LPC4357 IAP and Compiled Binary Mapping

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

LPC4357 IAP and Compiled Binary Mapping

Jump to solution
1,859 Views
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

Labels (2)
0 Kudos
Reply
1 Solution
1,624 Views
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).

View solution in original post

0 Kudos
Reply
3 Replies
1,624 Views
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 Kudos
Reply
1,625 Views
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 Kudos
Reply
1,624 Views
soledad
NXP Employee
NXP Employee

Hi,

If you have additional questions, please let us know.

Regards

Sol

0 Kudos
Reply