Using the J-Link Base with the M4 core on an STM32H747XI with a non-standard FLASH start address

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Using the J-Link Base with the M4 core on an STM32H747XI with a non-standard FLASH start address

      Hi,

      I'd like to be able to debug binaries on the M4 core of my board using my J-Link Segger Base via SWD. The CM4 binary start in my setup is non-standard (vs the wizard values) and it's 0x08180000 for the start and 0x08200000 for the end. I couldn't work out from the Ozone User Guide and Reference Manual what I needed to change to successfully connect to the M4 core (M7 debugging works fine) and flash the M4 in the right place.

      No doubt this is RTFM and I've just missed the section in the docs but any pointers would be very much appreciated.

      As an aside, I was diagnosing an intermittent crash on the M4 so I span up Ozone and tried 'Connect to running program" and instead of connecting to the M4 with the program counter untouched it seemed to soft reset the board so it rebooted and I lost the crash state I wanted to debug. If anyone has pointers as to what I need to do to avoid this behaviour I'd also be thankful :)

      Kind regards,

      Andy
    • Hello,

      1.
      If your Flash base address differs from the one specified in the J-Link software, you can change it using a command-line parameter.
      For more information, please refer to:
      kb.segger.com/J-Link_Multiple_…er#Command_line_parameter

      For Ozone, you may need to specify the flash loader in your project file.
      For further details, refer to section 7.9.15.2, Project.SetFlashLoader (page 333):
      segger.com/downloads/jlink/UM08025_Ozone.pdf

      2.
      It is possible that a device-specific reset is executed when the J-Link connects to the device.
      You can prevent this by providing a JLinkScript file that overrides the InitTarget() function.
      However, please note that overriding this function might disable other functionalities, such as initializing the DAP and unsecuring the target.
      You can find an example in our knowledge base:
      kb.segger.com/J-Link_script_fi…g_device_specific_connect

      Best regards,
      Simon
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.