download.bat 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. rem @echo off
  2. @echo *********************************************************************
  3. @echo AC632N SDK
  4. @echo *********************************************************************
  5. @echo %date%
  6. cd /d %~dp0
  7. set OBJDUMP=C:\JL\pi32\bin\llvm-objdump.exe
  8. set OBJCOPY=C:\JL\pi32\bin\llvm-objcopy.exe
  9. set INELF=sdk.elf
  10. set LZ4_PACKET=lz4_packet.exe
  11. ::@echo on
  12. if exist sdk.elf (
  13. %OBJDUMP% -D -address-mask=0x1ffffff -print-dbg %INELF% > sdk.lst
  14. %OBJCOPY% -O binary -j .text %INELF% text.bin
  15. %OBJCOPY% -O binary -j .data %INELF% data.bin
  16. %OBJCOPY% -O binary -j .data_code %INELF% data_code.bin
  17. %OBJCOPY% -O binary -j .overlay_aec %INELF% aec.bin
  18. %OBJCOPY% -O binary -j .overlay_aac %INELF% aac.bin
  19. %OBJCOPY% -O binary -j .overlay_aptx %INELF% aptx.bin
  20. %OBJCOPY% -O binary -j .common %INELF% common.bin
  21. bankfiles=
  22. for /L %%i in (0,1,20) do (
  23. %OBJCOPY% -O binary -j .overlay_bank%%i %INELF% bank%%i.bin
  24. set bankfiles=!bankfiles! bank%%i.bin 0x0
  25. )
  26. echo %bank_files
  27. %LZ4_PACKET% -dict text.bin -input common.bin 0 %bankfiles% -o bank.bin
  28. %OBJDUMP% -section-headers -address-mask=0x1ffffff %INELF%
  29. %OBJSIZEDUMP% -lite -skip-zero -enable-dbg-info %INELF% > symbol_tbl.txt
  30. copy /b text.bin+data.bin+data_code.bin+aec.bin+aac.bin+bank.bin+aptx.bin app.bin
  31. del bank*.bin common.bin text.bin data.bin bank.bin aac.bin aec.bin aptx.bin
  32. )
  33. call download/data_trans/download.bat