← index #15182PR #4315
Off-topic · high · value 3.250
QUERY · ISSUE

libhydrogen error when trying to build mboot with packing enabled

openby saraverbeeckeopened 2024-06-01updated 2024-09-02
bugport-stm32

Port, board and/or hardware

stm32

MicroPython version

MicroPython v1.22-release

Reproduction

make BOARD=PYBV11

Expected behaviour

building mboot with packing enabled i.e. MBOOT_ENABLE_PACKING = 1

Observed behaviour

I get a couple of these lines:

../../../lib/libhydrogen/impl/random/Particle.h:8:1: note: previous definition of 'hydro_random_init' with type 'int(void)'
    8 | hydro_random_init(void)
      | ^~~~~~~~~~~~~~~~~

and I get a couple of these lines:

../../../lib/libhydrogen/impl/random/Particle.h:8:1: error: 'hydro_random_init' defined but not used [-Werror=unused-function]
    8 | hydro_random_init(void)
      | ^~~~~~~~~~~~~~~~~

Build outcome:

cc1: all warnings being treated as errors
make: *** [build-PYBV11/lib/libhydrogen/hydrogen.o] Error 1

The pyhy version that is installed is 0.0.9

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

CANDIDATE · PULL REQUEST

ports/stm32/mboot: Add missing include for irq.h

closedby IAmCoderopened 2018-11-21updated 2018-11-26

I was not able to build mboot. Received the following errors when building mboot for the PYB or STM32 boards, adding the include in the PR fixed it:

/ports/stm32/mboot$ make BOARD=PYBV11
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
CC ../../../ports/stm32/flashbdev.c
../../../ports/stm32/flashbdev.c: In function 'flash_bdev_ioctl':
../../../ports/stm32/flashbdev.c:225:32: error: implicit declaration of function 'raise_irq_pri' [-Werror=implicit-function-declaration]
             uint32_t basepri = raise_irq_pri(IRQ_PRI_FLASH); // prevent cache flushing and USB access
                                ^~~~~~~~~~~~~
../../../ports/stm32/flashbdev.c:225:46: error: 'IRQ_PRI_FLASH' undeclared (first use in this function); did you mean 'I2C_CR2_LAST'?
             uint32_t basepri = raise_irq_pri(IRQ_PRI_FLASH); // prevent cache flushing and USB access
                                              ^~~~~~~~~~~~~
                                              I2C_CR2_LAST
../../../ports/stm32/flashbdev.c:225:46: note: each undeclared identifier is reported only once for each function it appears in
../../../ports/stm32/flashbdev.c:232:13: error: implicit declaration of function 'restore_irq_pri' [-Werror=implicit-function-declaration]
             restore_irq_pri(basepri);
             ^~~~~~~~~~~~~~~
../../../ports/stm32/flashbdev.c: In function 'flash_bdev_writeblock':
../../../ports/stm32/flashbdev.c:364:38: error: 'IRQ_PRI_FLASH' undeclared (first use in this function); did you mean 'I2C_CR2_LAST'?
     uint32_t basepri = raise_irq_pri(IRQ_PRI_FLASH); // prevent cache flushing and USB access
                                      ^~~~~~~~~~~~~
                                      I2C_CR2_LAST
cc1: all warnings being treated as errors
Makefile:166: recipe for target 'build-PYBV11/ports/stm32/flashbdev.o' failed
make: *** [build-PYBV11/ports/stm32/flashbdev.o] Error 1

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied