Closed DanSop closed 3 months ago
That tools section is missing test_compiler
and test_linker
fields, so I would actually assume your native GCC is trying to compile these files for x86x64.
Also, I assume you want to run this on target or in simulator correct?
I am planning on running the test build on a simulator (likely qemu). I am only interested in the test build and not the release build at the moment.
Ah I forgot about those sections... I added the following:
:tools:
:test_compiler:
:executable: arm-none-eabi-gcc
:arguments:
- ${1}
- -DTARGET
- -mcpu=cortex-m7
- -mthumb
- -mfloat-abi=hard
- -g
- -I../
- -I"$": COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE
- -Wall
- -Os
- -c
- -o ${2}
:test_linker:
:executable: arm-none-eabi-gcc
:arguments:
- ${1}
- -DTARGET
- -I../
- -I"$": COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE
- -mcpu=cortex-m7
- -mthumb
- -mfloat-abi=hard
- -Wl,-Map="stmBase.map"
- -g
- -T"../STM32H743IIKX_FLASH.ld"
- --specs=nosys.specs
- -o ${2}.elf
:test_assembler:
:executable: arm-none-eabi-gcc
:arguments:
- ${1}
- -DTARGET
- -I"$": COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE
- -mcpu=cortex-m7
- -mthumb
- -mfloat-abi=hard
- -g
- -Wall
- -Os
- -c
- -o ${2}
Unfortunately when I run test:all I get the following error:
Generating include list for arm_math.h...
Creating mock for arm_math...
Generating runner for test_DSP.c...
Compiling test_DSP_runner.c...
build/test/runners/test_DSP_runner.c:4:10: fatal error: unity.h: No such file or directory
4 | #include "unity.h"
| ^~~~~~~~~
Seems that this unity dependency is no longer being met. This unity include seems to work just fine with GCC. I installed ceedling from gem install ceedling
therefore I assume that these files are already in my system path?
Is my only option here to manually include the unity source files in this ceedling build?
You are missing some includes in the test_compiler
section, which by default structure are included, but because you overwrite that you need to ensure they are also part of it. But from the top of my head I do not remember which (sorry). You also have COLLECTION_PATHS_RELEASE_TOOLCHAIN_INCLUDE
, while I after quick search of my projects have:
- -D$: COLLECTION_DEFINES_TEST_AND_VENDOR
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR
Ah thank you that worked! Very much appreciated I believe I can get the rest of it working now.
I'm encountering a build error in my Ceedling project related to ARM Cortex-M assembly instructions. The error message is as follows:
Drivers/CMSIS/Include/cmsis_gcc.h:209: Error: no such instruction: cpsid i
This error is followed by many more of the same type. I have the following settings for my tools section of my project.yml file:
I am wondering how you deal with the ARM-specific instructions files for unit testing code that has dependencies on them (for example disable_irq).
Any help would be appreciated.