Conversation
d9da2ab to
95186da
Compare
Make them a bit more generic
- Add openocd_<target>: runs openocd for the target - Add openocd_flash_<target>: flashes the target using openocd. It works with both an already running openocd instance as well as launching its own one. Uses a helper tool that requires python. - Add openocd_cfg_<target>: generates openocd config for target. Used for generating an openocd config automatically when launching a debug session from an IDE.
Used for IDE-based debugging
FLYWOOF411, FLYWOOF72DUAL, FOXEERF722V2 and IFLIGHTF4_SUCCEXD
WARNIGNS_AS_ERRORS, DEBUG_HARDFAULTS and SEMIHOSTING can now be turned on/off
- Rename function for target name definitions to include full MCU names, so we can support multiple size variants of the same MCU cleanly - Add cmake targets for .bin/.hex files from .elf files - Add targets for bootloader generation - Add targets for combining the bootloader with the main firmware
Build didn't fail with -Os or -O2 due to dead code elimination. Otherwise there were some undefined symbols when USE_OSD or USE_RX_NRF24 were not defined.
Add a SKIP_RELEASES target argument
When no alternative toolchain is provided, we explicitely include the src/tests directory, so the check target (which builds and runs tests) is available from a main source build without having to build specifically the src/tests directory
This way the git revision is automatically regenerated when the revision changes without having to re-run cmake's configuration step.
|
On buster again, the generated Makefile advertises Fails more gracefully on Arch / cmake 3.18 In both cases, I'd only made the MATEKF405 target, not the _bl variant. |
Also, use the proper pathlist separator on Windows
|
@stronnag Thanks for the heads up! I've added a workaround for removing files while using versions earlier than 3.17 (where |
|
LGTM. Built on buster with and without distro compiler installed, clean_TARGET is working correctly with cmake 3.13 and 3.18 (Arch). |
- Make sure all the new files are terminated with newlines - Fix typos
|
@fiam please take a look at the new |
RAM no longer fits
The MCU preprocessor defines are slightly different, so these needed some small tweaking since the page layout selection is MCU-dependant.
While depending in the output files of other targets work fine with cmake 3.17+ and/or ninja, it fails with cmake 3.14 and make. This way works fine with all the combinations of cmake+backend we do care about.
We had several target.mk_ files in order to disable them. With cmake, those targets are fully defined but we just skip them from CI builds and releases, so these old files can be safely deleted.
|
FYI, clean inconsistency "don't be silly" is an appropriate response. |
Removing CMAKE_CURRENT_BINARY_DIR directly is problematic, since it also removes files generated by cmake and can cause errors that will require regenerating the build system files. Instead, call <backend> clean (e.g. make clean or ninja clean) in CMAKE_CURRENT_BINARY_DIR. This ensures all the files generated by the build system are removed, but any files generated as a part of cmake's configuration step are preserved.
|
@stronnag You've raised a good point. The |
Still in progress, only F411 targets have been converted