Building the demos/STM32/RT-STM32F429-DISCOVERY works OK when enabling CH_DBG_ENABLE_STACK_CHECK.
No, I'm not specifying PORT_ENABLE_GUARD_PAGES. It is FALSE per default.
Same error as mine when building MapleMini demo:
Code: Select all
$ chibios/demos/STM32/RT-STM32F103-MAPLEMINI $ make
Compiler Options
arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -DUSE_MAPLEMINI_BOOTLOADER= -ffunction-sections -fdata-sections -fno-common -flto -Wall -Wextra -Wundef -Wstrict-prototypes -Wa,-alms=./build/lst/ -DCORTEX_USE_FPU=FALSE -MD -MP -MF ./.dep/build.d -I. -I./cfg -I../../../os/license -I../../../os/common/portability/GCC -I../../../os/common/startup/ARMCMx/compilers/GCC -I../../../os/common/startup/ARMCMx/devices/STM32F1xx -I../../../os/common/ext/ARM/CMSIS/Core/Include -I../../../os/common/ext/ST/STM32F1xx -I../../../os/hal/include -I../../../os/hal/ports/common/ARMCMx -I../../../os/hal/ports/STM32/STM32F1xx -I../../../os/hal/ports/STM32/LLD/CANv1 -I../../../os/hal/ports/STM32/LLD/DACv1 -I../../../os/hal/ports/STM32/LLD/DMAv1 -I../../../os/hal/ports/STM32/LLD/GPIOv1 -I../../../os/hal/ports/STM32/LLD/I2Cv1 -I../../../os/hal/ports/STM32/LLD/RTCv1 -I../../../os/hal/ports/STM32/LLD/SDIOv1 -I../../../os/hal/ports/STM32/LLD/SPIv1 -I../../../os/hal/ports/STM32/LLD/TIMv1 -I../../../os/hal/ports/STM32/LLD/USARTv1 -I../../../os/hal/ports/STM32/LLD/USBv1 -I../../../os/hal/ports/STM32/LLD/xWDGv1 -I../../../os/hal/boards/MAPLEMINI_STM32_F103 -I../../../os/hal/osal/rt-nil -I../../../os/rt/include -I../../../os/oslib/include -I../../../os/common/ports/ARMCMx -I../../../os/common/ports/ARMCMx/compilers/GCC -I./source/ -I../../../os/hal/lib/streams -I../../../os/various/shell -I../../../test/lib -I../../../test/rt/source/test -I../../../test/oslib/source/test main.c -o main.o
Compiling crt0_v7m.S
Compiling vectors.S
Compiling chcoreasm_v7m.S
Compiling crt1.c
Compiling hal.c
Compiling hal_st.c
Compiling hal_buffers.c
Compiling hal_queues.c
Compiling hal_flash.c
Compiling hal_mmcsd.c
Compiling hal_pal.c
Compiling hal_serial_usb.c
Compiling hal_usb.c
Compiling nvic.c
Compiling stm32_isr.c
Compiling hal_lld.c
Compiling hal_efl_lld.c
Compiling stm32_dma.c
Compiling hal_pal_lld.c
Compiling hal_st_lld.c
Compiling hal_usb_lld.c
Compiling board.c
Compiling osal.c
Compiling chsys.c
Compiling chdebug.c
Compiling chtrace.c
Compiling chvt.c
Compiling chschd.c
Compiling chthreads.c
Compiling chregistry.c
Compiling chsem.c
Compiling chmtx.c
Compiling chcond.c
Compiling chevents.c
Compiling chmsg.c
Compiling chdynamic.c
Compiling chmboxes.c
Compiling chmemcore.c
Compiling chmemheaps.c
Compiling chmempools.c
Compiling chpipes.c
Compiling chfactory.c
Compiling chcore.c
Compiling chcore_v7m.c
In file included from ../../../os/common/ports/ARMCMx/chcore.h:195,
from ../../../os/rt/include/ch.h:110,
from ../../../os/common/ports/ARMCMx/chcore_v7m.c:28:
../../../os/common/ports/ARMCMx/chcore_v7m.c: In function '_port_set_region':
../../../os/common/ports/ARMCMx/mpu.h:209:3: error: 'MPU' undeclared (first use in this function); did you mean 'MPU_H'?
MPU->RNR = ((uint32_t)region); \
^~~
../../../os/common/ports/ARMCMx/chcore_v7m.c:127:3: note: in expansion of macro 'mpuSetRegionAddress'
mpuSetRegionAddress(PORT_USE_MPU_REGION,
^~~~~~~~~~~~~~~~~~~
../../../os/common/ports/ARMCMx/mpu.h:209:3: note: each undeclared identifier is reported only once for each function it appears in
MPU->RNR = ((uint32_t)region); \
^~~
../../../os/common/ports/ARMCMx/chcore_v7m.c:127:3: note: in expansion of macro 'mpuSetRegionAddress'
mpuSetRegionAddress(PORT_USE_MPU_REGION,
^~~~~~~~~~~~~~~~~~~
make: *** [build/obj/chcore_v7m.o] Error 1