Author Topic: Cross debugging problem using Uniwin  (Read 32005 times)

oliver69

  • Guest
Cross debugging problem using Uniwin
« on: October 08, 2009, 12:57:46 pm »
Hi,

I am using CodeBlocks together with Uniwin to build and debug an application for a TI DaVinci Board.
Code editing, compiling and linking is working fine, except that i cannot use CodeBlocks as a frontend for debugging.
Using Uniwin's proxy gdb.exe directly from the command line on my Windows PC works fine.

My setup is based on the description in:
http://wiki.codeblocks.org/index.php?title=Installing_Uniwin_remote_compiler
I think my problem is not new and has already been solved because exactly the same problem is mentioned in the last paragraph "Troubleshooting" of this wiki article. The Problem is that the bug fixed Uniwin proxy gdb.exe from the referred forum article has been deleted by the admin (http://forums.codeblocks.org/index.php/topic,4516.15.html).

Can this patched version of Uniwin's gdb downloaded from anywhere else?
Is there an other workaround?

Maybe there is another reason for my problem, so please let me provide more details:
Actually, what i am trying to do is: Cross debugging the TI board using gdbserver from a Linux machine (with the Linux cross toolchain) and tunneling the commands with Uniwin so that i can control this from my Windows machine using CodeBlocks.
I have verified that the cross GDB integration in Codeblocks works in principle (tried it with a self compiled Windows native cross debug version of gdb for ARM, but this had other problems...). The "only" problem is with Uniwin's gdb.
* CodeBlocks Nightly Build: SVN 5716 (July 21 2009)
* Uniwin: uniwin.0.5b.binary.02_26_2006
* Development PC: Win XP
* CrossCompileToolchain: Montavista 5.0 (on SuSE Linux)
* Target: TMS320DM6467 EVM Board
* Toolchain prefix: arm_v5t_le-
* Some of Uniwin's executables (gcc, ar gdb) on my Windows machine have been renamed for also using the prefix, because otherwise the wrong programs are called on the CrossCompiling Linux machine. This is proposed in the Uniwin manual and works fine with the compiler and linker. But not with the Debugger.
* The PATH has Uniwin's bin directory as its first entry, in front of all other compilers/debuggers.

I can provide more details, if this is necessary.

I would greatly appreciate any help on this problem.
Many thanks in advance.

Oliver








Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: Cross debugging problem using Uniwin
« Reply #1 on: October 08, 2009, 01:25:31 pm »
Can this patched version of Uniwin's gdb downloaded from anywhere else?
Here it is (see attachament).

Probably Yiannis could provide the sources, too. That'd be most convenient.

[attachment deleted by admin]
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

oliver69

  • Guest
Re: Cross debugging problem using Uniwin
« Reply #2 on: October 08, 2009, 02:03:18 pm »
Hi Morten,

>Here it is (see attachament).
I have just tried it, works perfectly.
Thank you very much for your quick help!

>Probably Yiannis could provide the sources, too. That'd be most convenient.
It really would be, although it looks like i don't need them anymore ;-)


Yours sincerely
Oliver

Offline zanget

  • Single posting newcomer
  • *
  • Posts: 5
Re: Cross debugging problem using Uniwin
« Reply #3 on: January 05, 2010, 02:55:23 am »
hi,oliver69

I'm going to ask about compiling a cross compiler on win for the embedded system.
Is it possible by using CB here and then debug on the embedded system?


I want to compiling m68k-elf-tools on win so i can compiling  a app on win  running on embedded system by CB。
thanks
« Last Edit: January 05, 2010, 02:57:32 am by zanget »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: Cross debugging problem using Uniwin
« Reply #4 on: January 05, 2010, 07:07:48 am »
I want to compiling m68k-elf-tools on win so i can compiling  a app on win  running on embedded system by CB。
Setting up a C::B project to compile the compiler seems not very logical to me. If you want to compile a cross compiler you usually should use the suggested environment which is usually automake / Makefile based or alike. Ask the compiler's devs for help accordingly.

However, once you've compiled your cross compiler and it's really working you can embed this into C::B. This is possible in several ways:
1.) Use an existing compiler if your compiler is command-line compatible
2.) Use a copy of an existing compiler if you need to tune parameters / the setup in general
3.) Extend the compiler plugin by your cross compiler. This is easier as you might think, but requires you to compile C::B itself, too (which is also easy).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline zanget

  • Single posting newcomer
  • *
  • Posts: 5
Re: Cross debugging problem using Uniwin
« Reply #5 on: January 05, 2010, 07:53:24 am »
I want to compiling m68k-elf-tools on win so i can compiling  a app on win  running on embedded system by CB。
1.) Use an existing compiler if your compiler is command-line compatible
2.) Use a copy of an existing compiler if you need to tune parameters / the setup in general
3.) Extend the compiler plugin by your cross compiler. This is easier as you might think, but requires you to compile C::B itself, too (which is also easy).
The compiler has no win-version as far as i know, and yes, it's command-line compatible,which is used in linux base on gcc.
I just not sure about the compiler for compiling the cross-compiler.May I use "mingw32-gcc" here?
and how can i settings for 3),is it a tutorial?

By the way i have download the code from http://www.uclinux.org/pub/uClinux/m68k-elf-tools/tools-20030314/

« Last Edit: January 05, 2010, 07:56:15 am by zanget »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: Cross debugging problem using Uniwin
« Reply #6 on: January 05, 2010, 08:11:14 am »
By the way i have download the code from http://www.uclinux.org/pub/uClinux/m68k-elf-tools/tools-20030314/

OK - first I'd say try to cross compile this yourself. What compiler to use for cross compilation I can't tell, ask the guys that develop the compiler, we can't (and shouldn't) give support for that. Once you did this step (which is really hard from what I tried) come back and provide the compiler package. Then we'll see what of the options is the best.

Alternatively did you ask the compiler devs whether there is already a cross-compiler available for Windows (or the platform you wish to use it)?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline pinoyboy82

  • Single posting newcomer
  • *
  • Posts: 5
Re: Cross debugging problem using Uniwin
« Reply #7 on: October 03, 2011, 07:21:33 pm »
Does anyone happen to have the patched gdb.exe file for Uniwin?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: Cross debugging problem using Uniwin
« Reply #8 on: October 06, 2011, 07:21:03 am »
Does anyone happen to have the patched gdb.exe file for Uniwin?
Even in case, I doubt it will still work for recent compilers.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline vdm

  • Single posting newcomer
  • *
  • Posts: 7
Re: Cross debugging problem using Uniwin
« Reply #9 on: October 11, 2012, 08:51:52 am »
Hi guys.

Anybody, please share a patched gdb.exe file. The link attached by administrator currently removed...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: Cross debugging problem using Uniwin
« Reply #10 on: October 11, 2012, 09:12:33 am »
Anybody, please share a patched gdb.exe file. The link attached by administrator currently removed...
http://www.sendspace.com/file/cbc3nz
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline vdm

  • Single posting newcomer
  • *
  • Posts: 7
Re: Cross debugging problem using Uniwin
« Reply #11 on: October 11, 2012, 10:00:03 am »
MortenMacFly, thank you very much!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9693
Re: Cross debugging problem using Uniwin
« Reply #12 on: December 13, 2013, 09:01:18 am »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline jhellen

  • Single posting newcomer
  • *
  • Posts: 2
Re: Cross debugging problem using Uniwin
« Reply #13 on: August 31, 2015, 09:16:06 pm »
Hi all,
I'm also looking for a patched version of the gdb.exe file. Is there someone Who can share it?

Regards Wim