WORKSHOP Parobrod, 11TH - 13TH April, 10AM - 6PM Daily

Embedded music: Baremetal ARM programming with c.thi.ng

by Karsten Schmidt

ARM processors are ubiquitous in mobile devices and in an ever increasing number of embedded devices, with RISC processors making a comeback in low power computing environments. With major operating systems (incl. Linux, iOS and Android) choosing to run on these processors, understanding the low level operations of these processors can serve to better understand, optimize and debug software stacks running on them.

This workshop will introduce you to the exciting world of programming ARM embedded devices outside the world of Arduino, working ‘baremetal’ with the powerful ARM Cortex-M processor family. We will use the STM32F746 discovery board (included in workshop fee), the first device featuring the latest and most powerful CPU in the Cortex-M family. After an introduction to generic ARM hardware and baremetal (no OS!) topics, including basic examples demonstrating how to work with core peripherals of the board, we’ll then start using C libraries from the thi.ng project (to be announced) and learn to create a few fully featured applications based on our own programmable, polyphonic stereo synthesizer and a multi-track MIDI step sequencer with interactive touchscreen GUIs to control the instrument – all of which you can take home later. This is not just going to be a lo-fi noise box! Furthermore, with the help from a little studio gear, we will be able to jam together as band and strive to do some recording on the last day.

Source code scaffolding will be provided to maximize time for experimentation.

Scheduled topics

– Introduction to the ARM CPU family and the STM32 platform & development board
– Open source toolchain setup (Eclipse, GCC, OpenOCD, ST-Link)
– Overview/review of important C language concepts (structs, pointers, function pointers)
– Basic examples (clock config, timers, GPIO, LED, LCD display)
– Overview of multi-tasking via timers and interrupts
– LCD & multi-touch introduction
– Creating interactive GUIs with
– Digital audio introduction, theory & experimentation
– Intro to USB device classes & file systems (play/record WAV files)
– Synthesizer DSP graph overview, audio/music theory, experimentation
– Introduction to MIDI & integrating with synthesizer / sequencer
– Generative music composition techniques (scales, cellular automata, eucledian rhythms etc.)
– Manipulate the synth via touchscreen GUI controls
– Project development / recording music

Included in workshop fee:

STM32F7-DISCOVERY development board (49 EUR)

YouTube videos:

https://www.youtube.com/watch?v=41FKE3PYjnE
https://www.youtube.com/watch?v=3lL-ZxyrHiE

 

REQUIREMENTS

This workshop is going to be fast paced, but primarily intended for beginners to embedded development. Previous programming experience in Arduino/C/C++ or Processing/Java/Python etc. is required, but we will try to keep coding to a minimum.

All participants need to bring the following items:

- OSX / Linux / Windows7+ laptop
- Headphones
- USB Memory stick (MS-DOS formatted)
- USB OTG cable
- USB MIDI controller if you have one (e.g. Korg NanoKey / NanoKontrol2)