UserCommand.bat 560 B

1234567891011121314151617181920212223
  1. @echo off
  2. ::--------------------------------------------------------
  3. ::-- Input param
  4. ::-- %1: elf file
  5. ::-- %2: tool dir
  6. ::--------------------------------------------------------
  7. set "ELF=%~dpnx1"
  8. set "TMP=%~dp1\..\%~n1.tmp"
  9. set "BIN=%~dp1\..\%~n1.bin"
  10. set "LST=%~dp1\..\%~n1.lst"
  11. set "TOOL=%~2\ARMCLANG\bin"
  12. :: Output bin
  13. "%TOOL%\fromelf" --bin --output="%TMP%" "%ELF%"
  14. copy /B /Y "%TMP%\ER_VECTOR" "%BIN%" >nul 2>nul
  15. rmdir /S /Q "%TMP%"
  16. :: Output list
  17. "%TOOL%\fromelf" --text -a -c --output="%LST%" "%ELF%"
  18. :: Copy axf
  19. copy /B /Y "%ELF%" .\ >nul 2>nul