How to Generate independent Binary could be placed in either two Flash Banks : LPCXPresso

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

How to Generate independent Binary could be placed in either two Flash Banks : LPCXPresso

612 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ashgupta28 on Mon Jun 29 09:43:38 MST 2015
Hello,

I am looking to generate the Binary from LPCXpresso that can be loaded into the Bank A @0x1A000000. But also be loaded into Bank B @0x1B000000. Currently we can change the setting in LPCXpresso to generate the binary either for Bank A or Bank B. SO Bank B binary cannot be loaded into Bank A.

How to generate the image that could be placed in either bank A or B ?

Thanks in advance,
Ashish Gupta
Labels (1)
0 Kudos
5 Replies

448 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Jul 14 00:06:15 MST 2015
You could look at using linked resources, as described in:

[list]
  [*]https://www.lpcware.com/content/forum/mcu-settings-should-be-configuration-dependent-and-not-same-ac...
[/list]
Regards,
LPCXpresso Support

0 Kudos

448 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ashgupta28 on Mon Jul 13 23:26:29 MST 2015
Hello,

Is there any way to generate 2 separate images for Flash Bank A & Flash Bank B for a single code by single building the project.

Means i am asking is there any command line argument we can add that will creates 2 separate images for different flash Bank A & B for the same code. Then we do not have to every time change the Flash driver selection under Properties->MCU Settings & build again to get required image.

Thanks In Advance,
Ashish Gupta
0 Kudos

448 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Jun 30 05:22:11 MST 2015
Essentially, this is not going to work for you.

Position Independent (code and data) relies on a loader to read the AXF file,  and fix-up the locations. The AXF file contains the information required to provide these fixups. It is not possibke to do this with bin or hex files as they strip this information away. Loading of position independent applications is nearly always done by an Operating System (not an RTOS).

Even if you manage to accomplish this, you will then need to remap the vector table to refer to the correct locations (A vs B) etc.
0 Kudos

448 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ashgupta28 on Tue Jun 30 01:26:51 MST 2015
Thanks,

Is there any command line options to the compiler that generates position independent code. Please share.

With the help of above link, i guess it is still feasible to use some command line options to the compiler.
0 Kudos

448 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Tue Jun 30 00:59:21 MST 2015
You might want to take a look at:

http://www.lpcware.com/content/forum/compiling-flash-image-suitable-banks-and-b

HTH!
0 Kudos