electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
starting with arm
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
rumpofsteelskin



Joined: Apr 22, 2009
Posts: 52
Location: brighton, uk

PostPosted: Mon Mar 13, 2017 10:53 am    Post subject: starting with arm Reply with quote  Mark this post and the followings unread

I've decided to have a go at programming some ARM based DSP synths - to get to know more about DSP and 32 bit processors.

Does anyone have recommendations for a good dev board, debugger, IDE etc? I've done a fair bit of 8bit programming but I don't know much about this.. I want it to be affordable but also I don't want to reach limitations too quickly, i'm hoping ill get a lot of use out of it

What are good 'net resources for simple (and useful!) music applications? I learnt DSP and programming at university but my skills are pretty rusty as I do mostly analogue stuff now

any suggestions much appreciated!
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1585
Location: West Red Spot, Jupiter
Audio files: 190

PostPosted: Mon Mar 13, 2017 12:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

I've been using the Raspberry Pi 3, which is $35 (just the populated board, need PSU et al). It doesn't have high quality on board audio, but I bought Wolfson boards for them (I have 4). So the price for good audio on the Rpi3 is around $100. Runs Linux. I program in C and use ALSA. The CPU is a 4 core ARM that can run at 1200 MHz. The CPU cores all have their own NEON FPU. I've been able to get polyphonic MIDI synthesizers running with between 16 and 64 voices depending on voice complexity. I looked at using it in bare metal mode, but I was put off by the hassle of writing my own bootloader code (which runs in the GPU). I've not had latency issues using ALSA. The Raspberry Pi 4 is soon to be released which is claimed to be able to run at 1800 MHz. I also have a Pi 2 which runs (overclocked) at 1000 MHz and it performs quite well too with the audio boards I have.
_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
rumpofsteelskin



Joined: Apr 22, 2009
Posts: 52
Location: brighton, uk

PostPosted: Mon Mar 13, 2017 12:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

i was thinking of going for a bare metal kind of thing - single core, no os, like an STM dev board or suchlike. Then again, maybe I could just go for a raspberry pi - would that be much of a jump from doing bare metal stuff on 8bit processors? I only know C and I'm not sure I want to get bogged down with linux but, maybe it would be a good thing to learn..
Back to top
View user's profile Send private message
gdavis



Joined: Feb 27, 2013
Posts: 359
Location: San Diego
Audio files: 1

PostPosted: Mon Mar 13, 2017 1:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

I can't recommend any specific resources, but just from doing my own web searches there seems to be a lot more support out there from people doing Linux based stuff. I wouldn't say it's a "jump" from bare metal as much as it is just a different set of resources available. You're interacting with the OS instead of directly with the hardware, but either way you need to study the interface and architecture of the platform.

The nice thing about the OS approach is it saves you from a lot of low level programming. Drivers are often available that let you get up and running more easily with complex things like audio and graphics, letting you focus more on the "fun" stuff. C programming is very well supported in Linux. With something like the Pi, you can work directly on the board so you don't have to rely on an IDE on another machine. Then again, you may prefer a nice GUI IDE over Vim on Linux Laughing

On the other hand you may prefer interacting more directly with the hardware, not spending time setting up an OS and relying on a lot of other peoples software. But you'll be spending time on more mundane stuff. I spend a fair amount of time coding to set up the audio codec to get sound out and I've spent the last couple months writing a bare metal USB host stack just so I can connect a USB MIDI controller to my synth Rolling Eyes

I enjoy the Linux environment a lot, but I've only used it on full computers, not on embedded processors or for synths. If you've never used a Unix type OS there will be a learning curve. I think it really just comes down to how you want to spend your time and effort.

_________________
My synth build blog: http://gndsynth.blogspot.com/
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1585
Location: West Red Spot, Jupiter
Audio files: 190

PostPosted: Mon Mar 13, 2017 2:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

rumpofsteelskin wrote:
i was thinking of going for a bare metal kind of thing - single core, no os, like an STM dev board or suchlike. Then again, maybe I could just go for a raspberry pi - would that be much of a jump from doing bare metal stuff on 8bit processors? I only know C and I'm not sure I want to get bogged down with linux but, maybe it would be a good thing to learn..


As gdavis says, the OS being there provides a lot of "already available" resources which are going to be difficult at best to troubleshoot in bare metal, not the least of which is the GPU stuff. I did already have a background with using Linux, but I had to learn ALSA from scratch (ALSA is the bit that lets you program against the sound driver so that all you need is to give it a buffer full of samples and it plays them). There is free information available on the web - in fact - I started with test program source code (in plain C) that is on the ALSA Project website. The test program played a continuous sinewave tone. Looking at that code and reading on the site allowed be to create synthesizer code based on the guts of the test program. One thing I should mention about the Rpi ARM CPU - the NEON FPU supports single precision floating point. After writing 5 MIDI synths, I found sing prec float to be more than adequate especially since I had previously been doing work on a dsPIC in 16 bit fixed point (assembly language). Moving from 16 bits to 24 bit mantissa float was like a breath of fresh air with the extra 8 bits of mantissa headroom added to the fact that the exponent increases range. The gcc compiler installed uses the NEON instructions for floats (I checked the disassembled output file). I do all of the compile and souce code edit work on the Raspberry Pi itself which makes for a fast edit-compile-test cycle and no head scratching over weirdness of cross-compile on another box plus the transfer of files each time you do a edit-compile-test cycle.

As for the jump from 8 bit CPU bare metal - there's no comparison really. The Rpi3 will smoke any 8 bit out there. My synths will all run headless too, I don't depend on a GUI interface, but with QT it's certainly possible to do that. One nice thing about an OS is the ability to print values to the screen or write to a file. Those resources are right there, just say printf(). 8 bit CPUs will need to have the code compiled on a PC and sent to it over USB, where as I mentioned, that's not necessary if you use gcc on the pi itself. I use an ssh connection to talk to the pi.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
rumpofsteelskin



Joined: Apr 22, 2009
Posts: 52
Location: brighton, uk

PostPosted: Mon Mar 13, 2017 3:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

hmm, yeah, that's good advice.... I don't know which to choose now! So many options. I enjoy the gritty parts of setting up hardware etc. but maybe I should opt for something I can get stuff done with quickly

I was thinking of programs about the same complexity as the mutable instruments stuff - I know Olivier uses the STM chips, and that a lot of other applications are based around those or use the same ARM cortex. Making stuff like oscillators and filters on these chips - I think - would be a good step up from where I am now.

On the other hand, the Linux stuff sounds like it could be a lot of fun and would also be more flexible for other stuff should I feel like experimenting.

...and I need to leave enough time to go to work
Back to top
View user's profile Send private message
BobTheDog



Joined: Feb 28, 2005
Posts: 4015
Location: England
Audio files: 32
G2 patch files: 15

PostPosted: Thu Mar 30, 2017 1:45 am    Post subject: Reply with quote  Mark this post and the followings unread

It might be worth you having a look at this as well: http://bela.io/

Plugs into a beaglebone black with Xenomai Linux which gives you hard real time scheduling.

With the basic board you get stereo I/O and 16 analog I/O and 16 digital I/O all running at audio rate.

The BB Black only has an A8 running at 1Ghz though.
Back to top
View user's profile Send private message
wmonk



Joined: Sep 15, 2008
Posts: 504
Location: Enschede, the Netherlands
Audio files: 14

PostPosted: Sat May 06, 2017 1:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

I can recommend the STM32F4 series for a more embedded feel, as the first upgrade from 8-bit microcontrollers. (used F2 and F3 as well, but not for DSP work). The development boards are pretty cheap (Nucleo series) and some even have an embedded codec (Discovery board) so you don't need to add a shield.
To teach a few fellow students we used the Eclipse IDE with GNU ARM Eclipse plugins. See http://gnuarmeclipse.github.io/
But when not explaining code to my mates, I rather use plain gcc, openocd and a text editor.

_________________
Weblog!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: State Machine
Page 1 of 1 [8 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use