Добавь каталог назначения последним аргументом postcompile CCS и Keil. Копируй только архив текущего запуска с сохранением имени папки, всех файлов и проверкой SHA-256. Обнови MD-команды и проверки выбора папки, вложенных файлов и ошибок экспорта.
30 lines
1.2 KiB
Batchfile
30 lines
1.2 KiB
Batchfile
@echo off
|
|
setlocal EnableExtensions DisableDelayedExpansion
|
|
if /i "%~1"=="--identity" goto identity
|
|
rem Legacy mode: SETGUI release preflight.
|
|
if "%~1"=="" goto usage
|
|
if not "%~2"=="" goto usage
|
|
if not exist "%~1" (
|
|
echo [firmware-build] Release config not found: "%~1" 1>&2
|
|
exit /b 2
|
|
)
|
|
call "%~dp0..\..\firmware-publish\PUBLISH_FIRMWARE.bat" --config "%~f1" --preflight
|
|
exit /b %errorlevel%
|
|
:identity
|
|
if "%~2"=="" goto usage
|
|
if "%~3"=="" goto usage
|
|
if "%~4"=="" goto usage
|
|
if "%~5"=="" goto usage
|
|
if "%~6"=="" goto usage
|
|
if not "%~8"=="" goto usage
|
|
if "%~7"=="" goto identity_local
|
|
python "%~dp0..\..\..\c\firmware-info\tools\c2000_postbuild.py" --compiler "%~f2" --build-dir "%~f3" --artifact "%~4" --metadata "%~f5" --output "%~f6" --export "%~f7"
|
|
exit /b %errorlevel%
|
|
:identity_local
|
|
python "%~dp0..\..\..\c\firmware-info\tools\c2000_postbuild.py" --compiler "%~f2" --build-dir "%~f3" --artifact "%~4" --metadata "%~f5" --output "%~f6"
|
|
exit /b %errorlevel%
|
|
:usage
|
|
echo Usage: postcompile.bat --identity "compiler-root" "build-dir" "artifact-name" "generated-metadata.json" "output-dir" ["export-dir"] 1>&2
|
|
echo Legacy: postcompile.bat "firmware-release.cmd" 1>&2
|
|
exit /b 2
|