Code Composer Studio Skipping Breakpoints When Compiling with GNU - c

I'm attempting to debug a program in Code Composer Studio compiling with the GNU toolchain rather than the default TI, it's my understanding that CCS by default only places CCS breakpoints which are not recognized by the GDB when working in a CCS project.
My code is inside a CCS project hence my breakpoints are being ignored. I read somewhere that when working inside a C/C++ project the breakpoints placed will be GDB breakpoints but when working inside a C/C++ project it doesn't seem to actually run the code on the microcontroller itself.
I need to be able to debug my code running on the microcontroller itself while also using the GNU compiler toolchain but I can't seem to find a way to do this.

Please check target configuration. What kind of hardware is it ? Does the hardware support hardware breakpoints ? Is the program flashed correctly ? Some hardware support only a limited number of hardware breakpoints. Gnu toolchain should also include "-g" or "--symdebug:dwarf".

Related

Configure GDB to accept Cross-Compiled executables?

I'm still a newbie to assembly language and cross-compiling etc. I've already googled the problem I'm having and seen a few similar posts but none of them solved my problem unfortunately.
We're learning ARM32 Syntax at the university and playing around with assembly code on AARCH64 machines on a uni server. So we need to cross-compile the .s files to be able to run them.
We use the command arm-linuxgnueabihf-gcc to cross-compile.
Now the system (the loader I guess) is configured properly to execute these 32-bit cross executables. When I tried to debug a 32b exec however GDB crashes with error: selected architecture armv7 is not compatible with reported target architecture aarch64
There are screenshots below that illustrate the problem. Thanks for any help!
System infos:
System info
No error with native compiler:
No error with native compiler
Error with cross-compilation:
Error with cross-compilation

GDB stuck at “Configuring GDB Aborting configuring GDB”

I've installed (OSX Mojave 10.14.6.) Eclipse CDT and GNU MCU Eclipse plugin and finaly GNU Tools for ARM. My goal is to build and debug ARM code using GDB (arm-none-eabi-gdb).
I've created a Hello World project for Arm, which builds ok - but, debugging seems not to work with GDB (that comes with the Arm package). GDB gets stuck:
I have set the proper paths in Eclipse to arm-none-eabi-gdb.
I have signed the arm-none-eabi-gdb (with the same certificate that I used to sign GDB installed via brew into /usr/local/bin/gdb the day before - and it worked!).
I have also tried running Eclipse as root from command line.
Nothing helps.
The message is "Configuring GDB Aborting configuring GDB".
What to do?
Probably what is going on here is that you built to a given target (ARM based) and you're trying to run it (with gdb) on your mac (x86).
You'll need an emulator or QEMU to properly run on your mac or maybe a real board.

Eclipse: debugging large C project without compiling in Eclipse

I have large C project which I'm compiling manually and then debugging via GDB.
I'm already editing source in Eclipse, but I am not able to compile it there, because of complex and multiple makefile.
Is it possible only to launch app via Eclipse for debugging as via GDB?
Thanks
Yes, you can just set up the debugger to point to the binary and have it launch it. Just make sure you compile it with the right flags (-ggdb and -g3 for symbols). If you have it imported as a Makefile project, it should be able to automatically map your code to the symbols.
Basic instructions are here: http://eclipse.org/jetty/documentation/current/debugging-with-eclipse.html

graphics.h programs not running in Dosbox Windows 7 environment

I have installed Dosbox to run Turbo C in it. But my graphics.h programs are not executing in it. I am getting Linker Error which says"Undefined sumbol initgraph in module..." and so on.
The problem you are facing is quite simple to solve.
Open your Turboc IDE
Click on options
click on linker
click on libraries
mark the graphics option(a cross mark usually)
now run.
You are not linking the required graphics library. It has been quite a while since I last used Turbo C, but if I remember correctly, you can simply configure the toolchain to link the graphics lib in the linker options which are easily accessible from the Turbo C "IDE".
If You are getting Error in Windows XP that Undefined symbol initgraph in module
then follow the Steps :
Go to Console
Go to Options
Go to Linker
Go to Libraries
Make "X" Mark on Graphics Library

How to run a Simple C Program in Eclipse IDE

I've downloaded Eclipse C/C++ IDE . I need to run a simple c program in this(To print welcome).
While trying to run the program its popping up an error message like "Launch failed: Binary not found" .
Need i install any compiler package. ?
Please help me to do this.
Yes, you have to install a compiler, Eclipse is only an IDE. You can get MinGW here.
http://www.eclipse.org/cdt/
Look at the above link,you will get more idea,on how to do development using C/C++ using eclipse.
You can make use of the documentation which comes along with the IDE.
Just on the start up window in Eclipse click Tutorials and then click on c/c++ development link and then read Before you Begin part.
The program you write must be converted into respective binary which is to be run on that particular architecture.This process is carried out by the compiler as a result compiler is required for eclipse IDE to compile and link the code .
Various compilers are available such as Microsoft Visual C++ MinGW GCC or Cygwin GCC in the form of chaintools in eclipse so as to compile the code.
Eclipse is an IDE.It will help you write applications in c/++,but it will not compile your program as Eclipse does not comes with a compiler pre-configured.
You need to install a compiler to run your application.
Eclipse is capable to use many c/c++ compilers,some are:
1.Cygwin
2.MingW
3.Gross
4.Microsoft Visual C++
I would advise to install mingW OR Cygwin.
If you need more help on running a c/c++ application in Eclipse
visit http://www.ibm.com/developerworks/opensource/library/os-ecc/?S_TACT=105AGX44&S_CMP=ART

Resources