Git Product home page Git Product logo

tock-bootloader's People

Contributors

alevy avatar alexandruradovici avatar bradjc avatar brghena avatar gentooza avatar mateibarbu19 avatar ppannuto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tock-bootloader's Issues

Bootloader cannot update itself

Although the bootloader can program the kernel and any application over serial, it cannot update its own code, since it is running from flash.

If the bootloader code relocates into RAM, it would be possible to arbitrarily overwrite its flash image. Thus, the bootloader could update itself.

I think the relocation step could be implemented simply by changing the linker script, so that all code sections are between _srelocate and _erelocate. The startup code will take care of the rest.

The only remaining item would be to add a corresponding command to tockloader.

Maybe this is a feature we don't actually want? It would allow a board to be bricked by a bad bootloader image (assuming the developer doesn't have a JLink). For a developer with only serial port access, the choice is either 1. a bad bootloader update could brick them, or 2. they are stuck with whatever version of the bootloader they started with.

Personally, I think 2. is the worse case, but maybe others feel differently. Thoughts?

nrf52dk bootloader

What is necessary to use the bootloader with the nrf52dk USB debugger?

Support "USB-only" nRF52 boards

Typically our bootloaders require an FTDI chip to do serial over USB so that the bootloader running on the chip only requires a serial interface. Since MCUs sometimes have USB hardware, It has always seemed reasonable to omit the FTDI chip and just communicate with the USB peripheral on the MCU directly. In particular, the Arduino Nano 33 relies on having a USB bootloader on the chip itself.

Help Wanted: Make kernel location variable

Right now, the kernel location is fixed at 0x10000. Ideally, this wouldn't be fixed in case a platform wants to put its kernel at a different address.

fn jump(&self) {
unsafe {
asm!(
".syntax unified \n\
ldr r0, =0x10000 // The address of the payload's .vectors \n\
ldr r1, =0xe000ed08 // The address of the VTOR register (0xE000E000(SCS) + 0xD00(SCB) + 0x8(VTOR)) \n\
str r0, [r1] // Move the payload's VT address into the VTOR register \n\
ldr r1, [r0] // Move the payload's initial SP into r1 \n\
mov sp, r1 // Set our SP to that \n\
ldr r0, [r0, #4] // Load the payload's ENTRY into r0 \n\
bx r0 // Whoopee"
);
}
}
}

I don't think this would be particularly hard, I just don't know how to do it.

Tracking Issue: nrf5x support

This may need to split to nrf51 and 52 in the future, but hopefully the bootloader is minimal enough that much/most can be shared.

Instructions

The instructions tell you to go to

boards/

but the only subdirectory is

boards/hail-bootloader

Does this work for imix? If hail is the only board supported then the instructions should say so explicitly.

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.