February 22, 2013

BareMetal : a log of the project

Filed under: Raspberry 3.14 — Tags: , , , , , , , — admin @ 11:08 am
  • feb 22 , 2013

Using C code and inline ASM , after a week of victory-and-failure , i’m able to start a code from zero (boot) level.

The file (.img) is compiled using the  hard-floating-point option.
Inline assembly is used for critical accesses ( read/write to the mailbox for video init )

Pointer’s code is used to set GPIO’s functions (input / output ) , set state of the outputs, read states of the inputs.

I have to say that my current way to work is quite complicated :

  1. type C code or asm into leafpad of the RasPI
  2. compile from console on the PI
  3. connect from the pc to the pi through psftp.exe : login, pass…
  4. copy my kernel.img from the Pi to the pc’s SD card that’s plugged into
  5. stop the Pi , unplug the Raspbian SD card from it, plug the SD with my kernel.img
  6. restart the Pi : check of new code works ok or failed ( can be really driving you crazy if not!)
  7. stop the pi, unplug the SD with my kernel, re-plug the SD with the Raspbian, replug my kernel’s SD to the Pc,  then reboot linux and go back to 1.

Kind off…. hard job.
I’ll purchase another Pi soon, because it will ease the work.
Parts of my code come from different sources inspirations. I dont want to re-invent the ‘butter cutter’ ( impossible to translate, thats a french expression).

So, here are 2 pictures taken with my BM code running.

On the first, you can see the output of a test-matrix video output :

And the most interresting , my CCD project’s output now that the USB interrupts (and others) are not interrupting the dump process when hardware’s running : phantom sync’s have disappeared. great ! :D

Finally, here is how Pi is tortured at the hardware level ( prototype was initially built to work with FT2232 module connected to intel coreI7 running the control software side )


cat{ } { post_330 } { } 2009-2015 EIhIS Powered by WordPress