GithubHelp home page GithubHelp logo

Comments (5)

MabezDev avatar MabezDev commented on July 28, 2024

You might get a stack trace in this region if you call a function that's placed in this ram region, e.g: https://github.com/esp-rs/esp-hal/blob/edd6c16637f9639c2e4de9f7c664c398794c2594/esp32c3-hal/examples/ram.rs#L94-L97

from esp-backtrace.

bjoernQ avatar bjoernQ commented on July 28, 2024

IIRC is_valid_ram_address is only used to check the stack frame address - not the program counter address.
I tested with a panic inside function_in_rtc_ram on C3 and S3 and I got the backtrace.

Do you have an example where it failed to produce a backtrace while it should be able to generate it?

from esp-backtrace.

MabezDev avatar MabezDev commented on July 28, 2024

I don't have a concrete case, because I was just theorizing that it was possible :D. I think the case I had in my mind was if function_in_rtc_ram called another function inside rtc ram. I think then you'd get a stacktrace which was partially in rtc ram?

from esp-backtrace.

bjoernQ avatar bjoernQ commented on July 28, 2024

Should work - at least in my test it does: (tested on ESP32-S3 but shouldn't matter)

0x420179a3 - core::panicking::panic
    at C:\Users\Bjoern\.rustup\toolchains\esp\lib\rustlib\src\rust\library\core\src\panicking.rs:117
0x42001e59 - ram::in_flash
    at C:\projects\esp\esp-hal\esp32s3-hal\examples\ram.rs:101
0x600fe00d - ram::function_in_rtc_ram
    at C:\projects\esp\esp-hal\esp32s3-hal\examples\ram.rs:96
0x420027f1 - ram::__xtensa_lx_rt_main
    at C:\projects\esp\esp-hal\esp32s3-hal\examples\ram.rs:81
0x42015193 - Reset
    at C:\Users\Bjoern\.cargo\registry\src\index.crates.io-6f17d22bba15001f\xtensa-lx-rt-0.16.0\src\lib.rs:70
0x403787cf - ESP32Reset

from esp-backtrace.

MabezDev avatar MabezDev commented on July 28, 2024

Nice, in which case we can close this! Thanks for looking into it :).

from esp-backtrace.

Related Issues (15)

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.