Getting an error " No source available for "0xFFFFFFFE (0xFFFFFFFE)() " " porting k60 bootloader from AN4368 to k20

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Getting an error " No source available for "0xFFFFFFFE (0xFFFFFFFE)() " " porting k60 bootloader from AN4368 to k20

2,102 Views
rhana
Contributor III

Hello,

   We have been following AN4368 for porting the k60 bootloader to the k20 (on a TWR-K20D72M.) The project compiles however when we go to debug there is this error

"No source available for "0xFFFFFFFE (0xFFFFFFFE)() " " (debug stops on main, then just after pressing the resume button this happens.)

[We are using codewarrior 10.6, windows XP]

The disassembly listing lists the following:

0xFFFFFFFa: movs r0, r0

0xFFFFFFFc: movs r0, r0

0xFFFFFFFe: movs r0, r0

This has happened after adjusting the memory map in the Bootloader.h file (as directed in AN4368)

#define MIN_RAM1_ADDRESS        0x1FFF0000

#define MAX_RAM1_ADDRESS        0x20007FFF

#define MIN_FLASH1_ADDRESS     0x00000000

#define MAX_FLASH1_ADDRESS      0x0003FFFF

#define IMAGE_ADDR              ((uint_32_ptr)0x10000)

#define ERASE_SECTOR_SIZE       (0x800)  /* 2K bytes*/

Likewise in the *.lcf file we have modified it to:

MEMORY {

  m_interrupts  (RX) : ORIGIN = 0x00010000, LENGTH = 0x00000400

  m_cfmprotrom  (RX) : ORIGIN = 0x00010400, LENGTH = 0x00000010

  m_text        (RX) : ORIGIN = 0x00010410, LENGTH = 0x0006FBF0-0x00000800

  vectorram (RWX) : ORIGIN = 0x1FFF0000, LENGTH = 0x00000400

  m_data        (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00010000-0x00000200

  m_bdt  (RW) : ORIGIN = 0x20007E00, LENGTH = 0x200

}

...

.vectorram :
{
___VECTOR_RAM = .;
} > vectorram

...

One thread indicates the program counter value is causing the program to jump to the end of memory because there is nothing there otherwise.

We are just trying to get the bootloader running by itself (there is no application on top of the bootloader yet.)


Other threads indicate it could be a setting the debugger.

Is this a memory issue from the memory table or does this have to do with a debugger setting? Any ideas?

Thank you.

Tags (3)
1 Reply

943 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Robert,

On a normal application after reset Program Counter goes to address 0x0 and here it will find the vector table, the first vector will init the Stack Pointer. If the application has been relocated the debugger will force the program counter to main function but the Stack Pointer will not be initialized and its reset values is 0xFFFFFFFF. This is the reason of the error.

You can initialize the SP with the debugger by configuring init_kinetis.tcl, just add the following function in the file and call it at the end of the file.

proc init_stack_pointer {} {

    reg SP = 0x2000FFF8   

}

Regards,

Carlos