Linux debug configuration

Discussions and support about ChibiStudio, the free development environment for ARM.
steved
Posts: 825
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Linux debug configuration

Postby steved » Thu Apr 06, 2023 11:07 pm

I've installed the latest ChibiStudio Linux distribution into ~/ChibiStudio (a delightfully simple operation to get running) on Mint.

However I don't seem to get an option to create debug configurations (AIUI highlight the .elf file and an option becomes available somewhere?)

Is there some bit of configuration I've missed, having installed into a different directory?

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

Re: Linux debug configuration

Postby Giovanni » Fri Apr 07, 2023 6:12 am

Hi,

Is the "ChibiOS (whole tree)" project open in your workspace? configurations are in there. If not present then import it from the ChibiOS tree root.

Note that the installation path is probably different in your system, probably you need to repopulate the workspaces and change the workspace variable CHIBIOS to point to the correct location (Windows->Preferences->General->Workspace->Linked Resources).

The default installation path is: /home/chibios/Projects/Chibistudio if I remember well.

Giovanni

steved
Posts: 825
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: Linux debug configuration

Postby steved » Fri Apr 07, 2023 10:48 pm

Giovanni wrote:Is the "ChibiOS (whole tree)" project open in your workspace? configurations are in there. If not present then import it from the ChibiOS tree root.

The "ChibiOS (whole tree)" project is present in the project explorer; however on attempting to open it the message "can't find project file" or similar is shown. And I can't see a ".project" file in the root of the installation. (The same situation exists on the Windows installation - the project "ChibiOS tools" is shown, but no project file.

Giovanni wrote:Note that the installation path is probably different in your system, probably you need to repopulate the workspaces and change the workspace variable CHIBIOS to point to the correct location (Windows->Preferences->General->Workspace->Linked Resources).

The default installation path is: /home/chibios/Projects/Chibistudio if I remember well.

The default project path is indeed as you say; I've installed in my user directory as ChibiStudio, and changed workspace and project preferences so that my projects compile. Just setting up the debugging is the problem.

Is it necessary to delete and recreate the project? If so, what type of project is it, and what needs to be specified?

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

Re: Linux debug configuration

Postby Giovanni » Sat Apr 08, 2023 6:07 am

Yes, you need to delete all projects from workspace and re-import them (at least those you need). Make sure to do the "import without copy" or you will have to adjust makefiles relative CHIBIOS path too.

I have not found a way to make Eclipse workspaces position-independent yet... workspaces contain absolute paths and it is a mess in that directory.

Giovanni

steved
Posts: 825
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: Linux debug configuration

Postby steved » Sat Apr 08, 2023 8:41 am

Giovanni wrote:Yes, you need to delete all projects from workspace and re-import them (at least those you need). Make sure to do the "import without copy" or you will have to adjust makefiles relative CHIBIOS path too.

I've already reimported and adjusted "normal" projects; that's not a problem.

It's how to set things up to automate generation of debug configuration files; mainly in case Linux format is different to Windows, where I've been manually creating them for ages. AIUI that means creating/updating the "ChibiOS (whole tree)" project, but I don't understand what needs to happen here.

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

Re: Linux debug configuration

Postby Giovanni » Sat Apr 08, 2023 6:05 pm

Hi,

There is a small script for creating debug configurations under the tools menu: "Create OpenOCD Debug Configuration (pre-select elf file into a project)". You only see this if you keep the "whole tree" project opened.

You need to select the .elf file before calling the tool, it creates a ./debug subdirectory in the project with the usual .launch files.

Giovanni

steved
Posts: 825
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: Linux debug configuration

Postby steved » Sat Apr 08, 2023 7:57 pm

Giovanni wrote:Hi,

There is a small script for creating debug configurations under the tools menu: "Create OpenOCD Debug Configuration (pre-select elf file into a project)". You only see this if you keep the "whole tree" project opened.

This is the point - I can't open the "whole tree" project because when I try, it can't find the .project file. [And I haven't found a .project file anywhere in the download].

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

Re: Linux debug configuration

Postby Giovanni » Sat Apr 08, 2023 8:26 pm

This is strange, the .project file should be in the root of the various chibios directories, are you sure it is not there?

In ChibiStudio try: ./chibios_trunk/.project or ./chibios_stable-21.11.x/.project

Is this the file you downloaded? https://sourceforge.net/projects/chibio ... o%20Linux/

Giovanni

steved
Posts: 825
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: Linux debug configuration

Postby steved » Sat Apr 08, 2023 10:19 pm

Found it now; I'd forgotten that in Linux, file names beginning with a dot are hidden until disabled! Sorry about that.

It does raise another question, though. The method of importing the "whole tree" project suggests that it could be linked to a specific Chibi version. Is this the case? (At present I may have several versions of Chibi available, and use a single workspace regardless of Chibi version. Is it necessary to have a separate workspace for each version?)

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

Re: Linux debug configuration

Postby Giovanni » Sun Apr 09, 2023 6:00 am

Hi,

Yes, the current setup is to have one workspace for each version. You could mix projects but then you could not rely on the workspace variable CHIBIOS in project virtual folders (board, os, test, etc).

Giovanni


Return to “ChibiStudio”

Who is online

Users browsing this forum: No registered users and 2 guests