Как прошить код C на плату STM32 с помощью CLion? - PullRequest
0 голосов
/ 21 мая 2019

Я использую Eclipse для разработки для моей платы STM32F746G-DISCOVERY, но я бы хотел перейти на CLion. Я следовал этому руководству (https://blog.jetbrains.com/clion/2019/02/clion-2019-1-eap-clion-for-embedded-development-part-iii/) для этого. Пока все выглядит хорошо, поэтому я хотел бы перенести предварительно сгенерированный код "helloworld" на доску. Я полагаю, это должно быть сделано через UPLOAD. Когда я нажимаю build У меня появляется следующее сообщение об ошибке: Когда я нажимаю RUN, процесс завершается с кодом завершения 127.

====================[ Build | UPLOAD | Debug ]==================================
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/hordon/Desktop/GreenFox/CLionSTM32/cmake-build-debug --target UPLOAD -- -j 2
[100%] Built target ClionSTM32.elf
GNU gdb (GNU Tools for Arm Embedded Processors 8-2018-q4-major) 8.2.50.20181213-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "--host=x86_64-apple-darwin10 --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
tcp:127.0.0.1:3333: Operation timed out.
"monitor" command not supported by this target.
"monitor" command not supported by this target.
You can't do that when your target is `None'
[100%] Built target UPLOAD

Build finished

====================[ Build | ClionSTM32.elf | Debug ]==========================
/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake --build /Users/hordon/Desktop/GreenFox/CLionSTM32/cmake-build-debug --target ClionSTM32.elf -- -j 2
[100%] Built target ClionSTM32.elf

Build finished

Я только начинаю работать с микроконтроллерами, но я думаю, что CLion не может добраться до платы (которая точно подключена). Понятия не имею, как это исправить.

1 Ответ

0 голосов
/ 22 мая 2019

Вам необходимо интегрировать STM32_Programmer_CLI.exe из STM32CubeProgrammer в процесс. Когда вы хотите загрузить двоичный файл, необходимо вызвать что-то вроде <full path> STM32_Programmer_CLI.exe -P <File_Path> [<Address>] [ske] [skpv].

...