MM9S1J638 bootloader is not jumping into Application

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

MM9S1J638 bootloader is not jumping into Application

898 Views
vivek_sri
Contributor II

Hi

I'm working on a bootloader project on MM9S1J638. I'm having an issue while jumping into application code.

I'm using below code to jump into the application code.

void Jump_Main_Application(void)
{
app_vector = *(unsigned long int *) (APPLICATION_RESET_VEC_ADD+1);
asm LD X,app_vector;
asm JMP (0,X);
}

APPLICATION_RESET_VEC_ADD is BOOTLOADER_START_ADD-4

I've checked, it holds the last 3 bytes of the s19 file. which is same as the start address of the application code(_Startup).

The problem is that when I directly jump into the application code. Then it dosen' t work.

But when I place a breakpoint anywhere inside the above function and then run the code. Then it works totally fine.

0 Kudos
Reply
1 Reply

859 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @vivek_sri,

Just to be sure, what do you mean it does not work?

The application does not work or the debug session gets terminated?

You can attach the debugger (without reset) once it is in the application code to halt it and check registers etc.

Also, the MCU must always do something, either it is running the application or it is stuck in a loop.

Can you implement this ISRs with while(1){} in them at least?

danielmartynek_0-1651571645197.png

 

Thank you,

 

Regards,

Daniel

0 Kudos
Reply