Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Openocd problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Sun Dec 27, 2009 12:16 pm    Post subject: Openocd problems Reply with quote

I have had problems installing openocd. Here are my temporary solutions.

In openocd-9999.ebuild

change line 5 from
ESVN_REPO_URI ...
to
EGIT_REPO_URI="git://openocd.git.sourceforge.net/gitroot/openocd/openocd"

change line 8 from
inherit subversion autotools
to
inherit git autotools

change line 40 from
subversion_src_unpack
to
git_src_unpack

add the following line after line 49 econf \
--enable-maintainer-mode

this enable mode is for the version.texi error

ebuild openocd-9999.ebuild digest, then emerge openocd. It will fail due to an error in a file in/usr/portage/distfiles/git-src/openocd/jtag/drivers.

edit amt_jtagaccel.c and change to the following:
Code:
#if PARPORT_USE_PPDEV == 1
static int device_handle;
int XxXxX;

static int addr_mode = IEEE1284_MODE_EPP | IEEE1284_ADDR ;
#define AMT_AW(val) do { ioctl(device_handle, PPSETMODE, &addr_mode); XxXxX=write(device_handle, &val, 1); } while (0)
#define AMT_AR(val) do { ioctl(device_handle, PPSETMODE, &addr_mode); XxXxX=read(device_handle, &val, 1); } while (0)

static int data_mode = IEEE1284_MODE_EPP | IEEE1284_DATA ;
#define AMT_DW(val) do { ioctl(device_handle, PPSETMODE, &data_mode); XxXxX=write(device_handle, &val, 1); } while (0)
#define AMT_DR(val) do { ioctl(device_handle, PPSETMODE, &data_mode); XxXxX=read(device_handle, &val, 1); } while (0)


adding the variable XxXxX to overcome compiler error.

Anyone with ebuild experience is welcome to comment.
Hope this helps

Billy
Back to top
View user's profile Send private message
armin76
Retired Dev
Retired Dev


Joined: 24 Apr 2006
Posts: 174

PostPosted: Mon Jan 04, 2010 6:21 am    Post subject: Reply with quote

I fixed that stuff already.
Back to top
View user's profile Send private message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Mon Jan 04, 2010 8:02 pm    Post subject: Reply with quote

Thanks, but you certainly had NOT (or not arrived at the mirrors) at the time of posting.
Back to top
View user's profile Send private message
armin76
Retired Dev
Retired Dev


Joined: 24 Apr 2006
Posts: 174

PostPosted: Wed Jan 06, 2010 5:16 pm    Post subject: Reply with quote

http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-embedded/openocd/ChangeLog?view=markup

Maybe i didn't, what i mean to say is that its now fixed in the tree :)
Back to top
View user's profile Send private message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Wed Apr 13, 2011 1:42 pm    Post subject: Reply with quote

openocd is failing to build due to version.texi error again, is there a flag I should be using?

My temporary solution is to edit the ebuild again:

add the following line after line econf \
--enable-maintainer-mode
Back to top
View user's profile Send private message
Mikkl
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2006
Posts: 79

PostPosted: Thu Apr 14, 2011 12:48 pm    Post subject: Reply with quote

Hi,
Quote:
openocd is failing to build due to version.texi error again, is there a flag I should be using?

My temporary solution is to edit the ebuild again:

add the following line after line econf \
--enable-maintainer-mode


I tried this but then it says:
Code:
configure: error: jimtcl not found, run git submodule init and git submodule update.


Should I use the 9999 version of jimtcl? I have jimtcl-0.70_pre20110317 installed. (9999 version fails to build, too).
Back to top
View user's profile Send private message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Thu Apr 14, 2011 6:14 pm    Post subject: Reply with quote

Worked ok for me .. I noticed there was a change regarding jimtcl.

I cannot try at the moment as I have broken everything trying to remove qt, As soon as the pc working again, I will remove all of openocd and try again to see what happens and let you know.

If you get it going in the mean time let us know on this thread.
Back to top
View user's profile Send private message
Mikkl
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2006
Posts: 79

PostPosted: Thu Apr 14, 2011 6:50 pm    Post subject: Reply with quote

Ok, there's a typo in the jimtcl-9999.ebuild as it seems.
It complains about EGIT_REPO_URI not set.
Instead of EGIT_REPO_URI there is only EGIT_REPO in the ebuild.
So I got that to work, but openocd-9999 still refuses with the same error.
Oh, and good luck with your pc and qt removal! I hope removing openocd won't break anything more in the end.
Back to top
View user's profile Send private message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Tue Apr 26, 2011 7:34 pm    Post subject: Reply with quote

I could not get the error you got .. but try removing:
Code:
 [[ ${PV} != "9999" ]] &&

on line 52 of the ebuild

I do not know why --enable-maintainer-mode is disabled for the 9999 ebuild.
(I did not notice this check earlier) :roll:

I removed all of openocd and then modified the ebuild making line 52 read as:

Code:
myconf="${myconf} --enable-maintainer-mode"


in my PORTDIR_OVERLAY and it built and worked o.k.

Sorry about delay but here in the UK we had some very rare summer type weather (21C in North England in April) .. I am behind on alot of work now.

Billy
Back to top
View user's profile Send private message
Mikkl
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2006
Posts: 79

PostPosted: Wed Apr 27, 2011 11:57 am    Post subject: Reply with quote

Hey,
no problem. Actually, here in Germany weather has been like summer for 2 weeks, too! I'm rather happy it's raining today, haha, so I can get some work done without regrets.

Ok, so adding the line after "econf \" didn't work, but what you suggested in your last post did the trick, except that in my ebuild it's on line 50 (do we have different ebuilds?)

Thanks a lot!

Mikkl
Back to top
View user's profile Send private message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Wed Apr 27, 2011 7:27 pm    Post subject: Reply with quote

Hello Mikki

This is the version I am using:

"# $Header: /var/cvsroot/gentoo-x86/dev-embedded/openocd/openocd-9999.ebuild,v 1.13 2011/03/17 12:50:00 hwoarang Exp $"

I emerged --sync on Apr26 to ensure upto date before posting the reply to you.

I am happy it worked for you, I don't think my changes can do any harm.

What chips are you using openocd with?

I am using SAM7 mainly at the moment, I used to use PICs for projects, but now programming ARMs in C is much easier. :)

I see am am not the only one who feels guilty when I am relaxing in the sunshine!

Billy
Back to top
View user's profile Send private message
Mikkl
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jan 2006
Posts: 79

PostPosted: Sun May 01, 2011 7:43 pm    Post subject: Reply with quote

My goal is to implement a JTAG interface for debugging a very simple RISC processor (FPGA design) used for learning in school. So i'm just starting to figure out how the internals of openocd work so I can hopefully add support for the cpu. I guess I rather will have to work on openocd than with it.
Glad to hear I'm not alone with doing debugging here.

For me, as far as relaxing is concerned it is more the other way round: I feel guilty when not relaxing in the sunshine :roll:

Greets Mikkl
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum