AnsweredAssumed Answered

MPC5748G flash start address(flashStart=1000000)

Question asked by Barkly Lin on Jul 17, 2018
Latest reply on Aug 16, 2018 by Martin Kovar

Hi

A question about MPC5748G's flash start address.

When I create a new S32 DS MPC5748G project, FLASH Start Address is fixed at 0x1000000.

I checked user manual for MPC5748G's Flash memory as below:

0x00F8C000 0x00F8FFFF 16 KB Small HSM Code Block

 00F8_C000h ~ 00FA_8000 -> boot headers location
0x00F90000 0x00FFFFFF 448 KB Small and Medium NVM Blocks
0x01000000 0x0157FFFF 5632 KB Large Flash NVM

After new S32 DS project created, default flash start address listed as below:

1.com.freescale.s32ds.cross.wizard.prefs

flashStart=1000000

2.MPC5748G_flash.ld

flash_rchw : org = 0x00FA0000, len = 0x4
cpu0_reset_vec : org = 0x00FA0000+0x10, len = 0x4
cpu1_reset_vec : org = 0x00FA0000+0x14, len = 0x4
cpu2_reset_vec : org = 0x00FA0000+0x04, len = 0x4

...

    m_text         :  org = 0x1000000,

 

Then I modified them like this:

1.com.freescale.s32ds.cross.wizard.prefs

flashStart=FC0000

2.MPC5748G_flash.ld

flash_rchw : org = 0x00F8C000, len = 0x4
cpu0_reset_vec : org = 0x00F8C000+0x10, len = 0x4
cpu1_reset_vec : org = 0x00F8C000+0x14, len = 0x4
cpu2_reset_vec : org = 0x00F8C000+0x04, len = 0x4

...

    m_text         :  org = 0x00FC0000,      

 

My program is simply set LED blink to make sure program is running.

After modified FLASH Start address, I flashed .elf into DEVKIT via \Run\Flash from file...

The LED is working, but after I remove USB power from DEVKIT, then plug-in again, LED is no longer blink, program not running anymore.

It seems wrong to change flashStart=FC0000, why?

Does it means only Large Flash Blocks can be used for my own program?
0x01000000 0x0157FFFF (256 KB * 22), it is just only 5 MB within 6MB totally.

Regards,

Attachments

Outcomes