lpcware

crt_emu_cm_redlink problem with multiple sections on the same page

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by marcocenerelli on Fri Jan 15 11:15:46 MST 2016
Hello, I'm using LPCXpresso v8.0.0_526 on Linux. The command-line tool crt_emu_cm_redlink has a problem with ELFs with multiple sections on the same SPI flash page (MCU is an LPC1830). The tool erases each time the same flash page, it doesn't matter if you launch it with -flash-mass-load or with -flash-load. This is the command line output:


Ni: LPCXpresso RedlinkMulti Driver v7.9 (Jul 23 2015 14:20:59 - crt_emu_cm_redlink build 468)
Pc: (  0) Reading remote configuration
Pc: (  5) Remote configuration complete
Nc: Probe Firmware: LPC-LINK2 CMSIS-DAP V5.134 (NXP Semiconductors)
Nc: VID:PID:  1FC9:0090
Nc: USB Path: /dev/hidraw4
Pc: ( 30) Emulator Connected
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Connected&Reset. DpID: 2BA01477. CpuID: 410FC230. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Nc: loaded v.2 External Flash Device on SPI Flash/LPC18_43_SPIFI_GENERIC.cfx
Nc: image 'LPC18/43 Generic SPIFI Nov  2 2015 16:52:43'
Nc: flash variant 'S25FL064P' detected (8MB = 128*64K at 0x14000000)
Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=false. was_stopped=true
Cf:v LPCXpressoPro Full License - Unlimited
Pc: ( 70) License Check Complete
Nt: Loading ELF file 'Bootloader.axf' at location 14000000
Ec: Flash Driver V.2 dynamic startup ignored - driver Init provided no info in STATUS

Nt: Writing 1376 bytes to address 0x14000000 in Flash
Pb: 1 of 1 (  0) Writing pages 0-0 at 0x14000000 with 1376 bytes
Ps: (  0) at 14000000: 0 bytes - 0/1376
Ps: (1190) at 14000000: 16384 bytes - 16384/1376
Nc: Progress meter completed at over 100% (16384/1376 bytes)
Nt: Erased/Wrote page  0-0 with 1376 bytes in 314msec
Pb: (100) Finished writing Flash successfully.
Nt: Flash Write Done
Nt: Loaded 0x560 bytes in 517ms (about 2kB/s)
Nt: Loading ELF file 'Bootloader.axf' at location 14000674
Nt: Writing 25880 bytes to address 0x14000674 in Flash
Pb: 1 of 1 (  0) Writing pages 0-0 at 0x14000674 with 25880 bytes
Ps: (  0) at 14000000: 0 bytes - 0/27532
Ps: ( 59) at 14000000: 16384 bytes - 16384/27532
Ps: (119) at 14004000: 16384 bytes - 32768/27532
Nc: Progress meter completed at over 100% (32768/27532 bytes)
Nt: Erased/Wrote page  0-0 with 25880 bytes in 454msec
Pb: (100) Finished writing Flash successfully.
Nt: Flash Write Done
Nt: Loaded 0x6518 bytes in 677ms (about 38kB/s)
Nt: Loading ELF file 'Bootloader.axf' at location 14000560
Ec: Flash Driver V.2 dynamic startup ignored - driver Init provided no info in STATUS

Nt: Writing 276 bytes to address 0x14000560 in Flash
Pb: 1 of 1 (  0) Writing pages 0-0 at 0x14000560 with 276 bytes
Ps: (  0) at 14000000: 0 bytes - 0/1652
Ps: (991) at 14000000: 16384 bytes - 16384/1652
Nc: Progress meter completed at over 100% (16384/1652 bytes)
Nt: Erased/Wrote page  0-0 with 276 bytes in 320msec
Pb: (100) Finished writing Flash successfully.
Nt: Flash Write Done
Nt: Loaded 0x114 bytes in 522ms (about 0kB/s)
Nt: Loading ELF file 'Bootloader.axf' at location 14010000
Nt: Writing 196608 bytes to address 0x14010000 in Flash
Pb: 1 of 1 (  0) Writing pages 1-3 at 0x14010000 with 196608 bytes
Ps: (  0) at 14010000: 0 bytes - 0/196608
Ps: (  8) at 14010000: 16384 bytes - 16384/196608
Ps: ( 16) at 14014000: 16384 bytes - 32768/196608
Ps: ( 25) at 14018000: 16384 bytes - 49152/196608
Ps: ( 33) at 1401C000: 16384 bytes - 65536/196608
Ps: ( 41) at 14020000: 16384 bytes - 81920/196608
Ps: ( 50) at 14024000: 16384 bytes - 98304/196608
Ps: ( 58) at 14028000: 16384 bytes - 114688/196608
Ps: ( 66) at 1402C000: 16384 bytes - 131072/196608
Ps: ( 75) at 14030000: 16384 bytes - 147456/196608
Ps: ( 83) at 14034000: 16384 bytes - 163840/196608
Ps: ( 91) at 14038000: 16384 bytes - 180224/196608
Ps: (100) at 1403C000: 16384 bytes - 196608/196608
Nt: Erased/Wrote page  1-3 with 196608 bytes in 2464msec
Pb: (100) Finished writing Flash successfully.
Nt: Flash Write Done
Nt: Loaded 0x30000 bytes in 2688ms (about 73kB/s)


The correct behavior should be:
1) erase all needed sectors
2) program all sectors

Please fix it as soon as possible.

Outcomes