How to flash multi hex files?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to flash multi hex files?

432 次查看
fatcolk28
Contributor I

When I load using the S32DS program, all Hex files are loaded by performing a single erase with these commands, but when I load by opening the Server and Client with CMD, everything in all hex files is erased with the erase command and only the last hex file remains. How can I load 3 hex files by performing the erase operation at the beginning like here?

Server Command:

pegdbserver_power_console -device=MPC5775E -startserver -singlesession -serverport=7224 -gdbmiport=6224 -interface=USBMULTILINK -speed=5000 -port=USB1 -resetdelay=1000

exit

 

Client Commands:

target remote 127.0.0.1:7226
monitor preserve0 0
load "./bin/Bm_0_4_3.hex"
load "./bin/Fbl_0_4_3.hex"
load "./bin/PEU_Container_0_4_3.hex"
monitor endmultiload
monitor selectcore 0
continue

 

 

S32DS Commands:

GNU gdb (GDB build.sh rev=gceb1328 s=F494 -i /opt/freescale ELe200 -V release_gceb1328_build_Fed_ELe200_ML3 (BLD = 1607)) 7.8.2
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-w64-mingw32 --target=powerpc-eabivle".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
monitor preserve0 0
load C:\\Test\\TOGG_Power_Electronic_Unit\\SW_DOSYALARI\\TEST_SW_SAYISAL\\11_24TSAYI01_SW\\11_24TSAYI01_SW\\s32\\bin\\Bm_0_4_3.hex
Loading section .sec1, size 0x40000 lma 0x800000
Start address 0x800148, load size 262144
Transfer rate: 800 KB/sec, 1106 bytes/write.
load C:\\Test\\TOGG_Power_Electronic_Unit\\SW_DOSYALARI\\TEST_SW_SAYISAL\\11_24TSAYI01_SW\\11_24TSAYI01_SW\\s32\\bin\\Fbl_0_4_3.hex
Loading section .sec1, size 0x80000 lma 0x840000
Start address 0x840000, load size 524288
Transfer rate: 702 KB/sec, 1108 bytes/write.
load C:\\Test\\TOGG_Power_Electronic_Unit\\SW_DOSYALARI\\TEST_SW_SAYISAL\\11_24TSAYI01_SW\\11_24TSAYI01_SW\\s32\\bin\\PEU_Container_0_4_3.hex
Loading section .sec1, size 0x8 lma 0x8c0000
Loading section .sec2, size 0x492 lma 0x8c0020
Loading section .sec3, size 0x40 lma 0x8c04b8
Loading section .sec4, size 0x44 lma 0x8c0800
Loading section .sec5, size 0x15b45c lma 0x8c0848
Loading section .sec6, size 0x4 lma 0xa1bca8
Loading section .sec7, size 0x279e4 lma 0xa1bcb0
Loading section .sec8, size 0x140 lma 0xa44000
Loading section .sec9, size 0x140 lma 0xa45000
Loading section .sec10, size 0x4 lma 0xa46000
Loading section .sec11, size 0x820 lma 0xa47000
Loading section .sec12, size 0x2154 lma 0xa48000
Loading section .sec13, size 0x542 lma 0xa4a158
Loading section .sec14, size 0x2c lma 0xa4a6a0
Loading section .sec15, size 0x1d54e lma 0xa4a6d0
Loading section .sec16, size 0x9280 lma 0xbcbfb0
Loading section .sec17, size 0xb910 lma 0xbdc000
Loading section .sec18, size 0xc990 lma 0xbec000
Loading section .sec19, size 0x8 lma 0xbfffa0
Loading section .sec20, size 0x28 lma 0xbfffb0
Loading section .sec21, size 0x20 lma 0xbfffe0
Start address 0x1, load size 1855366
Transfer rate: 736 KB/sec, 1088 bytes/write.
monitor endmultiload
monitor selectcore 0
No symbol table is loaded. Use the "file" command.
continue
Continuing.

Program received signal SIGINT, Interrupt.
0x0000b8f0 in ?? ()

0 项奖励
回复
1 回复

368 次查看
jiri_kral
NXP Employee
NXP Employee

Hi, 

it works with .elf files (unfortunately I'm not able find example) - but I didn't test hex file. I'll try to figure out. Your commands looks okay. 

As a workaround you can use srec tool - https://srecord.sourceforge.net/  

and merge your hex files before flashing:

srec_cat a.hex -intel b.hex -intel c.hex -intel -o mergedfile.hex -intel

0 项奖励
回复