How 'correct' is verbose output for test_includes_preprocessor

241 views
Skip to first unread message

Michael Simpson

unread,
May 27, 2021, 9:06:04 AM5/27/21
to ThrowTheSwitch Forums
I'm currently trying to get Ceedling working using the IAR toolchain, and I've found previous posts that were very useful for that. However, I need to include definitions for test_file_preprocessor and test_includes_preprocessor and that's a bit of a challenge.
I have my project, and ran "ceedling verbosity[5] clobber test:all" (with gcc) to capture exactly what it's doing, but I'm stumped on understanding and translating this:

Generating include list for hub_diag.h...
Verbose: exec(): gcc.exe -E -MM -MG -I"C:/repos/GPSST-2026_NAVSYS_unit_test_framework/ed3-git/ED3_app/vendor/ceedling/vendor/unity/src" -I"C:/repos/GPSST-2026_NAVSYS_unit_test_framework/ed3-git/ED3_app/vendor/ceedling/vendor/cmock/src" -I"build/test/mocks" -I"tests" -I"tests/support" -I"source" -I"include" -I"../ED3_hw/CMSIS" -I"../ED3_hw/CMSIS/Include" -I"../ED3_hw/CMSIS/startup_iar" -I"../Micrium/uCOS-II/include" -I"../Platform/BSP/include" -I"../Platform/include" -DUNIT_TEST -DUNIT_TEST -DGNU_COMPILER "build/temp/_hub_diag.h"
> Shell executed command:
'gcc.exe -E -MM -MG -I"C:/repos/GPSST-2026_NAVSYS_unit_test_framework/ed3-git/ED3_app/vendor/ceedling/vendor/unity/src" -I"C:/repos/GPSST-2026_NAVSYS_unit_test_framework/ed3-git/ED3_app/vendor/ceedling/vendor/cmock/src" -I"build/test/mocks" -I"tests" -I"tests/support" -I"source" -I"include" -I"../ED3_hw/CMSIS" -I"../ED3_hw/CMSIS/Include" -I"../ED3_hw/CMSIS/startup_iar" -I"../Micrium/uCOS-II/include" -I"../Platform/BSP/include" -I"../Platform/include" -DUNIT_TEST -DUNIT_TEST -DGNU_COMPILER "build/temp/_hub_diag.h"'
> Produced output:
_hub_diag.o: build/temp/_hub_diag.h include/hub.h include/build_defs.h \
include/bmm.h include/icd153.h ../Platform/include/interrupt_irqn.h \
../ED3_hw/CMSIS/m2sxxx.h ../ED3_hw/CMSIS/Include/core_cm3.h \
../ED3_hw/CMSIS/Include/core_cmInstr.h \
../ED3_hw/CMSIS/Include/core_cmFunc.h @@@@hub.h \
../Platform/include/nvm_layout.h @@@@nvm_layout.h

I don't see an input file specified for the command, which I believe gcc requires, so I'm wondering if the logging code for ceedling might just be omitting it in the output? I've found that the "${1}" argument is "build/temp/_hub_diag.h", but that file doesn't exist.

Thanks,
   Mike

Michael Simpson

unread,
May 27, 2021, 9:28:16 PM5/27/21
to ThrowTheSwitch Forums
Update: I believe I have the tests_includes_preprocessor configured using the IAR compiler to generate the equivalent of what gcc was compiling, except for a new error: I'm getting a fatal error on "cannot open source file '@@@@unity.h'". This appears to be the same issue reported at https://github.com/ThrowTheSwitch/Ceedling/issues/86, and possibly https://github.com/ThrowTheSwitch/Ceedling/issues/159.
I'm guessing that the file names with the "@@@@" prefix are generated by ceedling at some point, and the compilation with gcc succeeds because the -MG flag tells it to not fail on missing header files, but I can't find a similar option flag for IAR. If anyone knows a workaround to make this work with IAR, I would really appreciate it!

Reply all
Reply to author
Forward
0 new messages