This application manages local memory, providing access to peripherals and the GoodFET's global configuration.
All clients deal with the monitor in some way.
The monitor provides access to the local memory of the GoodFET device, and it ought to be used to debug the unit or poke pieces of memory directly. Additionally, it might serve as a standalone bootloader with a few tweaks to the IVT.
The following verbs are supported.
|0x02||PEEK||Read word from memory at word.|
|0x03||POKE||Write word to memory at word. (Not flash.)|
|0x31||EXEC||Execute Arbitrary Code Fragment|
|0x80||CHANGE_BAUD||Change the baud rate.|
|0x81||ECHO||Echo the buffer back.|
|0x82||LIST_APPS||List the supported applications.|
|0x90||RAM_PATTERN||Suicide, filling RAM with a pattern.|
|0x91||RAM_DEPTH||Determine heap/stack depth.|
|0xA0||DIR||Set port direction bits.|
|0xA1||OUT||Set output value.|
|0xA2||IN||Get input value.|
|0xB0||SILENT||Set silence to byte|
|0xC0||READBUF||Dump buffer, takes 16-bit length.|
|0xC1||WRITEBUF||Set buffer, takes 16-bit length.|
|0xC2||SIZEBUF||Return buffer size.|
|0xFE||DEBUGHEX||Print a hex value.|
|0xFF||DEBUGSTRING||Debug a string.|
This command takes a 16-bit, little-endian length as its parameter, then spits out as many bytes from the beginning of the buffer. The bytes come after the reply command, outside of the command stream.
This command takes a 16-bit, little-endian length as its parameter, then reads as many bytes into the beginning of the buffer. The bytes come after the reply command, outside of the command stream.
This command returns the size of the monitor buffer.
The GoodFET defaults to 115200 baud, but alternate baud rates are available by use of the CHANGE_BAUD (0x80) command of the Monitor application. This takes a single byte, which specifies the baud rate as per the following table.
N.B., This command does not generate a reply.
Fill all of RAM with 0xBEEF, then reset to begin the firmware from the start. Unless power is lost, this pattern will only be overwritten by the firmware's use of RAM and the bootloader's caching of write blocks.
The GoodFET will reboot after sending a reply. It is recommended that the client session reset as well.
Measures the size of the 0xBEEF block in the middle of RAM, calculating from that the amount of RAM which has been used by the firmware. Running RAM_PATTERN, then several test cases, followed by RAM_DEPTH, will allow the RAM requirements of the application to be accurately estimated.
See The GoodFET's MSP430 Stack Depth for a description of this command and its usefulness in measuring the RAM usage of a GoodFET.