Could not determine GDB version after sending: /home/<user>/ModusToolbox/tools_2.4/gcc/bin/arm-none-eabi-gdb --version,

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lking
Moderator
Moderator
Moderator
50 sign-ins 10 likes received 10 replies posted

I am experiencing exactly the same problem described HERE.

The "solution" posted by @Charles_Lai does not work or make sense on an Ubuntu system. 

I am using a Ubuntu 20.04 system with ModusToolbox 2.4. I have tried all of the suggestions in the "solution", none of these help.

  • The issue is not a double semicolon in the PATH variable, since this only applies to Windows systems, I am using an Ubuntu system.
  • The problem is not the path to the executable, since it is a fully resolved path (/home/lawrence/ModusToolbox/tools_2.4/gcc/bin/arm-none-eabi-gdb   --version).
  • manually running the command with the fully resolved path correctly returns the version of gdb, "GNU gdb (GNU Arm Embedded Toolchain 10.3-2021.07) 10.2.90.20210621-git", this is the version included in the install of ModusToolbox 2.4.
  • I do have libncurses5 installed
  • I have re-installed ModusToolbox-2.4
  • I have never installed or used an older version of ModusToolbox.
  • I have rebooted the machine (many times)
  • I can successfully load code to the board and run it by entering the following command in the Terminal window.

make program TARGET=CY8CPROTO-062-4343W TOOLCHAIN=GCC_ARM

  • running the following command successfully loads the code, starts the gdb server, and hits the breakpoint at main()

    make debug TARGET=CY8CPROTO-062-4343W TOOLCHAIN=GCC_ARM

The make debug step makes me believe that the issue is inside eclipse, at this point eclipse should be opening the file main.c and displaying the debug window with a red dot beside main() at the breakpoint. This doesn't seem to be happening.

None of the steps I have tried have resolved the issue. It seems to me that loading code to a board and debugging the code is one of the most basic functions of ModusToolbox, this should work.

Can you take a look at this problem and see if you can come up with a solution?

0 Likes
1 Solution
lking
Moderator
Moderator
Moderator
50 sign-ins 10 likes received 10 replies posted

Ha!  I fixed it!

pip install --upgrade pyocd

I think that I had a older version of pyocd 0.33.1->0.34.1  and the upgrade fixed the issue. The 'new' Ubuntu machine I build had pyocd 0.34.1 installed.

View solution in original post

0 Likes
8 Replies
Qi_Colin
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 5 questions asked

Hi @lking :

Please help to check the setting following the section 6.7.1 in Eclipse_IDE_for_ModusToolbox_User_Guide.

Best Regard,

Colin

0 Likes
lking
Moderator
Moderator
Moderator
50 sign-ins 10 likes received 10 replies posted

I tried changing the pyOCD path as recommended in the manual, this makes no difference. I also tried changing the OpenOCD path, this also made no difference.

I don't think it is a path issue, since the error message has a fully resolved (and correct) path to arm-none-eabi-gdb. I am more inclined to think that stdout from arm-none-eabi-gdb is not correctly captured by eclipse.

Any other suggestions?

0 Likes
Qi_Colin
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 5 questions asked

Hi @lking :

Could you help to check again following the section 3.4 in ModusToolbox-Installation-Guide?

Best Regard,

Colin

0 Likes
lking
Moderator
Moderator
Moderator
50 sign-ins 10 likes received 10 replies posted

I had already run all of the steps in section 3.4 as part of the original install, but just to be sure I ran them again. No difference.

So, I build a new Linux box, and a clean install of Ubuntu 20.04, then ModusToolbox. This time it runs correctly. Moving to a fresh install of Ubuntu is a workaround, not a solution.

 

The real challenge will be figuring out what I had installed that ends up breaking ModusToolbox. One thing I noticed is builds are MUCH faster on the new machine, even though the hardware is identical. Is ModusToolbox going through the items in my path when looking for the tools? The path on the broken machine is: 

/home/lawrence/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/usr/games:/usr/local/games:snap/bin

and on the good machine:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

notice that /home/lawrence/.local/bin is missing from the good system. I looked in /usr/lawrence/.local/bin and found a pyocd-gdbserver, but ModusToolbox shouldn't be using this one.

 

0 Likes
Qi_Colin
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 5 questions asked

HI @lking :

Is it possible this path "/home/lawrence/.local/bin " added when you install another IDE?

In the broken machine, when the tools searched in path "/home/lawrence/.local/bin", the error happened, and then it's stop to search the tools.

Best Regard,

Colin

0 Likes
lking
Moderator
Moderator
Moderator
50 sign-ins 10 likes received 10 replies posted

Yes, the path "/home/lawrence/.local/bin" is added anytime you add python packages with pip install --user package-name and any command that ModusToolbox might use could also be in the .local/bin directory. In general I think ModusToolbox is self contained and should be looking in it's own directories for commands, before looking in the user's path.

I did have other IDEs installed (VSCode), but this quite normal for an Ubuntu (or even Windows) system, since a developer may be working on more than one project with different development systems. The IDEs should be able to co-exist.

The system I have also been working with is the ZephyrProject system (which is not an IDE), I had installed the Zephyr development tools according to the instructions HERE. I installed the zephyr system on the new Ubuntu system after installing ModusToolbox and the ModusToolbox system continued to run normally.

Where does ModusToolbox keep it's search path? I can look through the path on the broken machine and see what is bothering ModusToolbox.

0 Likes
lking
Moderator
Moderator
Moderator
50 sign-ins 10 likes received 10 replies posted

Ha!  I fixed it!

pip install --upgrade pyocd

I think that I had a older version of pyocd 0.33.1->0.34.1  and the upgrade fixed the issue. The 'new' Ubuntu machine I build had pyocd 0.34.1 installed.

0 Likes
Qi_Colin
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 5 questions asked

Hi @lking :

That's great!

Thank you for your sharing!

Best Regard,

Colin

0 Likes