[sdiy] Raspberry Pi

Eric Brombaugh ebrombaugh1 at cox.net
Sun Nov 20 18:33:22 CET 2011


Paul,

In general there are fairly high-level APIs for accessing the I2C, SPI 
and GPIO pins from within userspace applications under Linux. The main 
difficulty is in setting up the hardware and Linux kernel data 
structures to enable them. I've done a lot of work over the last few 
years in this area using the Beagleboard and while at the high level it 
looks pretty easy, there are a lot of details involved. If the folks who 
are packaging the Linux OS for Raspberry Pi manage to get these details 
done for you then it should be simple. If you have to do it yourself 
(eg, they didn't enable out-of-the-box a hardware interface you need) 
then be prepared for a few months of drinking from a firehose to get it 
working yourself. This is the scenario in which easy access to the 
hardware documentation becomes essential, and if it's not available can 
be a show-stopper.

It's true that writing application code intended to run under Linux is a 
vastly different exercise than coding for bare-metal on a low-end MCU. 
On the one hand you can't just go out and poke at a hardware register 
because the OS won't let you do that and you need to keep in mind that 
your code isn't the only thing running on the machine. On the other 
hand, many of the difficult things a bare-metal program needs to do are 
handled for you by the OS, and generally development/debug is much easier.

As far as resources go, you might consider something like this

http://www.amazon.com/Embedded-Linux-Primer-Practical-Real-World/dp/0131679848

Bearing in mind that embedded linux development is a very rapidly 
growing topic and printed matter goes stale pretty quickly. The best way 
to do it is find an active online community focused on your hardware 
platform of choice and follow along.

Eric

On 11/20/2011 09:44 AM, Paul Maddox wrote:
>
>    I'm hoping, that I can write stuff to run under a version of linux that runs on the board, and just use the APIs for SPI/I2S/UART to access what I need/want.
>
>    The other alternative is the beagle board, or beagle bone...
>
>    Perhaps my biggest worry, with both of these, is how to develop code to run/manage a synthesiser. There is a huge step change required in swapping from writing embedded C for an AVR to writing an app for embedded linux.
>    Does anyone have any recommendations for books to help with this step?
>
> On 20 Nov 2011, at 15:16, Eric Brombaugh wrote:
>
>> GPIO is the key to using this in DIY/Synth applications. There's a pretty good write up on the hardware over at the elinux.org site which gives some more detail on what's available:
>>
>> http://elinux.org/RaspberryPiBoard#Hardware_Details
>>
>> I2C, SPI etc. are all in the cards. The main caveat is that the ARM SoC they're using is from Broadcom who are notoriously tight-fisted about documentation. If hobbyists need to run a marketing gauntlet and sign an NDA to get a datasheet for this then it's going to slow down the development of interesting applications.
>>
>> On Nov 20, 2011, at 7:56 AM, Paul Maddox wrote:
>>
>>> Well, for me it is...
>>>
>>> It's small, and it has GPIO, so I could use the SPI, I2S and UART to connect to say, an FPGA, some DACs driving some VCFs, some VCAs and you've got yourself a synth.
>>>
>>> It's also small enough that it could form part of a small sequencer, or MIDI controller... to upgrade the OS, add a new file to the SDCard, and switch on.
>>>
>>> On 20 Nov 2011, at 13:58, Gabbe wrote:
>>>
>>>> It's on my watchlist, but not in a SDIY sort or way...
>>>>
>>>> Paul Maddox<yo at VacoLoco.net>  skrev:
>>>>
>>>>> Anyone else seen this little gem?
>>>>>
>>>>> http://www.raspberrypi.org/
>>>>>
>>>>> I think I'll add one, or two, to my Xmas wish list.



More information about the Synth-diy mailing list