So I've been playing with TI's MSP430 series uC for a few days now

(Ashley M. Kirchner [Norym]) #1

So I’ve been playing with TI’s MSP430 series uC for a few days now … well I was before our whole town got flooded (and surrounding areas). It brought me back to a question I posed not too long ago: when will the library be made independent of Arduino? So that it can be pulled into any other coding environment without needing any of the core Arduino bits and pieces and able to be used as is. If we can write raw C/C++ code for these micro controllers and not use the overhead of the Arduino code …

(Daniel Garcia) #2

The library is mostly arduino free already - with the exception of some fallback code for pins if there’s no port/register mappings. However - each MCU has different ways of talking to I/O ports and registers for SPI - So there’s 3-4 classes that would need to be implemented for a new MCU.

I have an msp430 - but the I/O coprocessors in the beagle board are a bit more immediately interesting to me.

(Daniel Garcia) #3

Oh - also some of the hand rolled assembly in the math functions would need to be ported to the msp’s instruction set.

(Ashley M. Kirchner [Norym]) #4

Gotcha. I haven’t jumped onto the Beagle Wagon yet …

(Mark Kriegsman) #5

Also: the library really doesn’t particularly use any “Arduino” library code. It’s mostly raw C, C++, and AVR/ARM assembly.

(Ashley M. Kirchner [Norym]) #6

No, it doesn’t. But I believe it does need/use some of the Arduino core files (for pin assignments and what not.) Or am I mistaken here?

(Daniel Garcia) #7

You are mistaken - I am only using arduino headers/functions for the fallback functions for getting pin/port mappings when they aren’t defined in fastpin.h - that was the whole point behind the rewrite.

I think some of the arduino header files are used as a shortcut for the avr includes to get things like register definitions, mostly becaue I haven’t tracked down the avr/*.h files to include directly yet.

(Ashley M. Kirchner [Norym]) #8

Ooooh, cool. That makes things a tad easier to fiddle with.

(Daniel Garcia) #9

Well - yes and no - the msp430 has it’s own way of interacting with gpio pins - which means there needs to be msp430 versions of the fastpin class , the clockless controller class, and the hardware spi class.

(Daniel Garcia) #10

I do want to port the library to new hardware and document it - so that I can outline a porting guide for people to use, which might help.

Somewhat relatedly, I’ve had far more interest expressed in PIC32 than msp430

(Mark Kriegsman) #11

And if we could make it work sanely on a Pi…
Nah. That’s crazy talk, and I know it.

(Daniel Garcia) #12

On a pi, it’d need to be a device driver for the timing, and it would piss off Linux. This is why I’m curious about the beagle’s I/o coprocessors.

(Mark Kriegsman) #13

Yep. And I’m wondering how hard it actually is to live as a device driver. Maybe that’s bedtime reading for me some night.

(Ashley M. Kirchner [Norym]) #14

Ok, that was the best line I’ve seen so far, “it would piss of Linux” … :slight_smile: