Giter Club home page Giter Club logo

Comments (4)

elderbig avatar elderbig commented on July 18, 2024 1

Thanks! In actually, I want build bootloader for esp-c3-M1-kit,but I do not know how to do,it seems a lot of things to do,.

from tock-bootloader.

bradjc avatar bradjc commented on July 18, 2024

In theory, the bootloader shouldn't need any modifications to support RISC-V, but would just need to be ported to a specific RISC-V chip/board. I think the main issue is that a suitable board needs:

  • Some way to automatically enter the bootloader
  • Flash HIL support
  • UART receive HIL support
  • Enough flash space to hold the bootloader

which I'm not sure there are any RISC-V boards that are really suitable. So, to answer your question, I don't think there are any short-term plans to port the bootloader to a RISC-V platform.

from tock-bootloader.

bradjc avatar bradjc commented on July 18, 2024

The basic idea is you are creating a version of the Tock kernel that runs the bootloader code. You would want to combine the main esp-c3 board with a version of the bootloader configuration from one of the boards in this repo.

One issue we always have with bootloaders is having some method for telling the bootloader to actually run, rather than jump to the main kernel. We have used a few options in the past:

  • Using the DTR/CTS pins on the UART FTDI chip to indicate that the bootloader should run.
  • Pressing a button during boot.
  • Checking for a change in baud rate and rebooting into the bootloader.

I'm guessing that for the esp-c3-M1-kit the only option will be to have the user hold the button, but I'm not 100% sure.

Beyond that really the "only" task is to be able to create the Bootloader object:

let bootloader = static_init!(
bootloader::bootloader::Bootloader<
'static,
bootloader::uart_receive_multiple_timeout::UartReceiveMultipleTimeout<
'static,
VirtualMuxAlarm<'static, nrf52::rtc::Rtc>,
>,
bootloader::flash_large_to_small::FlashLargeToSmall<'static, nrf52::nvmc::Nvmc>,
>,
bootloader::bootloader::Bootloader::new(
recv_auto_cdc,
flash_adapter,
&bootloader_exit,
pagebuffer,
&mut bootloader::bootloader::BUF
)
);

I say "only" because it requires a few resources. If those are not already implemented then they will need to be implemented for that chip.

from tock-bootloader.

gentooza avatar gentooza commented on July 18, 2024

I'm interested too!

It seems the only way to have a pure rust system, isn't it?
Rust OS + Rust app

I have no idea about bootloaders, but I'll give your instructions, @bradjc, a try!

Another question: the 'normal' esp32 bootloader boots up when powered up, this behavior is not possible using tock?

Cheers!

from tock-bootloader.

Related Issues (12)

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.