#!/bin/sh SCRIPTS_PATH=/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.debug_1.0.0.201904091537/resources/openocd/st_scripts cd /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.macos64_1.0.0.201904181610/tools/bin ./openocd -s ${SCRIPTS_PATH} -f interface/stlink.cfg -f target/stm32wbx.cfg # -c "init; reset halt; stm32l4x unlock 0; reset halt; stm32l4x mass_erase 0;"