AnsweredAssumed Answered

Why does init section change size [MPC560*b]

Question asked by Hu Ez on Jan 13, 2016
Latest reply on Jan 19, 2016 by Hu Ez

Hello,

 

On some occasions the layout (size) of the init section changes. This is an issue to me because I need the "_startup" to be at a constant address.

Basically, my bootloader jumps to that area where the application is located.

 

On my other projects, the size of init section never change. Just having some trouble with this current project. And diffing between linker files and such shows that there are no differences.

Thus I need some guidance of why this is happening.

 

For instance, this is how the section in the map file should look like:

 

.__bam_bootarea section layout

  Starting        Virtual  File

  address  Size   address  offset

  ---------------------------------

  00000000 000008 00008000 00000320  1 .__bam_bootarea MPC5602B_init_flash_c.obj

  00000000 000004 00008000 00000320  4 bam_rchw MPC5602B_init_flash_c.obj

  00000004 000004 00008004 00000324  4 bam_resetvector MPC5602B_init_flash_c.obj

 

.init section layout

  Starting        Virtual  File

  address  Size   address  offset

  ---------------------------------

  00000000 0000a4 00008008 00000328  1 .init Linker Generated Symbol File

  00000000 000084 00008008 00000328  4 _rom_copy_info Linker Generated Symbol File

  00000084 000020 0000808c 000003ac  4 _bss_init_info Linker Generated Symbol File

 

And not like this:

 

.__bam_bootarea section layout

  Starting        Virtual  File

  address  Size   address  offset

  ---------------------------------

  00000000 000008 00008000 000002e0  1 .__bam_bootarea MPC5602B_init_flash_c.obj

  00000000 000004 00008000 000002e0  4 bam_rchw MPC5602B_init_flash_c.obj

  00000004 000004 00008004 000002e4  4 bam_resetvector MPC5602B_init_flash_c.obj

 

.init section layout

  Starting        Virtual  File

  address  Size   address  offset

  ---------------------------------

  00000000 000098 00008008 000002e8  1 .init Linker Generated Symbol File

  00000000 000078 00008008 000002e8  4 _rom_copy_info Linker Generated Symbol File

  00000078 000020 00008080 00000360  4 _bss_init_info Linker Generated Symbol File

 

 

Thank you!

Outcomes