Replies: 2 comments
-
For future visitors, if can be of any help… I ended up using the gcc compiler instead of the arm one. I removed the HAL drivers and the rest of the source files from the :source: includes. Then I created a separate .h and .c with the code I wanted to test. Then I had to mock up a few included headers with the minimum required functions and variables to be able to build the test code. The functions and the variables were in some cases adjusted/mocked to make it work. Good luck… |
Beta Was this translation helpful? Give feedback.
-
Hello. But I have another question in mind, when contributing to these discussion. In my case I have a jlink gdbserver installed on the system which is able to write the compiled file, but i don't know how ceedling can use the gdb server. (For debug purpose on my system I was able to get the mingw gdb server to run, but i want to use non debug mode in ceedling) Regards Daimonion |
Beta Was this translation helpful? Give feedback.
-
I am trying to create a first Unit Test with Ceedling/Unity/CMoke for my STM32CubeIDE project.
The project has started building but getting an error:
Linking test_functions_STM32G474RB.out... /Applications/STMicroelectronics/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.macos64_1.0.0.202111181127/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: warning: cannot find entry symbol Reset_Handler; defaulting to 0000000008000000 Running test_functions_STM32G474RB.out...
ERROR: Test executable "test_functions_STM32G474RB.out" failed.
Produced no final test result counts in $stdout: sh: build/test/out/test_functions_STM32G474RB.out: No such file or directory And exited with status: [0] (count of failed tests). This is often a symptom of a bad memory access in source or test code.
rake aborted!
This is the project.yml file:
:project:
:use_exceptions: FALSE
:use_test_preprocessor: TRUE
:use_auxiliary_dependencies: TRUE
:build_root: build
:release_build: TRUE
:test_file_prefix: test_
:which_ceedling: gem
:ceedling_version: 0.31.1
:default_tasks:
#:test_build:
:use_assembly: TRUE
#:release_build:
:output: MyApp.out
:use_assembly: FALSE
:environment:
:extension:
:executable: .out
:paths:
:test:
:source:
:support:
:libraries: []
:defines:
:common: &common_defines []
:test:
:test_preprocess:
:cmock:
:mock_prefix: mock_
:when_no_prototypes: :warn
:enforce_strict_ordering: TRUE
:plugins:
:treat_as:
uint8: HEX8
uint16: HEX16
uint32: UINT32
int8: INT8
bool: UINT8
:includes:
:treat_externs: :include
:gcov:
:reports:
:gcovr:
:html_medium_threshold: 75
:html_high_threshold: 90
:tools:
:test_compiler:
:executable: arm-none-eabi-gcc
:arguments:
:test_linker:
:executable: arm-none-eabi-gcc
:arguments:
LIBRARIES
These libraries are automatically injected into the build process. Those specified as
common will be used in all types of builds. Otherwise, libraries can be injected in just
tests or releases. These options are MERGED with the options in supplemental yaml files.
:libraries:
:placement: :end
:flag: "-l${1}"
:path_flag: "-L ${1}"
:system: [] # for example, you might list 'm' to grab the math library
:test: []
:release: []
:plugins:
:load_paths:
:enabled:
...
I have tried to add the .S file on the compiler/linker flags. But, either I am doing it wrongly or it doesn't work.
I would really appreciate that somebody with more experience than me could point what I am doing wrong.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions