Hello,
Just made the test:
- Dowload ChibiOS_18_2_1
- Unzip ChibiOS
- Go to demo/STM32/
- Build STM32F303-DISCOVERY to see that all is rigth
- Copy STM32F303-DISCOVERY to test
- Go to test and clean test
- Replace the main.c by your main.c
- Build the test
Then here is the error that I have:
Code: Select all
Compiler Options
arm-none-eabi-gcc -c -mcpu=cortex-m4 -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -ffunction-sections -fdata-sections -fno-common -flto -Wall -Wextra -Wundef -Wstrict-prototypes -Wa,-alms=build/lst/ -DCORTEX_USE_FPU=FALSE -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/build.d -I. -I../../../os/license -I../../../os/common/portability/GCC -I../../../os/common/startup/ARMCMx/compilers/GCC -I../../../os/common/startup/ARMCMx/devices/STM32F3xx -I../../../os/common/ext/ARM/CMSIS/Core/Include -I../../../os/common/ext/ST/STM32F3xx -I../../../os/hal/include -I../../../os/hal/ports/common/ARMCMx -I../../../os/hal/ports/STM32/STM32F3xx -I../../../os/hal/ports/STM32/LLD/ADCv3 -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/EXTIv1 -I../../../os/hal/ports/STM32/LLD/GPIOv2 -I../../../os/hal/ports/STM32/LLD/I2Cv2 -I../../../os/hal/ports/STM32/LLD/RTCv2 -I../../../os/hal/ports/STM32/LLD/SPIv2 -I../../../os/hal/ports/STM32/LLD/TIMv1 -I../../../os/hal/ports/STM32/LLD/USARTv2 -I../../../os/hal/ports/STM32/LLD/USBv1 -I../../../os/hal/ports/STM32/LLD/xWDGv1 -I../../../os/hal/boards/ST_STM32F3_DISCOVERY -I../../../os/hal/osal/rt -I../../../os/rt/include -I../../../os/common/oslib/include -I../../../os/common/ports/ARMCMx -I../../../os/common/ports/ARMCMx/compilers/GCC -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_mmcsd.c
Compiling hal_pal.c
Compiling hal_serial.c
Compiling nvic.c
Compiling stm32_isr.c
Compiling hal_lld.c
Compiling stm32_dma.c
Compiling hal_pal_lld.c
Compiling hal_st_lld.c
Compiling hal_serial_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 chtm.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 chheap.c
Compiling chmempools.c
Compiling chfactory.c
Compiling chcore.c
Compiling chcore_v7m.c
Compiling ch_test.c
Compiling rt_test_root.c
Compiling rt_test_sequence_001.c
Compiling rt_test_sequence_002.c
Compiling rt_test_sequence_003.c
Compiling rt_test_sequence_004.c
Compiling rt_test_sequence_005.c
Compiling rt_test_sequence_006.c
Compiling rt_test_sequence_007.c
Compiling rt_test_sequence_008.c
Compiling rt_test_sequence_009.c
Compiling rt_test_sequence_010.c
Compiling oslib_test_root.c
Compiling oslib_test_sequence_001.c
Compiling oslib_test_sequence_002.c
Compiling oslib_test_sequence_003.c
Compiling oslib_test_sequence_004.c
Compiling main.c
main.c:22:18: fatal error: test.h: No such file or directory
compilation terminated.
../../../os/common/startup/ARMCMx/compilers/GCC/rules.mk:234 : la recette pour la cible « build/obj/main.o » a échouée
make: *** [build/obj/main.o] Erreur 1
It is not the same that you have.
So please try to follow carefuly the step to reach that point then you have to resolve some conflicts.
I notice that your main.c may be too old, I' m not sure that your need to include:
Code: Select all
#include "spi.h"
#include "i2c.h"
#include "usbcfg.h"
They are already available you just need to enable them in halconf.h file.
I hope that help