LPC4357 IAP and Compiled Binary Mapping

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC4357 IAP and Compiled Binary Mapping

跳至解决方案
1,850 次查看
amorgan
Contributor II

I am using an NXP LPC4357 (specifically an Embedded Artist OEM board: LPC4357 OEM Board | Embedded Artists AB  ).

Right now I am storing a compiled binary in the QSPI and have been researching In Application Programming (IAP) and I think I have a grasp on that, but my questions pertains to understanding how to get the mapping of the compiled binary so that it can be programmed to the correct locations. The application notes and examples I have seen only refer to read-only code that gets loaded into flash (at 0x1A00 0000 for example), but not ro / rw data that goes to SDRAM, or other places.

My question is how do I understand what is in my compiled binary vs where it needs to go in memory?

In general I would think I would need to store this information in my binary at a fixed address, so that I can always find this information, but am unsure how to obtain this information programmatically.

This is for a firmware upgrade (over http), so I would think this information needs to be calculated and stored in the compiled binary.

Microcontroller: NXP LPC4357

IDE / Compiler: EWARM IAR 8.11.2

Thank you,

amorgan

标签 (2)
0 项奖励
回复
1 解答
1,615 次查看
amorgan
Contributor II

I wanted to circle back around and provide what I have learned.

A binary is mapped 1 to 1. While it now seems obvious, it was unclear that if you are, for example, using both the Flash Bank A (0x1A000000 - 0x1A07FFFF) and Flash Bank B (0x1B000000 - 0x1B07FFFF), then your binary will be mapped literally 1 to 1 using the full range (with an offset of your starting address). So instead of 1MByte of data there is ~17MBytes of data due to the range from 0x1A000000 - 0x1B07FFFF.

Also, the RAM is obviously done during run-time, but information for what needs to be placed, is in ROM (the flash).

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,615 次查看
amorgan
Contributor II

It seems like I want to go with a .hex file instead of a binary, since a binary seems to not store information such as size, address, etc.

I will work on this, but may have questions further.

0 项奖励
回复
1,616 次查看
amorgan
Contributor II

I wanted to circle back around and provide what I have learned.

A binary is mapped 1 to 1. While it now seems obvious, it was unclear that if you are, for example, using both the Flash Bank A (0x1A000000 - 0x1A07FFFF) and Flash Bank B (0x1B000000 - 0x1B07FFFF), then your binary will be mapped literally 1 to 1 using the full range (with an offset of your starting address). So instead of 1MByte of data there is ~17MBytes of data due to the range from 0x1A000000 - 0x1B07FFFF.

Also, the RAM is obviously done during run-time, but information for what needs to be placed, is in ROM (the flash).

0 项奖励
回复
1,615 次查看
soledad
NXP Employee
NXP Employee

Hi,

If you have additional questions, please let us know.

Regards

Sol

0 项奖励
回复