This file contains 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
# | |
# Makefile - for TI sample msp430g2xx3_ta_01.asm ported to msp430-gcc | |
# | |
# Author: Rick Kimball | |
# email: rick@kimballsoftware.com | |
# Version: 1.00 Initial version 10/19/2011 | |
MCU=msp430g2553 | |
CC=msp430-gcc | |
CXX=msp430-g++ |
This file contains 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
;-------------------------------------------------------------------------------- | |
; gcc port of this code: http://www.43oh.com/forum/viewtopic.php?p=7273#p7265 | |
;-------------------------------------------------------------------------------- | |
#include <msp430.h> | |
#define PC r0 /* gcc doesn't know about PC,SP,SR,CG1,CG2 */ | |
#define ARG1 R15 /*C function arguments are passed in R15-R12 */ | |
.file "delay.S" |
This file contains 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
#!/usr/bin/env bash | |
# $Id: build-mspgcc 70 2011-11-05 19:40:36Z ice $ | |
# 2012-02-04 kimballr - modified for latest FSF directory and | |
# sourceforge patch file name changes | |
# 2012-03-13 kimballr - added patches | |
# | |
# download, build and install GCC toolchain for MSP430 | |
# | |
# prerequisites | |
# - bash |
This file contains 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
/** | |
* main.cpp - swserial/timerserial/usciserial Serial Asynch test driver. | |
* | |
* To test: use putty and connect to /dev/ttyACM0 at 9600 Baud | |
* | |
*/ | |
#include <msp430.h> | |
#include <stdio.h> | |
#include "serial.h" |
This file contains 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
/* | |
* gpio.h - experimental template based c++ gpio abstraction | |
* | |
* Created on: Jan 14, 2012 | |
* Author: kimballr | |
* | |
* 01/14/2012 - kimballr added volatile to SFR registers and force inline | |
* 01/16/2012 - kimballr more functions more experimentation | |
* 01/28/2012 - kimballr more complete implementation dealing with a 28 pin msp430g2553 | |
*/ |
This file contains 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
/** | |
* void delay(uint16 cnt) - using cpu cycle counting busy loop | |
* | |
* Sit in a tight loop until delayCycles instructions cycles | |
* have occurred. Not very power friendly. Not very interrupt | |
* friendly. In fact, you should disable interrupts before | |
* calling this function to insure accurate results. | |
* | |
* Note: minimum of 20 cycles | |
* |
This file contains 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
/* | |
* main.cpp | |
* | |
* Created on: Mar 15, 2012 | |
* Author: kimballr | |
*/ | |
#include <msp430.h> | |
#define GREEN_LED_PIN BIT6 |
This file contains 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
/* Default linker script, for normal executables */ | |
OUTPUT_FORMAT("elf32-msp430") | |
OUTPUT_ARCH("msp430") | |
INCLUDE memory.x | |
INCLUDE periph.x | |
SECTIONS | |
{ | |
/* Read-only sections, merged into text segment. */ | |
.hash : { *(.hash) } | |
.dynsym : { *(.dynsym) } |
This file contains 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
/*----------------------------------------------------------------------- | |
/ PFF - Low level disk interface modlue include file (C)ChaN, 2009 | |
/-----------------------------------------------------------------------*/ | |
#ifndef _DISKIO | |
#include "integer.h" | |
/* Status of Disk Functions */ | |
typedef BYTE DSTATUS; |
This file contains 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
/** | |
* tlv_data dumper - msp430-gcc port | |
* | |
* see: http://www.43oh.com/forum/viewtopic.php?f=10&t=2547 | |
* | |
*/ | |
#include <msp430.h> | |
#include <stdint.h> | |
volatile unsigned ta0txbuf = 0; // Timer0_A0 Transmit buffer pseudo register |