Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is cmake appropriate for bare-metal embedded systems?

I've been seeing more embedded developers using cmake as a build configuration tool for their bare-metal (i.e. no operating system) embedded systems. But while cmake is great for projects that will run natively on various host architectures, what value does it add over a Makefile in an embedded system, where there is no operating system and the target processor does not change?

EDIT: What advantages does CMake provide over a simple Makefile in cases where the code is designed specifically for one embedded processor / board, which is running bare-metal (i.e. no operating system, at least not a POSIX one)?

like image 676
thinkski Avatar asked Oct 27 '13 01:10

thinkski


1 Answers

I have used Cmake for cross-compiling to embedded systems: it's a very useful tool if you are cross-compilig as well as for native development. Here are some advantages i appreciate for this:

  • It's very easy to use and to program
  • Powerful but easy to learn script-language
  • Cmake supports two kinds of cross-compiling:
    • Specify compiler(s) and you're done
    • Writing toolchain files which contains settings about your target system, Cpu, Compiler etc. With those you can support many different target systems without chaning anything - just write a new toolchain file with required settings.
  • Commandline and GUI available
  • Open-Source
  • Good documentation
  • Supported by many IDE's

There are many tools around, but cmake is perfect if you need an easy to use, but very powerful one.

Ps. Can you describe your scenario a bit more?

like image 149
ollo Avatar answered Sep 20 '22 17:09

ollo