diff --git a/app/gen_misc.bat b/app/gen_misc.bat index 9b83f542..05944228 100644 --- a/app/gen_misc.bat +++ b/app/gen_misc.bat @@ -7,23 +7,25 @@ del /F ..\bin\eagle.app.v6.flash.bin ..\bin\eagle.app.v6.irom0text.bin ..\bin\ea cd .output\eagle\debug\image -if %XTENSA_CORE%==lx106 ( - xt-objdump -x -s eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.dump - xt-objdump -S eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.S - - xt-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin - xt-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin - xt-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin - xt-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin +@echo off +set OBJDUMP=xt-objdump +set OBJCOPY=xt-objcopy +if defined XTENSA_CORE ( + set OBJDUMP=xt-objdump + set OBJCOPY=xt-objcopy ) else ( - xtensa-lx106-elf-objdump -x -s eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.dump - xtensa-lx106-elf-objdump -S eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.S - - xtensa-lx106-elf-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin - xtensa-lx106-elf-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin - xtensa-lx106-elf-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin - xtensa-lx106-elf-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin + set OBJDUMP=xtensa-lx106-elf-objdump + set OBJCOPY=xtensa-lx106-elf-objcopy ) +@echo on + +%OBJDUMP% -x -s eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.dump +%OBJDUMP% -S eagle.app.v6.out > ..\..\..\..\..\bin\eagle.app.v6.S + +%OBJCOPY% --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin +%OBJCOPY% --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin +%OBJCOPY% --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin +%OBJCOPY% --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin gen_appbin.py eagle.app.v6.out v6