Coder Social home page Coder Social logo

Comments (5)

tannewt avatar tannewt commented on July 25, 2024

Ya, it should be 0x4000 for samd51. In CircuitPython we use the py and provide the offset on the command line IIRC.

from uf2-samdx1.

FHeilmann avatar FHeilmann commented on July 25, 2024

@ladyada @dhalbert what is your opinion on this? These false offsets bear the risk of people nuking their bootloaders on M4 boards.

from uf2-samdx1.

dhalbert avatar dhalbert commented on July 25, 2024

As @tannewt notes, the Makefile explicitly specifies the offset argument for uf2conv.py with -b ~$(BOOTLOADER_SIZE). So unless you run this by hand, or use binuf2.js, it will not produce a UF2 with a bad offset.

We can, however, take away the default values for these arguments. bin2uf2.js doesn't take arguments but we could add those (or just get rid of this script in favor of the python one).

Also I'd note that the Makefile tries to use python2 to run uf2conv.py. It should be made to be version independent or py3 only. @TG-Techie noticed that this morning.

from uf2-samdx1.

FHeilmann avatar FHeilmann commented on July 25, 2024

I see, thanks for clearing that up for me. Removing the default values from these scripts would make them more foolproof in my opinion since you would not be able to execute them without specifically specifying an offset. In addition to your notes I also want to mention sketch.cpp again where bootloader_size is passed as argument, but BOOTLOADER_K is hardcoded to be 8k

I'm not sure how to go about this (maybe you can point me in the right direction) but the same issues are present in the upstream microsoft repository. Should I open a separate issue over there?

Thanks again for your time!

from uf2-samdx1.

dhalbert avatar dhalbert commented on July 25, 2024

We send PR's to upstream regularly, and we're the only non-8K bootloader right now, so just here is fine.

from uf2-samdx1.

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.