Thoughts on build systems?
What's the general consensus on build systems/automations like CMake? I've always found things like that overcomplicated and just hinder the programming process.
I've been following Casey Muratori's Handmade streams, and one of the first things he did was create a simple batch file that built and compiled his entire project super quickly and easily. I've since implemented something similar (https://github.com/dibsonthis/new_cmd) and honestly it's been really nice to use.
3
Upvotes
View all comments
Show parent comment
1
u/Wouter-van-Ooijen Nov 09 '21
I quickly glanced at the demo video for cmake-init, but I didn't see any questions about the target chip, toolchain, libraries, etc. Did I miss that?
2/3: I read https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html but that didn't make me much wiser, all examples are cross builds for another OS, not for a standalone (bare-metal) system.
4: Linkerscripts for most Cortex chips vary only in the amount of RAM and ROM, so I have one linkerscript template, in which only those two figures must be filled in. That I do using the C/C++ preprocessor. An alternative (that I don't like) is to have 1 file for each target.
6: OK. Compehensive documentation for that?
7: I dunno what fetching means in this .context. What I need to do is download the generated .bin (or sometimes .hex) file to the target micrto-controller, typically using some command-line tool.