-
Notifications
You must be signed in to change notification settings - Fork 106
Getting started
At this stage we access the VideoCore IV processor in your Raspberry Pi by replacing bootcode.bin on the SD card. This seems to be the earliest stage of intercepting execution. At this stage the ARM processor is held in reset and the VideoCore IV is master of the show. Your system clock will be a pedestrian 19MHz or so and the processor is not yet ready to talk to SDRAM.
Let's make your Raspberry Pi status led flash using pure VideoCore IV code.
Prepare a SD card for bare metal VideoCore IV programming by the following:
- Take a your working SD card and rename bootcode.bin to say old-bootcode.bin, or alternatively format a new SD card.
- Download the flashing led binary from https://github.com/hermanhermitage/videocoreiv/blob/master/blinker01/blinker01.bin?raw=true.
- Rename this file bootcode.bin and copy it onto your SD card.
- Insert the SD card in your Raspberry Pi and turn on the power.
- If all goes well the program will be loaded and your status led will flash in a steady on-off pattern.
To understand how it works, check out the notes at https://github.com/hermanhermitage/videocoreiv/blob/master/blinker01/.
Because we are running very small programs and exploring the device the only IO capability we have is GPIO and Serial via the Mini UART on the GPIO header. (Over time we hope to add IO support for SD Media, USB, Ethernet and TV/Monitor output).
To see how to set up a serial connection, check out https://github.com/dwelch67/raspberrypi. Choices of converter at different price points include:
- A FTDI breakout board such as http://www.sparkfun.com/products/9873,
- A custom cable for the Raspberry Pi such as http://www.ftdichip.com/Products/Cables/RPi.htm, or
- A PL2303HX based device (http://www.ebay.com/itm/USB-RS232-TTL-PL2303HX-Auto-Converter-Module-Converter-Adapter-5V-3-3V-Output-/170798767126#ht_6357wt_1187).
I went with the spark fun board and a set of male:female jumpers.
- On Microsoft Windows programs like HyperTerminal or Putty make good starting points.
- On a unix such as linux or bsd (including mac os x), minicom or gnu screen work well.
All our samples will be configured to run at 115200 baud, 8 data bits, no parity, 1 stop bit, and NO flow control. Don't forget to dial that up in your serial program.