Glitch app is in progress, first support will be for AVR.
[goodfet] / firmware / apps / chipcon / chipcon.c
index ccacb95..478e877 100644 (file)
@@ -278,7 +278,7 @@ void cc_wr_config(unsigned char config){
 
 //! Locks the chip.
 void cc_lockchip(){
-  register i;
+  register int i;
   
   debugstr("Locking chip.");
   cc_wr_config(1);//Select Info Flash 
@@ -409,12 +409,12 @@ void cc_write_flash_page(u32 adr){
   cmddata[1]=0xc7;
   cmddata[2]=0x51;
   cc_debug_instr(3);
-  //debugstr("Loaded bank info.");
+  debugstr("Loaded bank info.");
   
   cc_set_pc(0xf000+FLASHPAGE_SIZE);//execute code fragment
   cc_resume();
   
-  //debugstr("Executing.");
+  debugstr("Executing.");
   
   
   while(!(cc_read_status()&CC_STATUS_CPUHALTED)){
@@ -422,7 +422,7 @@ void cc_write_flash_page(u32 adr){
   }
   
   
-  //debugstr("Done flashing.");
+  debugstr("Done flashing.");
   
   P1OUT&=~1;//clear LED
 }
@@ -555,8 +555,7 @@ for (n = 0; n < count; n++) {
 unsigned char cc_peekdatabyte(unsigned int adr){
   unsigned char
     hb=(adr&0xFF00)>>8,
-    lb=adr&0xFF,
-    toret;
+    lb=adr&0xFF;
   
   //MOV DPTR, adr
   cc_debug(3, 0x90, hb, lb);