9

Is there a way to use the Raspberry Pi like an Arduino? That is, without an operating system?

Just connect it to the USB of your computer and download code onto it, and the next time the Raspberry Pi boots, it runs that program (infinitely). Just as an Arduino would.

When I googled how to use the Raspberry Pi like an Arduino, all I get is using the Raspberry Pi's GPIO and not something what I'am looking for.

What I finally want to do is develop my own bootloader and a bare bones OS using assembly language, C and ARMGCC. So I need a way of burning the code onto my board.

How can I do this?

2 Answers 2

9

Look at the lesson Baking Pi – Operating Systems Development. It's an ARM-only lesson, but it uses pieces of C for the USB driver.

4
  • where is the link for the USB driver part, i could not find it!! but thanks for the answer, solves most of my problem. but is there a way to boot without a sd card??
    – deepak
    Mar 3, 2013 at 15:40
  • No, there is not any way to boot without an sd card installed as the card firmware is resident on the card
    – Eineki
    Mar 4, 2013 at 1:28
  • @deepak : you can find it on the author's Github : github.com/Chadderz121/csud
    – chriga
    Mar 4, 2013 at 19:33
  • @deepak You can boot a Pi 3 without an SD card, but all other Pis to this point, including the Zero W, need to read bootcode.bin from an SD card. (Everything after that can come off another device if you are using new enough software.)
    – cjs
    Apr 16, 2017 at 18:04
4

Raspberry Pi ARM based bare metal examples is another good reference. First you'll need to learn how the Raspberry Pi operates, how it boots, what's needed to get your code running without an existing operating system and so on - the README gives you a lot of information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.