feat: ceedling cross compile
This commit is contained in:
parent
e8d26dd1a4
commit
bad5730a8d
2 changed files with 37 additions and 16 deletions
|
@ -3,3 +3,18 @@
|
|||
This subproject contains all C Code for the benchmarking. It is built with
|
||||
[ceedling](https://www.throwtheswitch.org/ceedling), a more modern build tool
|
||||
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.
|
||||
|
|
|
@ -340,7 +340,7 @@
|
|||
# TOOLCHAIN CONFIGURATION
|
||||
################################################################
|
||||
|
||||
#:tools:
|
||||
: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
|
||||
|
@ -380,21 +380,27 @@
|
|||
# :arguments: []
|
||||
# :name:
|
||||
# :optional: FALSE
|
||||
# :release_compiler:
|
||||
# :executable:
|
||||
# :arguments: []
|
||||
# :name:
|
||||
# :optional: FALSE
|
||||
# :release_linker:
|
||||
# :executable:
|
||||
# :arguments: []
|
||||
# :name:
|
||||
# :optional: FALSE
|
||||
# :release_assembler:
|
||||
# :executable:
|
||||
# :arguments: []
|
||||
# :name:
|
||||
# :optional: FALSE
|
||||
:release_compiler:
|
||||
:executable: arm-none-eabi-gcc
|
||||
:arguments:
|
||||
- "-g"
|
||||
- "-Wall"
|
||||
- "-c"
|
||||
- "${1}"
|
||||
- "-o"
|
||||
- "${2}"
|
||||
:optional: FALSE
|
||||
:release_linker:
|
||||
:executable: arm-none-eabi-ar
|
||||
:arguments:
|
||||
- "-rcs"
|
||||
- "${2}"
|
||||
- "${1}"
|
||||
:optional: FALSE
|
||||
# :release_assembler:
|
||||
# :executable: arm-none-eabi-as
|
||||
# :arguments: ["$@"]
|
||||
# :optional: FALSE
|
||||
# :release_dependencies_generator:
|
||||
# :executable:
|
||||
# :arguments: []
|
||||
|
|
Loading…
Add table
Reference in a new issue