Set different Memory configuration according the "Build Configuration"

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Set different Memory configuration according the "Build Configuration"

ソリューションへジャンプ
1,851件の閲覧回数
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 件の賞賛
1 解決策
1,845件の閲覧回数
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 件の賞賛
5 返答(返信)
1,817件の閲覧回数
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 件の賞賛
1,835件の閲覧回数
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 件の賞賛
1,834件の閲覧回数
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 件の賞賛
1,831件の閲覧回数
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 件の賞賛
1,846件の閲覧回数
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 件の賞賛