Dual Core Binaries

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

Dual Core Binaries

967 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tom-gds on Wed Jun 18 03:59:47 MST 2014
Hi

I'm trying to program an LPC4357 using the DFU bootloader included in the rom and the dfuSec tool.

As I understand it, it should be possible to simply generate a binary for each core and flash it to the appropriate memory location, however when I generate the binaries, the M0 image is generated, programs fine and runs as expected, however the image for the M4 is 16445KB, that's around 32 times the size of the flash sector i'm trying to flash it to. Programming using the lpc-link and the axf file works fine for both cores and the code runs as expected, but the binary seems to be generated incorrectly. Am i missing anything when it comes to generating dual core binaries or is this a bug in lpcxpresso?

P.S if this would be better served in the LPC43xx forum then mods feel free to move it.

Tom
0 Kudos
Reply
5 Replies

926 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by whitecoe on Wed Jul 15 02:49:40 MST 2015
If you disassemble the AXF (using "Binary Utilities->Disassemble" for example, as per https://www.lpcware.com/content/faq/lpcxpresso/disassembling-objects-and-executables), you should be able to see the names of the sections, then pick the ones you do / don't want appropriately.

HTH!
0 Kudos
Reply

926 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tom-gds on Wed Jul 15 01:39:18 MST 2015
This was working in release 7.5 but is broken in releases 7.7.2 and 7.8.

This linker sections seem to have changed and there are now many more. I've been trying to exclude any sections that are to do with the M0 code but no matter what I try, the resultant image is too large for the flash. I've attached my linker sections (renamed to .txt). The M0 code goes into memory MFlashB512. I've tried the following:
arm-none-eabi-size "${BuildArtifactFileName}"
arm-none-eabi-objcopy -O binary -R .text.* -R .Flash_* "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" -v
checksum -p ${TargetChip} -d "${BuildArtifactFileBaseName}.bin"

but this results in a 160MB binary.
0 Kudos
Reply

926 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tom-gds on Wed Jun 18 07:18:04 MST 2014
Thanks for getting back to me

I've tried excluding section .text_Flash2 for the M4 bin. This reduced the binary to 20KB (which seems to be about the right size) and it now flashes but it doesn't appear to be a working binary.

[s]I've attached my axf file so you can have a look if that helps[/s] - taken down
0 Kudos
Reply

926 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tom-gds on Wed Jun 18 07:17:39 MST 2014
Ignore that post. I was neglecting to add the checksum onto the image, its working now

Thanks for your help

Tom
0 Kudos
Reply

926 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Jun 18 05:24:28 MST 2014
Binary files have no address information in them, so  when objcopy is presented with an AXF "with a hole" - as presumably your combined M4/M0 image has, then it will simply pad the space between them. If you want two separate bins, you can modify the obcopy command run to only generate the binary for a particular section (ie flash bank), and then for the other.

The options you want are --only-section and --remove-section. See the objcopy docs included in LPCXpresso at Help -> Help Contents -> Tools -> GNU Binary Utilities.

Regards,
LPCXpresso Support
0 Kudos
Reply