How to run a C program with no OS on the Raspberry Pi?

前端 未结 4 1215
暖寄归人
暖寄归人 2020-12-12 11:21

I\'d like to experiment using the Raspberry Pi for some different low level embedded applications. The only problem is that, unlike the AVR and PIC microcontroller boards av

4条回答
  •  生来不讨喜
    2020-12-12 11:54

    https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/ is a great tutorial, and as they'll tell you the best quick and dirty way to run code on bare metal is to hijack a linux distro, to do that, just compile to kernel.img (with the appropriate architecture options) and use it to replace the existing one in the linux distro for just this section of the tutorial you can go to: https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/ok01.html#pitime

提交回复
热议问题