BSP Questions

  1.   I need to know more about how a little bit more on how the .lnk file for IPL works when building the BSP from hand.  Specifically, we start off our code with the FLASH located at 0 and the memory controller uninitialized.  Later, we initialize the memory controller and then move FLASH, so that memory is now at location 0.  Should the .lnk file be written so that it reflects the system once it has been fully initialized?  Does this cause a problem that we move the flash and initialize the memory?
    
  2.   For the .build file used by the mkifs utility, what does the first line mean?
    
               [image = 0xblah]
    

Is blah the address of the image in the system once loaded by the startup code (virtual or physical), is it the offset into the flash, or is it something else?

The .lnk file only applies to where the ipl gets located.

The location of the ipl has no effect on the rest of the system once startup is running. As long as the memory that startup is running in doesn’t move around after startup is called, you should be OK.

I am guessing that you are running the ipl from flash with a little bit of stack somewhere (in RAM that isn’t going to be moved), copying the image to RAM, and then having a small piece of stack resident code (from the ipl) switch the addressing, and then jump to the startup (which is now, after the remap, somewhere near zero). Not sure why all the contortions are necessary, but as long as the little bit of code that does the address switch then jump isn’t affected by the address switch itself, then I don’t see any problem.

0xblah (not a valid hex number btw :slight_smile: is the address of the image (which is consists of the startup code and the image filesystem). The image is resident wherever your ipl places it (RAM or flash). If you are flipping the addressing then the [image = 0xXXX] needs to indicate the “post-switch” address.