boot: directly inject bootloader asm, no functions
authorDan White <dan@whiteaudio.com>
Tue, 30 Apr 2013 18:40:19 +0000 (13:40 -0500)
committerDan White <dan@whiteaudio.com>
Tue, 30 Apr 2013 18:40:19 +0000 (13:40 -0500)
msp4th/main.c

index bff1b205715cbb57c6f3c983ba995af584d8fa19..44e11c7d1756c31f4f7ecc99b07e156dc9d42f38 100644 (file)
@@ -56,41 +56,33 @@ static void __inline__ eint(void){
 
 
 
-/*
- * SPECIAL BOOTLOADER CALLING
- *
- * We *do not* want to 'call' the initial bootloader.  Such a call instruction
- * attempts to use the stack, which is in RAM -- whose health is unknown.  The
- * functionality must use ROM code and registers only.  * Declaring as an
- * inline function and .include'ing the ASM code is a hop and skip to ensure
- * this happens.
- *
- * As a consequence, the ASM file must use local labels only -- of the form
- *  N:
- *      mov foo, bar
- *
- *  where N is an integer, referenced as
- *
- *      jmp Nb
- *
- *  where the label is searched for forwards or backwards according to the
- *  suffix Nf or Nb.
- */
-void __inline__ flashbootASM(void)
-{
-    asm(".include \"flashboot.s\"");
-}
-
 
 
 int main(void){
+    /*
+     * SPECIAL BOOTLOADER CALLING
+     *
+     * We *do not* want to 'call' the initial bootloader.  Such a call instruction
+     * attempts to use the stack, which is in RAM -- whose health is unknown.  The
+     * functionality must use ROM code and registers only.  * Declaring as an
+     * inline function and .include'ing the ASM code is a hop and skip to ensure
+     * this happens.
+     *
+     * As a consequence, the ASM file must use local labels only -- of the form
+     *  N:
+     *      mov foo, bar
+     *
+     *  where N is an integer, referenced as
+     *
+     *      jmp Nb
+     *
+     *  where the label is searched for forwards or backwards according to the
+     *  suffix Nf or Nb.
+     */
+    asm(".include \"flashboot.s\"");
 
     int16_t tmp;
 
-    //register int16_t data asm("r5");
-    //register int16_t *addr asm("r7");
-
-    flashbootASM();
     dint();
 
     // chip setup for UART0 use