ChibiStudio, Windows 10 and several problems....

Discussions and support about ChibiStudio, the free development environment for ARM.
Klaus
Posts: 4
Joined: Thu Jun 27, 2019 3:44 pm

ChibiStudio, Windows 10 and several problems....

Postby Klaus » Thu Jun 27, 2019 5:11 pm

Hi there,

I'm new to ChibiOS and ChibiStudio but not to Eclipse at general. Since three days I try to get ChibiStudio running on two Windows 10 computers but it doesn't work. From both computers I get different error messages and finally I can't do my work. I want to take over a project from a former colleague of mine, he worked with ChibiStudio on an Windows 7 computer and everything was fine.

The problem I experienced with the first computer was, that I can build the project as expected but I never could flash or debug it. The connection to the board (STM32F303RE) could never been established, I got several different error messages. After a while I detected that there was no debug configuration available but I suppose at the beginning thus after "installation" (in fact to copy it) I had 4 debug configurations (menu -> Run -> External Tools -> External Tools Configurations), but now they are all gone. So I manually made a configuration, which worked a little bit but in general it was not useable. Yesterday I saw, that this configuration is also gone. The only goal I got was to compile the project, whether flashing nor debugging was possible.
For me to compare what I should expect is shown here: https://wiki.ugfx.io/index.php/Using_Ch ... ng_OpenOCD
The first image in section 'Configuring OpenOCD' shows different configurations. (https://wiki.ugfx.io/index.php/File:Openocd-config.png)

I made a screenshot about the missing configurations.

Chibi-1.png


Now I tried to install ChibiStudio (Preview 20) at the second computer. At first I installed the preview 20 version, after starting up I got the message that Java has to be installed. Ok, I installed at first Java 32-bit and afterwards the Java 64-bit release as advised somewhere here. Now ChibiStudio starts up and I've imported the project into the workspace (with copying files into that workspace). Then I immediately got a red exclamation mark at the directory structure of this project and below there's the following error message shown: Can not find 'gcc' in path (or similar). And there was a second error message given by make: No rule to make target os/somewhere/inside/ChibiOS/rules.mk: file not found.

On both computers I've admin rights, the second one runs due to EtherCAT-master capabilities (real time extension) in test-mode. On both computer I can make a connection with ST-Link to the STM32F303 Nucleo board and flash/erase it, no problem at all. But with ChibiStudio I'm currently really unhappy due to several different error messages and the disappearing configuration. Is something went wrong during installation or are they interferences? Have all these problems a typical Windows 10 background? And if so, what could be a solution?

BTW, here are some error messages I got during the past days, thanks to the browser tabs which are currently still open.
> You can't do that when your target is `None' ... The program is not being run. (OpenOCD?)
> Error: libusb_open() failed with LIBUSB_ERROR_ACCESS
> Error creating session Cannot run program "gdb": Launching failed
> embedded:startup.tcl:60: Error: Can't find board/stm32f3discovery.cfg
> monitor command not supported by this target.
> Error with command: gdb --version
> Target request failed: The program is not being run.

It would be very very nice if we can solve this problem.

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: ChibiStudio, Windows 10 and several problems....

Postby RoccoMarco » Fri Jun 28, 2019 7:28 am

Hi,
I use ChibiStudio on Windows 10 on a daily basis. All the problems you are listing here sound to me like a missing file related problem. This could be caused by the archiver or by an antivirus.

Note that starting from ChibiStudio 20 you have to keep open the ChbiiOS Whole Tree or the Tools project to see external tools. External tools launch configuration are now inside the ChibiOS repo and no more in the workspace.
Ciao,
RM

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: ChibiStudio, Windows 10 and several problems....

Postby RoccoMarco » Fri Jun 28, 2019 9:06 am

Ciao,
I am updating some articles to setup ChibiStudio. Maybe you should take a look:
Developing on STM32: introducing ChibiStudio

In this article, you can find a nice short video about ChibiStudio setup
https://www.youtube.com/watch?v=MeP8oBUYjcw
Ciao,
RM

Klaus
Posts: 4
Joined: Thu Jun 27, 2019 3:44 pm

Re: ChibiStudio, Windows 10 and several problems....

Postby Klaus » Fri Jun 28, 2019 1:27 pm

What could be the reason for a missing file? What I've done to install ChibiStudio was do download it, in Total Commander with a 7z-plugin I've extracted the contents to C:\ so that C:\ChibiStudio was created. After that I double clicked inside Total Commander on the Chibi Studio GCC 7.0 icon. After ChibiStudio has started up I've imported the existing project into the workspace (with "copying files to workspace" checked) and want to build it which was well done but if I try to flash the STM32F303 I ran into problems I've described.
Could it be that the Windows 10 internal virus scanner has to do with it? I see nothing else on my computer what could be made so strange things.

However, now I've freshly installed ChibiStudio Preview 21. And now I've watched your video! :D I've also checked if I can see the both projects in the project explorer tree and YES! they are there. :like: I've imported the project right now and try to build it, OK, it's well done.

But now the difficult thing IMHO. I want to flash the controller and debug the SW but there's no debug configuration to this project where I'm working on. If I check Debug -> Debug Configurations... I see 15 different groups in the left pane, beginning with C/C++ Application and so on. Under the entry GDB Hardware Debugging is nothing. So I've manually added a debug configuration or lets say, I've copied the values which are necessary to this from an F303 example project coming with ChibiOS 18.2.2. I could start the debugger but I'm not shure that the controller was erased/flashed before. I don't think so, I don't saw anything regarding this. In CooCox (a dead Eclipse-IDE project for STM32) I saw one or two progress bars while the controller was erased and flashed/verified.

That is the current big issue I experienced right now.
Another thing coming with it is that OpenOCD can't reconnect after the USB-plug war pulled out and back again. So how do I stop OpenOCD? I get continuous the following error messages:

Info : Previous state query failed, trying to reconnect
Error: jtag status contains invalid mode value - communication failure
Polling target stm32f3x.cpu failed, trying to reexamine
Examination failed, GDB will be halted. Polling again in 6300ms

(NB, to scroll lock the console output seem not to be working while I get the error messages above.)

How can I fix this issue? It seems to me that this is an USB issue or similar or that something is not completely or right configured.

And with this checks I've done so far, I've tried to make use of the chprintf() function to get a 'Hello World'-like message to the terminal (COM5 or COM 6, both are open) but nothing was seen.

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: ChibiStudio, Windows 10 and several problems....

Postby RoccoMarco » Fri Jun 28, 2019 2:30 pm

Ciao,
could we solve this step by step? I have the feeling you are mixing up too many things.

First step: clean setup of ChibiStudio 21
Second step: flash and run of a default demo for your devkit.

Could you do this?
Ciao,
RM

Klaus
Posts: 4
Joined: Thu Jun 27, 2019 3:44 pm

Re: ChibiStudio, Windows 10 and several problems....

Postby Klaus » Fri Jun 28, 2019 3:30 pm

Yes, I could do that.

So today I've made a clean setup of ChibiStudio21 as I wrote before.
The import of the ethercat-project seems not to work so I've taken a STM32F407 board which was available to check generic things.
So I've build the RT-STM32F407-DISCOVERY project with success and then I've flashed this, the LED is now blinking.
Now I want to add an UART interface from chibios182/testhal/STM32/multi/UART/cfg-stm32f407_discovery to get the UART working with chprintf() because I want to use it in the project I'm working on.

That's what I've done so far today.

Klaus
Posts: 4
Joined: Thu Jun 27, 2019 3:44 pm

Re: ChibiStudio, Windows 10 and several problems....

Postby Klaus » Tue Jul 09, 2019 2:35 pm

To get this story to an end I've compared my debugger configuration with a colleague of mine, he has also worked several month ago at this project.

We compared the debug-settings step-by-step because at his PC it was working but he hasn 't installed ChibiStudio and by this my colleague told me that a former colleague, who has left the university, has explicitly said that we have to use a specific board config-file in place of the one I've used so far. So with the other board config-file it's working now.

By this, just a suggestion: In the past I've also worked with CooCox (dead project since around two years). There it was more comfortable to start a flash/debug session. I've only clicked the bug-icon in the menu and with this OpenOCD was started, the MCU was erased and flashed (visualized with two progress bar's) and after that, the debugger starts up. After the debugging session was stopped, OpenOCD was also stopped. So there's no manual OpenOCD start/stop necessary. Perhaps there is something like that possible in the future.

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: ChibiStudio, Windows 10 and several problems....

Postby RoccoMarco » Tue Jul 09, 2019 4:40 pm

Ciao,
if you share the launch configuration I could try to replicate it inside our default projects.
Ciao,
RM

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: ChibiStudio, Windows 10 and several problems....

Postby Giovanni » Tue Jul 09, 2019 5:54 pm

I think it is not possible using a launch configuration, it is likely a customization.

Giovanni

User avatar
FXCoder
Posts: 384
Joined: Sun Jun 12, 2016 4:10 am
Location: Sydney, Australia
Has thanked: 180 times
Been thanked: 130 times

Re: ChibiStudio, Windows 10 and several problems....

Postby FXCoder » Wed Jul 10, 2019 11:01 am

Hi,
I’ve done a launch configuration as described on an older Macbook Air but not on Windows.
The Eclipse setup on the Mac also uses GNU MCU to set toolchain per project.
Quite good to use once the settings get sorted out (a bit fiddly).
Not home ATM but will look ASAP and advise any salient points.

Bob


Return to “ChibiStudio”

Who is online

Users browsing this forum: No registered users and 11 guests