RPI U-boot Example App
From arrizza.org wiki
Jump to navigation Jump to searchPrepare application
There is an example application "interrupt.c" that is provided in u-boot but is not compiled. I'll use that to show how to enable an s-rec application.
- the interrupts executable needs a define to compile:
edit u-boot-pi-rpi/examples/standalone/interrupt.c add NR_IRQS 46a47,48 > #define NR_IRQS 65 >
- Edit Examples Makefile:
edit u-boot-pi-rpi/examples/standalone/Makefile add the executable to the end of the ELF-y variable 29c29 < ELF-y := hello_world --- > ELF-y := hello_world interrupt
- re-compile
./doit
load interrupts.srec
- see rPI U-boot run s-rec application for an example
U-Boot> loads ## Ready for S-Record download ...
## First Load Addr = 0x0C100000 ## Last Load Addr = 0x0C10024E ## Total Size = 0x0000024F = 591 Bytes ## Start Addr = 0x0C100000 U-Boot>
run it
U-Boot> go 0x0c100000 0 ## Starting application at 0x0C100000 ... Installing handler for irq vector 0 and doing busy wait Press 'q' to quit <press q here> Interrupt handler has been uninstalled ## Application terminated, rc = 0x0 U-Boot>
Your application
- cp one of the example .c files in the examples/standalone directory that is "closest" to your application
- follow the steps above (add the executable to the makefile, compile, load and run)