Author Topic: About OpenOCD..  (Read 19081 times)

Offline PaowZ

  • Multiple posting newcomer
  • *
  • Posts: 14
About OpenOCD..
« on: October 22, 2009, 04:33:46 pm »

Hello there!

Through some searches, I ended up guessing the use of MCU plugin (thanks to martind) is a must for remote debugging. The fact is that I can't find the last plugin cbmcu that should be available on this link:
http://developer.berlios.de/projects/cbmcu/

I've only found those sources at http://svn.berlios.de/svnroot/repos/cbmcu/trunk/cbplugin/. are they ok ?

I have some questions, is this project still maintained and if so, do you guys have a link for the latest plugin release ?
Anayway, the C::B wiki doesn't seem to talk about it.. am I wrong ??  :shock:

thanks a lot :)

Offline PaowZ

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: About OpenOCD..
« Reply #1 on: October 22, 2009, 07:25:22 pm »
Ok.. I retrieved C::B sources and got the file from SVN for openOCD.
I managed to compile everything (after getting wxScintilla which was not part of wxWidget sources, apparently..) except that it won't link the dynamic lib (the resulting plugin..)

[100.0%] Linking dynamic library: H:\_program files\CodeBlocks\src\devel\mcumgr.dll
ld.exe: unrecognized option '-Wl,--out-implib=H:/_program files/CodeBlocks/src/devel/libmcumgr.a'
ld.exe: use the --help option for usage information
Process terminated with status 1 (0 minutes, 8 seconds)
0 errors, 0 warnings

..it is said that some options are not recognized. I'm using the MingGCC linker (ld.exe)..

any idea ?

thanks :)

Offline PaowZ

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: About OpenOCD..
« Reply #2 on: October 23, 2009, 05:50:18 pm »
Ok.. I got farther..
I successfully build C::B sources and so are the openOCD DLLs..
I'm close to get this think to work but I'm getting this message when I try to launch my freshly built C::B:

Quote
Cannot find ressources...
Code::Blocks was configured to be installed in '......... tralalal'.
Please use the command-line switch '--prefix' or set.. etc

Any clue would be greatly appreciated ;)

Thanks

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: About OpenOCD..
« Reply #3 on: October 23, 2009, 07:28:37 pm »
Any clue would be greatly appreciated ;)
Don't forget to run the update script. See the WiKi for information on the build process for Unix/Linux (applies to you, too most likely)
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 PaowZ

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: About OpenOCD..
« Reply #4 on: October 24, 2009, 12:56:10 am »
thanks for the reply.
Sure, I already run the update batch file and got the files copied to the /output dir and tried to launch from that directory..
I'll glance at wiki ;)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: About OpenOCD..
« Reply #5 on: October 24, 2009, 01:43:38 pm »
and tried to launch from that directory..
that won't work. The update script creates a version of C::B that needs to be "make install"'ed afterwards. Otherwise the launch script does not have the correct path's set. Alternatively you can adopt the launch script and do exactly what C::B pops up: Export an envvar to the path where your C::B shared (data) folder is.
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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9702
Re: About OpenOCD..
« Reply #6 on: October 24, 2009, 01:46:09 pm »
Adopt e.g. this script to your needs (path's):
Code
#!/bin/sh
APP_DIR=/home/mortenmacfly/bin/codeblocks_svn
CODEBLOCKS_DATA_DIR=/home/mortenmacfly/bin/codeblocks_svn
export CODEBLOCKS_DATA_DIR
export LD_LIBRARY_PATH=$APP_DIR:$LD_LIBRARY_PATH
$APP_DIR/codeblocks $@
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 PaowZ

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: About OpenOCD..
« Reply #7 on: October 25, 2009, 12:53:28 pm »
Ok.. I'll give it a try asap..
Thanks again ;)

Offline PaowZ

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: About OpenOCD..
« Reply #8 on: October 26, 2009, 10:48:21 am »
Hi!

Is this script supposed to be run under GNU/Linux ? I can see the #!/bin/sh for a linux shell. If so, I'm running WinXP and even under a Cygwin terminal I can't get the job done.
I modify the update.bat script to point to a valid zip exe (not the cygwin one..) but nothing much..
Like this guy, http://forums.codeblocks.org/index.php?topic=10764.0%3Bprev_next=next, setting CODEBLOCKS_DATA_DIR doesn't help..

Unlike this one, http://forums.codeblocks.org/index.php?topic=10677.0%3Bprev_next=next who did manage to run C::B after an update.bat run.
I'm starting to feel a bit dumb..  :shock:
I think I gonna do the whole process since the beginning..


Offline PaowZ

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: About OpenOCD..
« Reply #9 on: October 26, 2009, 12:26:10 pm »
Ok.. this time, everything went fine, except that I can't see any MCU tab.. now it's an openOCD issue :)

bigger

  • Guest
Re: About OpenOCD..
« Reply #10 on: October 26, 2009, 07:40:07 pm »
Ok.. I retrieved C::B sources and got the file from SVN for openOCD.
I managed to compile everything (after getting wxScintilla which was not part of wxWidget sources, apparently..) except that it won't link the dynamic lib (the resulting plugin..)

[100.0%] Linking dynamic library: H:\_program files\CodeBlocks\src\devel\mcumgr.dll
ld.exe: unrecognized option '-Wl,--out-implib=H:/_program files/CodeBlocks/src/devel/libmcumgr.a'
ld.exe: use the --help option for usage information
Process terminated with status 1 (0 minutes, 8 seconds)
0 errors, 0 warnings

..it is said that some options are not recognized. I'm using the MingGCC linker (ld.exe)..


Quote
Ok.. I got farther..
I successfully build C::B sources and so are the openOCD DLLs..
I'm close to get this think to work but I'm getting this message when I try to launch my freshly built C::B:


Hi PaowZ,

I got exactly the same error concerning ld.exe and the unrecognized option. Could you give me a clue on how you fixed this issue?
Thank you.


Offline PaowZ

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: About OpenOCD..
« Reply #11 on: October 27, 2009, 09:46:34 am »
Quote
Could you give me a clue on how you fixed this issue?
Hi!
I had this issue when I tried to compile with a cross-compiler. Make sure your "GNU GCC Compiler" points to a valid x86 code compiler.
I just reset the C::B environment for a fresh install. If it doesn't help, try to remove the -Wl flag from Compiler and Debugger Settings/Other Settings/Advanced Options, choose "link object to dynamic library" in the dropdown and remove every -Wl flag..

bigger

  • Guest
Re: About OpenOCD..
« Reply #12 on: October 27, 2009, 02:27:01 pm »
Thanks a lot PaowZ!

I gonna test it asap....