<div dir="ltr">Zdravim,<div>snazim se prestehovat s vyvojem pro STM do VS Code. Funguje mi preklad, nahrani do MCU i debugovani.</div><div>MCU: STM32G431</div><div>Pro debugovani pouzivam 'cinsky klon' ST-Linku s upravou pro SWO</div><div>A to je presne vec, ktera se mi nedari. Kdyz se pokusim neco vypsat pres SWO, nic se nevypise a program v MCU vytuhne (nekonecna smycka pri pokusu odeslat druhy znak)</div><div>Podotykam, ze kdyz se pripojim pomoci STM32CubeProgrammer, tak vypisy pres SWO normalne vidim.</div><div>Pro vypis pouzivam printf, v kodu mam:</div><div><br></div><div>int _write(int file, char *ptr, int len)<br>{<br>  int DataIdx;<br><br>  for (DataIdx = 0; DataIdx < len; DataIdx++)<br>  {<br>    ITM_SendChar(*ptr++);<br>  }<br>  return len;<br>}<br></div><div>----------------------------------------------------------------</div><div>Muj launch.json:</div><div>{<br>    // Use IntelliSense to learn about possible attributes.<br>    // Hover to view descriptions of existing attributes.<br>    // For more information, visit: <a href="https://go.microsoft.com/fwlink/?linkid=830387">https://go.microsoft.com/fwlink/?linkid=830387</a><br>    "version": "0.2.0",<br>    "configurations": [<br>        {<br>            "name": "Cortex Debug (OpenOCD)",<br>            "cwd": "${workspaceRoot}",<br>            "executable": "./build/Rts2000Stm32Test.elf",<br>            "request": "launch",<br>            "type": "cortex-debug",<br>            "servertype": "openocd",<br>            "device": "STM32G431KB",<br>            "svdFile": "${workspaceRoot}/STM32G431xx.svd",<br>            "configFiles": [<br>                "interface/stlink.cfg",<br>                "target/stm32g4x.cfg"<br>            ],<br>            "swoConfig": {<br>                "enabled": true,<br>                "cpuFrequency": 144000000,<br>                "swoFrequency": 2000000,<br>                "source": "probe",<br>                "decoders": [<br>                    { <br>                        "type": "console",<br>                        "label": "ITM", <br>                        "port": 0,<br>                        "showOnStartup": true<br>                    }<br>                ]<br>            }<br>        }<br>    ]<br>}<br></div><div><br></div><div>---------------------------------------</div><div>Jsem na windows, pouzivam OpenOCD:</div><div>C:\Temp\VsCodeSTMtest>openocd --version<br>Open On-Chip Debugger 0.11.0 (2021-07-29) [<a href="https://github.com/sysprogs/openocd">https://github.com/sysprogs/openocd</a>]<br>Licensed under GNU GPL v2<br>libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3<br>For bug reports, read<br>        <a href="http://openocd.org/doc/doxygen/bugs.html">http://openocd.org/doc/doxygen/bugs.html</a><br></div><div><br></div><div>------------------------------------------</div><div>Mate to nekdo rozchozene? Hraju si s tim uz pulden a dochazeji mi napady. Goodle neporadil (nebo se neumim zeptat)</div><div>BR,</div><div>Marek</div><div><br></div><div><br></div></div>