2016-11-09 00:56:41 +00:00
|
|
|
@echo off
|
|
|
|
PATH=D:\MCU\GNU_Tools_ARM_Embedded\5.2_2015q4\bin;D:\MCU\SEGGER\JLink_V610a;%PATH%
|
2017-01-31 03:46:49 +00:00
|
|
|
@if %1x==x goto xxx
|
|
|
|
set img_file=%1
|
|
|
|
goto run
|
2016-11-09 00:56:41 +00:00
|
|
|
:xxx
|
2017-01-31 03:46:49 +00:00
|
|
|
set img_file=build/bin/ram_all.bin
|
|
|
|
:run
|
2016-11-09 00:56:41 +00:00
|
|
|
echo define call1>flasher/flash_file.jlink
|
|
|
|
echo SetFirwareSize %img_file%>>flasher/flash_file.jlink
|
|
|
|
echo end>>flasher/flash_file.jlink
|
|
|
|
echo define call2>>flasher/flash_file.jlink
|
|
|
|
echo FlasherWrite %img_file% 0 $Image1Size>>flasher/flash_file.jlink
|
|
|
|
echo end>>flasher/flash_file.jlink
|
|
|
|
echo define call3>>flasher/flash_file.jlink
|
|
|
|
echo FlasherWrite %img_file% $Image2Addr $Image2Size>>flasher/flash_file.jlink
|
|
|
|
echo end>>flasher/flash_file.jlink
|
|
|
|
start JLinkGDBServer.exe -device Cortex-M3 -if SWD -ir -endian little -speed 3500
|
|
|
|
arm-none-eabi-gdb.exe -x flasher/gdb_wrflash.jlink build/bin/ram_all.bin
|
|
|
|
taskkill /F /IM JLinkGDBServer.exe
|
|
|
|
|