Unknown
  1. St Link Cannot Connect To Target

1000 New Commits: linux:udr/mcdermj By Greg Kroah-Hartman: 5a4c0738998a: Revert 'MIPS: Lantiq: Fix cascaded IRQ setup' This reverts commit. May 18, 2016  Please watch: 'Buildyourcnc CNC Router on Love Yurts' Patrick's Tip Jar: bitcoin:1Gtawd29Sgu5CdvfUnkRg1YBfowCawjFdH. Aug 3, 2017 - Why GitHub? 2017-08-03T17:33:39 INFO srccommon.c: Loading device parameters. When I hit Reset on the board, I am able to connect via ST-LINK GUI,. He found out CMSIS/HAL initialization blocks SWD communication. Error: init mode failed (unable to connect to the target) in procedure.

Solution env:genericSTM32F103C8platform = ststm32board = genericSTM32F103C8framework = arduinouploadprotocol = stlinkbuildflags = -DCONFIGMAPLEMININODISABLEDEBUG=1Just installed Atom+PlatformIO, configured my first arduino project with following settings:env:genericSTM32F103C8platform = ststm32board = genericSTM32F103C8framework = arduinouploadprotocol = stlinkThe code is simple Blink example. Successfully uploaded the code, but after that I am not able to connect to STM32. It says:st-flash 1.3.12017-08-03T17:33:39 INFO srccommon.c: Loading device parameters.2017-08-03T17:33:39 WARN srccommon.c: unknown chip id! 0xa05f0000. upload Error -1St-link GUI is not able to connect also.When I hit Reset on the board, I am able to connect via ST-LINK GUI, and able to clear the FLASH. After that I can use PlatformIO once again, and after that it locks chip communication again.When I manually flash the same.bin - the same happens again - chip locks.

So there is something inside the.bin file, blocking the communication. I found some explanation where the guy does not use Platformio, but says he found out CMSIS/HAL initialization blocks SWD communication. I feel like this is probably my case. But how to fix this?P.S.

I also tried the same Blink example through standard Arduino - and it flashes as many times as needed without blocking.Want to back this issue? We accept bounties via. Just tried mbed framework and it flashes fine every time, but since genericSTM32F103C8 did not support mbed freameform on pio, I used configuration below. The solution would be use to the following buildflags, so your platformio.ini configuration would look like this: env:genericSTM32F103C8platform = ststm32board = genericSTM32F103C8framework = arduinouploadprotocol = stlinkbuildflags = -std=gnu11 -MMD -DCONFIGMAPLEMININODISABLEDEBUG=1 -DSERIALUSB -DGENERICBOOTLOADERbuildunflags = -lc -lstdc -lnosysSeems like debug ports are disabled if flag CONFIGMAPLEMININODISABLEDEBUG isn't defined. I've added other flags just because they do exist under Arduino IDE env.

Coments are closed