Skip to content

Commit

Permalink
Merge pull request #66 from dzid26/building
Browse files Browse the repository at this point in the history
Building
  • Loading branch information
emmebrusa authored Oct 23, 2023
2 parents 9b298eb + b2d0b62 commit 4af474f
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 1,024 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ Debug
.vscode
releases
tools/Java_Configurator_Source/
!tools/Java_Configurator_Source/src
!tools/Java_Configurator_Source/src
src/controller/main.ihx
src/controller/Result.log
1 change: 0 additions & 1 deletion compile_and_flash_20.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ MKDIR %release_folder% >NUL 2>NUL
COPY ..\..\bin\main.ihx %release_folder%\TSDZ2-%version%.hex
MKDIR %backup_folder% >NUL 2>NUL
COPY ..\..\bin\main.ihx %backup_folder%\TSDZ2-%settings_date%.ihx >NUL 2>NUL
COPY ..\..\bin\main.ihx main.ihx >NUL 2>NUL

echo Press any key to flash... (Ctl+C to stop)
pause > nul
Expand Down
5 changes: 2 additions & 3 deletions src/controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,9 @@ backup:
stm8flash -c stlinkv2 -p stm8s105?6 -s eeprom -r $(ODIR)/TSDZ_orig_eeprom.bin

flash:
stm8flash -c stlinkv2 -p stm8s105?6 -w $(ODIR)/$(PNAME).ihx

stm8flash -c stlinkv2 -p stm8s105\?6 -w $(ODIR)/$(PNAME).ihx
clear_eeprom:
stm8flash -c stlinkv2 -p stm8s105?6 -s eeprom -w data_empty.ihx
stm8flash -c stlinkv2 -p stm8s105\?6 -s eeprom -w data_empty.ihx


clean:
Expand Down
35 changes: 0 additions & 35 deletions src/controller/Result.log

This file was deleted.

2 changes: 1 addition & 1 deletion src/controller/compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PATH = %PATH%;%~dp0..\..\tools\cygwin\bin;C:\SDCC\usr\local\bin;C:\SDCC\bin;C:\P
echo Build started...
timeout /t 2 > nul
make all
if errorlevel == 1 goto FAIL
if errorlevel 1 goto FAIL

:PASS
goto EXIT
Expand Down
2 changes: 1 addition & 1 deletion src/controller/compile_and_flash.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off
CALL compile.bat
if errorlevel == 1 goto EXIT
if errorlevel 1 goto EXIT

echo Press any key to flash... (Ctl+C to stop)
pause > nul
Expand Down
24 changes: 19 additions & 5 deletions src/controller/flash.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
@echo off
PATH = %PATH%;C:\STMicroelectronics\st_toolset\stvp;"C:\Program Files (x86)\STMicroelectronics\st_toolset\stvp"
PATH = %PATH%;%~dp0..\..\tools\tool-stm8flash;C:\STMicroelectronics\st_toolset\stvp;%PROGRAMFILES%\STMicroelectronics\st_toolset\stvp;%PROGRAMFILES(x86)%\STMicroelectronics\st_toolset\stvp

STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileProg=main.ihx -FileData=data_empty.ihx -verbose -no_loop -verif -no_warn_protect
if errorlevel == 1 goto FAIL
echo Flash successful, press any key to close...
:FLASH
STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileProg=../../bin/main.ihx -FileData=data_empty.ihx -verbose -no_loop -verif -no_warn_protect
if errorlevel 1 goto STM8FLASH
goto PASS

:STM8FLASH
echo.
echo Flashing using STVP failed. Press key to try STM8FLASH tool..
pause > nul
make clear_eeprom
make flash
if errorlevel 1 goto FAIL

:PASS
echo.
echo Flash successful, press any key to close...
pause > nul
goto EXIT
:FAIL
echo Flashing error!!
echo.
echo Flashing error!!, press key to try again
pause > nul
goto FLASH
pause
:EXIT
@echo on
Expand Down
977 changes: 0 additions & 977 deletions src/controller/main.ihx

This file was deleted.

0 comments on commit 4af474f

Please sign in to comment.