Last active
November 20, 2017 12:53
-
-
Save trtg/4451949 to your computer and use it in GitHub Desktop.
Commands for setting up MSP430 toolchain in gentoo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emerge crossdev | |
mkdir /usr/local/portage | |
add PORTDIR_OVERLAY="/usr/local/portage" to /etc/make.conf | |
mv /etc/portage/package.env /etc/portage/package.env.bak | |
mkdir /etc/portage/package.env | |
mv /etc/portage/package.env.bak /etc/portage/package.env/x86_64-pc-linux-gnu | |
crossdev -s4 -t msp430 #stage 4 will build gcc, libc, and binutils | |
#This will also create: /usr/msp430/etc/portage/make.conf | |
crossdev --ex-only --ex-gdb -t msp430 #just cross compile gdb | |
emerge mspdebug | |
msp430-gcc -mmcu=msp430g2553 blink.c | |
#Run the debugger to load the code onto mcu | |
sudo mspdebug rf2500 | |
Press Ctrl+D to quit. | |
(mspdebug) prog a.out | |
hit Ctrl+D to quit | |
the mcu will start executing code, in this case blinking LED1, | |
LED2 is attached to P1.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment