You are not logged in.
I've been unable to get makepkg working on binutils-msp430 (https://aur.archlinux.org/packages/binutils-msp430/)
I tried to use the PKGBUILD and patch in nocko's gist, but it comes back with an error as well (-Werror is in the CFLAGs and seems to be re-added even if I run makepkg -e after removing them manually)
I found that TI has been working with Red Hat and have released this: http://software-dl.ti.com/msp430/msp430 … x_FDS.html
Which I can get to install, but it would be nice to have an AUR package that installs both the compiler and header files listed on that page.
So, I was wondering what the best thing to do is? I'm assuming the Red Hat compiler is the most recent and will have the most support going into the future and therefore should be in an AUR package, right?
Thanks for your thoughts and any help!
edit:
Changed title to "request"
Last edited by uberscientist (2014-05-17 15:32:15)
Offline
NOTICE
Texas Instruments and Red Hat have teamed to develop a new back-end for GCC. This is expected to replace mspgcc, which cannot be upstreamed due to inability to obtain copyright releases from all the developers who have contributed to it over its many year history. Limited support for mspgcc will continue until nobody can be found to take on this responsibility.
looks like switching to the new backend might be a good idea.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
looks like switching to the new backend might be a good idea.
Okay, I'll change the title to "request" and start looking into making a PKGBUILD myself
Offline
Lone_Wolf wrote:looks like switching to the new backend might be a good idea.
Okay, I'll change the title to "request" and start looking into making a PKGBUILD myself
I would find this really useful. I have been trying to get the msp430 toolchain working without luck.
What is the difference between TI and Red Hat's collaboration and the recent msp430 push into upstream gcc 4.9?
https://gcc.gnu.org/onlinedocs/gcc/MSP430-Options.html
Offline
I would find this really useful. I have been trying to get the msp430 toolchain working without luck.
What is the difference between TI and Red Hat's collaboration and the recent msp430 push into upstream gcc 4.9?
https://gcc.gnu.org/onlinedocs/gcc/MSP430-Options.html
From what I've read: nothing ![]()
So, that's cool, I guess we'd still need to have an AUR package for the header files?
Do you know if the other binutils are upstream too (I'm not really sure how this works)?
This answer to my question on TI's e2e might be helpful to you: http://e2e.ti.com/support/microcontroll … px#1197474
It's an example makefile, maybe we should make a seperate topic in "Programming & Scripting" to discuss getting the toolchain working? I've been able to get a basic program compiled and programmed onto my MSP430 using msp430-elf-gcc and mspdebug last night, but I'm having issues with my main project still.
Offline
From what I've read: nothing
So, that's cool, I guess we'd still need to have an AUR package for the header files?
Do you know if the other binutils are upstream too (I'm not really sure how this works)?
This answer to my question on TI's e2e might be helpful to you: http://e2e.ti.com/support/microcontroll … px#1197474
It's an example makefile, maybe we should make a seperate topic in "Programming & Scripting" to discuss getting the toolchain working? I've been able to get a basic program compiled and programmed onto my MSP430 using msp430-elf-gcc and mspdebug last night, but I'm having issues with my main project still.
Agreed, we could setup an AUR package for the header files.
I don't know much about the binutils, and I don't think they're included in gcc 4.9. I haven't even gotten a blink program running :s
Did you get your basic program running through TI's toolset? http://www.ti.com/tool/msp430-gcc-opensource
What dependencies did you need?
Offline
To get a simple LED blinker working I did this:
msp430-elf-gcc -mmcu=msp430g2744 -I /home/nak/Msp430GCCopensource/include/ -o cool.elf cool.cthen ran `mspdebug rf2500` (I have the ezrf2500 programmer) with my board connected to a msp430g2744 via Spy-Biwire.
In there I did:
prog cool.elfyou can also do something like:
objcopy -O ihex cool.elf cool.hex... and (i'm pretty ignorant btw) I think this is the raw hex file that can also be put on the msp430 via `prog cool.hex`
Hopefully that helps!
*edit*
Actually `msp430-elf-objcopy` I don't know if that's "upstream" or not ![]()
Last edited by uberscientist (2014-05-21 23:24:48)
Offline
I have been trying for the past week to get the MSP430 toolchain up and running. The AUR packages binutils-msp430, gcc-msp430, and msp430-gdb appear to be out of date to the 'new' method of msp430 gcc. Although, the AUR packages msp430-libc and msp430mcu work fine because they are just files.
Here's what I gathered so far.
To get the MSP430 toolchain, compile binutils-2.24 and gdb-7.2 with:
./configure --target=msp430 --program-prefix="msp430-"And, gcc-4.9.0 with this:
./configure --enable-languages=c --target=msp430 --program-prefix="msp430-"I've come up with this build script (I will try eventually to convert this to an PKGBUILD). I've tested it a couple of times on different machines and it seems to install correctly, but when ever I try to compile a file with msp430-gcc I get a linker error that it can't find 'msp430g2553.ld'. It installs everything to /opt/msp430, so if you want to remove all of the toolchain stuff just delete that directory. If you want to just test the script, then download it into /tmp and edit the script to set $INSTALL_PREFIX=/tmp/msp430_install.
I figure it would be nice to create an AUR package that included the entire MSP430 tool chain in big package that could be installed to /opt/msp430 to keep it clean.
Other than that, you said you got this RedHat version to install. How did you do that?
I found that TI has been working with Red Hat and have released this: http://software-dl.ti.com/msp430/msp430 … x_FDS.html
Which I can get to install, but it would be nice to have an AUR package that installs both the compiler and header files listed on that page.
I tried both downloading/running the .run file and trying to compile from their source. Both with failure.
Offline
Other than that, you said you got this RedHat version to install. How did you do that?
I didn't do anything special that I can remember, just downloaded the .run file, chmod +x and ran it. A graphical wizard came up and stepped me through the process.
I did try to build from their source too unsuccessfully, but I haven't spent any significant amount of time troubleshooting it.
Excellent work on the build script, I'll have to try it sometime! I don't remember seeing the missing .ld file error before, there are memory.ld and peripherals.ld files for each msp430 in the headers archive: http://software-dl.ti.com/msp430/msp430 … 131206.zip -- maybe it's looking for those?
Offline
I didn't do anything special that I can remember, just downloaded the .run file, chmod +x and ran it. A graphical wizard came up and stepped me through the process.
Huh, mine won't run at all, no error messages, or anything. All it does is create a newline when I execute it.
I didn't know it was graphical, maybe I don't have the right gtk or something. What DE/WM are you using right now? I have a minimal dwm, so I don't know if that has all of the graphical libraries needed to run the install wizard.
I don't remember seeing the missing .ld file error before, there are memory.ld and peripherals.ld files for each msp430 in the headers archive: software-dl.ti.com/msp430/msp430 … 131206.zip -- maybe it's looking for those?
Yes! Those were the files it was looking for (gcc couldn't find the memory.ld file for my msp). Thanks for the pointer.
*EDIT*
Running the file command on the .run file outputs this:
Msp430GCCopensource-msp430-130423-272-linux-installer.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, strippedWhich means that is a 32-bit executable, and sure enough it works just fine on any 32-bit machine. I just wish that they would make a 64-bit build.
Last edited by ryanjacobs (2014-05-27 03:14:10)
Offline
Running the file command on the .run file outputs this:
Msp430GCCopensource-msp430-130423-272-linux-installer.run: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, strippedWhich means that is a 32-bit executable, and sure enough it works just fine on any 32-bit machine. I just wish that they would make a 64-bit build.
I run 64-bit too:
Linux arch 3.14.4-1-ARCH #1 SMP PREEMPT Tue May 13 16:41:39 CEST 2014 x86_64 GNU/Linux
Maybe I have some multilib packages installed that you don't, it's odd that no errors presented themselves though.
$ pacman -Q | grep lib32
lib32-acl 2.2.52-2
lib32-alsa-lib 1.0.27.2-1
lib32-alsa-plugins 1.0.27-1
lib32-at-spi2-atk 2.8.1-1
lib32-at-spi2-core 2.8.0-2
lib32-atk 2.12.0-1
lib32-attr 2.4.47-1
lib32-bzip2 1.0.6-1
lib32-cairo 1.12.16-1
lib32-colord 1.0.2-1
lib32-cracklib 2.8.22-1
lib32-curl 7.36.0-1
lib32-db 5.3.28-1
lib32-dbus-glib 0.100.2-1
lib32-e2fsprogs 1.42.9-1
lib32-elfutils 0.158-2
lib32-expat 2.1.0-1
lib32-flac 1.3.0-1
lib32-flashplugin 11.2.202.356-1
lib32-flex 2.5.37-1
lib32-fontconfig 2.11.1-1
lib32-freealut 1.1.0-4
lib32-freetype2 2.5.3-1
lib32-gcc-libs 4.9.0-2
lib32-gconf 3.2.6-1
lib32-gdk-pixbuf2 2.30.7-1
lib32-gettext 0.18.3.2-1
lib32-glew 1.10.0-1
lib32-glib2 2.40.0-1
lib32-glibc 2.19-5
lib32-glu 9.0.0-2
lib32-gtk2 2.24.23-1
lib32-gtk3 3.8.2-1
lib32-harfbuzz 0.9.26-2
lib32-icu 53.1-1
lib32-js185 1.0.0-2
lib32-json-c 0.11-1
lib32-keyutils 1.5.9-1
lib32-krb5 1.12.1-1
lib32-lcms2 2.6-1
lib32-libasyncns 0.8-6
lib32-libcap 2.24-1
lib32-libcups 1.7.2-1
lib32-libdbus 1.8.0-1
lib32-libdrm 2.4.54-1
lib32-libffi 3.0.13-1
lib32-libgcrypt 1.6.1-1
lib32-libgpg-error 1.12-1
lib32-libgssglue 0.4-1
lib32-libgusb 0.1.6-1
lib32-libice 1.0.8-1
lib32-libidn 1.28-1
lib32-libjpeg-turbo 1.3.1-1
lib32-libldap 2.4.39-1
lib32-libltdl 2.4.2-13
lib32-libmikmod 3.3.6-1
lib32-libmng 2.0.2-1
lib32-libogg 1.3.1-1
lib32-libpciaccess 0.13.2-1
lib32-libpng 1.6.10-1
lib32-libpulse 5.0-1
lib32-libsm 1.2.2-1
lib32-libsndfile 1.0.25-2
lib32-libssh2 1.4.3-1
lib32-libstdc++5 3.3.6-7
lib32-libtiff 4.0.3-2
lib32-libtirpc 0.2.3-1
lib32-libtxc_dxtn 1.0.1-5
lib32-libusbx 1.0.15-1
lib32-libvdpau 0.7-2
lib32-libvorbis 1.3.4-1
lib32-libx11 1.6.2-1
lib32-libxau 1.0.8-1
lib32-libxcb 1.10-2
lib32-libxcomposite 0.4.4-1
lib32-libxcursor 1.1.14-1
lib32-libxdamage 1.1.4-1
lib32-libxdmcp 1.1.1-1
lib32-libxext 1.3.2-1
lib32-libxfixes 5.0.1-1
lib32-libxft 2.3.1-1
lib32-libxi 1.7.2-1
lib32-libxinerama 1.1.3-1
lib32-libxkbcommon 0.4.1-1
lib32-libxml2 2.9.1-1
lib32-libxmu 1.1.2-1
lib32-libxrandr 1.4.2-1
lib32-libxrender 0.9.8-1
lib32-libxshmfence 1.1-1
lib32-libxss 1.2.2-1
lib32-libxt 1.1.4-1
lib32-libxtst 1.2.2-1
lib32-libxv 1.0.10-1
lib32-libxvmc 1.0.8-1
lib32-libxxf86vm 1.1.3-1
lib32-llvm-amdgpu-lib-snapshot 20130403-2
lib32-llvm-libs 3.4.1-1
lib32-mesa 10.1.4-1
lib32-mesa-demos 8.1.0-3
lib32-mpg123 1.20.0-1
lib32-ncurses 5.9-2
lib32-nspr 4.10.5-1
lib32-nss 3.16.1-1
lib32-nvidia-libgl 337.19-1
lib32-nvidia-utils 337.19-1
lib32-openal 1.15.1-1
lib32-openssl 1.0.1.g-1
lib32-pam 1.1.6-2
lib32-pango 1.36.3-1
lib32-pcre 8.35-1
lib32-pixman 0.32.4-1
lib32-polkit 0.111-1
lib32-readline 6.3.000-1
lib32-sdl 1.2.15-3
lib32-sdl_image 1.2.12-3
lib32-sdl_mixer 1.2.11-3
lib32-sdl_net 1.2.8-1
lib32-sdl_ttf 2.0.11-1
lib32-smpeg 0.4.4-9
lib32-sqlite 3.8.4.3-1
lib32-systemd 212-1
lib32-util-linux 2.24.1-1
lib32-v4l-utils 1.0.1-1
lib32-wayland 1.5.0-1
lib32-xz 5.0.5-1
lib32-zlib 1.2.8-1Maybe GTK?...
Offline
Sorry for the double post, but I just ran into an issue with trying to run msp430-elf-gdb:
$ msp430-elf-gdb
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named os
GNU gdb (GDB) msp430-130423-90
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-redhat-linux --target=msp430-elf".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) Seems like this bug has shown up before due to multilib issues: https://bugzilla.redhat.com/show_bug.cgi?id=488478
Maybe I should be bringing this one to TI/Red Hat's attention...
Offline
$ pacman -Q | grep lib32 lib32-acl 2.2.52-2 lib32-alsa-lib 1.0.27.2-1 lib32-alsa-plugins 1.0.27-1 lib32-at-spi2-atk 2.8.1-1 lib32-at-spi2-core 2.8.0-2 lib32-atk 2.12.0-1 lib32-attr 2.4.47-1 lib32-bzip2 1.0.6-1 lib32-cairo 1.12.16-1 lib32-colord 1.0.2-1 lib32-cracklib 2.8.22-1 lib32-curl 7.36.0-1 lib32-db 5.3.28-1 lib32-dbus-glib 0.100.2-1 lib32-e2fsprogs 1.42.9-1 lib32-elfutils 0.158-2 lib32-expat 2.1.0-1 lib32-flac 1.3.0-1 lib32-flashplugin 11.2.202.356-1 lib32-flex 2.5.37-1 lib32-fontconfig 2.11.1-1 lib32-freealut 1.1.0-4 lib32-freetype2 2.5.3-1 lib32-gcc-libs 4.9.0-2 lib32-gconf 3.2.6-1 lib32-gdk-pixbuf2 2.30.7-1 lib32-gettext 0.18.3.2-1 lib32-glew 1.10.0-1 lib32-glib2 2.40.0-1 lib32-glibc 2.19-5 lib32-glu 9.0.0-2 lib32-gtk2 2.24.23-1 lib32-gtk3 3.8.2-1 lib32-harfbuzz 0.9.26-2 lib32-icu 53.1-1 lib32-js185 1.0.0-2 lib32-json-c 0.11-1 lib32-keyutils 1.5.9-1 lib32-krb5 1.12.1-1 lib32-lcms2 2.6-1 lib32-libasyncns 0.8-6 lib32-libcap 2.24-1 lib32-libcups 1.7.2-1 lib32-libdbus 1.8.0-1 lib32-libdrm 2.4.54-1 lib32-libffi 3.0.13-1 lib32-libgcrypt 1.6.1-1 lib32-libgpg-error 1.12-1 lib32-libgssglue 0.4-1 lib32-libgusb 0.1.6-1 lib32-libice 1.0.8-1 lib32-libidn 1.28-1 lib32-libjpeg-turbo 1.3.1-1 lib32-libldap 2.4.39-1 lib32-libltdl 2.4.2-13 lib32-libmikmod 3.3.6-1 lib32-libmng 2.0.2-1 lib32-libogg 1.3.1-1 lib32-libpciaccess 0.13.2-1 lib32-libpng 1.6.10-1 lib32-libpulse 5.0-1 lib32-libsm 1.2.2-1 lib32-libsndfile 1.0.25-2 lib32-libssh2 1.4.3-1 lib32-libstdc++5 3.3.6-7 lib32-libtiff 4.0.3-2 lib32-libtirpc 0.2.3-1 lib32-libtxc_dxtn 1.0.1-5 lib32-libusbx 1.0.15-1 lib32-libvdpau 0.7-2 lib32-libvorbis 1.3.4-1 lib32-libx11 1.6.2-1 lib32-libxau 1.0.8-1 lib32-libxcb 1.10-2 lib32-libxcomposite 0.4.4-1 lib32-libxcursor 1.1.14-1 lib32-libxdamage 1.1.4-1 lib32-libxdmcp 1.1.1-1 lib32-libxext 1.3.2-1 lib32-libxfixes 5.0.1-1 lib32-libxft 2.3.1-1 lib32-libxi 1.7.2-1 lib32-libxinerama 1.1.3-1 lib32-libxkbcommon 0.4.1-1 lib32-libxml2 2.9.1-1 lib32-libxmu 1.1.2-1 lib32-libxrandr 1.4.2-1 lib32-libxrender 0.9.8-1 lib32-libxshmfence 1.1-1 lib32-libxss 1.2.2-1 lib32-libxt 1.1.4-1 lib32-libxtst 1.2.2-1 lib32-libxv 1.0.10-1 lib32-libxvmc 1.0.8-1 lib32-libxxf86vm 1.1.3-1 lib32-llvm-amdgpu-lib-snapshot 20130403-2 lib32-llvm-libs 3.4.1-1 lib32-mesa 10.1.4-1 lib32-mesa-demos 8.1.0-3 lib32-mpg123 1.20.0-1 lib32-ncurses 5.9-2 lib32-nspr 4.10.5-1 lib32-nss 3.16.1-1 lib32-nvidia-libgl 337.19-1 lib32-nvidia-utils 337.19-1 lib32-openal 1.15.1-1 lib32-openssl 1.0.1.g-1 lib32-pam 1.1.6-2 lib32-pango 1.36.3-1 lib32-pcre 8.35-1 lib32-pixman 0.32.4-1 lib32-polkit 0.111-1 lib32-readline 6.3.000-1 lib32-sdl 1.2.15-3 lib32-sdl_image 1.2.12-3 lib32-sdl_mixer 1.2.11-3 lib32-sdl_net 1.2.8-1 lib32-sdl_ttf 2.0.11-1 lib32-smpeg 0.4.4-9 lib32-sqlite 3.8.4.3-1 lib32-systemd 212-1 lib32-util-linux 2.24.1-1 lib32-v4l-utils 1.0.1-1 lib32-wayland 1.5.0-1 lib32-xz 5.0.5-1 lib32-zlib 1.2.8-1Maybe GTK?...
Yeah... I ran this and got nothing.
pacman -Q | grep lib32Later, I'll try installing the lib32 version of gtk.
*EDIT*
Okay, I installed lib32-gtk2 (and all of the stuff that comes with it).
ryan@delta ~ $ sudo pacman -S lib32-gtk2
resolving dependencies...
:: There are 3 providers available for lib32-libgl:
:: Repository multilib
1) lib32-mesa-libgl 2) lib32-nvidia-304xx-libgl 3) lib32-nvidia-libgl
Enter a number (default=1):
warning: dependency cycle detected:
warning: lib32-harfbuzz will be installed before its lib32-freetype2 dependency
looking for inter-conflicts...
Packages (57): lib32-atk-2.12.0-1 lib32-bzip2-1.0.6-1 lib32-cairo-1.12.16-1
lib32-e2fsprogs-1.42.9-1 lib32-elfutils-0.158-2 lib32-expat-2.1.0-1
lib32-fontconfig-2.11.1-1 lib32-freetype2-2.5.3-1
lib32-gcc-libs-4.9.0-2 lib32-gdk-pixbuf2-2.30.7-1
lib32-glib2-2.40.0-1 lib32-glibc-2.19-5 lib32-harfbuzz-0.9.26-2
lib32-icu-53.1-1 lib32-keyutils-1.5.9-1 lib32-krb5-1.12.1-1
lib32-libcups-1.7.2-1 lib32-libdbus-1.8.0-1 lib32-libdrm-2.4.54-1
lib32-libffi-3.0.13-1 lib32-libgcrypt-1.6.1-1
lib32-libgpg-error-1.12-1 lib32-libjpeg-turbo-1.3.1-1
lib32-libldap-2.4.39-1 lib32-libpciaccess-0.13.2-1
lib32-libpng-1.6.10-1 lib32-libtiff-4.0.3-2 lib32-libvdpau-0.7-2
lib32-libx11-1.6.2-1 lib32-libxau-1.0.8-1 lib32-libxcb-1.10-2
lib32-libxcomposite-0.4.4-1 lib32-libxcursor-1.1.14-1
lib32-libxdamage-1.1.4-1 lib32-libxdmcp-1.1.1-1
lib32-libxext-1.3.2-1 lib32-libxfixes-5.0.1-1 lib32-libxft-2.3.1-1
lib32-libxi-1.7.2-1 lib32-libxinerama-1.1.3-1
lib32-libxrandr-1.4.2-1 lib32-libxrender-0.9.8-1
lib32-libxshmfence-1.1-1 lib32-libxxf86vm-1.1.3-1
lib32-llvm-libs-3.4.1-1 lib32-mesa-10.1.4-1
lib32-mesa-libgl-10.1.4-1 lib32-openssl-1.0.1.g-1
lib32-pango-1.36.3-1 lib32-pcre-8.35-1 lib32-pixman-0.32.4-1
lib32-systemd-212-1 lib32-util-linux-2.24.1-1 lib32-wayland-1.5.0-1
lib32-xz-5.0.5-1 lib32-zlib-1.2.8-1 lib32-gtk2-2.24.23-1
Total Download Size: 30.68 MiB
Total Installed Size: 122.90 MiBNow, the installer runs flawlessly.
Last edited by ryanjacobs (2014-05-27 23:14:09)
Offline
To get a simple LED blinker working I did this:
msp430-elf-gcc -mmcu=msp430g2744 -I /home/nak/Msp430GCCopensource/include/ -o cool.elf cool.c
May I see your code for the blinking led? I don't think I included the correct headers.
I tried compiling this but it said it couldn't find the msp430.h header file.
$ msp430-elf-gcc -mmcu=msp430g2553 -I $HOME/Msp430GCCopensource/include/ -o blink.elf blink.c
blink.c:1:20: fatal error: msp430.h: No such file or directory
#include <msp430.h>
^
compilation terminated.blink.c
#include <msp430.h>
int main(void)
{
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= 0x01;
while (1) {
P1OUT ^= 0x01;
__delay_cycles(1000000); // 1 second @ 1MHz
}
return 0;
}Last edited by ryanjacobs (2014-05-27 23:36:18)
Offline
uberscientist wrote:To get a simple LED blinker working I did this:
msp430-elf-gcc -mmcu=msp430g2744 -I /home/nak/Msp430GCCopensource/include/ -o cool.elf cool.cMay I see your code for the blinking led? I don't think I included the correct headers.
I tried compiling this but it said it couldn't find the msp430.h header file.
$ msp430-elf-gcc -mmcu=msp430g2553 -I $HOME/Msp430GCCopensource/include/ -o blink.elf blink.c blink.c:1:20: fatal error: msp430.h: No such file or directory #include <msp430.h> ^ compilation terminated.blink.c
#include <msp430.h> int main(void) { WDTCTL = WDTPW + WDTHOLD; P1DIR |= 0x01; while (1) { P1OUT ^= 0x01; __delay_cycles(1000000); // 1 second @ 1MHz } return 0; }
I stared at this for a while and the only thing I can suggest is seeing if msp430.h exists where you think it is, like:
$ ls $HOME/Msp430GCCopensource/include/ | grep msp430.hAnd that "blink" code I compiled earlier was just turning on a couple LEDs on my board, although there is a function for a delay... it was just a bit of code sitting around that used to blink LEDs and I knew it should compile.
I'll include it because you asked, but it won't be helpful I don't think:
#include <msp430.h>
void configureClocks();
volatile unsigned long i;
void main(void) {
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
configureClocks();
P3DIR |= BIT7 | BIT6; // Set P3.0 to output direction
P3OUT |= BIT7 | BIT6;
_EINT();
while(1)
{
//execute
}
}
void delay(void) {
i = 59999;
do (i--);
while (i != 0);
}
void configureClocks() {
BCSCTL1 = CALBC1_8MHZ;
DCOCTL = CALDCO_8MHZ;
BCSCTL3 |= LFXT1S_2;
}I did write a makefile for my project today (it finally compiled!), which might be helpful: https://bitbucket.org/naked/msp-datalog … ?at=master
Offline
Well then...
With your help, I think I have solved every problem I had with this toolchain. Now I just have to create something useful. ![]()
Thank you uberscientist for all of the pointers and tips.
Offline
Thank you for posting about this. I've been trying to get mspgcc and CCS installed the whole weekend but failed to install either. This worked great though. I've never been happier running the blinky demo.
I wonder if this would work with XPG Eclipse msp430 plugin or not.
EDIT: It looks like it works but not always. For me, the list where you're supposed to choose the device you're using is empty. But it could be a configuration problem, because I only chose the bin folder of gcc compiler and not actual executable and the names are different. There's enum with a string "msp430-gcc" in the code and obviously there's no such executable in the PATH, but I saw a screenshot on 43oh.com with a list populated. The simplest thing to try would be adding a link to msp430-gcc. Even if this doesn't work out of the box, it's still easier to hack Eclipse plugin than to get all lib32 libs right for CCSv6. BTW, did anyone get it running on 64bit Arch?
Last edited by F1y3r (2014-06-17 06:03:24)
Offline
Thank you for posting about this. I've been trying to get mspgcc and CCS installed the whole weekend but failed to install either. This worked great though. I've never been happier running the blinky demo.
I wonder if this would work with XPG Eclipse msp430 plugin or not.
Glad to see another MSP user.
Did you use RedHat's installer or did you compile it yourself?
Offline
I used Red Hat's installer. I haven't tried compiling yet.
Offline
I've started working on creating packages from upstream gcc: https://github.com/jck/pkgbuilds/blob/m … s/PKGBUILD
This chain has instructions: http://www.mail-archive.com/mspgcc-user … 12028.html
Offline
Thanks! You're great. ![]()
I'll try building it as soon as I have time.
Last edited by F1y3r (2014-06-30 09:46:49)
Offline
Hi! I am a newbie and as a newbie, it took me some time to setup mspgcc working on Arch Linux. So I uploaded the pacman packages created using makepkg to Github ( https://github.com/77ganesh/arch-mspgcc-bin ). I think that someone like me might find this link useful.
Offline
So I uploaded the pacman packages created using makepkg to Github ( https://github.com/77ganesh/arch-mspgcc-bin ). I think that someone like me might find this link useful.
Thank you so much! These binaries installed flawlessly and now I finally can compile code on my Arch system.
Also, I added a pull request that adds mspdebug, (which I believe is part of the toolchain as well).
Last edited by ryanjacobs (2014-12-14 11:06:15)
Offline
I've been working at this problem for around two days now and this thread has been a huge help (especially obsu's repository). I've recently been running into more problems that might be specific to my individual model of msp430 (the f5529 board).
I've got all the compiling, linking, and debugging, as well as the header files from the TI page set up, and I've also got a basic blink demo working. My problem arises when I attempt to use some the capacitive touch pads on the board where my chip is mounted. Some of the example code I've seen uses the 'capTouchLibrary" with the CTS_HAL and CTS_Layer headers. I've got these installed but in order to successfully link them in the final step, I have to add the $(LINKER) variable to the CC command in the build target. If I do this I get no errors, but the executable generated does not work on the board, as I get the following error in mspdebug:
(mspdebug) verify blink
Verifying 4 bytes at 4400 [section: .rodata]...
Done, 4 bytes total
(mspdebug) prog blink
Erasing...
Programming...
Writing 4 bytes at 4400 [section: .rodata]...
Done, 4 bytes totalIf I compile a simple blink program, mspdebug looks like this:
(mspdebug) prog blink
Erasing...
Programming...
Writing 148 bytes at 4400 [section: .text]...
Writing 128 bytes at ff80 [section: .vectors]...
Done, 276 bytes total
(mspdebug) run
Running. Press Ctrl+C to interrupt...I'm pretty lost here, does anyone think they could give me some tips? All the code i've got is in this repo https://github.com/tmathmeyer/ECE2049
in the testing directory. the CTS_* and the structure* files are all from the capTouchLibrary.
Makefile for reference:
#AUTHOR: Ted Meyer (2015)
SOURCES = blink.c devices.c
# PROJECT SPECIFIC CONFIGURATION
TARGET = blink# put program name here
MCU = msp430f5529# put the model of the board here
TILIB = CTS_Layer.c structure.c CTS_HAL.c
SRCALL = $(TILIB) $(SOURCES)
# SYSTEM SPECIFIC CONFIGURATION
HEADERS = /usr/local/lib/msp430# location of header files
CC = msp430-gcc# compiler
# FLAGS
INCLUDES = -I $(HEADERS)
MEMORY = -T $(HEADERS)/$(MCU)/memory.ld
PERPH = -T $(HEADERS)/$(MCU)/peripherals.ld
LINKER = $(MEMORY) $(PERPH)
MODEL = -D__$(MCU)__ -mmcu=$(MCU)
WL = -Wl,--gc-sections -Wl,-Map=$(TARGET).map
OBJECTS = $(SRCALL:.c=.o)
CFLAGS = $(INCLUDES) $(MODEL)
all: build
build: $(OBJECTS)
.c.o:
@echo CC -c $<
@$(CC) -c $+ $(CFLAGS)
build:
@echo CC -o $(TARGET) $+
@echo $(CFLAGS)
@$(CC) -o $(TARGET) $+ $(CFLAGS) $(WL)
clean:
@echo cleaning
rm -f *.o *.map $(TARGET)Offline