Hi,
I have problem with debugging M4 program if M0 program is before M4. It's look like this:
Bootloader run M4 program from Flash B then M4 run M0 Program from Flash A.
Debugging M4 program in this configuration is impossible. It's look like debugger try run Cortex M0 as M4 program.
Debug Messages Logs:
LPCXpresso RedlinkMulti Driver v8.1 (Mar 11 2016 13:34:34 - crt_emu_cm_redlink build 672)
Found chip XML file in D:/Projekty/ISM/iSMASedona/Firmware_new/Sedona/Release/LPC4337.xml
Probe Firmware: LPC-LINK2 CMSIS-DAP V5.147 (NXP Semiconductors)
Serial Number: CWG2CUCV
VID:PID: 1FC9:0090
USB Path: \\?\hid#vid_1fc9&pid_0090&mi_00#8&2f6b45be&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Emu(0): Connected&Reset. DpID: 4BA00477. CpuID: 410FC240. Info: <None>
Debug protocol: JTAG. RTCK: Disabled. Vector catch: Disabled.
inspected v.2 On-chip Flash Memory C:\nxp\LPCXpresso_8.1.4_606\lpcxpresso\bin\Flash\LPC18x7_43x7_2x512_BootA.cfx
image 'LPC18x7/LPC43x7 2x512KB (Boot Bank A) Feb 16 2016 09:18:47'
NXP: LPC4337 Part ID: 0x00000000
Connected: was_reset=true. was_stopped=false
LPCXpresso Free License - Download limit is 256K
Writing 9292 bytes to address 0x1A010000 in Flash
Erased/Wrote page 8-8 with 9292 bytes in 230msec
Flash Write Done
Writing 220916 bytes to address 0x1B000000 in Flash
Erased/Wrote page 15-25 with 220916 bytes in 2446msec
Flash Write Done
Flash Program Summary: 230208 bytes in 2.68 seconds (84.01 KB/sec)
============= SCRIPT: LPC18LPC43InternalFLASHBootResetscript.scp =============
Boot from FLASH image pc/sp reset script
PC = 0x1A011641
SP = 0x20010000
XPSR = 0x01000000
VTOR = 0x00000000
============= END SCRIPT =====================================================
If M0 program is after M4 program then everything works well.
How to debug M4 program in this configuration as above?
Solved! Go to Solution.
Hi,
thank you for quick reply.
I dont' download the bootloader with the application.
I added this line to the script:
101 a% = peek32 this 0x1b000004
and its works!
Thank you a lot!
Do you download the bootloader along with the application code? If so, you could modify the LPC18LPC43InternalFlashBootResetScript.scp to provide the bootloader entry as the initial PC, then deal with stopping execution in the M4 code. Doing this might make sense if the application relies on something in your bootloader setup, but it's somewhat messy to do. If you don't download the bootloader with the application (the more common case), then modify the script PC setting to use the M4 entry, not the M0 entry as it appears now.
Thanks and regards,
LPCXpresso Support
Hi,
thank you for quick reply.
I dont' download the bootloader with the application.
I added this line to the script:
101 a% = peek32 this 0x1b000004
and its works!
Thank you a lot!