2 \author Travis Goodspeed
3 \brief Local debug monitor.
10 //! Handles a monitor command.
11 void monitorhandle(unsigned char app,
16 cmddata[0]=memorybyte[cmddataword[0]];
20 //Todo, make word or byte.
21 memorybyte[cmddataword[0]]=cmddata[2];
22 cmddata[0]=memorybyte[cmddataword[0]];
25 case MONITOR_CHANGE_BAUD:
26 //This command, and ONLY this command, does not reply.
30 case MONITOR_RAM_PATTERN:
31 monitor_ram_pattern();//reboots, will never return
33 case MONITOR_RAM_DEPTH:
34 cmddataword[0]=monitor_ram_depth();
52 //! Overwrite all of RAM with 0xBEEF, then reboot.
53 void monitor_ram_pattern(){
57 for(a=(int*)0x1100;a<(int*)0x2500;a++){//TODO get these from the linker.
66 //! Return the number of contiguous bytes 0xBEEF, to measure RAM usage.
67 unsigned int monitor_ram_depth(){
70 for(a=0x1100;a<0x2500;a+=2)
71 if(*((int*)a)==0xBEEF) count+=2;