gms0012
Posts: 6
Joined: Sat Jun 14, 2014 6:14 am

beginner questions

Sat Jun 14, 2014 6:17 am

hi friends..

first of all.. any idea what with this link happend http://www.cl.cam.ac.uk/projects/raspbe ... orials/os/ ?

is there another place to find this great tut?

how can i "program" my raspberry without using the onboard "os".
can i programm the controller by usb or another programmer or must i "flash" it via sd card?

thanks

gregor

User avatar
DougieLawson
Posts: 39576
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: beginner questions

Sat Jun 14, 2014 9:04 am

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

gms0012
Posts: 6
Joined: Sat Jun 14, 2014 6:14 am

Re: beginner questions

Sat Jun 14, 2014 9:06 am

thx..

than it was only a temporary problem.. not it is working

thanks :)

dwelch67
Posts: 967
Joined: Sat May 26, 2012 5:32 pm

Re: beginner questions

Sat Jun 14, 2014 9:04 pm

You can write programs that run on the raspberry pi without using an operating system. That is what we mean by bare metal (not using an operating system). But due to the design of the raspberry pi you must use an sd card to first load the gpu (with programs that are simply provided to us) that then reads the arm program (kernel.img) off of the sd card. It doesnt have to be a kernel you can make any bare metal program you want and name it kernel.img.

Now, with time and perhaps already, someone will create a gpu based bootloader and we wont "have" to use kernel.img, but that is another discussion. The easiest thing to do is stick to kernel.img. there are arm based bootloaders out there that you write to the flash one time as kernel.img then in theory based on the bootloader can use the various interfaces (serial, ethernet, uart) to copy files into the memory and have the arm run them.

David

gms0012
Posts: 6
Joined: Sat Jun 14, 2014 6:14 am

Re: beginner questions

Sat Jun 14, 2014 10:41 pm

thanks guys..

so is there no possibility at the moment to code on the pc and transfer the data to the PI?

like with an atmel microcontroller and the atmel studio - or other controllers...!?

i always have to copy the code to the sd and put the sd in the PI or is there an alternative to this?

is there an ide which supports the pi (perhaps with debug registers etc)

hoping to get some information.. :)

dwelch67
Posts: 967
Joined: Sat May 26, 2012 5:32 pm

Re: beginner questions

Sun Jun 15, 2014 6:13 am

No, you can develop on a pc and transfer, that is what a bootloader will do. There has been work on various bootloaders with various features, I think at least one has a multiboot ability for the flash, but dont know. My simple bootloader is serial, and you have to load the program every time. Once you decide that is the program you want to commit to then you remove the sd card copy the file and replace it, making that the program that runs.

Another answer is no this is not a microcontroller, and in particular it does not support an atmel avr spi like flash programming feature.

You can also use jtag, unfortunately you need some arm code that runs on the flash in order to enable that feature (enable the I/O pins)

It is also quite possible and maybe someone has done it and maybe you should do it. To have an arduino like experience where you have a serial bootloader, and it decides whether or not to boot the bootloader or to boot the application. If it boots the bootloader then you can use that bootloader to reprogram the application. In this case you would want/need to insure the bootloader and application are part of kernel.img. All the info is out there it is just a small matter of programming...

David

tgritchie
Posts: 19
Joined: Fri Jun 01, 2012 4:07 pm
Location: United Kingdom

Re: beginner questions

Wed Jun 18, 2014 11:19 am

Hello - I too started by using David's boot loader to avoid the SDCARD "dance" but soon moved on to a remote stub for the GDB debugger that I found here: https://github.com/jamieiles/rpi-gdb. This allows you to not only download .elf images into the pi but also enables some (admittedly fairly limited) debugging. I'd say that JTAG is the best way to go if you can cope with the added expense and fiddling you have to do with the GPIO if you have an early revision board.

Trevor

Return to “Bare metal, Assembly language”