LIBMEM RPC loader failure with multicore project...
This one is stumping me, and I'm hoping y'all have some thoughts:
I'm seeing the "LIBMEM RPC loader has not initialized correctly" error attempting to debug my multicore project after a successful flash for both cores. Precisely the same project and toolchain (Windows, Crossworks 4.7.0, STLINK-V2SET USB JTAG device connected directly to the PC port with no hub, STM32H745XI chip) works for my colleague. We're sharing all code via github, and we've confirmed we're both using precisely the same source base. We're using the stock loader script that comes with CrossWorks, with the loader script set to auto-detect.
The same error occurs on macOS using 4.7.2 and 4.8.5 for me (my colleague doesn't have a Macintosh to try the same thing).
I've tried swapping target hardware, and am running the JTAG directly off of the USB port on my PC. I've tried swapping cables --- both USB and the JTAG jig connector). I've also tried upgrading to 4.8.5, the February build.
I've tried the suggestions in this link, to no avail. The one thing I haven't tried is debugging the loader project, because I can't find it in my CrossWorks install.
So, two questions:
1. Can someone point me to the loader solution so I can give a go at debugging?
2. Can anyone suggest anything else to try? (I have a new STLINK JTAG adapter on order as well.)
Thanks,
R.
-
Hi Ray,
You say that it has flashed - did you use a different tool to do this?
If not then the only reason the flash loader would be used in debugging is if you have enabled flash breakpoints. I confess to not having tested this scenario - dual-core but with only one CPU used to do the flash programming - and as such it won't work.
1. The sources of the flash loaders are in the $(PackagesDir)/targets/STM32 directory
2. Double check that you haven't enabled flash breakpoints.
Regards
Michael
-
Just a followup for anyone else who may run into this.
Unfortunately, I never did get a root cause identified that I could fix.
I am, however, able to _manually_ connect the debugger to the target after flashing, and then restarting lets me debug both cores as I'd expect.
I dunno, but as long as it gets the job done, I don't mind a couple of extra keystrokes!
-
There are two project properties that control the multi-core debug
"Debug Additional Projects"
"Load Additional Projects".
These should specify the additional projects by name but there is some backward compatibility code that handles "Yes" for "Debug Additional Projects".
Looks like if "Debug Additional Projects" is set then the loader of the dependent project is used, this doesn't work on the STM32H747. If you set "Load Additional Projects" then the loader of the active project is used.
-
Looks like I didn't release an updated STM32H747 Discovery Board Support package with this setting. I've done this https://www.rowleydownload.co.uk/arm/packages/ST_STM32H747I_DISCOVERY.htm
-
You bet!
Thanks for the new package. I'll give it a whirl now. And thanks for the help!!
Here's the log:
---
Loading target script file STM32H7_Target.js
Executing match part name script
Executing script MatchPartName("STM32H745XI_CM7")
Loading target script file STM32H7_Target.js
Preparing target for download
Executing Reset script FLASHReset()
Downloading ‘STM32H7_Loader_rpc.elf’ to ST-LINK/V2
Programming 2.2 KB of .load_section addresses 24000000 — 24000927
Download successful
Verifying ‘STM32H7_Loader_rpc.elf’ on ST-LINK/V2
Verifying 2.2 KB of .load_section addresses 24000000 — 24000927
Verify successful
Erasing ‘MIXER_CM7.elf’ on ST-LINK/V2
Erasing 199.4 KB of addresses 08040000 — 08071daf
Erasing 0.1 KB of addresses 08071db0 — 08071e2b
Erase successful
Erasing ‘Mixer_CM4.elf’ on ST-LINK/V2
Erasing 0.6 KB of .vectors addresses 08100000 — 08100297
Erasing 0.7 KB of .init addresses 08100298 — 0810057b
Erasing 407.1 KB of .text addresses 0810057c — 08166247
Erasing 0.0 KB of .ctors addresses 08166248 — 08166287
Erasing 39.6 KB of .rodata addresses 08166288 — 0817010f
Erasing 0.2 KB of .data addresses 08170110 — 08170217
Erase successful
Downloading ‘MIXER_CM7.elf’ to ST-LINK/V2
Programming 199.4 KB of addresses 08040000 — 08071daf
Programming 0.1 KB of addresses 08071db0 — 08071e2b
Download successful
Downloading ‘Mixer_CM4.elf’ to ST-LINK/V2
Programming 0.6 KB of .vectors addresses 08100000 — 08100297
Programming 0.7 KB of .init addresses 08100298 — 0810057b
Programming 407.1 KB of .text addresses 0810057c — 08166247
Programming 0.0 KB of .ctors addresses 08166248 — 08166287
Programming 39.6 KB of .rodata addresses 08166288 — 0817010f
Programming 0.2 KB of .data addresses 08170110 — 08170217
Download successful
Verifying ‘MIXER_CM7.elf’ on ST-LINK/V2
Verifying 199.4 KB of addresses 08040000 — 08071daf
Verifying 0.1 KB of addresses 08071db0 — 08071e2b
Verify successful
Verifying ‘Mixer_CM4.elf’ on ST-LINK/V2
Verifying 0.6 KB of .vectors addresses 08100000 — 08100297
Verifying 0.7 KB of .init addresses 08100298 — 0810057b
Verifying 407.1 KB of .text addresses 0810057c — 08166247
Verifying 0.0 KB of .ctors addresses 08166248 — 08166287
Verifying 39.6 KB of .rodata addresses 08166288 — 0817010f
Verifying 0.2 KB of .data addresses 08170110 — 08170217
Verify successful
Loading target script file STM32H7_Target.js
Preparing target for user application
Executing Reset script FLASHReset()
Loading target script file STM32H7_Target.js
Executing match part name script
Executing script MatchPartName("STM32H745XI_CM4")
Loading target script file STM32H7_Target.js
Preparing target for download
Executing Reset script FLASHReset()
Downloading ‘STM32H7_CM4_Loader_rpc.elf’ to ST-LINK/V2
Programming 2.2 KB of .load_section addresses 30000000 — 30000923
Download successful
Verifying ‘STM32H7_CM4_Loader_rpc.elf’ on ST-LINK/V2
Verifying 2.2 KB of .load_section addresses 30000000 — 30000923
Verify successful
Loading target script file STM32H7_Target.js
Preparing target for user application
Executing Reset script FLASHReset() -
Sure thing. Only the site won't let me paste something that big; it just hangs.
Let's try the link directly:
https://drive.google.com/file/d/13GrJ1Nsomtbl0W7VvUD0Ite1czUgJfOt/view?usp=sharing
-
The Mixer CM7 project has
Additional Load File[0] $(ProjectDir)/Mixer CM4 THUMB Debug/Mixer_CM4.elf
and
Debug Additional Projects: Mixer CM4
try removing the Additional Load File[0] property, you can right click on it in property dialog and select "Use Inherited"
and set the
Load Additional Projects: Mixer CM4
Please sign in to leave a comment.
Comments
15 comments