juribeparada / MMDVM_HS

MMDVM HotSpot: firmware for ZUMspot or MMDVM_HS based boards (D-Star, DMR, YSF, P25, NXDN and POCSAG)
GNU General Public License v2.0
345 stars 141 forks source link

use st-flash from path if exists and add option --flash=128k #140

Closed mcamposv closed 3 years ago

mcamposv commented 3 years ago

After enable the duplex & usb boot loaer option a bin file bigger than 64k is generated. and flashing using make stlink-bl fails because of the file size. I'm testing on MMDVM Dual hat Revision 1.3 chip STM32F 103C8t6 which is detected as 64k flash but in reality it has 128k therefore st-flash command needs to specify the flash size. STM32F10X_Lib is adding st-flash old version wich does not support --flash option. so I modified the Makefile so if st-flash binary is in the path use it and enable --flash option.

Probably this is not the best solution but is a quick fix. I hope you can aprove this PR or upgrade STM32F10X_Lib repo and add the --flash option.

Thanks.