nucleo-l053r8-benches/crates/algorithms/algorithms-c
2025-07-17 18:00:53 +02:00
..
src fix: sha2 works 2025-07-17 18:00:53 +02:00
test feat: half working sha2 2025-07-17 17:14:11 +02:00
.clangd test: test algorithms-c 2025-07-11 11:16:51 +02:00
.gitignore refactor: use ceedling as c build system 2025-07-10 17:31:22 +02:00
compile_flags.txt feat: half working sha2 2025-07-17 17:14:11 +02:00
project.yml feat: half working sha2 2025-07-17 17:14:11 +02:00
README.md docs: why it didnt work without -march 2025-07-14 15:52:00 +02:00

Algorithms-c

This subproject contains all C Code for the benchmarking. It is built with 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 the compiler specified in $CC to compile modules and $AR to "link" the object files (this should be ar for a static library like this).

# compile for STM32
CC=arm-none-eabi-gcc AR=arm-none-eabi-ar ceedling release
# compile for this computer
CC=gcc AR=ar ceedling release

It is also critically important to define the -march=ARCH option when using arm-none-eabi-gcc, since the compiler will otherwise just assume a target architecture. In this case, it needs to be set to armv6-m, since the MPU is a cortex-M0+. This MPU does only support the thumb instructionset, not the ARM32 set.