Various with latest ChibiStudio on Drive D:

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

Various with latest ChibiStudio on Drive D:

Postby steved » Tue Jun 02, 2020 12:24 pm

I have ChibiStudio 2020 installed on Drive D:, and can edit and compile with no problem (in fact, I think less to change than previous versions of Studio).

But I have a number of issues with debug, which I suspect might be due to hard-configured C: paths somewhere in the bowels of Eclipse.
1. I don't get the option to build debug launch files - there are no options shown under the 'External Tools' menu.
2. I copied across some existing debug files, editing project names as I have done previously. As per another thread, I modified some of the settings as per screenshot.
3. On the first debug attempt I start OpenOCD, and it reports that it can't find the elf file, having dropped a backslash somewhere (can't see where!)
4. On a subsequent debug attempt without restarting OpenOCD, Eclipse just hangs.
5. I've noticed in the OpenOCD log that it is adding two unexpected search paths:

Code: Select all

Debug: 18 16 options.c:187 add_default_dirs(): bindir=C:/msys64/mingw32/bin
Debug: 19 16 options.c:188 add_default_dirs(): pkgdatadir=C:/msys64/mingw32/share/openocd

Not sure why it should want these at all (although as it happens they do exist on my drive D:)

Any suggestions?
Attachments
ChibiStudio_2020_debugger.png

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

Re: Various with latest ChibiStudio on Drive D:

Postby Giovanni » Tue Jun 02, 2020 12:42 pm

Hi,

Not sure, you could try to create a workspace from scratch and see if it makes a difference, most settings are in workspaces.

Giovanni

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

Re: Various with latest ChibiStudio on Drive D:

Postby RoccoMarco » Tue Jun 02, 2020 2:21 pm

Hello Steved,
I have your exact same issue. I have two chibistudio on my PC and I always struggle when I have to move the setup.

Now some of the issue can be automatically solved and I applied these changes in the last ChibiStudio.

e.g.
The path is not hardcoded anymore in the start batch and there is a new env. variable in it:

Code: Select all

@echo off
set CHIBISTUDIO=%~dp0
set FMPP=%CHIBISTUDIO%\tools\fmpp\bin\fmpp.bat
set BASH=%CHIBISTUDIO%\tools\gnutools\bin\bash.exe
set OPENOCD=%CHIBISTUDIO%\tools\openocd\bin\openocd.exe
set PATH=%CHIBISTUDIO%\tools\gnutools\bin;%PATH%
set PATH=%CHIBISTUDIO%\tools\openocd\bin;%PATH%
set PATH=%CHIBISTUDIO%\tools\GNU Tools ARM Embedded\9.0 2019q4\arm-none-eabi\bin;%PATH%
set PATH=%CHIBISTUDIO%\tools\GNU Tools ARM Embedded\9.0 2019q4\bin;%PATH%
cd eclipse
start eclipse.exe


Unfortunately the path is hard-coded in the workspace as well. I created a script that reworks the workspaces to resolve this issue
(it is under C:\ChibiStudio\tools\chibistudio\relocator).
  1. Extract the ChibiStudio toolchain in a arbitrary folder. Then call
  2. bash relocator.sh -s [THE ARBITRARY DIRECTORY]
  3. e.g. bash relocator.sh -s D:\ChibiStudio

Unfortunately eclipse hard-codes even the path of the imported project in the workspace. This issue can be addressed with an eclipse plugin that is already installed. Select the project that you want to relocate, close them, right click and choose Update Project Location(s)

2020-06-02 15_20_20-ChibiStudio 2020-04 - ChibiOS 20.3.x - C__ChibiStudio_workspace203.png

2020-06-02 15_20_01-ChibiStudio 2020-04 - ChibiOS 20.3.x - C__ChibiStudio_workspace203.png

2020-06-02 15_20_13-ChibiStudio 2020-04 - ChibiOS 20.3.x - C__ChibiStudio_workspace203.png
Ciao,
RM

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

Re: Various with latest ChibiStudio on Drive D:

Postby RoccoMarco » Tue Jun 02, 2020 2:37 pm

Another side note. If you are using a custom launch of openocd check that you are using the env. variable instead of an hardcoded path:

Code: Select all

-c "telnet_port 4444" -s "${env_var:CHIBISTUDIO}/tools/openocd/scripts" -f "interface/ti-icdi.cfg" -f "${file_prompt}"


2020-06-02 15_37_07-External Tools Configurations.png
Ciao,
RM

steved
Posts: 770
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 10 times
Been thanked: 122 times

Re: Various with latest ChibiStudio on Drive D:

Postby steved » Tue Jun 02, 2020 3:12 pm

RoccoMarco,

Thanks for the feedback - nice to know its not 100% down to me!

I don't appear to have a problem with editing and building the project - I created a new one. It's only debug.
The error message when starting debugging is quite interesting:

Code: Select all

Failed to execute MI command:
file D:\ChibiStudio_2020\workspace203\projname\build\ch.elf
Error message from debugger back end:
D:ChibiStudio_2020workspace203projnamebuildch.elf: No such file or directory.

since that file and directory does exist!

I haven't run your relocator program yet - when you say "Extract the ChibiStudio toolchain" do you just mean the entire contents of the ChibiStudio zip file?

Incidentally, I start up GDB a little differently; I have a small project-specific batch file of the form:

Code: Select all

REM starts in the Eclipse directory
cd ..\tools\openocd\bin\
openocd -s ..\scripts -f board/stm32f0discovery.cfg -d -l /Temp/Chibi/oocd.log -f add_rtos.cfg

Then I create a set of project-specific launch files (including "Build, Load, Run")


Return to “ChibiStudio”

Who is online

Users browsing this forum: No registered users and 1 guest