3 ms·
You can write ordinary C code to run on them. You just need a separate compiler/linker/etc. because they have a different CPU architecture than your computer. F
by embedawayz 6y ago
You can write ordinary C code to run on them. You just need a separate compiler/linker/etc. because they have a different CPU architecture than your computer. For an ARM Cortex-M chip, you can use the `arm-none-eabi` GNU toolchain:
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads https://developer.arm.com/tools-and-software/open-source-sof...
But when you write a program for a microcontroller, you don't have an OS kernel, so your code needs to include drivers for anything that you want to communicate with.
It's a little outdated, but I like this introduction to STM8 chips (which this article also mentions) as a quick crash course on embedded C:
https://lujji.github.io/blog/bare-metal-programming-stm8/ https://lujji.github.io/blog/bare-metal-programming-stm8/
- nerfhammer 6y agoterm is "cross-compiler" https://en.wikipedia.org/wiki/Cross_compiler https://en.wikipedia.org/wiki/Cross_compiler