Giter Club home page Giter Club logo

Comments (2)

majbthrd avatar majbthrd commented on August 22, 2024

I have added a unique ID (using the SPI flash 0x4B command) that appears both in the USB descriptor and CMSIS-DAP’s DAP_Info command. I have also added a manufacturer string.

The size of the code to retrieve the unique ID from the SPI flash dwarfs the size of storing the string that ultimately contains the result.

The way to make things fit within the existing pico-debug footprint was to cheat somewhat. Since pico-debug loads as an SRAM .uf2, it has to load into SRAM for the Boot ROM to run. Upon initial execution, it briefly has access to the entire SRAM (and not just the portion of memory earmarked for pico-debug’s use). The code for retrieving the unique ID (as well as PLL initialization code previously resident in the app that I moved to free up string space) executes first, and once it has written the result into the string buffer used by pico-debug to store the unique ID, it has done its job. The .uf2 image is slightly larger, but only the existing smaller footprint is needed for debugger operation.

from pico-debug.

flit avatar flit commented on August 22, 2024

Great! Thanks for adding this. And I wouldn't call that cheating—it's a well-crafted hack. 😉

from pico-debug.

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.