cannot flash zephyr on stm32_min_dev_blue #stm32 #flash


moreaniket219@...
 

ninja flash
[0/1] Flashing stm32_min_dev_blue
-- west flash: using runner openocd
-- runners.openocd: Flashing file: /home/amore/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/zephyr.hex
Open On-Chip Debugger 0.10.0+dev-00992-g3333261df-dirty (2019-08-16-00:14)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
Info : clock speed 1000 kHz
Info : STLINK V2J31S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.259867
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f1x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 100ms
Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f1x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 300ms
Info : Listening on port 3333 for gdb connections
    TargetName         Type       Endian TapName            State      
--  ------------------ ---------- ------ ------------------ ------------
 0* stm32f1x.cpu       hla_target little stm32f1x.cpu       unknown
Error: mem2array: Read @ 0xe0042004, w=4, cnt=1, failed
/home/amore/zephyr-sdk-0.10.3/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts/mem_helper.tcl:6: Error:
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 251
in procedure 'mmw'
in procedure 'mrw' called at file "/home/amore/zephyr-sdk-0.10.3/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts/mem_helper.tcl", line 36
at file "/home/amore/zephyr-sdk-0.10.3/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts/mem_helper.tcl", line 6

Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
TARGET: stm32f1x.cpu - Not halted


ERROR: command exited with status 1: /home/amore/zephyr-sdk-0.10.3/sysroots/x86_64-pokysdk-linux/usr/bin/openocd -s /home/amore/zephyr-sdk-0.10.3/sysroots/x86_64-pokysdk-linux/usr/share/openocd/scripts -f /home/amore/zephyrproject/zephyr/boards/arm/stm32_min_dev/support/openocd.cfg -c init -c targets -c 'reset halt' -c 'flash write_image erase /home/amore/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/zephyr.hex' -c 'reset halt' -c 'verify_image /home/amore/zephyrproject/zephyr/samples/basic/blinky/build/zephyr/zephyr.hex' -c 'reset run' -c shutdown
FAILED: zephyr/cmake/flash/CMakeFiles/flash
cd /home/amore/zephyrproject/zephyr/samples/basic/blinky/build && /usr/local/bin/cmake -E env /home/amore/.local/bin/west flash --skip-rebuild
ninja: build stopped: subcommand failed.

Im trying to flash on stm32 min board using ST-Link but it keeps giving me this error.
i have install openocd for the original sites but still keep getting this error.
can someone point me in the right direction.

Join users@lists.zephyrproject.org to automatically receive all group messages.