Code Monkey home page Code Monkey logo

Comments (6)

enjoy-digital avatar enjoy-digital commented on May 20, 2024

Thanks, i'll try to reproduce. Do you have a minimal firmware to load with flterm that trigger the issue? (On others project we are running software from DDR with VexRiscv, so that would help understand what is going on).

from litex.

pgielda avatar pgielda commented on May 20, 2024

Yes, I know this looks suspicious.

I've prepared a minimal test for that:
https://github.com/pgielda/litex-baremetal-test

This is a very minimal standalone baremetal program. The only trick there is that I "steal" flush_cpu_dcache so you will need to update the address in linker.ld with a correct one.

Just tested this and it only works if the flush_cpu_dcache is called 3 times at the beginning. Otherwise the firmware reboots the board (which means that mcause was != 0).

If you do not want to update linker.ld you can also remove flush_cpu_dcache calls from my code, test and prove that the code reboots itself, then add those to boot.c in the BIOS and see that the code stops rebooting.

At least this happens on my setup with ARTY.

from litex.

enjoy-digital avatar enjoy-digital commented on May 20, 2024

It seems flushing dcache and l2_cache make it work, can you test with upstream LiteX?

from litex.

pgielda avatar pgielda commented on May 20, 2024

Thanks, this change looks promising. I will test this over the weekend.

from litex.

enjoy-digital avatar enjoy-digital commented on May 20, 2024

OK thanks.

from litex.

pgielda avatar pgielda commented on May 20, 2024

I can confirm that his fixes the problem.

from litex.

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.