You are not logged in.
Hello everybody,
I am new here in the Forum, so I hope this is the right place where to post my question.
Right now I am trying to compile Ti/RedHat MSP430 support for GCC. I have installed all the support packages needed (I have checked what ./configure is looking for while creating the make file).
This is the configuration parameters I use and the subsequent invocation of make:
../sources/tools/configure --target=msp430-none-elf --prefix=/opt/gcc-msp430 --enable-languages=c,c++ --disable-werror --disable-sim --disable-nls --disable-libssp
make all -j1However the build breaks with this message:
/usr/bin/ld: cannot find -lexpat
collect2: error: ld returned 1 exit status
Makefile:1236: recipe for target 'gdb' failed
make[2]: *** [gdb] Error 1
make[2]: Leaving directory '/home/alessandro/msp430-build/gdb'
Makefile:13776: recipe for target 'all-gdb' failed
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory '/home/alessandro/msp430-build'
Makefile:859: recipe for target 'all' failed
make: *** [all] Error 2I must point out that the expatlib is correctly installed:
[root@athanasius lib]# ls -alhg libcurl.so*
lrwxrwxrwx 1 root 16 Apr 22 15:53 libcurl.so -> libcurl.so.4.3.0
lrwxrwxrwx 1 root 16 Apr 22 15:53 libcurl.so.4 -> libcurl.so.4.3.0
-rwxr-xr-x 1 root 512K Apr 22 15:53 libcurl.so.4.3.0also ldconfig finds the library:
[root@athanasius msp430-build]$ ldconfig -v | grep expat
libexpat.so.1 -> libexpat.so.1.6.0I can not figure out why ld does not find the library, maybe someone already had a similar issue in the past and hopefully can help me.
Thank you!
alva
Last edited by alva (2015-06-19 11:26:02)
Offline
Welcome to Arch. Out of curiosity, is there a reason you are not using msp430-gdb from the AUR?
A quick look at the AUR shows a fair number of packages supporting that neat little processor. I like the FRAM based parts.
ewaller@turing /sys/class/usbmisc/hiddev0 1110 %packer -Ss msp430
aur/mspdebug 0.23-1 (30)
A free debugger and firmware downloader for the MSP430/CC430 MCU family
aur/gcc-msp430 4.6.3-4 (29)
GNU toolchain for the TI MSP430 processor
aur/msp430-libc 20120224-2 (26)
C runtime library for the MSP430 family of microcontrollers
aur/msp430-gdb 7.2a-5 (18)
GNU debugger for MSP430
aur/msp430mcu 20120406-2 (17)
C headers and binutils linker scripts for microcontrollers in the MSP430 family
aur/energia 0015-8 (12)
Energia is a Arduino IDE clone for use with the MSP430 launchpad
aur/mspgcc-ti 3.02.03.00-3 (7)
GNU toolchain (as, gcc, g++, ld, gdb) for the TI MSP430 processor
aur/msp430-jtag 2.4-6 (6)
Hardware access tools for the MSP430 processor including BSL, JTAG
aur/mspdebug-git v0.22.r55.g7e04b31-2 (5)
a free debugger for use with MSP430 MSUs
aur/naken430asm 2011.10.30-2 (4)
An open-sourced assembler / disassembler / simulator for the MSP430 series of microcontrollers
aur/mspgcc-mspgcc 20120406-1 (4)
GNU GCC for MSP430 family of microcontrollers
aur/mspgcc-binutils-bin 20120406-1 (4)
Binary utilities supporting TI's MSP430 targets
aur/mspgcc-binutils 20120406-1 (4)
binutils suite for the MSP430 family of microcontrollers
aur/mspgcc-msp430mcu 20120407-1 (3)
C headers and binutils linker scripts for MSP430 family microcontrollers.
aur/mspgcc-msp430-libc 20120224-1 (3)
C runtime library for the MSP430 family of microcontrollers
aur/msp430-launchpad-uart-fix 3-1 (3)
Kernel module fix for the msp430 launchpad uart
aur/fetproxy-git 20100317-1 (3)
An open source replacement for msp430-gdbproxy, the MSP430 debugger
aur/dkms-msp430-launchpad-uart-fix git-3 (3)
DKMS-enabled kernel module fix for the MSP430 LaunchPad UART
aur/naken_asm 2014.10.27-2 (2)
A raw, simple assembler supporting 65xx, ARM, dsPIC, MIPS, 8051/8052, and MSP430 instruction sets
aur/mspgcc-libc-bin 20120224-1 (2)
Standard C library for TI MSP430 development
aur/mspgcc-gcc-bin 20120406-1 (2)
GNU C compiler (cross compiler for MSP430)
aur/python-msp430-tools 0.6-3 (1)
The python-msp430-tools are a collection of tools related to the MSP430 embedded processor.
aur/mspds 3.4.3.004-1 (1)
MSP430 Debug Stack. Contains a dynamic link library as well as embedded firmware that runs on the MSP-FET430UIF or the eZ430 emulators.
aur/mspgcc-mcu-bin 20120406-1 (0)
Spec files, headers and linker scripts for TI's MSP430 targets
aur/mspgcc-gdb-bin 20111205-1 (0)
GNU C debugger (for MSP430)
aur/mspgcc-gdb 20120406-1 (0)
GNU Debug for the MSP430 family of microcontrollers
aur/bslsh 2.6-1 (0)
MSP430 BSL frontend for Linux/Un*x
ewaller@turing /sys/class/usbmisc/hiddev0 1111 %Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
Hello ewaller,
thank you for your answer. I have no compelling reason to not use the AUR packages, apart from:
the gcc I am trying to compile is a TI initiative, a good news and maybe the future considered the little activity on the user supported msp430-gcc
the learning experience of compiling gcc and maybe preparing an AUR script
In the meantime I will test the AUR sourced msp gcc, however I will keep trying to get to compile the TI version. So I am still open to any hints that might help me to solve this problem.
By the way, I am also interested in the FRAM memory, I guess it has other interesting features: I have just started studying this MCU.
Last edited by alva (2015-06-13 16:02:32)
Offline
Hello everybody,
I have managed to compile GCC for MSP430. I am posting my solution, maybe someone else can find it useful.
On this page of sourceware https://sourceware.org/gdb/onlinedocs/g … ments.html is described a switch for ./configure to specify a non standard location for libexpat:
--with-libexpat-prefixSo I have downloaded libexpat sources, compiled and installed them. By default it goes into /usr/local/lib/.
The next step is to reconfigure and build the new gcc make with:
../sources/tools/configure --target=msp430-none-elf --prefix=/opt/gcc-msp430 --enable-languages=c,c++ --disable-werror --disable-sim --disable-nls --disable-libssp --with-libexpat-prefix=/usr/local/lib/
make all -j1
make installAll the binaries will be installed in /opt/gcc-msp430/ the next step is to install the supporting header files (download them from the Texas Instrument website) with:
unzip msp430-support-files.zip
cd msp430-support-files/
chmod -R 755 *
cp *.ld /opt/gcc-msp430/msp430-none-elf/lib/430
cp *.h /opt/gcc-msp430/msp430-none-elf/includeMaybe this solution is a bit hacky but it works! I'll try to make an AUR script by next week.
Regards,
alva
Last edited by alva (2015-06-19 09:15:02)
Offline