[SOLVED] nRF52, monitor mode and Rust debugging

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

  • [SOLVED] nRF52, monitor mode and Rust debugging

    We plan on writing parts of nRF52 firmware in C + Rust.

    One issue with nRF52 is that it needs monitor mode so that chip doesn't crash on breakpoint if BLE is enabled - wiki.segger.com/nRF52_Series_D…Debugging_on_Nordic_nRF52

    But Ozone doesn't fully support Rust (latest 3.28b) - i.e. it can see symbols, you can break on them, you see structures, but without values. It has a workaround that you add watch to a specific location in memory and cast it to some type, but it's fairly impractical.

    CLion with Rust plugin via JLink GDB server works for Rust (at least we tried it on STM32), but not sure if I can make the monitor mode work there?

    Any suggestions on how to proceed with this? If the code only needs adding some of the Segger monitor code, it may be fine.

    (BTW Rust support in Ozone would be real nice, it seems it doesn't have that far to completion)

    For comparison some screenshots of Rust code Ozone vs in CLion+JLink GDB server in attachments - you can see the structure in local variables, but no values in Ozone.
    Images
    • Ozone_Rust_no_var_values_03.png

      534.17 kB, 1,960×1,091, viewed 234 times
    • CLion_Rust_embedded_Trezor_01.png

      351.61 kB, 1,960×1,091, viewed 286 times
  • Hi Zamniah,

    as you can see in section 1.1 "What is Ozone?" of the Ozone user's manual, "Ozone is a source-level debugger for embedded software applications written in C/C++ [...]."

    Rust uses some encoding of the debug information for basic types inside the ELF file that is not compatible with C/C++. We already have adding support to those basic types to Ozone on our internal wish list for future improvements but cannot comment on when this will be available.

    Best regards
    -- AlexD
    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.