MTB buffer location incorrect

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

    • MTB buffer location incorrect

      New

      I want to use MTB on MKL05Z32 (4k RAM). But it doesn't seem to be working. Whenever I enable Trace Buffer in the Ozone settings, my program just crashes with a hard fault.

      I have reserved space in RAM for the MTB buffer with: (where __SA_MTB_SIZE=0x200 is globally defined as in the project settings)

      C Source Code

      1. unsigned char __attribute__((section (".mtb_buf"))) mtb_buf[__SA_MTB_SIZE] __attribute__ ((aligned (SA_MTB_ALIGNEMENT)));

      And I see in the MAP file that mtb_buf is located at 0x1ffffc00, which is consistent with the reference manual which states it should be located at (0x2000_0000 -(RAM_Size/4))

      But it seems like Ozone is assuming that the MTB is located at 0x20000000. I see this in the Ozone console:

      Source Code

      1. MTB: No UsageSize configured. Using default 0x00000200
      2. MTB: Starting trace using 0x200 bytes buffer @ 0x20000000

      Is there a way to tell Ozone/Jlink where the MTB buffer actually is?
    • New

      Hi,
      Thank you for you inquiry.
      The MTB buffer location can be set via J-Link Command strings:
      wiki.segger.com/MTB_specifics#…ngs_for_MTB_configuration

      How to use J-Link Command strings in Ozone you can find here:
      wiki.segger.com/J-Link_Command…ng_J-Link_Command_Strings

      Does this solve the issue?

      Best regards,
      Fabian
      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.