AnsweredAssumed Answered

S12X Function pointers to paged flash.

Question asked by controls controls on Aug 31, 2009
Latest reply on Sep 2, 2009 by CompilerGuru

Hi All,

I'm trying to store a long/far address in a variable, cast and then jump to that specific address. with the code below:

 

uint32_t appl_start_address;  

appl_start_address = 0x701234;  
((void(*_far) (void))(appl_start_address))();

 

in the debugger, it does the FCALL, but the PC seems to only go to 7012, and the PPAGE is set to 34.

Shouldn't the Program at least jump to address 0x347012?

 

Essentially i would like to jump and run program at address 0x701234. however, so i'm doing something majorly wrong.

 

thanks in advance.

 

Regards

Quasio

 


Outcomes