hydrabus / hydrafw

HydraBus HydraFW official firmware for open source multi-tool for anyone interested in learning/developping/debugging/hacking/Penetration Testing for basic or advanced embedded hardware
https://hydrabus.com/hydrabus-1-0-specifications
Apache License 2.0
362 stars 92 forks source link

src/Makefile: add target to flash firmware for convenience #150

Closed ia closed 9 months ago

ia commented 9 months ago

Hello. Just decided to share this tiny improvement for the main Makefile: in the case of compile-flash-run cycle, now just putting the device into dfu mode & running make flash will do the rest automagically. Can't wait to hear any feedback about this patch.

bvernoux commented 9 months ago

Thanks for the contribution, it is simple and shall do not have any border effect (I have not tested it so far) The only potential issue is it is specific to Linux (as Windows support will requires a dedicated special version of dfu-util with same syntax and which fully support STM32F405 Flash ...) and it does not support Windows (with ifeq ($(OS), Windows_NT) using Windows ST DfuSeCommand.exe see https://github.com/hydrabus/hydrafw/tree/master/utils/windows_dfu_util)

@Baldanos Could you check if you do not see any issue on Linux ?

ia commented 9 months ago

Thanks for the contribution

Thank YOU and every other contributor for this incredibly amazing open hardware project with open source firmware! The honor is mine to contribute at least something back.

The only potential issue is it is specific to Linux (as Windows support will requires a dedicated special version of dfu-util with same syntax and which fully support STM32F405 Flash ...)

Oops... Yes, indeed! Although I have a couple of fully proprietary hardware devices with Windows-only management software myself but for anything else I usually use Linux so I even didn't notice that this Makefile is Win-compatible!

and it does not support Windows (with ifeq ($(OS), Windows_NT) using Windows ST DfuSeCommand.exe see https://github.com/hydrabus/hydrafw/tree/master/utils/windows_dfu_util)

This is very interesting input! I'm sorry that I just didn't care to check the documentation for other host platforms. I did check the links now so I think I know how this patch can be improved. Thanks for the tip. I will try to make an update for the patch in the few hours.