I am trying to implement Unity Ceedling test framework with IAR compiler. but the Ceedling asks for a .out file of the test but IAR produces a project out file only. How to solve this issue or create a out file for the test file with IAR.
In my tools section I give the
:test_compiler:
:executable: IarBuild.exe
:name: 'IAR test compiler'
:arguments:
- path to the project.ewp
- '-build' # Command to perform a build
- 'Build configuration name ' # The build configuration name
// This produces a .out file from this command. tried using IAR commands but showed error while running so removed it.
:test_linker:
:executable: ilinkarm.exe
:name: 'IAR test linker'
:arguments:
- --vfe #Very Fast Executable mode.
- --redirect _Printf=_PrintfFull
- --redirect _Scanf=_ScanfFull
- --config "path to generic_cortex.icf"
- --map "path to project.map"
# Additional flags can be added here if needed in the future
# - -o "path to the project.out folder"
:test_fixture:
:executable: CSpyBat.exe
:name: 'CSpyBat test runner'
:arguments:
- --backend
- simulator
- --plugin
- '"path to armproc.dll"'
- '"path to jlinkarm.dll"'
- '"path to armsim2.dll"'
- --plugin "path to armbat.dll"
Error message : Error[Li005]: no definition for "__iar_program_start" [program entry] Fatal error[Li010]: no modules to link Fatal error detected, aborting. ERROR: Shell command failed.
Shell executed command: 'ilinkarm.exe --vfe --redirect _Printf=_PrintfFull --redirect _Scanf=_ScanfFull --config "generic_cortex.icf" --map "project_name.map"' Produced output: IAR ELF Linker V8.50.9.278/W32 for ARM Copyright 2007-2020 IAR Systems AB. And exited with status: [3].
NOTICE: If the linker reports missing symbols, the following may be to blame:
- Test lacks #include statements corresponding to needed source files.
- Project search paths do not contain source files corresponding to #include statements in the test.
- Test does not #include needed mocks.
rake aborted!
C:/Ruby27-x64/bin/ceedling:23:in load' C:/Ruby27-x64/bin/ceedling:23:in
'
Caused by:
ShellExecutionException: ShellExecutionException
C:/Ruby27-x64/bin/ceedling:23:in load' C:/Ruby27-x64/bin/ceedling:23:in
'
Tasks: TOP => build/test/results/test_file.pass => build/test/out/test_file.out
(See full trace by running task with --trace)
ERROR: Ceedling Failed
Consider changing :test_compiler: to iccarm.exe (adjusting arguments accordingly). IARBuild is the command-line build tool not compiler.
Add the following to your project.yml if not already present:
Also here is an example Ceedling configuration using the IAR C/Cpp Compiler for RX: https://stackoverflow.com/a/77493081/22832892.