1 // Command handling functions.
3 //! Global data buffer.
4 extern unsigned char cmddata[256];
5 #define cmddataword ((unsigned int*) cmddata)
6 #define memorybyte ((unsigned char*) 0)
7 #define memoryword ((unsigned int*) 0)
21 #define MONITOR_CHANGE_BAUD 0x80
24 #define CC_CHIP_ERASE 0x80
25 #define CC_WR_CONFIG 0x81
26 #define CC_RD_CONFIG 0x82
27 #define CC_GET_PC 0x83
28 #define CC_READ_STATUS 0x84
29 #define CC_SET_HW_BRKPNT 0x85
31 #define CC_RESUME 0x87
32 #define CC_DEBUG_INSTR 0x88
33 #define CC_STEP_INSTR 0x89
34 #define CC_STEP_REPLACE 0x8a
35 #define CC_GET_CHIP_ID 0x8b
37 #define CC_READ_CODE_MEMORY 0x90
38 #define CC_READ_XDATA_MEMORY 0x91
39 #define CC_WRITE_XDATA_MEMORY 0x92
40 #define CC_SET_PC 0x93
41 #define CC_CLOCK_INIT 0x94
42 #define CC_WRITE_FLASH_PAGE 0x95
43 #define CC_READ_FLASH_PAGE 0x96
44 #define CC_MASS_ERASE_FLASH 0x97
45 #define CC_PROGRAM_FLASH 0x98
48 #define JTAG_IR_SHIFT 0x80
49 #define JTAG_DR_SHIFT 0x81
50 #define JTAG_DR_SHIFT20 0x91
53 #define SPI_JEDEC 0x80
54 #define SPI_ERASE 0x81
57 #define JTAG430_HALTCPU 0xA0
58 #define JTAG430_RELEASECPU 0xA1
59 #define JTAG430_SETINSTRFETCH 0xC1
60 #define JTAG430_SETPC 0xC2
61 #define JTAG430_WRITEMEM 0xE0
62 #define JTAG430_WRITEFLASH 0xE1
63 #define JTAG430_READMEM 0xE2
64 #define JTAG430_ERASEFLASH 0xE3
65 #define JTAG430_ERASECHECK 0xE4
66 #define JTAG430_VERIFYMEM 0xE5
67 #define JTAG430_BLOWFUSE 0xE6
68 #define JTAG430_ISFUSEBLOWN 0xE7
70 //! Handle a command. Defined in goodfet.c
71 void handle(unsigned char app,
76 void txdata(unsigned char app,
79 //! Transmit a string.
80 void txstring(unsigned char app,
85 void delay(unsigned int count);
88 void monitorhandle(unsigned char, unsigned char, unsigned char);
89 void spihandle(unsigned char, unsigned char, unsigned char);
90 void i2chandle(unsigned char, unsigned char, unsigned char);
91 void cchandle(unsigned char, unsigned char, unsigned char);
92 void jtaghandle(unsigned char, unsigned char, unsigned char);
93 void jtag430handle(unsigned char, unsigned char, unsigned char);