Auto select OBJDUMP and OBJCOPY.

This commit is contained in:
HuangRui 2015-01-05 17:13:49 +08:00
parent 1f644592b3
commit 93b6b9162c
1 changed files with 17 additions and 15 deletions

View File

@ -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