Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
WimKunnen
@WimKunnen
Which one should it be then? (Sorry for the beginner questions, just trying to ban Eclipse from my life)
Ilia Motornyi
@elmot
image.png
Run config should look similar to this
WimKunnen
@WimKunnen
Oh ok!
But now it gives me this error:
Open On-Chip Debugger 0.10.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html 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 srst_only separate srst_nogate srst_open_drain connect_deassert_srst Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : Unable to match requested speed 1000 kHz, using 950 kHz Info : clock speed 950 kHz Error: open failed in procedure 'program' in procedure 'init' called at file "embedded:startup.tcl", line 495 in procedure 'ocd_bouncer' ** OpenOCD init failed ** shutdown command invoked
And can't seem to find that startup file
Ilia Motornyi
@elmot
Name of the board, name of the board config file?
WimKunnen
@WimKunnen
Im using an STM32F031K6, which config is that?
Ilia Motornyi
@elmot
should be st_nucleo_f0.cfg
WimKunnen
@WimKunnen
thats what im using
Ilia Motornyi
@elmot
How much RAM is onboard?
I see, 4K
how old is your openocd?
what is flashed to the chip ATM?
WimKunnen
@WimKunnen
I installed version 0.10.0 yesterday
Ilia Motornyi
@elmot
That's not enough. They make small changes without releasing new versions.
Better if you try to download sources and build openocd on your own
WimKunnen
@WimKunnen
hmm ok I'll try that
kiciek
@kiciek
HI.
I found this lobby after I wrote feature request, but I feel I need guidance more than changes if plugin.
To run debug session with semihosting I need to write "monitor arm semihosting enable" into gdb console. This is pretty annoying so I look for a way to put it into config / script. And I can't find how to pass a command to gdb invoked by plugin.
Ilia Motornyi
@elmot
@kiciek not implemented yet. There are a couple of tickets related to that already, hopefully it's easier to implement for new clion 2018.1
Ilia Motornyi
@elmot

@kiciek Now I started working with semihosting also. There is a workaround to enable it automagically
Step 1. Copy your board file into your project
Step 2. Add two lines into in to the very bottom:

init
arm semihosting enable

Step 3 Use the new as a board cfg file

At least works for me

RealJoL
@RealJoL
Hey,
I'm currently trying to flash a Spansion S6E2CC using OpenOCD but getting this console output:
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 "swd". To override use '
transport select <transport>'.
adapter speed: 500 kHz
cortex_m reset_config sysresetreq
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Info : CMSIS-DAP: SWD  Supported
Info : CMSIS-DAP: JTAG Supported
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : CMSIS-DAP: FW Version = 1.0
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 0 nTRST = 1 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 500 kHz
Info : SWD DPIDR 0x2ba01477
Info : s6e2cc.cpu: hardware has 6 breakpoints, 4 watchpoints
Error: s6e2cc.cpu -- clearing lockup after double fault
Polling target s6e2cc.cpu failed, trying to reexamine
Info : s6e2cc.cpu: hardware has 6 breakpoints, 4 watchpoints
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x00000002 msp: 0x00905a4c
** Programming Started **
auto erase enabled
wrote 1835008 bytes from file C:/WinIdea/05_WinIdeaWorkspaceTemplate/cmake-build
-debug/05_WinIdeaWorkspaceTemplate.exe in 236.931885s (7.563 KiB/s)
** Programming Finished **
Error: s6e2cc.cpu -- clearing lockup after double fault
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x01000003 pc: 0x00010dd2 msp: 0x00905a28
Polling target s6e2cc.cpu failed, trying to reexamine
Info : s6e2cc.cpu: hardware has 6 breakpoints, 4 watchpoints
shutdown command invoked
The project works when being flashed with WinIDEA, but not with CLion.
Ilia Motornyi
@elmot
Well, OpenOCD reports the flashing has been finished but then double fault happened somewhere in the firmware.
If you reset the chip, does it work?
Does debug work?
Sam Lane
@SJ-Innovation
Hi, thanks for redirecting me here from the issue of setting up IDEA to build the plugin for CLion, sorry for not posting here first. Didnt realise you had a gitter setup up. If you could enlighten me as to how youve managed to get IDEA to build for CLion id be most grateful, as the docs are about as clear as mud. Thanks!
Ilia Motornyi
@elmot
@SJ-Innovation ,
  1. Download and install CLion
  2. Clone and open the plugin project using idea
  3. Open project settings, then click SDKs, add a new SDK of type IntelliJ Plugin SDK
  4. Point out CLion directory as SDK root and select 1.8 JRE as the JRE
  5. Optionally clone intellij-community git repo, checkout latest CLion version, and set the folder as newly created SDK sources.
  6. wait for another half an hour until has indexed all the sources
    Now just click run or debug, whatever you need
This message was deleted
Sam Lane
@SJ-Innovation
Have done the above many times, both before and after your suggestion. Thank you for that. But always get the same error - "Cannot find symbol: RunConfigurationSingletonPolicy" Any idea what to add to find this? Googling returns no helpful results.
Sam Lane
@SJ-Innovation
Okay, updated to EAP versions. May i suggest adding a note to Readme.md informing potential devs about the hard requirement for the new API version?
Ilia Motornyi
@elmot
Sorry for late response, I was too busy latter weeks.
Hello, well, its not always very last. Better to follow releases.
BTW, what are you going to achieve? Now I have more time but less of flexibility with the plugin, because I have just joined clion team. if you have any good ideas, let me know ASAP.
Pedro
@pedrorroca_twitter

Hello Ilia, thank you for your very useful plugin. I've managed to set it working together CLion 2018.2.6 on MacOS X, and I use it for newly generated projects from CubeMX.
Now I would like now to be able to use try the examples provided with STM32Cube_FW_F4, but still didn't managed.
The steps I take are the following:
-Import one of these examples on CLion
-Select menu Update CMake Project with STM32CubeMX Project, it complains saying that .cproject and .project files couldn't be found. They are at /SW4STM32/STM32F4-Discovery. So:
-Move them to root
-Click again on Update CMake... and it gets stuck in "Detecting C compiler ABI info - failed"

What am I missing here? I'm new to CMake and I don't really know if this is really related to your plugin... Thanks In advance for your help

Ilia Motornyi
@elmot
Hello. First of all, there are new versions of everything. CLion 2018.3 and a new plugin is released.
Try to add your toolchain to system path.
And yes, thanks
Pedro
@pedrorroca_twitter

Hello Ilia, thank you for your answer. I updated to CLion 2018.3 and your latest plug-in version, but that didn't solve my problem. After that I've realized that the problem was that not only I have to move files .cproject and .project to the project root directory, but linker script file STM32F407VGTx_FLASH.ld as well.

Then your script could do its work ;)

But there are some things that bothers me. I think I'm not setting my environment properly, I would like to ask for some help. In the MacOS X PATH variable, I have a reference already to my toolchain, but CMake cannot find it, so I've added to Clion as well (Appearance & Behavior → Path Variables, then Name: PATH, Value: /my/Path), but CMake is not recognizing it either. Thus in CMakeLists_template.txt I've added "set(PATH /Developer/ClionProjects/gcc-arm-none-eabi-7-2018-q2-update/bin)", and for every line with a relative path to the toolchain, I've added the PATH like this:
SET(CMAKE_C_COMPILER ${PATH}/arm-none-eabi-gcc)

Isn't there any other more efficient way to do this?

Pedro
@pedrorroca_twitter
Additionally, is there anyway I can configure your script to look in /SW4STM32/STM32F4-Discovery/ instead of
moving .cproject, .project, and STM32F407VGTx_FLASH.ld by hand? Thanks
Ilia Motornyi
@elmot
@Pedro, I am afraid that config is not supported.
Pedro
@pedrorroca_twitter
Ok, I understand. So your plugin works only with projects created with CubeMX,
Ilia Motornyi
@elmot
Yup. At the moment, at least.
Pedro
@pedrorroca_twitter
Is that right? How could one run those examples included in stm32cube with CLion?
Ilia Motornyi
@elmot
Nevertheless, you may use CmakeLists template from there, and manually create Run Configurations for OpenOCD-based run and debug
Pedro
@pedrorroca_twitter
Ok great! I'll try that. Many thanks for your time!!
Ilia Motornyi
@elmot
Thanks:) Now I have much more time for this stuff, since I have joined JetBrains recently :)
Pedro
@pedrorroca_twitter
Congratulations!! Hopefully now you can push CLion more in the embedded development direction, but this time from inside! 👍
Ilia Motornyi
@elmot
That is the plan
drdoc
@drdoc
Hello guys, how can i add target to clion?
Ilia Motornyi
@elmot
Hello, What do you mean?
drdoc
@drdoc
I configured clion for openocd development? but it does not debug.
I have mac os + clion + openocd plugin, jlink.
i tried to debug nRF52832.
Ilia Motornyi
@elmot
Can you share the project? Or any kind of prototype? It's too complicated to find what's wrong remotely.
I have a board with nrf82, I think I can try it
drdoc
@drdoc
but when i conifured plugin with documentation. i got something like that. it does not run, because there is no target. i didnt use stm32cubemx, i already got config file for nRF52832, that works in eclipse+openocd. also i use makefile for build, not cmake.