Spent a few hours trying to get ceedling work with IAR (ARM).
project.yml is listed below, so no one else has to.
update the :path: and chose the correct .icf and .ddf file and should be ok.
PS: Existing ceedling gem has a limitation on :executable: (No spaces allowed), that's why the tool chain bin folder is appended to the path environmental variable at start of the .yml file.
---
# Notes:
# Sample project C code is not presently written to produce a release artifact.
# As such, release build options are disabled.
# This sample, therefore, only demonstrates running a collection of unit tests.
tools_root:
&tools_root 'C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.4\'
:environment:
- :path:
- C:/Program Files (x86)/IAR Systems/Embedded Workbench 6.4/arm/bin/
- C:/Program Files (x86)/IAR Systems/Embedded Workbench 6.4/common/bin/
- C:/mingw/bin/
- "#{ENV['PATH']}"
:project:
:use_exceptions: FALSE
:use_test_preprocessor: TRUE
:use_auxiliary_dependencies: TRUE
:build_root: build
# :release_build: TRUE
:test_file_prefix: Test
#:release_build:
# :output: TempSensor.out
# :use_assembly: FALSE
:extension:
:executable: .out
:paths:
:test:
- +:test/**
- -:test/support
:source:
- src/**
:support:
- test/support
:defines:
:common: &common_defines []
:test:
- *common_defines
- TEST
:test_preprocess:
- *common_defines
- TEST
:cmock:
:when_no_prototypes: :warn
:enforce_strict_ordering: TRUE
:plugins:
- :ignore
:treat_as:
uint8: HEX8
uint16: HEX16
uint32: UINT32
int8: INT8
bool: UINT8
#:tools:
# Ceedling defaults to using gcc for compiling, linking, etc.
# As [:tools] is blank, gcc will be used (so long as it's in your system path)
# See documentation to configure a given toolchain for use
:tools:
:test_compiler:
:executable:
iccarm.exe
:name: 'IAR Compiler'
:arguments:
- ${1} #source code input file (Ruby method call param list sub)
- -o ./${2} #object file output (Ruby method call param list sub)
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR
- -I*tools_root"/arm/inc/"
- -I*tools_root"/arm/inc/c"
- -D $: COLLECTION_DEFINES_TEST_AND_VENDOR
- -DIAR
- -DUNITY_SUPPORT_64
- -DUNITY_SUPPORT_TEST_CASES
- --dlib_config
- 'DLib_Config_Normal.h'
- --no_cse
- --no_unroll
- --no_inline
- --no_code_motion
- --no_tbaa
- --no_clustering
- --no_scheduling
- --debug
- --cpu_mode thumb
- --endian=little
- --cpu=Cortex-M3
- --interwork
- --warnings_are_errors
- --fpu=None
- --diag_suppress=Pa050
- --diag_suppress=Pe111
- -e
- -On
#- “{`args.exe -m acme.prj`}” #in-line ruby sub to shell out & build string of arguments
:test_linker:
:executable: ilinkarm
:name: 'IAR Linker'
:arguments:
- ${1} #list of object files to link (Ruby method call param list sub)
#- -l$-lib: #inline yaml array substitution to link in foo-lib and bar-lib
# - foo
# - bar
- -o ${2} #executable file output (Ruby method call param list sub)
- --config src/stm32f4xx_flash.icf
- --no_wrap_diagnostics
- --entry __iar_program_start
- --vfe
- --semihosting
- --redirect _Printf=_PrintfFull
- --redirect _Scanf=_ScanfFull
:test_fixture:
:executable:
"CSpyBat.exe"
:name:
'IAR cspy'
:stderr_redirect: :win #inform Ceedling what model of $stderr capture to use
:arguments:
- --silent "armproc.dll" "armsim2.dll"
- --plugin "armbat.dll"
- "${1}"
- --backend
- -B
- -p *tools_root"/arm/config/debugger/ST/iostm32f4xxx.ddf"
- --cpu=Cortex-M3
- -d sim
- 2>&1
:plugins:
:load_paths:
- vendor/ceedling/plugins
:enabled:
- stdout_pretty_tests_report
#- stdout_ide_tests_report
...