add c8051 util
This commit is contained in:
parent
fece7c73fe
commit
5559f3d742
85
bootloader_hex/master.bat
Normal file
85
bootloader_hex/master.bat
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM COLOR DEFINITIONS (ANSI ESC SEQUENCES)
|
||||||
|
REM ======================================================================
|
||||||
|
set "RED=[91m"
|
||||||
|
set "GREEN=[92m"
|
||||||
|
set "YELLOW=[93m"
|
||||||
|
set "RESET=[0m"
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM CONFIGURATION
|
||||||
|
REM ======================================================================
|
||||||
|
|
||||||
|
REM Путь к flash8051.exe (лежит в соседней папке ..\c8051\)
|
||||||
|
set "FLASH_TOOL=%~dp0..\c8051\flash8051.exe"
|
||||||
|
|
||||||
|
REM Путь к HEX файлу
|
||||||
|
set "HEX_FILE=%~dp0master_boot.hex"
|
||||||
|
|
||||||
|
REM Серийный номер Debug Adapter (должен быть ДЕСЯТИЧНЫЙ!)
|
||||||
|
set "SERIAL=EC3005A03C4"
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM CHECK FILES
|
||||||
|
REM ======================================================================
|
||||||
|
|
||||||
|
echo %YELLOW%Using tool:%RESET% "%FLASH_TOOL%"
|
||||||
|
echo %YELLOW%HEX file:%RESET% "%HEX_FILE%"
|
||||||
|
echo %YELLOW%Serial:%RESET% %SERIAL%
|
||||||
|
echo.
|
||||||
|
|
||||||
|
if not exist "%FLASH_TOOL%" (
|
||||||
|
echo %RED%[ERROR] flash8051.exe not found:%RESET%
|
||||||
|
echo "%FLASH_TOOL%"
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit . . .
|
||||||
|
pause >nul
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%HEX_FILE%" (
|
||||||
|
echo %RED%[ERROR] HEX file not found:%RESET%
|
||||||
|
echo "%HEX_FILE%"
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit . . .
|
||||||
|
pause >nul
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM FLASH PROCESS
|
||||||
|
REM ======================================================================
|
||||||
|
|
||||||
|
echo %YELLOW%Starting flash...%RESET%
|
||||||
|
echo.
|
||||||
|
|
||||||
|
"%FLASH_TOOL%" -sn %SERIAL% -tif c2 -erase -upload "%HEX_FILE%"
|
||||||
|
set "ERR=%ERRORLEVEL%"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM RESULT HANDLING
|
||||||
|
REM ======================================================================
|
||||||
|
|
||||||
|
if not "%ERR%"=="0" (
|
||||||
|
echo %RED%[ERROR] Flash failed! Error code: %ERR%%RESET%
|
||||||
|
echo Check:
|
||||||
|
echo - Debug Adapter connection
|
||||||
|
echo - Target power
|
||||||
|
echo - Correct serial number
|
||||||
|
echo - Valid HEX file
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit . . .
|
||||||
|
pause >nul
|
||||||
|
exit /b %ERR%
|
||||||
|
)
|
||||||
|
|
||||||
|
echo %GREEN%[OK] Flash completed successfully.%RESET%
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit . . .
|
||||||
|
pause >nul
|
||||||
|
exit /b 0
|
||||||
85
bootloader_hex/slave.bat
Normal file
85
bootloader_hex/slave.bat
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal ENABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM COLOR DEFINITIONS (ANSI ESC SEQUENCES)
|
||||||
|
REM ======================================================================
|
||||||
|
set "RED=[91m"
|
||||||
|
set "GREEN=[92m"
|
||||||
|
set "YELLOW=[93m"
|
||||||
|
set "RESET=[0m"
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM CONFIGURATION
|
||||||
|
REM ======================================================================
|
||||||
|
|
||||||
|
REM Путь к flash8051.exe (лежит в соседней папке ..\c8051\)
|
||||||
|
set "FLASH_TOOL=%~dp0..\c8051\flash8051.exe"
|
||||||
|
|
||||||
|
REM Путь к HEX файлу
|
||||||
|
set "HEX_FILE=%~dp0slave_boot.hex"
|
||||||
|
|
||||||
|
REM Серийный номер Debug Adapter (должен быть ДЕСЯТИЧНЫЙ!)
|
||||||
|
set "SERIAL=EC3005A03C4"
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM CHECK FILES
|
||||||
|
REM ======================================================================
|
||||||
|
|
||||||
|
echo %YELLOW%Using tool:%RESET% "%FLASH_TOOL%"
|
||||||
|
echo %YELLOW%HEX file:%RESET% "%HEX_FILE%"
|
||||||
|
echo %YELLOW%Serial:%RESET% %SERIAL%
|
||||||
|
echo.
|
||||||
|
|
||||||
|
if not exist "%FLASH_TOOL%" (
|
||||||
|
echo %RED%[ERROR] flash8051.exe not found:%RESET%
|
||||||
|
echo "%FLASH_TOOL%"
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit . . .
|
||||||
|
pause >nul
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist "%HEX_FILE%" (
|
||||||
|
echo %RED%[ERROR] HEX file not found:%RESET%
|
||||||
|
echo "%HEX_FILE%"
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit . . .
|
||||||
|
pause >nul
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM FLASH PROCESS
|
||||||
|
REM ======================================================================
|
||||||
|
|
||||||
|
echo %YELLOW%Starting flash...%RESET%
|
||||||
|
echo.
|
||||||
|
|
||||||
|
"%FLASH_TOOL%" -sn %SERIAL% -tif c2 -erase -upload "%HEX_FILE%"
|
||||||
|
set "ERR=%ERRORLEVEL%"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
|
||||||
|
REM ======================================================================
|
||||||
|
REM RESULT HANDLING
|
||||||
|
REM ======================================================================
|
||||||
|
|
||||||
|
if not "%ERR%"=="0" (
|
||||||
|
echo %RED%[ERROR] Flash failed! Error code: %ERR%%RESET%
|
||||||
|
echo Check:
|
||||||
|
echo - Debug Adapter connection
|
||||||
|
echo - Target power
|
||||||
|
echo - Correct serial number
|
||||||
|
echo - Valid HEX file
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit . . .
|
||||||
|
pause >nul
|
||||||
|
exit /b %ERR%
|
||||||
|
)
|
||||||
|
|
||||||
|
echo %GREEN%[OK] Flash completed successfully.%RESET%
|
||||||
|
echo.
|
||||||
|
echo Press any key to exit . . .
|
||||||
|
pause >nul
|
||||||
|
exit /b 0
|
||||||
2
c8051/.featureId
Normal file
2
c8051/.featureId
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
featureId=com.silabs.apack.c8051.feature
|
||||||
|
featureVersion=5.0.5
|
||||||
22
c8051/Readme.txt
Normal file
22
c8051/Readme.txt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.\flash8051 -tif c2 -erase -upload firmware.hex
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@echo off
|
||||||
|
setlocal
|
||||||
|
|
||||||
|
REM Путь к flash8051 (соседняя папка c8051)
|
||||||
|
set FLASH_TOOL=%~dp0..\c8051\flash8051.exe
|
||||||
|
|
||||||
|
REM Путь к HEX файлу (лежит рядом с bat)
|
||||||
|
set HEX_FILE=%~dp0firmware.hex
|
||||||
|
|
||||||
|
echo Using tool: %FLASH_TOOL%
|
||||||
|
echo Flashing: %HEX_FILE%
|
||||||
|
echo.
|
||||||
|
|
||||||
|
"%FLASH_TOOL%" -tif c2 -erase -upload "%HEX_FILE%"
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done.
|
||||||
|
pause
|
||||||
164
c8051/apack.info
Normal file
164
c8051/apack.info
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
# Adapter pack file for Studio.
|
||||||
|
#
|
||||||
|
label=Adapter pack for c8051 Devices
|
||||||
|
|
||||||
|
featureLevel=11
|
||||||
|
|
||||||
|
adapter_types=EC3,UDA,Toolstick
|
||||||
|
|
||||||
|
path=.,win32,win64,linux,macosx
|
||||||
|
|
||||||
|
executable(flash8051:linux.x86_64) {
|
||||||
|
exe=flash8051
|
||||||
|
lib=libslab8051.so
|
||||||
|
lib=libslabhiddevice.so
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(flash8051:linux.x86) {
|
||||||
|
exe=flash8051
|
||||||
|
lib=libslab8051.so
|
||||||
|
lib=libslabhiddevice.so
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(flash8051:win32.x86) {
|
||||||
|
exe=flash8051.exe
|
||||||
|
lib=slab8051.dll
|
||||||
|
lib=slabhiddevice.dll
|
||||||
|
lib=libgcc_s_dw2-1.dll
|
||||||
|
lib=libstdc++-6.dll
|
||||||
|
lib=mingwm10.dll
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(flash8051:win32.x86_64) {
|
||||||
|
exe=flash8051.exe
|
||||||
|
lib=slab8051.dll
|
||||||
|
lib=slabhiddevice.dll
|
||||||
|
lib=libgcc_s_seh-1.dll
|
||||||
|
lib=libstdc++-6.dll
|
||||||
|
lib=libwinpthread-1.dll
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(flash8051:macosx.x86_64) {
|
||||||
|
exe=flash8051
|
||||||
|
lib=libslab8051.dylib
|
||||||
|
lib=libslabhiddevice.dylib
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(siagentc8051:linux.x86_64) {
|
||||||
|
exe=siagentc8051
|
||||||
|
lib=libslab8051.so
|
||||||
|
lib=libslabhiddevice.so
|
||||||
|
lib=libsiagent.so
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(siagentc8051:linux.x86) {
|
||||||
|
exe=siagentc8051
|
||||||
|
lib=libslab8051.so
|
||||||
|
lib=libslabhiddevice.so
|
||||||
|
lib=libsiagent.so
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(siagentc8051:win32.x86) {
|
||||||
|
exe=siagentc8051.exe
|
||||||
|
lib=slab8051.dll
|
||||||
|
lib=slabhiddevice.dll
|
||||||
|
lib=siagent.dll
|
||||||
|
lib=libgcc_s_dw2-1.dll
|
||||||
|
lib=libstdc++-6.dll
|
||||||
|
lib=mingwm10.dll
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(siagentc8051:win32.x86_64) {
|
||||||
|
exe=siagentc8051.exe
|
||||||
|
lib=slab8051.dll
|
||||||
|
lib=slabhiddevice.dll
|
||||||
|
lib=siagent.dll
|
||||||
|
lib=libgcc_s_seh-1.dll
|
||||||
|
lib=libstdc++-6.dll
|
||||||
|
lib=libwinpthread-1.dll
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(siagentc8051:macosx.x86_64) {
|
||||||
|
exe=siagentc8051
|
||||||
|
lib=libslab8051.dylib
|
||||||
|
lib=libslabhiddevice.dylib
|
||||||
|
lib=libsiagent.dylib
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(cptstreamer:linux.x86_64) {
|
||||||
|
exe=cptstreamer_c8051
|
||||||
|
lib=libsiagent.so
|
||||||
|
lib=libsegger_support.so
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(cptstreamer:linux.x86) {
|
||||||
|
exe=cptstreamer_c8051
|
||||||
|
lib=libsiagent.so
|
||||||
|
lib=libsegger_support.so
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(cptstreamer:win32.x86) {
|
||||||
|
exe=cptstreamer_c8051.exe
|
||||||
|
lib=siagent.dll
|
||||||
|
lib=segger_support.dll
|
||||||
|
lib=libgcc_s_dw2-1.dll
|
||||||
|
lib=libstdc++-6.dll
|
||||||
|
lib=mingwm10.dll
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(cptstreamer:win32.x86_64) {
|
||||||
|
exe=cptstreamer_c8051.exe
|
||||||
|
lib=siagent.dll
|
||||||
|
lib=segger_support.dll
|
||||||
|
lib=libgcc_s_seh-1.dll
|
||||||
|
lib=libstdc++-6.dll
|
||||||
|
lib=libwinpthread-1.dll
|
||||||
|
}
|
||||||
|
|
||||||
|
executable(cptstreamer:macosx.x86_64) {
|
||||||
|
exe=cptstreamer_c8051
|
||||||
|
lib=libsiagent.dylib
|
||||||
|
lib=libsegger_support.dylib
|
||||||
|
}
|
||||||
|
|
||||||
|
# TouchXpress/cpt devices is not allowed to be debugged, but we need this "debug"
|
||||||
|
# function to read from the devices in XpressConfigurator.
|
||||||
|
function(debug:mcu.8051.*,ffd.touchxpress.*) {
|
||||||
|
cmd=$(siagentc8051) [ -date ${dateStr} ]
|
||||||
|
}
|
||||||
|
|
||||||
|
function(debuggers:mcu.8051.*,ffd.touchxpress.*) {
|
||||||
|
cmd=$(siagentc8051) -list
|
||||||
|
}
|
||||||
|
|
||||||
|
function(help) {
|
||||||
|
cmd=$(flash8051) -?
|
||||||
|
}
|
||||||
|
|
||||||
|
function(upload:mcu.8051.*,ffd.touchxpress.*) {
|
||||||
|
cmd=$(flash8051) ( -sn ${sn} ) ( -tif ${tif} ) ( -upload ${file} ) [ -erasemode ${erasemode} ] [ -clkstrobe ${clkstrobe} ] [ -keeppower ${keeppower} ]
|
||||||
|
}
|
||||||
|
|
||||||
|
function(erase:mcu.8051.*,ffd.touchxpress.*) {
|
||||||
|
cmd=$(flash8051) ( -sn ${sn} ) ( -tif ${tif} ) -erase
|
||||||
|
}
|
||||||
|
|
||||||
|
function(lock:mcu.8051.*,ffd.touchxpress.*) {
|
||||||
|
cmd=$(flash8051) ( -sn ${sn} ) ( -tif ${tif} ) -lock
|
||||||
|
}
|
||||||
|
|
||||||
|
function(unlock:mcu.8051.*,ffd.touchxpress.*) {
|
||||||
|
cmd=$(flash8051) ( -sn ${sn} ) ( -tif ${tif} ) -unlock
|
||||||
|
}
|
||||||
|
|
||||||
|
function(checklocked:mcu.8051.*,ffd.touchxpress.*) {
|
||||||
|
cmd=$(flash8051) ( -sn ${sn} ) ( -tif ${tif} ) -checklocked
|
||||||
|
}
|
||||||
|
|
||||||
|
function(serialports) {
|
||||||
|
cmd=$(cptstreamer) -ports
|
||||||
|
}
|
||||||
|
|
||||||
|
function(cptstreamer:mcu.8051.c8051.*,ffd.touchxpress.*) {
|
||||||
|
cmd=$(cptstreamer)
|
||||||
|
}
|
||||||
BIN
c8051/cptstreamer_c8051.exe
Normal file
BIN
c8051/cptstreamer_c8051.exe
Normal file
Binary file not shown.
BIN
c8051/flash8051.exe
Normal file
BIN
c8051/flash8051.exe
Normal file
Binary file not shown.
BIN
c8051/libapack_cpp64.dll
Normal file
BIN
c8051/libapack_cpp64.dll
Normal file
Binary file not shown.
BIN
c8051/libgcc_s_seh-1.dll
Normal file
BIN
c8051/libgcc_s_seh-1.dll
Normal file
Binary file not shown.
BIN
c8051/libstdc++-6.dll
Normal file
BIN
c8051/libstdc++-6.dll
Normal file
Binary file not shown.
BIN
c8051/libwinpthread-1.dll
Normal file
BIN
c8051/libwinpthread-1.dll
Normal file
Binary file not shown.
BIN
c8051/python27.dll
Normal file
BIN
c8051/python27.dll
Normal file
Binary file not shown.
BIN
c8051/segger_support.dll
Normal file
BIN
c8051/segger_support.dll
Normal file
Binary file not shown.
BIN
c8051/siagent.dll
Normal file
BIN
c8051/siagent.dll
Normal file
Binary file not shown.
BIN
c8051/siagentc8051.exe
Normal file
BIN
c8051/siagentc8051.exe
Normal file
Binary file not shown.
10
c8051/siagentc8051_log_28952.txt
Normal file
10
c8051/siagentc8051_log_28952.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
TCF 07:09:23.561: Cleaning up old log files. Create '.keeplogs' file to disable(C:\Yandex\__WORK__\Entering_AR_150\bootloader_hex\c8051\.keeplogs)
|
||||||
|
TCF 07:09:23.562: found 1 log files. keeping 20
|
||||||
|
TCF 07:09:23.562: Launched as: C:\Yandex\__WORK__\Entering_AR_150\bootloader_hex\c8051\siagentc8051.exe
|
||||||
|
TCF 07:09:23.562: Plugin path:
|
||||||
|
C:\Yandex\__WORK__\Entering_AR_150\bootloader_hex\c8051\plugins
|
||||||
|
TCF 07:09:23.562: Adding C:\Yandex\__WORK__\Entering_AR_150\bootloader_hex\c8051\plugins to the DLL search path
|
||||||
|
TCF 07:09:23.562: Scanning plugins in C:\Yandex\__WORK__\Entering_AR_150\bootloader_hex\c8051\plugins...
|
||||||
|
TCF 07:09:23.563: DeviceScriptingService::DeviceScriptingService
|
||||||
|
TCF 07:10:03.717: signal_handler handling signo 2
|
||||||
|
|
||||||
10
c8051/siagentc8051_log_35148.txt
Normal file
10
c8051/siagentc8051_log_35148.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
TCF 07:24:03.721: Cleaning up old log files. Create '.keeplogs' file to disable(C:\Yandex\__WORK__\Entering_AR_150\c8051\.keeplogs)
|
||||||
|
TCF 07:24:03.723: found 2 log files. keeping 20
|
||||||
|
TCF 07:24:03.725: Launched as: C:\Yandex\__WORK__\Entering_AR_150\c8051\siagentc8051.exe
|
||||||
|
TCF 07:24:03.726: Plugin path:
|
||||||
|
C:\Yandex\__WORK__\Entering_AR_150\c8051\plugins
|
||||||
|
TCF 07:24:03.726: Adding C:\Yandex\__WORK__\Entering_AR_150\c8051\plugins to the DLL search path
|
||||||
|
TCF 07:24:03.726: Scanning plugins in C:\Yandex\__WORK__\Entering_AR_150\c8051\plugins...
|
||||||
|
TCF 07:24:03.726: DeviceScriptingService::DeviceScriptingService
|
||||||
|
TCF 07:24:14.001: signal_handler handling signo 2
|
||||||
|
|
||||||
BIN
c8051/slab8051.dll
Normal file
BIN
c8051/slab8051.dll
Normal file
Binary file not shown.
BIN
c8051/slabhiddevice.dll
Normal file
BIN
c8051/slabhiddevice.dll
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user