Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building #66

Merged
merged 5 commits into from Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
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
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
7 changes: 3 additions & 4 deletions src/controller/Makefile
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
# This is
stm8flash -c stlinkv2 -p stm8s105\?6 -w $(ODIR)/$(PNAME).ihx
clear_eeprom:
stm8flash -c stlinkv2 -p stm8s105?6 -w data_empty.ihx
stm8flash -c stlinkv2 -p stm8s105\?6 -s eeprom -w data_empty.ihx


clean:
Expand All @@ -118,4 +117,4 @@ clean:
@echo "Done."

mkdir:
mkdir -p $(ODIR)
mkdir -p $(ODIR)
35 changes: 0 additions & 35 deletions src/controller/Result.log

This file was deleted.

2 changes: 1 addition & 1 deletion src/controller/compile.bat
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
@@ -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
@@ -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.