feat: ceedling cross compile

This commit is contained in:
cscherr 2025-07-11 10:39:53 +02:00
parent e8d26dd1a4
commit bad5730a8d
Signed by: cscherrNT
GPG key ID: 8E2B45BC51A27EA7
2 changed files with 37 additions and 16 deletions

View file

@ -3,3 +3,18 @@
This subproject contains all C Code for the benchmarking. It is built with This subproject contains all C Code for the benchmarking. It is built with
[ceedling](https://www.throwtheswitch.org/ceedling), a more modern build tool [ceedling](https://www.throwtheswitch.org/ceedling), a more modern build tool
for C projects that also integrates well with the Unity framework. for C projects that also integrates well with the Unity framework.
## Compiler
To compile for STM32, you need to crosscompile
```
# apt install binutils-arm-none-eabi gcc-arm-none-eabi
```
Then, use your tool with an `arm-none-eabi-` prefix: `arm-none-eabi-gcc`. This
project has been configured to use `arm-none-eabi-gcc` to compile modules and to
"link" the object files into a static library with `arm-none-eabi-ar`.
The unit tests will be compiled with `gcc` to be ran on the host computer, not
on the STM32.

View file

@ -340,7 +340,7 @@
# TOOLCHAIN CONFIGURATION # TOOLCHAIN CONFIGURATION
################################################################ ################################################################
#:tools: :tools:
# Ceedling defaults to using gcc for compiling, linking, etc. # 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) # 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 # See documentation to configure a given toolchain for use
@ -380,21 +380,27 @@
# :arguments: [] # :arguments: []
# :name: # :name:
# :optional: FALSE # :optional: FALSE
# :release_compiler: :release_compiler:
# :executable: :executable: arm-none-eabi-gcc
# :arguments: [] :arguments:
# :name: - "-g"
# :optional: FALSE - "-Wall"
# :release_linker: - "-c"
# :executable: - "${1}"
# :arguments: [] - "-o"
# :name: - "${2}"
# :optional: FALSE :optional: FALSE
# :release_assembler: :release_linker:
# :executable: :executable: arm-none-eabi-ar
# :arguments: [] :arguments:
# :name: - "-rcs"
# :optional: FALSE - "${2}"
- "${1}"
:optional: FALSE
# :release_assembler:
# :executable: arm-none-eabi-as
# :arguments: ["$@"]
# :optional: FALSE
# :release_dependencies_generator: # :release_dependencies_generator:
# :executable: # :executable:
# :arguments: [] # :arguments: []