Added the HALT preprocessor directive so that these files may be used directly.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 9 Dec 2010 19:33:51 +0000 (19:33 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 9 Dec 2010 19:33:51 +0000 (19:33 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@781 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

shellcode/chipcon/cc1110/Makefile
shellcode/chipcon/cc1110/cc1110-ext.h
shellcode/chipcon/cc1110/crystal.c

index f29eab9..ccd08b8 100644 (file)
@@ -1,3 +1,5 @@
+# These targets are compiled to execute at the beginning of RAM.
+# Each should conclude with HALT (0xA5).
 
 CC=sdcc --code-loc 0xF000 
 objs=crystal.ihx
 
 CC=sdcc --code-loc 0xF000 
 objs=crystal.ihx
index 7c84a0a..f3c73fc 100644 (file)
@@ -9,6 +9,11 @@
 #define _IOCCXX10_BITDEF_H\r
 \r
 \r
 #define _IOCCXX10_BITDEF_H\r
 \r
 \r
+//Added by Travis Goodspeed\r
+#define HALT __asm \\r
+  .byte 0xA5 \\r
+  __endasm;\r
+\r
 \r
 /* SEE DATA SHEET FOR DETAILS ABOUT THE FOLLOWING BIT MASKS */\r
 \r
 \r
 /* SEE DATA SHEET FOR DETAILS ABOUT THE FOLLOWING BIT MASKS */\r
 \r
index 36f929b..226cbfd 100644 (file)
@@ -8,4 +8,6 @@ void main(){
   CLKCON = (CLKCON & ~(CLKCON_CLKSPD | CLKCON_OSC)) | CLKSPD_DIV_1; // Select xtal osc, 26 MHz
   while (CLKCON & CLKCON_OSC); // Wait for change to take effect
   SLEEP |= SLEEP_OSC_PD; // Turn off the other high speed oscillator (the RC osc)
   CLKCON = (CLKCON & ~(CLKCON_CLKSPD | CLKCON_OSC)) | CLKSPD_DIV_1; // Select xtal osc, 26 MHz
   while (CLKCON & CLKCON_OSC); // Wait for change to take effect
   SLEEP |= SLEEP_OSC_PD; // Turn off the other high speed oscillator (the RC osc)
+  
+  HALT;
 }
 }