Hello everyone,
I would like to configure ICE40 and then program STM32 MCU using STLink v2. The MCU firmware blinks with the blue LED on PA15 / PMOD[52] which is marked as input on ICE40 side.
The problem is that when I program STM32:
st-flash --reset write build/$(TARGET).bin 0x8000000
... unless I connect RST pin of STLink with RST pin of BlackIce II the new firmware doesn't start. And if I do connect these pins ICE40 restarts as well and doesn't has the configuration I need.
I thought maybe I can restart the MCU over SWD using OpenOCD, but for some reason this time OpenOCD has difficulties connecting to the MCU. It hangs like this:
$ openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32l4x.cfg
Open On-Chip Debugger 0.10.0
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: 500 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : Unable to match requested speed 500 kHz, using 480 kHz
Info : clock speed 480 kHz
Info : STLINK v2 JTAG v29 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.236436
Info : stm32l4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Naturally I could just use a separate STM32 development board but now I'm curious
Am I doing something wrong? What is a recommended way to do what I'm trying to do? Can I configure ICE40 permanently?