Set different Memory configuration according the "Build Configuration"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Set different Memory configuration according the "Build Configuration"

Jump to solution
1,739 Views
arnogir
Senior Contributor II

Hello

 

I'm using MCUXpresso v11.6 with an MKL33Z256.

 

I have two "Build configuration":

- Debug

-Release (=Debug but with code optimization)

 

I would also modify the Memory mapping between Debug and Release configuration. Because the Debug is run alone (start at 0x0), and in build release, it will load by a Bootloader. Then the application code not start at 0x0( because it will be the Bootloader) but at another address (The boot will jump to the application and set the offset value of the Vector table)

 

But into MCUXpresso, the memory configuration seem not be configurable for each "Build configuration".

 

I have a way to resolve this problem?

 

Regards

0 Kudos
1 Solution
1,733 Views
ErichStyger
Senior Contributor V

Hi @arnogir ,

Yes, the memory configuration is bound to the project and not to the build configuration (this is still a pending feature request from my side).

I faced a similar situation as you, and needed to have different memory/linking map. What my solution was is using the built-in FreeMarker scripts, and wrote about it here:

https://mcuoneclipse.com/2019/10/06/linking-bootloader-applications-with-eclipse-and-freemarker-scri...

Maybe this would work for you too?

I hope this helps,

Erich

View solution in original post

0 Kudos
5 Replies
1,705 Views
scott_thompson
Contributor III

I have just experience the same issue--ported a huge IAR project over to MCUXpresso only to find that after creating my bootloader suddenly my FW application wouldn't fit into the memory needed by the bootloader.  I was not expecting the MCU memory regions to be global and not attached to a build configuration--this is bad practice and I can't believe we're on V11 of MCUXpresso and this issue remains.

The work-around provided will probably work, but mine will be to simply export the memory region for the bootloader, capture the managed script with its customized locations (which DOES work with build configurations!), then repeat for the FW application and re-generate the memory region for it, export for prosperity, etc.  

Let me know how to submit this (ahem) "feature" request--what a vast oversight this should be built into the build configuration from the start.  Fail.

0 Kudos
1,723 Views
arnogir
Senior Contributor II

Hello,

I see your topic.

I must evaluate this, but to resume, It would be easier if MCUXpresso could have different memory maping according configuration.

 

Thank for your help and your detailed topic.

 

0 Kudos
1,722 Views
arnogir
Senior Contributor II

Hello,

 

I can't make the check today and I will test tomorow,

 

But maybe this "Offset" is the solution?:

arnogir_0-1663143075026.png

 

0 Kudos
1,719 Views
ErichStyger
Senior Contributor V

that offset is added to the symbols you load. This is useful if you have linked the binary to a given address, but then in memory you load it to an offset of this. That way the debugger can correlate addresses with symbols.

0 Kudos
1,734 Views
ErichStyger
Senior Contributor V

Hi @arnogir ,

Yes, the memory configuration is bound to the project and not to the build configuration (this is still a pending feature request from my side).

I faced a similar situation as you, and needed to have different memory/linking map. What my solution was is using the built-in FreeMarker scripts, and wrote about it here:

https://mcuoneclipse.com/2019/10/06/linking-bootloader-applications-with-eclipse-and-freemarker-scri...

Maybe this would work for you too?

I hope this helps,

Erich

0 Kudos