Alejandro Hernandez

problem while I build, bootloader for Kinetis K60

Discussion created by Alejandro Hernandez on Apr 11, 2013
Latest reply on Oct 30, 2013 by Alberto Lubeiro

Hello, I have a problem when building the project bootloader from the downloadable document an2295sw. Within the src where are the source code, the module bootloader.c. send me 3 errors in the following function:


void JumpToUserApplication(LWord userSP, LWord userStartup)


  // set up stack pointer

  __asm("msr msp, r0");

  __asm("msr psp, r0");



  // Jump to PC (r1)

  __asm("mov pc, r1");


The error that occurs is as follows:  

{(assembler source):1}   msr msp, r0

  undefined identifier 'r0',

undefined identifier 'r0',

{(assembler source):1}   msr msp, r1

undefined identifier 'r1'


I guess it's because r0 and r1 are not native registers within the microcontroller.

Any help or ideas is much appreciated.