USB bootloader for custom FPGA: get DFU with no hardware required!

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ต.ค. 2024
  • A bootloader that lets you update FPGA config using only a USB cable, through DFU, that can even be used from a browser: no programmers, no FTDI chips, nothing on the board but the FPGA and 3 pins to deal with USB.
    In the first video of the series, • FPGA Design | Beyond d... we created the design for this custom FPGA PCB.
    At first, I thought I'd be using the TinyFPGA bootloader, and wired it accordingly. That didn't work out so easily, so instead here I describe and demonstrate the use of the Nitro (NO2) bootloader, which uses a similar arrangement to talk USB and provides for standard DFU updates of the firmware: both its own, and the FPGA's.
    You can find my fork of the bootloader, with all the changes shown here, at
    github.com/psy...
    All the original Nitro FPGA stuff is at:
    github.com/no2...
    That cool DFU in the browser thing (works at least with chrome and brave) is at
    devanlai.githu...

ความคิดเห็น • 27

  • @PsychogenicTechnologies
    @PsychogenicTechnologies  8 หลายเดือนก่อน +1

    The neat browser DFU thing is at devanlai.github.io/webdfu/dfu-util/
    Also got more info from Sylvain, the no2 bootloader creator:
    "The ice40-stub stuff is the first birstream that loads and it handles :
    * Checking button state to decide to go to bootloader or not
    * Handling the bitstream selection (so you can actually select which image to boot manually if you clip the button 1/2/3 times instead of 4 times. Easier to see which one you will boot if you have a RGB led since it display which one on the led rather than being blind :D)
    * Handling the flash lock
    The ice40 stuff is the DFU bootloader proper stuff."
    Awesome

  • @matthewvenn
    @matthewvenn 8 หลายเดือนก่อน +5

    Great to see it in action!

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  8 หลายเดือนก่อน

      Yes! And I just got the new externally produced batch today--they're black, well done and look awesome. Wish I'd had 'em for the video!! :)

  • @dkpriest
    @dkpriest 6 หลายเดือนก่อน +1

    This is one of those rare cases where I searched for some abstract thing I wanted to get done, find this, and not only it answers every single question I had about it, but also shows me there's an even easier way to get it done than I had originally thought about.

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  5 หลายเดือนก่อน

      That's awesome to hear! I actually have to make an addendum to the video: I just went through the process of making a version for TT04+ demoboards, github.com/TinyTapeout/breakout-pcb/tree/main/ASIC-simulator/tt04-fpga-ICE40UP5k and I moved things around because of the new pinout. Well I chose a nice 24MHz clock, which is a clean multiple of the USB 48 and stuck it on a GB pin... hm, no, if you want to use the PLL, some GB pins are better than others. Pins 35 and 37: nope, interfere with the PLL. So, if you're doing this, best to setup and build the bootloader before you get the boards produced, or even laid out, and you'll be certain you're all set.
      Everything actually still works, since you can turn on an internal osc and use that, but next revision will use the external clock so I'll be moving it to pin 20 or 44 which seem good on the up5k.
      Good luck on your project

  • @pirateradio1926
    @pirateradio1926 3 หลายเดือนก่อน

    Phenomenal. Please keep up the great work. You have become my current favorite channel.

  • @kentswan3230
    @kentswan3230 8 หลายเดือนก่อน +1

    Good work. Thanks. Probably have to watch it several times to correlate processes and understand what's going on, though.

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  8 หลายเดือนก่อน +1

      Thanks!! Also, yeah, it's a mouthful: download my forked repo or just look at the commit to have a quick view of all the things I did during the vid
      github.com/no2fpga/no2bootloader/compare/master...psychogenic:no2bootloader:master

  • @Cerololo
    @Cerololo 8 หลายเดือนก่อน

    Thanks for the video. I would love to see your pick and place machine in work for this PCB :)

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  8 หลายเดือนก่อน +1

      Thanks!! I won't be producing more of this particular version, and have been promising PnP videos for a while now without delivering, but I've actually got two pick & place videos underway: one focused on drag feeders, the other a full walkthrough of a project with OpenPnP and this machine. Stay tuned for those, am trying to put these out more regularly (can't wait until I have "free time", cause you know, that never just happens, hah)

  • @markpitts5194
    @markpitts5194 8 หลายเดือนก่อน

    Great Vid. Need some hardware to play with next. New toys! Can we (eventually) get hardware from you or PCBWay?

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  8 หลายเดือนก่อน

      Thanks Mark! The answer is yes (in not too long). You could actually spin off the board from the first video, but I wouldn't really recommend it since it's form factor is really specific to the use case (and uses headers that you get for a buck in china, but cost me CAD $7 a piece in prototyping, which bugs me, hah).
      But I had a similar convo on twatter, and I'll be designing a nice little board (and make a kicad tutorial while I'm at it), and make that both open hardware and available. Thanks again, would be a pleasure if I could provide you with some new toys :) cheers

    • @markpitts5194
      @markpitts5194 8 หลายเดือนก่อน

      @@PsychogenicTechnologies Glad about that. Its Friday night, and I'm settling in for some quality time with KiCad. Still learning it, I used to use DOS Protel a long time ago. So hints on KiCad will be cool, esp. the heirarchical stuff, and multi page, and the way you do your big drawings. Also sorting out a propper way to arange libraries etc.
      Right... time for Iron Maiden, and a drop of Buffalo Trace!

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  8 หลายเดือนก่อน

      @@markpitts5194 Perfect--thanks for highlighting those areas, am making note and will do my best to cover all that stuff that isn't obvious ("you add a wire by clicking here" ugh) and focus on the things that I find particularly useful or different with kicad. Say hi to Eddie for me and have a nice weekend :)

  • @-r-495
    @-r-495 2 หลายเดือนก่อน

    I have an early Atmel carrier board and I somewhat find myself sent on memory lane ^~

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  2 หลายเดือนก่อน +1

      Hah, nice. I still have a few AVR ISP programmers, including that big thing with the 12V programming--can't seem to get rid of them... you know, "just in case" but I think it's just nostalgia

  • @FlexyZMelon
    @FlexyZMelon 8 หลายเดือนก่อน

    awesome stuff

  • @suarezvictor77
    @suarezvictor77 8 หลายเดือนก่อน

    WebUSB DFU is super great!!!!

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  8 หลายเดือนก่อน +1

      I agree! Only had a quick look, didn't find it suuuuper clear how to replicate this elsewhere--at first I thought it was webassembly but it looks like it's just JS?? wow. Anyway, I love this thing :)

  • @finnbin1
    @finnbin1 8 หลายเดือนก่อน

    cool stuff.... well done...

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  8 หลายเดือนก่อน

      Thanks Finn! Most of the real work was done by the NO2 bootloader, am glad to be able to demo and share how to get it into our own projects.
      Thanks again for the feedback, cheers.

    • @finnbin1
      @finnbin1 8 หลายเดือนก่อน

      @@PsychogenicTechnologies yes, i know.... but you'r so good at explaining, and showing what to do... really enjoy you'r stuff

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  8 หลายเดือนก่อน

      @@finnbin1 Thank you, that means a lot :)

  • @TalpaDK
    @TalpaDK 8 หลายเดือนก่อน

    I love FPGAs they are "magical" but I usually doesn't have anything that justifies using one.
    Even at work where I have an nRF52 where the counters are a bit slow for the signal I need to measure the frequency of... An external "discrete" counter later and this is less of a problem.
    Sure a small ICE series FPGA isn't that expensive and could also accelerate the graphics on the SPI LCD display (the nRF52832 maxes out at 8MHz but both the display and the flash can go faster)...
    But it would also add another single source component (and some additional FPGA and MCU code)

    • @PsychogenicTechnologies
      @PsychogenicTechnologies  8 หลายเดือนก่อน

      Yeah, in most cases I wind up playing with an MCU... an RP2040 is mega capable and fast, nRF and ESP chips give you comms for free, and frankly most of my thinking is still sequential/algorithmic. There have been cases, doing a lot of parallel processing, where the FPGA was a shiny choice, but mostly for me they wind up in spots where we're planning to stick an ASIC down the line.