Rennorbs experiments to port the winidea setup for compiling to cortex-m4 to a cross platform cmake project
current issues:
- lib/gfx.c does not properly link against sprintf because of missing __aeabi_f2d. It's not the 'float literals are doubles by default' issue, its something else. Enable -Wdouble-promotion to see that it's a different issue.
The documentation for my compiler (
share/doc/gcc-arm-none-eabi/html/libc/siprintf.html
) specifies that only integer format specifiers are supported by this version. However, seeing as this function isn't currently used currently used (in the main project) it should just be save to comment out the call to sprintf. - flashing target. ... yea, kindof important part
Compilation:
- gcc-arm-none-eabi
- cmake
- some generator, could be msvc, Ninja or something else (tested with Ninja)
- an "installation" of the PDL (PeripheralDriverLibrary) from Cypress
Flashing/Debugging: (WIP)
- CmsisDapDriver (CmsisDapDriverInstallerV14.exe), might also work with different versions.
- DapLink might also be an option
- clone the project:
git clone [email protected]:SaculRennorb/cmake-cortex-m4.git
- move to the project root:
cd cmake-cortex-m4
- configure (this specific command requires ninja):
cmake -G Ninja -B build
. add-DBOARD=<BOARD>
and/or-DCONFIGURATION=<release|debug>
to configure those parameters - build:
cmake --build build --target <BOARD>_<CONFIG>
outputs will be inbuild/bin
- flash (TODO)