8

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?

8

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.

  • 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 '13 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 '13 at 1:28
  • @deepak : you can find it on the author's Github : github.com/Chadderz121/csud – chriga Mar 4 '13 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.) – Curt J. Sampson Apr 16 '17 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, privacy policy and cookie policy

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