News for hackers. Stuff that matters.
Re:The amazing $1 microcontroller (2017) by embedawayz on Thursday September 10, 2020 @01:10AM (#24429079)
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-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/

Re:The amazing $1 microcontroller (2017) by nerfhammer on Thursday September 10, 2020 @01:38AM (#24429209)