GithubHelp home page GithubHelp logo

Critical section crash about esp-hal HOT 6 CLOSED

ghismary avatar ghismary commented on July 17, 2024
Critical section crash

from esp-hal.

Comments (6)

MabezDev avatar MabezDev commented on July 17, 2024

I can't reproduce this. Could you share a full setup, with cargo settings etc in a repo?

from esp-hal.

ghismary avatar ghismary commented on July 17, 2024

I can't reproduce this. Could you share a full setup, with cargo settings etc in a repo?

Sure! Here it is: https://gitlab.com/ghislainmary/esp32-crash

from esp-hal.

MabezDev avatar MabezDev commented on July 17, 2024

Thanks for the repo, it made it pretty easy to spot!

We recently started switching to runtime binding of interrupts, and to do so we need to put the interrupt table in RAM. Without this patch, the new interrupt handling code will try and write to read only memory (FLASH) which isn't possible, hence the exception.

esp-hal's has the patched pacs, you just need to add the same to your Cargo.toml:

esp-hal/esp-hal/Cargo.toml

Lines 227 to 235 in 1846543

[patch.crates-io]
esp32 = { git = "https://github.com/esp-rs/esp-pacs", rev = "963c280621f0b7ec26546a5eff24a5032305437f" }
esp32s2 = { git = "https://github.com/esp-rs/esp-pacs", rev = "963c280621f0b7ec26546a5eff24a5032305437f" }
esp32s3 = { git = "https://github.com/esp-rs/esp-pacs", rev = "963c280621f0b7ec26546a5eff24a5032305437f" }
esp32c2 = { git = "https://github.com/esp-rs/esp-pacs", rev = "963c280621f0b7ec26546a5eff24a5032305437f" }
esp32c3 = { git = "https://github.com/esp-rs/esp-pacs", rev = "963c280621f0b7ec26546a5eff24a5032305437f" }
esp32c6 = { git = "https://github.com/esp-rs/esp-pacs", rev = "963c280621f0b7ec26546a5eff24a5032305437f" }
esp32h2 = { git = "https://github.com/esp-rs/esp-pacs", rev = "963c280621f0b7ec26546a5eff24a5032305437f" }
esp32p4 = { git = "https://github.com/esp-rs/esp-pacs", rev = "963c280621f0b7ec26546a5eff24a5032305437f" }
.

FYI it's advisable to not use git, unless you really need some feature that isn't release yet :).

from esp-hal.

ghismary avatar ghismary commented on July 17, 2024

Thanks for the quick reply, I will try that!
I am using the git repo because I'm working on the implementation of transaction for async I²C that I need for a project of mine.

from esp-hal.

ghismary avatar ghismary commented on July 17, 2024

I confirm this fixes the issue, so I'm closing it.

from esp-hal.

MabezDev avatar MabezDev commented on July 17, 2024

Thanks for the quick reply, I will try that! I am using the git repo because I'm working on the implementation of transaction for async I²C that I need for a project of mine.

Ah, I see! Glad to see someone working on that, let us know if you need any help :).

from esp-hal.

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.