Not sure whether to report this but you can easily ignore it.
stable_18.2.x d9a22f363
ChibiOS/test/rt/source/test/rt_test_root.c: In function 'test_wait_threads':
ChibiOS/test/rt/source/test/rt_test_root.c:128:7: warning: implicit declaration of function 'chThdWait'; did you mean 'chThdExit'?
ChibiOS/test/rt/source/test/rt_test_sequence_010.c: In function 'rt_test_010_005_execute':
ChibiOS/test/rt/source/test/rt_test_sequence_010.c:447:7: warning: implicit declaration of function 'chThdWait'; did you mean 'chThdExit'?
compile warnings in tests Topic is solved
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: compile warnings in tests
Yes, I know chThdWait is correct.
Maybe the difference is because I'm on the stable_18.2.x branch?
I compiled test files when compiling my project. I included $(TESTSRC) into the list of C files by mistake.
The reason I have the warnings is that those two files do not include chthreads.h (which is mostly included through ch.h).
They include only hal.h. (which should not include chthreads.h? ... just guessing, I do not really know) and rt_test_root.h.
and rt_test_root.h has include tree is like this:
. ChibiOS/test/rt/source/test/rt_test_root.h
.. ChibiOS/test/lib/ch_test.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_001.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_002.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_003.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_004.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_005.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_006.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_007.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_008.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_009.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_010.h
The command line example is like this:
arm-none-eabi-gcc -c -mcpu=cortex-m4 -Og -ggdb -fomit-frame-pointer -falign-functions=16 -ffunction-sections -fdata-sections -fno-common -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wall -Wextra -Wundef -Wstrict-prototypes -Wa,-alms=build/lst/rt_test_sequence_010.lst -DCORTEX_USE_FPU=TRUE -DFW_BUILD -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/rt_test_sequence_010.o.d -mthumb -DTHUMB -I. -IChibiOS/os/license -IChibiOS/os/common/portability/GCC -IChibiOS/os/common/startup/ARMCMx/compilers/GCC -IChibiOS/os/common/startup/ARMCMx/devices/STM32F4xx -IChibiOS/os/common/ext/ARM/CMSIS/Core/Include -IChibiOS/os/common/ext/ST/STM32F4xx -IChibiOS/os/hal/include -IChibiOS/os/hal/ports/common/ARMCMx -IChibiOS/os/hal/ports/STM32/STM32F4xx -IChibiOS/os/hal/ports/STM32/LLD/ADCv2 -IChibiOS/os/hal/ports/STM32/LLD/CANv1 -IChibiOS/os/hal/ports/STM32/LLD/DACv1 -IChibiOS/os/hal/ports/STM32/LLD/DMAv2 -IChibiOS/os/hal/ports/STM32/LLD/EXTIv1 -IChibiOS/os/hal/ports/STM32/LLD/GPIOv2 -IChibiOS/os/hal/ports/STM32/LLD/I2Cv1 -IChibiOS/os/hal/ports/STM32/LLD/MACv1 -IChibiOS/os/hal/ports/STM32/LLD/OTGv1 -IChibiOS/os/hal/ports/STM32/LLD/QUADSPIv1 -IChibiOS/os/hal/ports/STM32/LLD/RTCv2 -IChibiOS/os/hal/ports/STM32/LLD/SPIv1 -IChibiOS/os/hal/ports/STM32/LLD/SDIOv1 -IChibiOS/os/hal/ports/STM32/LLD/TIMv1 -IChibiOS/os/hal/ports/STM32/LLD/USARTv1 -IChibiOS/os/hal/ports/STM32/LLD/xWDGv1 -IChibiOS/os/hal/osal/rt -IChibiOS/os/rt/include -IChibiOS/os/common/oslib/include -IChibiOS/os/common/ports/ARMCMx -IChibiOS/os/common/ports/ARMCMx/compilers/GCC -IChibiOS/test/lib -IChibiOS/test/rt/source/test -IChibiOS/test/oslib/source/test -Ihw -H ChibiOS/test/rt/source/test/rt_test_sequence_010.c -o build/obj/rt_test_sequence_010.o
Maybe the difference is because I'm on the stable_18.2.x branch?
I compiled test files when compiling my project. I included $(TESTSRC) into the list of C files by mistake.
The reason I have the warnings is that those two files do not include chthreads.h (which is mostly included through ch.h).
They include only hal.h. (which should not include chthreads.h? ... just guessing, I do not really know) and rt_test_root.h.
and rt_test_root.h has include tree is like this:
. ChibiOS/test/rt/source/test/rt_test_root.h
.. ChibiOS/test/lib/ch_test.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_001.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_002.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_003.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_004.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_005.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_006.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_007.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_008.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_009.h
.. ChibiOS/test/rt/source/test/rt_test_sequence_010.h
The command line example is like this:
arm-none-eabi-gcc -c -mcpu=cortex-m4 -Og -ggdb -fomit-frame-pointer -falign-functions=16 -ffunction-sections -fdata-sections -fno-common -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wall -Wextra -Wundef -Wstrict-prototypes -Wa,-alms=build/lst/rt_test_sequence_010.lst -DCORTEX_USE_FPU=TRUE -DFW_BUILD -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/rt_test_sequence_010.o.d -mthumb -DTHUMB -I. -IChibiOS/os/license -IChibiOS/os/common/portability/GCC -IChibiOS/os/common/startup/ARMCMx/compilers/GCC -IChibiOS/os/common/startup/ARMCMx/devices/STM32F4xx -IChibiOS/os/common/ext/ARM/CMSIS/Core/Include -IChibiOS/os/common/ext/ST/STM32F4xx -IChibiOS/os/hal/include -IChibiOS/os/hal/ports/common/ARMCMx -IChibiOS/os/hal/ports/STM32/STM32F4xx -IChibiOS/os/hal/ports/STM32/LLD/ADCv2 -IChibiOS/os/hal/ports/STM32/LLD/CANv1 -IChibiOS/os/hal/ports/STM32/LLD/DACv1 -IChibiOS/os/hal/ports/STM32/LLD/DMAv2 -IChibiOS/os/hal/ports/STM32/LLD/EXTIv1 -IChibiOS/os/hal/ports/STM32/LLD/GPIOv2 -IChibiOS/os/hal/ports/STM32/LLD/I2Cv1 -IChibiOS/os/hal/ports/STM32/LLD/MACv1 -IChibiOS/os/hal/ports/STM32/LLD/OTGv1 -IChibiOS/os/hal/ports/STM32/LLD/QUADSPIv1 -IChibiOS/os/hal/ports/STM32/LLD/RTCv2 -IChibiOS/os/hal/ports/STM32/LLD/SPIv1 -IChibiOS/os/hal/ports/STM32/LLD/SDIOv1 -IChibiOS/os/hal/ports/STM32/LLD/TIMv1 -IChibiOS/os/hal/ports/STM32/LLD/USARTv1 -IChibiOS/os/hal/ports/STM32/LLD/xWDGv1 -IChibiOS/os/hal/osal/rt -IChibiOS/os/rt/include -IChibiOS/os/common/oslib/include -IChibiOS/os/common/ports/ARMCMx -IChibiOS/os/common/ports/ARMCMx/compilers/GCC -IChibiOS/test/lib -IChibiOS/test/rt/source/test -IChibiOS/test/oslib/source/test -Ihw -H ChibiOS/test/rt/source/test/rt_test_sequence_010.c -o build/obj/rt_test_sequence_010.o
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: compile warnings in tests
18.2.x is compiling demos correctly here. Which demo are you compiling?
Giovanni
Giovanni
Re: compile warnings in tests
I was not compiling a demo but my application which included test files too.
That explains why I see it and you do not. There is a difference between my chconfg.h and demo's chconf.h. I have setting CH_CFG_USE_WAITEXIT set to FALSE while the demo has it set to TRUE.
It confused me that some demo source files (e.g. rt_test_sequence_010.c) call chThdWait but do not include ch.h directly. They include hal.h which (surprisingly to me) includes all of ch.h. I expected hal to be independent from the whole ChibiOS interface. Here is the relevant part of the include tree:
rt_test_sequence_010.c
. ChibiOS/os/hal/include/hal.h
.. ChibiOS/os/hal/osal/rt/osal.h
.. ChibiOS/os/rt/include/ch.h
I expected ch.h and hal.h to include some common stuff but not one of them including all of the the other.
Sorry for confusion.
That explains why I see it and you do not. There is a difference between my chconfg.h and demo's chconf.h. I have setting CH_CFG_USE_WAITEXIT set to FALSE while the demo has it set to TRUE.
It confused me that some demo source files (e.g. rt_test_sequence_010.c) call chThdWait but do not include ch.h directly. They include hal.h which (surprisingly to me) includes all of ch.h. I expected hal to be independent from the whole ChibiOS interface. Here is the relevant part of the include tree:
rt_test_sequence_010.c
. ChibiOS/os/hal/include/hal.h
.. ChibiOS/os/hal/osal/rt/osal.h
.. ChibiOS/os/rt/include/ch.h
I expected ch.h and hal.h to include some common stuff but not one of them including all of the the other.
Sorry for confusion.
Who is online
Users browsing this forum: No registered users and 13 guests