Raspberry Pi RTEMS applications JTAG debugging and U-boot TFTP image load

Gedare Bloom gedare at gwu.edu
Mon Jul 20 17:51:25 UTC 2015

On Mon, Jul 20, 2015 at 11:13 AM, Pavel Pisa <pisa at cmp.felk.cvut.cz> wrote:
> Hello everybody,
> I have decided to prepare debugging environment
> during my attempts to test graphic Qiao Yang's
> framebuffer support for RPi and I expect that infomation
> can be interesting for more developers.
> The first, I do not like to copy RTEMS image each time
> to SD card for test on real hardware.
> So I have setup TFTP server on my computer and use
> next uEnv.txt sequence
> serverip=
> ipaddr=
> bootargs=place_for_kernel_options
> bootcmd=mw.l 0x20200000 0x04a020; mw.l 0x20200008 0x65b6c0; usb start; tftp ${kernel_addr_r} ; bootm
> ${kernel_addr_r}
> the tftp command can be replaced by dhcp for dynamic network setup.
> The first two memory modifications are used to enable
> JTAG pins on RPi P1 connector.
> The RTEMS executable is conevrted to U-boot image by next commands
> sequence
> arm-rtems4.11-objcopy -R -S --strip-debug -O binary ticker.exe ticker.bin || exit 1
> cat ticker.bin | gzip -9 >ticker.gz
> mkimage -A arm -O rtems -T kernel -a 0x00008000 -e 0x00008000 -n "RTEMS" -d ticker.gz ticker.img
> The debugger setup is described on our university department group HW notes page
>   https://rtime.felk.cvut.cz/hw/index.php/Raspberry_Pi#Raspberry_Pi_JTAG_debugguing
> I have used JTAG pod which I know best (i.e. PiKRON JT_USB5/JT_USB6) but
> all other FT2232 JTAGs should be usable with similar setup.
> Files for DDD and JTAG setup can be found in my RPi utilites repo
>   https://github.com/ppisa/rpi-utils/tree/master/jtag-debug
> uEnv.txt setup is switched for Linux kernel by default but RTEMS
> alternative line can be found there.
> To debug system it worth to insert some loop or wait to the system
> startup to have time to connect by JTAG to the system and then
> allow to continue by forcing jump out of the loop by debugger.
> Alternative is to use directly gdb load command from the debugger
> session but for some reasons I have for more HW and SW combinations
> received that some words has been loaded incorrectly/skipped
> if I use load directly from gdb/DDD command line.
> I think that it worth to collect/archive the part of RTEMS specific
> information even in RTEMS wiki. But there is no RPi page there yet
>   https://devel.rtems.org/wiki/TBR/BSP
> What should be the name of the page?
> Is RaspberryPi good choice to match "raspberrypi" BSP name
> in RTEMS.
Yes. Thanks for this!

> Best wishes,
>             Pavel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel

More information about the devel mailing list