Giter Site home page Giter Site logo

Comments (9)

MabezDev avatar MabezDev commented on July 4, 2024

This is most likely a defmt issue because they construct the header in a way that allows the debugger to attach to it, but isn't fully initialized. It should be fixed there, rtt-target doesn't have this problem, but obviously doesn't support defmt.

from probe-rs.

dzamlo avatar dzamlo commented on July 4, 2024

I have the same issues with rtt-target: https://gitlab.com/dzamlo/minimal-example-rtt-issue/-/tree/rtt-target?ref_type=heads

from probe-rs.

dzamlo avatar dzamlo commented on July 4, 2024

I have the same issue with the rtt backend of esp-println

from probe-rs.

dzamlo avatar dzamlo commented on July 4, 2024

If I remove the .await, using hal::Delay to wait instead of Timer, but let everything else the same (still an async function, embassy still initialized), it seems to works as expected.

If I use .await for something else than a timer, like waiting for a falling edge on a gpio, I get the issues.

from probe-rs.

dzamlo avatar dzamlo commented on July 4, 2024

After further investigation, it is the call to core::arch::asm!("wfi"); that cause the issue, so nothing to do with async in itself. I've made a minimal reproduction: https://gitlab.com/dzamlo/minimal-example-rtt-issue/-/tree/wfi-example?ref_type=heads

I get the same issues with an esp32-c6.

from probe-rs.

dzamlo avatar dzamlo commented on July 4, 2024

I can reproduce the issue on a STM32L476 (on a nucleo board with a ST-LINK/V2-1): https://gitlab.com/dzamlo/minimal-example-rtt-issue-arm

In addition to RTT issues, I sometime cannot even flash the board and get one the following error messages:

Error: Connecting to the chip was unsuccessful.

Caused by:
    0: An error with the usage of the probe occurred
    1: An error specific to a probe type occurred
    2: Command failed with status SwdDpWait
Error: Connecting to the chip was unsuccessful.

Caused by:
    0: An ARM specific error occurred.
    1: The debug probe encountered an error.
    2: An error specific to a probe type occurred
    3: Command failed with status JtagNoDeviceConnected

The solution to recover is to connect BOOT0 to VCC and unplug, replug the board.

from probe-rs.

Yatekii avatar Yatekii commented on July 4, 2024

It is know that WFI can cause this dependent on what debug bits you set because the chips disable the debug unit. But we can become more resilient I guess.

Duplicate of #350.

from probe-rs.

dzamlo avatar dzamlo commented on July 4, 2024

Is there any way to detect this situation ? It would be very helpful to show a link to a page that explain the situtation in this case, instead of just having the logs not working.

from probe-rs.

Yatekii avatar Yatekii commented on July 4, 2024

It would be nice to at least display a hint I guess, but it's not easy to really know.

from probe-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.