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)
20 #define CC_CHIP_ERASE 0x80
21 #define CC_WR_CONFIG 0x81
22 #define CC_RD_CONFIG 0x82
23 #define CC_GET_PC 0x83
24 #define CC_READ_STATUS 0x84
25 #define CC_SET_HW_BRKPNT 0x85
27 #define CC_RESUME 0x87
28 #define CC_DEBUG_INSTR 0x88
29 #define CC_STEP_INSTR 0x89
30 #define CC_STEP_REPLACE 0x8a
31 #define CC_GET_CHIP_ID 0x8b
33 #define CC_READ_CODE_MEMORY 0x90
34 #define CC_READ_XDATA_MEMORY 0x91
35 #define CC_WRITE_XDATA_MEMORY 0x92
36 #define CC_SET_PC 0x93
37 #define CC_CLOCK_INIT 0x94
38 #define CC_WRITE_FLASH_PAGE 0x95
39 #define CC_READ_FLASH_PAGE 0x96
40 #define CC_MASS_ERASE_FLASH 0x97
41 #define CC_PROGRAM_FLASH 0x98
44 #define JTAG_IR_SHIFT 0x80
45 #define JTAG_DR_SHIFT 0x81
46 #define JTAG_DR_SHIFT20 0x91
49 #define JTAG430_HALTCPU 0xA0
50 #define JTAG430_RELEASECPU 0xA1
51 #define JTAG430_SETINSTRFETCH 0xC1
52 #define JTAG430_SETPC 0xC2
53 #define JTAG430_WRITEMEM 0xE0
54 #define JTAG430_WRITEFLASH 0xE1
55 #define JTAG430_READMEM 0xE2
58 //! Handle a command. Defined in goodfet.c
59 void handle(unsigned char app,
64 void txdata(unsigned char app,
69 void delay(unsigned int count);