im-tomu / foboot

Bootloader for Fomu
Apache License 2.0
100 stars 32 forks source link

dfu detach not required to start program #11

Closed huettern closed 5 years ago

huettern commented 5 years ago

According to the readme a dfu-util -e has to be executed after downloading an image to start the new bitstream.

In my experience, running the riscv-blink on a fomu hacker board the program immediately starts execution after dfu download is complete.

Running Fomu DFU Bootloader v1.7.3-1-g82cb20c and dfu util v0.8 on Ubuntu.

Can someone explain me where in the bootloader the reset is executed after download?

xobs commented 5 years ago

I've updated the README.md to give correct information about the usage of dfu-util -e. It used to be a two-step process (due to timing restrictions), but was eventually collapsed into a one-step process.

The actual reboot is handled as part of the DFU_DETACH message that is parsed in https://github.com/im-tomu/foboot/blob/master/sw/src/usb-dev.c#L190

huettern commented 5 years ago

Thank you very much @xobs for the explanations