I'm building a bootloader firmware, and now I want a simple app (LED blinks) to test calling bootloader from application itself.
I'm currently doing:
    #include <stdio.h>
#include <stdlib.h>
#include <p18f25k50.h>
#pragma config FOSC = INTOSCIO
#pragma config FCMEN = OFF                         
#pragma config BORV = 3
#pragma config CPB = OFF
#pragma config CPD = OFF
/*
 *
 */
int main(int argc, char** argv) {
    int i, j;
    TRISC = 0xF0;
    LATCbits.LATC2 = 0;
    while(1) {
        if(!PORTBbits.RB3)
         _asm goto 0x1C _endasm
        LATCbits.LATC2=!LATCbits.LATC2;
        for(i=0;i<1000; i++) {
            for(j=0; j<10; j++) {
            }
        }
    }
    return (EXIT_SUCCESS);
}
And, I get
newmain.c:33: error: (195) expression syntax
(908) exit status = 1
The error is showing me the one assembly line I have in my code, which is supposed to send MC's instructions to absolute bootloader entry point.
After trying to build. I'm using MPlab X, with XC8 PRO compiler.
Does anyone have any idea what in here is wrong?
Thanks in advance.
 
     
    
asm("goto 0x1c");– Majenko Mar 23 '15 at 17:05asmproblem? It says line 33, which is after that line. Will it compile if you remove it? Will it compile if you take theasmthing into{}? – Eugene Sh. Mar 23 '15 at 17:06