From 21732162c19bb44d1aacefd87a54b01739fc4092 Mon Sep 17 00:00:00 2001 From: Roger Clark Date: Wed, 3 Dec 2014 08:27:52 +1100 Subject: [PATCH] Modified serial_upload.bat so that it would work for windows system using D: etc for the Arduino folder --- tools/win/serial_upload.bat | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/win/serial_upload.bat b/tools/win/serial_upload.bat index c59a646..d733be7 100644 --- a/tools/win/serial_upload.bat +++ b/tools/win/serial_upload.bat @@ -1,23 +1,23 @@ @echo off -rem -rem parameters are: - -rem Note: %~dp0 get path of this batch file, so path parameter is no longer required - +rem: Note %~dp0 get path of this batch file +rem: Need to change drive if My Documents is on a drive other than C: +set driverLetter=%~dp0 +set driverLetter=%driverLetter:~0,2% +%driverLetter% cd %~dp0 rem: the two line below are needed to fix path issues with incorrect slashes before the bin file name set str=%4 set str=%str:/=\% stm32flash -g 0x8000000 -b 230400 -w %str% %1 -rem C:\Python27\python.exe stm32loader.py -e -w -p %1 -g -b 115200 %str% +rem: C:\Python27\python.exe stm32loader.py -e -w -p %1 -g -b 115200 %str% -rem ------------- use STM's own uploader -rem ---- Need to remove the COM bit from the comm port as the STM prog just wants the number +rem: ------------- use STM's own uploader +rem: ---- Need to remove the COM bit from the comm port as the STM prog just wants the number set commport=%1 set commportnum=%commport:COM=% -rem --- The maple board may nee the -i setting to be -i STM32_Med-density_128K or STM32_Med-density_64K -rem ---- 64 bit version -rem "%ProgramFiles(x86)%\STMicroelectronics\Software\Flash Loader Demonstrator\STMFlashLoader.exe" -c --pn %commportnum% --br 230400 -i STM32_High-density_256K -e --all -d --fn %str% --a 0x8000000 -r --a 0x8000000 +rem: --- The maple board may nee the -i setting to be -i STM32_Med-density_128K or STM32_Med-density_64K +rem: ---- 64 bit version +rem: "%ProgramFiles(x86)%\STMicroelectronics\Software\Flash Loader Demonstrator\STMFlashLoader.exe" -c --pn %commportnum% --br 230400 -i STM32_High-density_256K -e --all -d --fn %str% --a 0x8000000 -r --a 0x8000000 -rem -- 32 bit version -rem "%ProgramFiles%\STMicroelectronics\Software\Flash Loader Demonstrator\STMFlashLoader.exe" -c --pn %commportnum% --br 230400 -i STM32_Med-density_64K -e --all -d --fn %str% --a 0x8000000 -r --a 0x8000000 +rem: -- 32 bit version +rem: "%ProgramFiles%\STMicroelectronics\Software\Flash Loader Demonstrator\STMFlashLoader.exe" -c --pn %commportnum% --br 230400 -i STM32_Med-density_64K -e --all -d --fn %str% --a 0x8000000 -r --a 0x8000000