Skip to content

Instantly share code, notes, and snippets.

Rick Kimball RickKimball

Block or report user

Report or block RickKimball

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@RickKimball
RickKimball / makefile
Created Oct 19, 2011
gcc port of mspg2xx3_ta_01.asm for the msp430g2553 chip
View makefile
#
# 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++
@RickKimball
RickKimball / delay.S
Created Nov 22, 2011
MSP430 - delay_cycles() function with one cycle granularity written for msp430-as
View delay.S
;--------------------------------------------------------------------------------
; 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"
@RickKimball
RickKimball / build-mspgcc.sh
Created Dec 28, 2011
msp430gcc toolchain fetcher/builder script
View build-mspgcc.sh
#!/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
@RickKimball
RickKimball / main.cpp
Created Jan 3, 2012
msp430 serial tool kit software/usci/timera/spi implementations
View main.cpp
/**
* 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"
@RickKimball
RickKimball / gpio.h
Created Jan 11, 2012
msp430 template based gpio experiment
View gpio.h
/*
* 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
*/
@RickKimball
RickKimball / delay.c
Created Jan 19, 2012
msp430-gcc delay using inline asm
View delay.c
/**
* 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
*
@RickKimball
RickKimball / main.cpp
Created Mar 19, 2012
msp430 with minimized low level init code
View main.cpp
/*
* main.cpp
*
* Created on: Mar 15, 2012
* Author: kimballr
*/
#include <msp430.h>
#define GREEN_LED_PIN BIT6
@RickKimball
RickKimball / framasram.x
Created Mar 21, 2012
msp430fr5750 - messing with fram as ram
View framasram.x
/* 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) }
@RickKimball
RickKimball / diskio.h
Created Apr 7, 2012
msp430 Petit FatFile System sample
View diskio.h
/*-----------------------------------------------------------------------
/ PFF - Low level disk interface modlue include file (C)ChaN, 2009
/-----------------------------------------------------------------------*/
#ifndef _DISKIO
#include "integer.h"
/* Status of Disk Functions */
typedef BYTE DSTATUS;
@RickKimball
RickKimball / main.c
Created Apr 10, 2012
msp430 port of tlv data dump
View main.c
/**
* 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
You can’t perform that action at this time.