The new NRG board is finally being beta-tested. This means that we should be able to launch a commercial version in less than three months. In the meantime, we have created a special forum section where to discuss about our beta tests and the ongoing developments related to panStamp NRG.
This article shows an introspective view about GDB_bootloader, the compact bootloader included in our modules. This reduced version of GDB server lets us program the boards serially from msp430-gdb by means of a standard USB-UART (3.3V) gateway connected to the target board. On the other hand, NRG boards can also be programmed and debugged via JTAG SBW as well, in the same way we program launchpads. In summary, we provide two different programming methods depending on your needs and personal preferences.
Besides the firm-loading capability, the serial bootloader also implements a set of GDB instructions so that we can navigate into the internal memory of the CC430F5137 MCU and read/write values from it. This guide shows how to exploit this feature.
First of all, we need to put the board in programming mode, according to this guide. Once your serial converted is connected to the target board and Pin 12 tied to ground, restart the board. At this moment panStamp NRG will enter in programming mode. We can then open a terminal and run msp430-gdb. If you didn't install msp430-gdb previosly in your computer you can run it from Energia/hardware/tools/msp430/bin/.
Once GDB starts you will see something like this:
OK you are now "into" the MCU so you can query the value contained at any address with "x":
Here we queried about the contents of address 0x1800, which is the start of the Info D region, one of four "pseudo EEPROM" spaces provided by the CC430 MCU. This page shows how the memory of the CC430F5137 MCU is organized.
On the other hand, we can also list the contents of a group of addresses. Below /10h means that we want 10 values, starting from 0x1800 to be displayed in 16-bit format:
All the above 0xffff's mean that those memory locations remain erased. since we are working with Flash and not with EEPROM, before writing a single byte we need to erase the whole section. Don't worry too much about this since the panStamp library already does this for you.
OK now let's say that we want to write 0x1234 into a specific location with address 0x1885 (Info C memory space) which has previously been erased so that the current value is 0xFFFF: