Max Peng

Strange problem when re-arrange flash blocks

Discussion created by Max Peng on Jul 14, 2010
Latest reply on Aug 2, 2010 by SONG ZHAO

Hi,

 

I'm using 52255 for current project. It's working only with internal flash and SRAM, and works fine.

When I try to re-arrange flash blocks for putting something like bootloader in front of normal program, problem happened.

The original flash blocks like following

 

# original settings

## intflash    (RX): ORIGIN = 0x00000000, LENGTH = 0x00080000

## sram        (RW): ORIGIN = 0x20000000, LENGTH = 0x00010000

   vectorrom   (RX): ORIGIN = 0x00000000, LENGTH = 0x00000400

   cfmprotrom  (RX): ORIGIN = 0x00000400, LENGTH = 0x00000020

  rom         (RX): ORIGIN = 0x00000420, LENGTH = 0x0007FBE0  

   ram         (RW): ORIGIN = 0x20000000, LENGTH = 0x00010000

 

I put bootloader in first 64KB like this

 

## intflash    (RX): ORIGIN = 0x00000000, LENGTH = 0x00080000

## sram        (RW): ORIGIN = 0x20000000, LENGTH = 0x00010000

   bootloader  (RX): ORIGIN = 0x00000000, LENGTH = 0x00010000       # bootloader

   vectorrom   (RX): ORIGIN = 0x00010000, LENGTH = 0x00000400

   cfmprotrom  (RX): ORIGIN = 0x00010400, LENGTH = 0x00000020

   rom         (RX): ORIGIN = 0x00010430, LENGTH = 0x0006FBD0  # Code + Const data   

   ram         (RW): ORIGIN = 0x20000000, LENGTH = 0x00010000  # SRAM - RW data

I create another project for bootloader, but I just put an direct jump to normal program start for testing.
Program stopped in initializing PHY.
There is an loop for auto-negotiate with PHY in BSP of MQX.
Normally it works fine. But it stuck when I shift all program at 0x00010000.
Is that anything I missed when moving blocks?
Please help, I've try days for this, I cannot understand why the same code cause different results.
Thanks!

Outcomes