I'm trying to boot the RasPi using specific files. I was following a tutorial and I had to compile some files using GCC. The problem is that this process doesn't provide a 'img' file and I don't know how to try the code in my RasPi.

The code I'm trying is this .

To give you an example, the result of the GCC is: '.bin, .elf, .hex, .list and .o'. How can I run the code? Thanks for your response.

1 Answer 1


What you appear to be doing is called bare metal programming, i.e. programming a box without having an operating system in charge.

If you Google Raspberry Pi bare metal you may find suitable examples.

http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/introduction.html is a series of tutorials on bare metal with the Pi. It seems to be more orientated to assembler rather than C. However both C and assembler still need the same files on the Pi's SD card to boot. It should give you the information you need.

Your Answer

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

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