Bootloader Firmware Update Mechanism :: Bare Metal Programming Series 10

Поділитися
Вставка
  • Опубліковано 22 чер 2023
  • In this episode, we're finally building the core firmware update mechanism in the bootloader! This involves taking all the elements we've been working on until now - timers, state machines, the packet protocol on top of uart, etc - and putting them together into a bootloader firmware that is able to communicate with a host PC and receive a firmware update.
    In the next video, we'll build the PC side application, and complete this major milestone, before moving on to implementing a cryptographic code signing mechanism, to ensure only authorised code can be loaded onto the device.
    =[ 🔗 Links 🔗 ]=
    🎥 Series Playlist: • Blinky To Bootloader: ...
    🗣 Discord: / discord
    ⭐️ Patreon: / lowleveljavascript
    💻 Github Repo: github.com/lowbyteproductions...

КОМЕНТАРІ • 11

  • @MarcelRobitaille
    @MarcelRobitaille 11 місяців тому +1

    What about using union types? Could save you from comparing 4 bytes on 4 lines in a few places.

    • @LowByteProductions
      @LowByteProductions  11 місяців тому +1

      Definitely possible - I usually avoid them by default for this kind of purpose since there can be endianness issues across platforms, though that wouldn't be a problem here.

  • @kalidsherefuddin
    @kalidsherefuddin 6 місяців тому

    Thanks

  • @kilwo
    @kilwo 11 місяців тому

    Just a quick thought. Could you move the check_for_timeout function call from inside all the else sections to just under the start of the while loop. Then just reset the timer as appropriate in the switch. That way, the timeout check is only in one place, so smaller code, but also a bit easier to read. In the case where you receive a valid packet after the timeout, you should timeout anyway as it’s too late

  • @user-bi1vi6nm2o
    @user-bi1vi6nm2o 11 місяців тому

    Thank you...this course is very useful... Can you give me some books and refrences to learn more about these things (bootloader, linker, etc.....)

    • @LowByteProductions
      @LowByteProductions  11 місяців тому +3

      I have to admit, most of what I've learned about embedded hasn't cone through reading books. A lot of it has been programming, reading others code, watching videos (of which quality ones are hard to find, hence making this series!), and reading blog posts.
      With regard to blog posts, the interrupt blog by memfault is fantastic - I recommend reading everything they've written. For bootloader specifically, they have a series called zero to main, which covers a huge amount of ground, and builds a more solid, multi stage bootloader than is shown in these videos: interrupt.memfault.com/tag/zero-to-main/
      For linker scripts, I learned a lot when I wrote a risc-v emulator, and needed to compile C that matched up to the emulators specific memory map. Thea flowers hasa great blog about linker script too: blog.thea.codes/the-most-thoroughly-commented-linker-script/
      Hope some of that helps! Best piece of advice I can give is: write a lot of code, and read a lot of code!

    • @user-bi1vi6nm2o
      @user-bi1vi6nm2o 11 місяців тому

      Thanks for your help... Can i ask you another question... I want to build my own transmitter and receiver using ADC and DAC and multiply them with carrier frequency by using mixer can you give me your opinion in this project and some resources to do this....

    • @user-bi1vi6nm2o
      @user-bi1vi6nm2o 11 місяців тому

      I played quite a lot with software defined radio my goal is to build my static software defined radio using some cheap ics and microcontroller

  • @forheuristiclifeksh7836
    @forheuristiclifeksh7836 3 місяці тому

    0:10

  • @tiphaniestaub5025
    @tiphaniestaub5025 11 місяців тому

    Promo SM 😱