cancel
Showing results for 
Search instead for 
Did you mean: 

STR912 bootloader -> app with different IRQ handlers

mykola2
Associate
Posted on November 03, 2010 at 04:37

STR912 bootloader -> app with different IRQ handlers

2 REPLIES 2
Posted on May 17, 2011 at 10:01

But it won't start...

 

 

I have a feeling it is the initial interrupt setup in the bootloader being different.

 

 

Is there a way to ''wipe'' the bootloader setup (the same as a hard reset)?  This will allow the application to start with a blank slate.

 

Without a clear understanding of what the difference actually are you are going to be in trouble. Try enumerating the differences, this would at least provide a road map, and help explain them to others.

You can't relocate the vectors of the ARM9, but you could reverse the setting of the STR9 by looking at the startup code and walk the configuration back to a point where you can re-configure it the way you want. It might also be possible to transition from the settings you have to the settings you want directly.

The part also has two banks of flash, you can switch which one it boots from (and which is at base 0 with the vector table). But your description doesn't really provide any implementation detail.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mykola2
Associate
Posted on May 17, 2011 at 10:01

Hi Clive,

Thanks for the reply and assistance.

Further details:

  1. I boot from Bank 1 (32KB) into the application in Bank 0 (512KB)
  2. The original bootloader start up code is the default Ride7 ('crt0_STR91x.s' attached)
  3. The FreeRTOS bootloader startup files are from STF12 ('startup.S' and 'vector.S' attached.
  4. Some parameters provided by loader file.  I can provide if needed.
  5. When accessing application code I use a RAM function, with the following FMI changes (I disable boot bank, then jump to 0x0):
   FMI->BBSR = 0x0;

   FMI->NBBSR = 0x6;

   FMI->BBADR = 0x0;

   FMI->NBBADR = 0x0;

   FMI->CR = 0x10;

Comparing the startup files, it can be noticed the vector handlers are very different.

I was hoping using the 'FreeRTOS' startup file in the application, would redefine the vector handlers...

NOTE:  When it does work, the vector handlers are the same in the application and bootloader, but in a different location.  An application ''header'' is added after the vector table in the application, ie:

Reset_Vector:        ldr     pc, Reset_Addr

                    ldr     pc, Undefined_Addr

                    ldr     pc, SWI_Addr

                    ldr     pc, Prefetch_Addr

                    ldr     pc, Abort_Addr

                    nop

                    ldr     pc, IRQ_Addr

                    ldr     pc, FIQ_Addr

   /* Header information */

   .ascii  ''XXXXXX''

   .byte   0x06

   .byte   0xFF

   .word   0x00080000

   .word   0xFFFFFFFF

I hope this information is somewhat useful.

regards,

Mykola