absolute jump to application from bootloader

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

absolute jump to application from bootloader

ソリューションへジャンプ
2,464件の閲覧回数
nordic56
Contributor I

Hi,

 

I´m looking for a solution for  my bootloader.

I´m using 56F8025 and CW_forDSC56800E V8.2

 

After downloading the firmware I want the program to jump to an absolute address.

The absolute address is the entry point of the application, stored in the downloaded relocated vector table.

 

Since I´m not familiar with assembler for dsc 56f800/E, is there any idea how to manage this absolute jump for the dsc56F800 family?

 

 

thanks in advance.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
744件の閲覧回数
FTSolutions
Contributor III

I am not as familiar with the 56f8025, but on the 56f8367 and 56f8357s I use, the codewarrior PE tool will store the user's starting address in the top 32bits of dataflash memory - if you have the PE license it does this automatically if you check "Bootloader support = Yes" in the processor expert.  IF you don't have PE license, you could do the similar thing with your app code with the address of main().   You must loadthe 32-bit address value into an unsigned long "StartAddress".

 

The bootloader then just does the following (in the '357 and '367 anyhow):

#define USER_INTERRUPT_VECTOR_ADDRESS (0x00000000UL)

#define INTC_VBA                      *((volatile word *)0x0000F1AA)

 

  /****************************************************************************
  / change base address of the interrupt vector table for user's application
  /****************************************************************************/
   setReg(INTC_VBA, USER_INTERRUPT_VECTOR_ADDRESS >> 8);
   asm(nop);
   asm(nop);
  /****************************************************************************
  / call user's application
  /****************************************************************************/
   asm(move.l StartAddress, N);
   asm(jmp (N));                       // and off we go to application
   asm(nop);
   asm(nop);

 

Hope this helps - my apologies if I misunderstood your question.

 

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
745件の閲覧回数
FTSolutions
Contributor III

I am not as familiar with the 56f8025, but on the 56f8367 and 56f8357s I use, the codewarrior PE tool will store the user's starting address in the top 32bits of dataflash memory - if you have the PE license it does this automatically if you check "Bootloader support = Yes" in the processor expert.  IF you don't have PE license, you could do the similar thing with your app code with the address of main().   You must loadthe 32-bit address value into an unsigned long "StartAddress".

 

The bootloader then just does the following (in the '357 and '367 anyhow):

#define USER_INTERRUPT_VECTOR_ADDRESS (0x00000000UL)

#define INTC_VBA                      *((volatile word *)0x0000F1AA)

 

  /****************************************************************************
  / change base address of the interrupt vector table for user's application
  /****************************************************************************/
   setReg(INTC_VBA, USER_INTERRUPT_VECTOR_ADDRESS >> 8);
   asm(nop);
   asm(nop);
  /****************************************************************************
  / call user's application
  /****************************************************************************/
   asm(move.l StartAddress, N);
   asm(jmp (N));                       // and off we go to application
   asm(nop);
   asm(nop);

 

Hope this helps - my apologies if I misunderstood your question.

 

0 件の賞賛
返信