LIBMEM RPC loader failure with multicore project...

Comments

15 comments

  • Avatar
    Michael Johnson

    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

    0
    Comment actions Permalink
  • Avatar
    Ray Rischpater

    Excellent, thanks for the speedy response.

    Yup, flashing through Crossworks. I've tried manually erasing all of flash, too.

    Flash breakpoints are off.

    I'll give a go at looking at the flash loader.

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Ray Rischpater

    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!

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Could you provide the log from the Output window.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    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.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    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

    0
    Comment actions Permalink
  • Avatar
    Ray Rischpater

    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()

     

    0
    Comment actions Permalink
  • Avatar
    Ray Rischpater

    Hmm. I get a MD5 hash failure attempting to pull the package from CrossStudio. Pulling and installing manually works, however.

    No joy, though --- still seeing the same loader error.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    No idea why the CM4_loader is being loaded after the flashing. Can you attach the .hzp file

    0
    Comment actions Permalink
  • Avatar
    Ray Rischpater

    You bet. It's here.

     

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    No attachment - can you paste the text?

    0
    Comment actions Permalink
  • Avatar
    Ray Rischpater

    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

     

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    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

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Note that the Additional Load File[0] is also set in the Release configuration for Mixer CM7.

    I use the "Properties in Folder" option in the Project Explorer to see what properties are set.

    0
    Comment actions Permalink
  • Avatar
    Ray Rischpater

    Woo hoo! 

    That did it. 

    Thanks so much.

    Look out bugs, here we come. :)

    Thanks again.

    0
    Comment actions Permalink

Please sign in to leave a comment.