gen_misc_plus.sh 934 B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash -x
  2. touch user/user_main.c
  3. make APP=$1
  4. if [ $? == 0 ];then
  5. rm ../bin/upgrade/user$1.bin ../bin/upgrade/user$1.dump ../bin/upgrade/user$1.S
  6. cd .output/eagle/debug/image/
  7. xt-objdump -x -s eagle.app.v6.out > ../../../../../bin/upgrade/user$1.dump
  8. xt-objdump -S eagle.app.v6.out > ../../../../../bin/upgrade/user$1.S
  9. xt-objcopy --only-section .text -O binary eagle.app.v6.out eagle.app.v6.text.bin
  10. xt-objcopy --only-section .data -O binary eagle.app.v6.out eagle.app.v6.data.bin
  11. xt-objcopy --only-section .rodata -O binary eagle.app.v6.out eagle.app.v6.rodata.bin
  12. xt-objcopy --only-section .irom0.text -O binary eagle.app.v6.out eagle.app.v6.irom0text.bin
  13. ../../../../../tools/gen_appbin.py eagle.app.v6.out v6
  14. ../../../../../tools/gen_flashbin.py eagle.app.v6.flash.bin eagle.app.v6.irom0text.bin
  15. cp eagle.app.flash.bin user$1.bin
  16. cp user$1.bin ../../../../../bin/upgrade/
  17. cd ../../../../../
  18. else
  19. echo "make error"
  20. fi