[Mac, gdb, debug] Run C program works, debugging doesn't

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[Mac, gdb, debug] Run C program works, debugging doesn't

1,563 Views
simonhelling
Contributor I

Hi,

I have a problem debugging a C program in the IDE. I can successfully run it (e.g. the hello world example) but as soon as i try to debug the file it builds the program and appears in the 'progress' window at 100% but then nothing more happens. Also it says beneath the progress bar: ''Launching: Configuring GDB Aborting configuring GDB'.

I am running a Mac on OS X Yosemite 10.10.5 with MCUXpresso IDE v10.1.1 [Build 606] [2018-01-02]. I am using gdb 8.0 and followed the steps to install it as described by Neil Traft on stackoverflow.

Also, I tried adding a certificate according to this, too. But still to no effect. I hope you can help.

All the best,

Simon

0 Kudos
6 Replies

1,204 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Simon,

The MCUXpresso IDE is for cross platform development/debug of NXP ARM M-class parts. If you're interested in an IDE for native debug, visit Eclipse Downloads.

Thanks and regards,

MCUXpresso Support

0 Kudos

1,204 Views
BlackNight
NXP Employee
NXP Employee

Hi Simon,

First: I would use the GDB which comes with the MCUXpresso IDE installation. Using a different GDB (in combination with different build tools) can be very problematic unless you know exactly what you are doing, so better stick with the default.

As for the error message: it usually originates by wrong or misformed parameters/arguments to gdb, see Solving “Launching: Configuring GDB Aborting Configuring GDB” | MCU on Eclipse  for an example. I recommend that you have a look at the Console output/logs and turn on GDB traces as well (see GDB Traces | MCU on Eclipse ) and post them here?

I hope this helps,

Erich

0 Kudos

1,204 Views
simonhelling
Contributor I

Hello Erich,

thank you for your answer. Actually, the problem started when I installed MCUXpresso. I didn't want to change the settings but when I tried to debug the program I got the error message "gdb --version" and online research suggested, that gdb might be missing. As a result, I installed gdb as described above. I have been to your blog and I gladly appreciate your efforts but it seems the problems origin lies one step prior to the solution you provide. I have to say I have little understanding oh how this is all working together. But it seems my GNU ARM build tools don't come with GDB? Is that even possible? 

Thank you once more,

Simon

0 Kudos

1,204 Views
BlackNight
NXP Employee
NXP Employee

Hi Simon,

there are two parts of GDB: the client (in Eclipse) and the Server (this is inside your toolchain, e.g. arm-none-eabi-gbd.exe) (see as well GDB Client and Server: Unlocking GDB | MCU on Eclipse ). For MCUXpresso IDE you don't need to install any GDB as it is installed, inside the IDE installation folder, e.g. <install>/ide/tools/bin. Can you check you have the GDB in there?

I hope this helps,

Erich

0 Kudos

1,204 Views
simonhelling
Contributor I

Hello Erich,

thank you again for you fast response.

I looked into it and i found the GDB in the installation folder.

I also added the "arm-none-eabi-" to the build variables because it wasn't there.

Still, nothing changes. I get the error "gdb --version". Maybe that is because i just want to debug the code on my pc and not on an embedded system? But I thought this should also be possible.

Yesterday, I tried to debug a program in the terminal with gdb and that worked just fine (but not convenient).

Thank you again...

Simon

0 Kudos

1,204 Views
lpcxpresso_supp
NXP Employee
NXP Employee

I'm not sure what you're trying to do, other than it's not working. The MCUXpresso installation comes with the GNU ARM build tools, including GDB. First, what target processor and debug probe are you using? Second, where did you get the "Hello World" example? Third, please include the debug console to see if it can provide more information.

Thanks and regards,

MCUXpresso Support

0 Kudos