SES can not live watch variables when target is runing

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

    • SES can not live watch variables when target is runing

      New

      when I am using SES8.18+Jlink to debug a RISC-V MCU(HPM6284).
      I added some global variables to the watch window and set the refresh rate to twice a second.
      In fact, the variables are refreshed only when the target stopped. When the target on running, the variables in the watch window are keep in 0.
      Is there something I need to set?
      Please gave me some help, thanks!!
    • New

      I found some clues about this issue.

      (1) When I use __attribute__((section(".noncacheable"))) to assign some variables, the watch function is valid and can be updated when the mcu is running.
      exp: __attribute__((section(".noncacheable"))) int testval=0;

      (2) If __attribute__((section(".noncacheable"))) is not used, the watch function is only available when the mcu is stopped.

      (3) When I disable the D-cache in MCU, the watch function can still be used when the mcu is running even without using __attribute__((section(".noncacheable"))).

      The watch function seems to be affected by the d-cache.

      But if __attribute__((section(".noncacheable"))) is used, the initial value of the variable becomes invalid and becomes a seemingly random data.

      How does SES handle these codes, and why the initial value of the variable becomes so strange?