How to flash multiple binaries for MPU5748G

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

How to flash multiple binaries for MPU5748G

Jump to solution
2,679 Views
rajani_sureja33
Contributor III

Hi,

I am using S32 design studio IDE for development of MPU5748G and want to flash multiple binaries with application binary. 

1. What are the possible ways to do it?

2. I also wants to persist second binary on flash (no need to flash every time with application binary) then what are steps which needs to follow?

Regards,

Rajani Sureja

Labels (1)
1 Solution
2,315 Views
stanish
NXP Employee
NXP Employee

FYI: I've created a HOWTO document based on your post:

 https://community.nxp.com/docs/DOC-342826 

Thanks for your interesting question!

Stan

View solution in original post

0 Kudos
Reply
4 Replies
2,316 Views
stanish
NXP Employee
NXP Employee

Hi Rajani,

1) Probably the easiest way to program multiple binary file is described here:

HOWTO: Debug multiple elf files in S32 Design Studio 

There is a section about loading additional files which could be elf, motorola srec or intel hex.

2)If you use Pemicro/OpenSDA debug interface there is "Non-Volatile Memory Preservation" panel under "Advanced Options" dialog for this purpose.

Please check the post below for more details:

https://community.nxp.com/message/878045 

Hope it helps.

Stan

2,316 Views
rajani_sureja33
Contributor III

Hi Sliva,

Thank you so much for reply.

I also want to add additionally .bin data file in MPC5748G Flash NVM Block location "0x00F90000". So, Can you please suggest How can I add .bin file?

Regards,

Rajani Sureja

0 Kudos
Reply
2,316 Views
stanish
NXP Employee
NXP Employee

FYI: I've created a HOWTO document based on your post:

 https://community.nxp.com/docs/DOC-342826 

Thanks for your interesting question!

Stan

0 Kudos
Reply
2,316 Views
stanish
NXP Employee
NXP Employee

I'd suggest to link the binary data with your application.

First copy the binary file to your project folder (e.g. root project folder within workspace)

Edit the linker file (.ld) and enter the binary file commands behind the MEMORY Section.

In the SECTIONS please specify where to place the binary file (in the example below it is placed at the end of .text section). You can specify your own section if you need to place the binary file at a specific address.

/* Specify the memory areas */
MEMORY
{
 /* Flash */
 m_interrupts   (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
 m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
 m_text         (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0
/* SRAM_L */
 m_data         (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00008000
/* SRAM_U */
 m_data_2       (RW) : ORIGIN = 0x20000000, LENGTH = 0x00007000
}
 TARGET(binary) /* specify the file format of binary file */
 INPUT (..\test.bin) /* provide the file name  (located in the project root folder)*/
 OUTPUT_FORMAT(default) /* restore the out file format */

/* Define output sections */
SECTIONS
{
 /* The startup code goes first into internal flash */
 .interrupts :
 {
 __VECTOR_TABLE = .;

...

 .text :
  {
    . = ALIGN(4);
    *(.text)                 /* .text sections (code) */
    *(.text*)                /* .text* sections (code) */
    *(.rodata)               /* .rodata sections (constants, strings, etc.) */
    *(.rodata*)              /* .rodata* sections (constants, strings, etc.) */
    *(.glue_7)               /* glue arm to thumb code */
    *(.glue_7t)              /* glue thumb to arm code */
    *(.eh_frame)
    KEEP (*(.init))
    KEEP (*(.fini))
    . = ALIGN(4);    
    ..\test.bin              /* link the binary file here */
  } > m_text

...
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

NOTE: 

Linker creates automatic symbols with start and end address for the binary data which you can reference in your code. Check the map file output:

*(.glue_7t)
 .glue_7t     0x0000080c 0x0 linker stubs
 *(.eh_frame)
 *(.init)
 *(.fini)
              0x0000080c . = ALIGN (0x4)
 ..\test.bin()
 .data        0x0000080c 0x48 ..\test.bin
              0x0000080c _binary____test_bin_start
              0x00000854 _binary____test_bin_end

.vfp11_veneer 0x00000854 0x0
 .vfp11_veneer 0x00000854 0x0 linker stubs

.v4_bx        0x00000854 0x0
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
...
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Hope it helps.

Stan