Programming Flash with binary for two cores

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

Programming Flash with binary for two cores

661 Views
jyothsnarajan
Contributor V

For the MPC5745 and similar processors with dual cores, the S32DS example projects generate 1 .elf file per core. The two cores share a single flash. This means I need to flash two separate images to the same flash. I use cyclone to connect to the processor. I can create two SAP images and store on cyclone. But to burn the image, I have to go through the programming sequence - erase, program, verify, each time. This means the last the image I program to flash will overwrite any/all previous image. How can I program the elf files for the two cores during a single flash program operation.? An example would be helpful.

I would like to create one single image for both the cores. Looking for suggestions on how to modify the linker file (flash.ld file in S32DS examples) to merge the sections for the two cores. 

Thanks.

0 Kudos
Reply
1 Reply

509 Views
jamesmurray
Contributor V

I don't know why NXP are giving examples with two binaries because it doesn't work for most (all?) of us.

I wrote my own Makefile instead of using the S32DS generated ones and link all object files into one ELF file.

The relevant line is:

$(CC) $(CFLAGS) $(LDFLAGS) -o output.elf $(OBJS) $(LIBS)

That's doesn't precisely answer your question, but it can be done.

James