Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Crossdev] error while making msp430 toolchain
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Fri Feb 05, 2010 1:12 pm    Post subject: [Crossdev] error while making msp430 toolchain Reply with quote

Hi.

I've been using the AVR toolchain for programming Atmel microprocessors for quite some time. Recently I received a development kit with the MSP430-F2013 by Texas Instruments. I wanted to give the MSP430 toolchain a try.

Code:
crossdev -s4 --ex-insight -t msp430


but got this:

Code:
 * Host Portage ARCH:     x86
 * Target Portage ARCH:   *
 * Target System:         msp430
 * Stage:                 4 (C/C++ compiler)

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               linux-headers-[latest]
 * libc:                  -[latest]
 * Extra: insight:        DO IT

 * PORTDIR_OVERLAY:       /usr/portage/local/layman/science
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /usr/portage/packages/cross/msp430
 * PORTAGE_TMPDIR:        /var/tmp/cross/msp430
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~ 
--- Invalid atom in /etc/portage/package.keywords: cross-msp430/[latest]
 * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ...                                                        [ ok ]
 * Log: /var/log/portage/cross-msp430-binutils.log
 * Emerging cross-binutils ...                                                                                               [ ok ]
 * Log: /var/log/portage/cross-msp430-linux-headers-quick.log
 * Emerging cross-linux-headers-quick ...

 * linux-headers failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-msp430-info.log
 * /var/log/portage/cross-msp430-linux-headers-quick.log


So here are the logs:

Code:
/var/log/portage/cross-msp430-info.log
-----------------------------------------------------------------------------------------------------------------------------------
 ^[[32;01m*^[[0m Host Portage ARCH:     x86
 ^[[32;01m*^[[0m Target Portage ARCH:   *
 ^[[32;01m*^[[0m Target System:         msp430
 ^[[32;01m*^[[0m Stage:                 4 (C/C++ compiler)

 ^[[32;01m*^[[0m binutils:              binutils-[latest]
 ^[[32;01m*^[[0m gcc:                   gcc-[latest]
 ^[[32;01m*^[[0m headers:               linux-headers-[latest]
 ^[[32;01m*^[[0m libc:                  -[latest]
 ^[[32;01m*^[[0m Extra: insight:        DO IT

 ^[[32;01m*^[[0m PORTDIR_OVERLAY:       /usr/portage/local/layman/science
 ^[[32;01m*^[[0m PORT_LOGDIR:           /var/log/portage
 ^[[32;01m*^[[0m PKGDIR:                /usr/portage/packages/cross/msp430
 ^[[32;01m*^[[0m PORTAGE_TMPDIR:        /var/tmp/cross/msp430
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~
Portage 2.1.7.16 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-i686-Intel-R-_Core-TM-2_Duo_CPU_T9300_@_2.50GHz-with-gentoo-1.12.13
Timestamp of tree: Thu, 04 Feb 2010 14:15:01 +0000
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA skype-eula dlj-1.1 cadsoft"
ACCEPT_PROPERTIES="*"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-m


Code:
/var/log/portage/cross-msp430-linux-headers-quick.log

--- Invalid atom in /etc/portage/package.keywords: cross-msp430/[latest]
Calculating dependencies  ^H^H... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) cross-msp430/linux-headers-2.6.30-r1 from science
--- Invalid atom in /etc/portage/package.keywords: cross-msp430/[latest]
 * gentoo-headers-base-2.6.30.tar.lzma RMD160 SHA1 SHA256 size ;-) ...   [ ok ]
 * gentoo-headers-2.6.30-2.tar.lzma RMD160 SHA1 SHA256 size ;-) ...      [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * CPV:  cross-msp430/linux-headers-2.6.30-r1
 * REPO: science
 * USE:  elibc_glibc kernel_linux userland_GNU x86

 * This version of linux-headers does not support unknown.
 * Please merge the appropriate sources, in most cases
 * (but not all) this will be called unknown-headers.
 * ERROR: cross-msp430/linux-headers-2.6.30-r1 failed:
 *   Package unsupported for unknown
 *
 * Call stack:
 *         ebuild.sh, line   54:  Called pkg_setup
 *         ebuild.sh, line 1347:  Called kernel-2_pkg_setup
 *   kernel-2.eclass, line 1105:  Called setup_headers
 *   kernel-2.eclass, line  718:  Called die
 * The specific snippet of code:
 *              die "Package unsupported for $(tc-arch)"
 *
 * If you need support, post the output of 'emerge --info =cross-msp430/linux-headers-2.6.30-r1',
 * the complete build log and the output of 'emerge -pqv =cross-msp430/linux-headers-2.6.30-r1'.
 * This ebuild is from a repository named 'science'
 * The complete build log is located at '/var/tmp/cross/msp430/portage/cross-msp430/linux-headers-2.6.30-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/cross/msp430/portage/cross-msp430/linux-headers-2.6.30-r1/temp/die.env'.
 * S: '/var/tmp/cross/msp430/portage/cross-msp430/linux-headers-2.6.30-r1/work/gentoo-headers-base-2.6.30'




So I guess the problem is
Code:
 * This version of linux-headers does not support unknown.
 * Please merge the appropriate sources, in most cases
 * (but not all) this will be called unknown-headers.


So I've checked:
Code:
 eix linux headers


* cross-msp430/linux-headers [1]
     Available versions:  (msp430)  2.4.33.3!b!s (~)2.4.36!b!s 2.6.23-r3!b!s 2.6.27-r2!b!s (~)2.6.28-r1!b!s (~)2.6.29!b!s (~)2.6.30-r1!b!s
     Homepage:            http://www.kernel.org/ http://www.gentoo.org/
     Description:         Linux system headers

* media-tv/linuxtv-dvb-headers
     Available versions:  3.1 ~5
     Homepage:            http://www.linuxtv.org
     Description:         Virtual Package installing the Header files for DVB

[I] sys-kernel/linux-headers
     Available versions:  2.4.33.3!b!s ~2.4.36!b!s 2.6.23-r3!b!s 2.6.27-r2!b!s ~2.6.28-r1!b!s ~2.6.29!b!s ~2.6.30-r1!b!s
     Installed versions:  2.6.27-r2!b!s(05:03:05 PM 01/05/2009)
     Homepage:            http://www.kernel.org/ http://www.gentoo.org/
     Description:         Linux system headers

[1] "science" /usr/portage/local/layman/science

Found 3 matches.


So could you tell me where is the problem ?? Do the sys-kernel/linux-headers have to my the same as cross-msp430/linux-headers or something ??

PS I've also noticed that since there is no libc in this toolchain a invalid record "cross-msp430/[latest]" is added to /etc/portage/package.keywords.
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Fri Feb 05, 2010 4:31 pm    Post subject: Reply with quote

Quote:
--- Invalid atom in /etc/portage/package.keywords: cross-msp430/[latest]

Try either the -S option or specify versions for binutils , gcc etc. and maybe use the full target name. Obviously [latest] does not get replaced substituted.
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Fri Feb 05, 2010 8:45 pm    Post subject: Reply with quote

but that's not the problem... it's just and invalid record added to /etc/portage/package.keywords by crossdev. Because there are no libc specified:
Code:
 * Host Portage ARCH:     x86
 * Target Portage ARCH:   *
 * Target System:         msp430
 * Stage:                 4 (C/C++ compiler)

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               linux-headers-[latest]
 * libc:                  -[latest]


so in /etc/portage/package.keywords I've got:

Code:
cross-msp430/binutils * ~* -x86 -~x86
cross-msp430/gcc * ~* -x86 -~x86
cross-msp430/linux-headers * ~* -x86 -~x86
cross-msp430/[latest] * ~* -x86 -~x86
cross-msp430/gdb * ~* -x86 -~x86
cross-msp430/insight * ~* -x86 -~x86


I honestly think this is irrelevant.


About the -s option... I've already tried from 0 to 4.
0 installs only binutils. Anything above that (1 2 3 4) gives the error.

Still don't know what's wrong.
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Sat Feb 06, 2010 12:26 pm    Post subject: Reply with quote

I was referring to uppercase -S.

Specifing a full target should fix your problem. There might be other codepaths in the script to work around it, therefore the -S

msp430-unknown-linux-gnu could be your problem as the ebuild makes use of the category names.
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Sat Feb 06, 2010 1:06 pm    Post subject: Reply with quote

Sorry... I've misunderstood you. But the -S option didn't help either.


I've looked through all the logs and found stuff like this:

Code:
checking for .preinit_array/.init_array/.fini_array support... yes
checking if mkdir takes one argument... no
*** Configuration msp430-unknown-none not supported
make[1]: *** [configure-gcc] Error 1
make[1]: Leaving directory `/var/tmp/cross/msp430/portage/cross-msp430/gcc-4.4.2/work/build'
make: *** [all] Error 2
 * ERROR: cross-msp430/gcc-4.4.2 failed:


Code:
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * CPV:  cross-msp430/linux-headers-2.6.27-r2
 * REPO: science
 * USE:  elibc_glibc kernel_linux userland_GNU x86

 * This version of linux-headers does not support unknown.
 * Please merge the appropriate sources, in most cases
 * (but not all) this will be called unknown-headers.
 * ERROR: cross-msp430/linux-headers-2.6.27-r2 failed:
 *   Package unsupported for unknown



So I guess that the problem really is the missing libc. I thought it simply doesn't exist, but then I've found that FreeBSD has one in ports. I'll try do make use of it somehow. I'll inform you of any success.

On the other hand it's strange that crossdev has such an error. I'll try downgrading it to a stable version.
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Sat Feb 06, 2010 2:12 pm    Post subject: Reply with quote

Quote:
*** Configuration msp430-unknown-none not supported


This is what the ebuild makes out of the category name cross-msp430. The part after unknown is the problem.

Try crossdev -S -t msp430-unknown-linux-gnu
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Sat Feb 06, 2010 3:15 pm    Post subject: Reply with quote

Ok... at least something has changed :P

Code:
localhost gabriel # crossdev -S -t msp430-unknown-linux-gnu
-----------------------------------------------------------------------------------------------------------------------------------
 * Host Portage ARCH:     x86
 * Target Portage ARCH:   *
 * Target System:         msp430-unknown-linux-gnu
 * Stage:                 4 (C/C++ compiler)

 * binutils:              binutils-[stable]
 * gcc:                   gcc-[stable]
 * headers:               linux-headers-[stable]
 * libc:                  glibc-[stable]

 * PORTDIR_OVERLAY:       /usr/portage/local/layman/science
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /usr/portage/packages/cross/msp430-unknown-linux-gnu
 * PORTAGE_TMPDIR:        /var/tmp/cross/msp430-unknown-linux-gnu
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~ 
 * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ...                                                        [ ok ]
 * Log: /var/log/portage/cross-msp430-unknown-linux-gnu-binutils.log
 * Emerging cross-binutils ...                                                                                               [ ok ]
 * Log: /var/log/portage/cross-msp430-unknown-linux-gnu-linux-headers-quick.log
 * Emerging cross-linux-headers-quick ...

 * linux-headers failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-msp430-unknown-linux-gnu-info.log
 * /var/log/portage/cross-msp430-unknown-linux-gnu-linux-headers-quick.log


At least now there's glibc on the list.... but still:
Code:
Calculating dependencies  ^H^H... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) cross-msp430-unknown-linux-gnu/linux-headers-2.6.27-r2 from science
 * gentoo-headers-base-2.6.27.tar.lzma RMD160 SHA1 SHA256 size ;-) ...   [ ok ]
 * gentoo-headers-2.6.27-2.tar.lzma RMD160 SHA1 SHA256 size ;-) ...      [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * CPV:  cross-msp430-unknown-linux-gnu/linux-headers-2.6.27-r2
 * REPO: science
 * USE:  elibc_glibc kernel_linux userland_GNU x86

 * This version of linux-headers does not support unknown.
 * Please merge the appropriate sources, in most cases
 * (but not all) this will be called unknown-headers.
 * ERROR: cross-msp430-unknown-linux-gnu/linux-headers-2.6.27-r2 failed:
 *   Package unsupported for unknown
 *
 * Call stack:
 *         ebuild.sh, line   54:  Called pkg_setup
 *         ebuild.sh, line 1347:  Called kernel-2_pkg_setup
 *   kernel-2.eclass, line 1105:  Called setup_headers
 *   kernel-2.eclass, line  718:  Called die
 * The specific snippet of code:
 *              die "Package unsupported for $(tc-arch)"
 *


I've spent hours searching the net for info... I don't want to add any ebuilds to my local overlay... I'd like to force crossdev to work :/
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Sat Feb 06, 2010 3:35 pm    Post subject: Reply with quote

msp430-unknown-elf-gnu maybe?
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Sat Feb 06, 2010 4:01 pm    Post subject: Reply with quote

After looking into the toolchain-funcs.eclass I can say tc-arch will always return unknown. I have no experience with the special target mps430, so I can't say if and how it's supposed to work. But it looks like a bug to me.
Back to top
View user's profile Send private message
Gabriel_Blake
Guru
Guru


Joined: 16 Sep 2007
Posts: 362

PostPosted: Sat Feb 13, 2010 12:33 pm    Post subject: Reply with quote

I've been working on it for some time. What I've learned is that he msp430 toolchain hasn't been maintained for a years and It's pretty much crap on any distro. I guess I have to use some soft under wine for the job.

I'm leaving this topic open in case anyone manages to compile this toolchain on Gentoo and would like to share his experience.
Back to top
View user's profile Send private message
radhermit
Developer
Developer


Joined: 15 Apr 2010
Posts: 9

PostPosted: Thu Apr 15, 2010 3:51 am    Post subject: Reply with quote

Recently I put together an overlay containing the latest MSP430 toolchain support. You can find the overlay and instructions here. Let me know if you have any problems or requests for more package versions.

I'll probably try getting this support into the packages in the main tree at some point in the near future, but it would be great if all the various toolchain package upstreams included MSP430 support in their releases by then so I wouldn't have to do much at all. :)
Back to top
View user's profile Send private message
pszemas
Apprentice
Apprentice


Joined: 02 Aug 2005
Posts: 181

PostPosted: Thu Jun 24, 2010 2:16 pm    Post subject: Reply with quote

ive got file collisions when try to install msp430-binutils from your ebuilds

edit: my mistake, i use crossdev without patch and try manualy emerge msp430-gcc package, but i have got another problem, at gcc stage 2 compiling:

Code:
looking for a compliant stdint.h in stdint.h, checking for uintmax_t... yes
checking for uintptr_t... yes
checking for int_least32_t... yes
checking for int_fast32_t... yes
checking for uint64_t... yes
checking what to include in gstdint.h... stdint.h (already complete)
configure: error: Pthreads are required to build libgomp
make[1]: *** [configure-target-libgomp] Błąd 1
make[1]: Opuszczenie katalogu `/var/tmp/cross/msp430/portage/cross-msp430/msp430-gcc-4.4.3/work/build'
make: *** [all] Błąd 2
Back to top
View user's profile Send private message
radhermit
Developer
Developer


Joined: 15 Apr 2010
Posts: 9

PostPosted: Thu Jun 24, 2010 10:03 pm    Post subject: Reply with quote

It looks like you're building the cross-compiler with the openmp use flag selected. Try building msp430-gcc without the openmp use flag.
Back to top
View user's profile Send private message
pszemas
Apprentice
Apprentice


Joined: 02 Aug 2005
Posts: 181

PostPosted: Fri Jun 25, 2010 7:19 am    Post subject: Reply with quote

It worked ! Thank you very much!
Back to top
View user's profile Send private message
radhermit
Developer
Developer


Joined: 15 Apr 2010
Posts: 9

PostPosted: Fri Jun 25, 2010 10:21 am    Post subject: Reply with quote

I've pushed a fix to the msp430 overlay for crossdev that disables the openmp use flag for the gcc stage 2 build phase so you shouldn't have to manually work around the problem in the future. Feel free to let me know if you run into other problems.
Back to top
View user's profile Send private message
Kiesus
n00b
n00b


Joined: 17 Jun 2004
Posts: 12
Location: Finland

PostPosted: Mon Mar 21, 2011 1:30 pm    Post subject: Reply with quote

I can't get the toolchain to build.
Binutils builds fine, but after that it fails on the GCC stage with the error "Configuration msp430-unknown-none not supported".

The crossdev command I used is
Code:
crossdev -t msp430 --b 2.20.1 --g 4.4.5 --l 20110213 -s4 --without-headers


I added the msp430 overlay with layman.

Without the last argument --without-headers it fails trying to install linux-headers or something.
I tried with GCC versions 4.4.5 (testing), 4.4.4 (testing) and 4.3.4 (stable). The same error with all of them.

Build logs:
cross-msp430-info.log
cross-msp430-gcc-stage1.log
_________________
Assumption is the mother of all fuckups.
Back to top
View user's profile Send private message
Kiesus
n00b
n00b


Joined: 17 Jun 2004
Posts: 12
Location: Finland

PostPosted: Mon Mar 21, 2011 7:25 pm    Post subject: Reply with quote

Meh, I was using crossdev from main tree.
After emerging crossdev from the overlay and then doing 'crossdev -t msp430' I get a different error.
Configure fails somewhere midway building the gcc, with error 'configure: error: cannot compute suffix of object files: cannot compile'.

cross-msp430-info.log
cross-msp430-msp430-gcc-stage1.log
_________________
Assumption is the mother of all fuckups.
Back to top
View user's profile Send private message
nitm
n00b
n00b


Joined: 27 Dec 2004
Posts: 63

PostPosted: Thu Mar 24, 2011 12:50 am    Post subject: Reply with quote

Hello,

I need to install msp430-gcc and msp430-gdb, what should I read in order to learn how to do it properly?
Direct emerge doesn't work and it looks like I need to use the crossdev tool, don't I?

Thank you in advance and sorry for the noob question :)
Back to top
View user's profile Send private message
radhermit
Developer
Developer


Joined: 15 Apr 2010
Posts: 9

PostPosted: Sat Apr 30, 2011 12:23 am    Post subject: Reply with quote

nitm wrote:
Hello,

I need to install msp430-gcc and msp430-gdb, what should I read in order to learn how to do it properly?
Direct emerge doesn't work and it looks like I need to use the crossdev tool, don't I?

Thank you in advance and sorry for the noob question :)


Yes, you'll need to use crossdev in order to use the overlay properly. You should read the instructions on github if you haven't yet.
Back to top
View user's profile Send private message
radhermit
Developer
Developer


Joined: 15 Apr 2010
Posts: 9

PostPosted: Sat Apr 30, 2011 12:27 am    Post subject: Reply with quote

Kiesus wrote:
Meh, I was using crossdev from main tree.
After emerging crossdev from the overlay and then doing 'crossdev -t msp430' I get a different error.
Configure fails somewhere midway building the gcc, with error 'configure: error: cannot compute suffix of object files: cannot compile'.

cross-msp430-info.log
cross-msp430-msp430-gcc-stage1.log


Does this occur for you with gcc-4.4.5 and and updated overlay? I can't seem to reproduce it.
Back to top
View user's profile Send private message
kwenspc
Advocate
Advocate


Joined: 21 Sep 2003
Posts: 4954

PostPosted: Tue Sep 27, 2011 1:05 pm    Post subject: Reply with quote

I know this thread is a bit old, but I think it's good to keep updated. I got into the same troubles and ended up in this thread.
Actually it was mainly due to a misuse of crossdev (which is a bit crappy in option handling and so on)

So use the msp430 overlay from radhermit, emerge the given crossdev from it (I let the user knowing what's need to be keyworded) and then:
Code:

crossdev --without-headers --stage3 --binutils 2.21 --gcc 4.5.2 --target msp430

followed by (if everything went well):
Code:

crossdev --ex-only --ex-gdb --target msp430


Trying to run the first command with --ex-gdb did not built the gdb... But second command did it hopefully.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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