GDB offers the best embedded software development experience by allowing you to remotely load, debug and test your programs and hardware/software interfaces. It feels like native programming thanks to a similar smooth "Edit-Compile-Run" cycle.
Alpha is a system-level GDB server (aka "gdbstub" and "gdb stubs") allowing you to dynamically debug anything running in your hardware target, from bare metal software to OS-backed programs, including their threads, the underlying drivers, etc. All with a single GDB session and without any JTAG probe.
This repository contains the freemium distribution of Alpha for any version of the Raspberry Pi and can be used to debug Circle Software.
Connect an serial to usb converter to Rapsberry Pin 8, 10 and Pin 6 for ground.
Copy at the root filesystem of the sdcard at the same level as bootcode.bin the two files :
- config.txt and
- Alpha.bin taken in the directory of your RPI model
Clone Circle then copy load.gdb and armv6-core.xml file in sample directory of Circle.
The load.gdb should be modify for the uart used at this line: "target remote /dev/ttyUSB0" It depends on the tty name of the usb converter.
It is recommanded to recompile Circle with a moderate level of optimization like -O1 or -Og or -O0 to ease debugging.
Then go to sample directory and launch command :
arm-none-eabi-gdb --nx 12-pwmsound/kernel.elf --ex "so load.gdb"
And DEBUG your software.
It can also be interesting to add a cmdline.txt at root of the sdcard with "logdev=ttyS1". In this case Circle should use Raspberry Pi Uart to log info. But because of Alpha, the log will be redirect to gdb console.
Support is provided through this repository's issue board. Feel free to also contact us.
See LICENSE for the full license text.