Code: Select all
#!/usr/bin/bash
OCD_DIR=$OCD_PATH
GOTO_DIR=~/esp/EXAMPLE/build
FILE_NAME=example.bin
RET_DIR=$(pwd)
FLAGS=${@}
cd $GOTO_DIR
$OCD_DIR/bin/openocd -s $OCD_DIR/share/openocd/scripts -f interface/jlink.cfg -f board/esp-wroom-32.cfg -c "program_esp32 $FILE_NAME 0x10000 $FLAGS"
cd $RET_DIR
What else I need to add in my script for use J-Link in first module flashing?