-
Looking for alternatives to Arduino... there and back again.
10/01/2018 at 13:24 • 2 commentsThe Arduino environment is simple, but a bit too simple for somebody like me who has programmed with "real" development tools, like Visual Studio and CodeWarrior. I was really looking forward to having and actual debugger instead of just printf.
So I looked around for something new for STM32. Unfortunately, just about every development system for STM32 is a modified version of Eclipse, which I despise. It's hugely bloated, and impossible to find anything if you are used to using any non-Linux GUI from the last 20 years. None-the-less, I resolved to give them a try.
It seemed like the standards were the well-liked System Workbench for STM32, the very similar Atollic, and Keil.
Keil costs actual money, and people seem to hate it, so that was right out.
Atollic seemed to have a pay plan when I started, so I decided to focus on the free System Workbench. Early tests were decent, but I realized that there was no printf unless I wanted to use an external serial adapter. I tried some tutorials on how to do it over the debugging interface. Also, I really wanted to leverage the Arduino libraries. There seemed to be multiple solutions for using Arduino with Eclipse that should theoretically work with SW4STM32.
For some reason, they can't just make a set of C libraries that implement Arduino; they have to do some special shit. Extra control buttons. Different places for libraries. It's a mess, and it avoided all of my attempts to get it working. I finally had to wipe the tools and all of their libraries completely off the system to get things working again.
In the middle of this process, ST Microelectronics bought Atollic and made it their official environment. They also made it free. I figured that this was the way to go, even though I had a slightly higher opinion of SW4STM32. I got this running, but once again, Arduino was eluding me, and I still had no printf. In hindsight, perhaps I could have done it over the USB port the same as the Arduino environment; maybe someday I'll try that again.
I really liked the Visual Studio Code based environment of Atmel Studio, and so I looked around for something based on that,. PlatformIO is a thing, and it shows up in free software lists, but it is really not free if you want to use the debugger. I remembered messing around with it for Teensy and that it had some strange way it handled libraries that wasn't compatible with me using my own modifications to the libraries. Maybe I could have figured it out, but not free is a problem, so I dropped it.
In any event, after months of messing around, I ended up back at the Arduino environment. The libraries mostly work, printf is supported, and it didn't take long to "get to blinky". Getting *beyond* blinky took a bit more effort, and I was having a lot of trouble getting a fast enough PWM output despite some helpful folks on the net sharing some code.
I also determined that the Mozzi audio libraries for Arduino actually work on STM32, and that kinda clinched the deal. So after all that, I'm back at Arduino IDE.
-
Considered some other parts
10/01/2018 at 13:00 • 0 commentsThe synth was to be designed around the STM32F103C6T8 "Blue Pill" board because they are less than $2 from AliExpress, theoretically supported with the Arduino environment, and better than the available AVR dev boards in every way. 72MHz vs 16Mhz. 64-128k of Flash (program) memory vs the Arduino's 32k. 20k of RAM vs 2k on the Uno/Mini/Micro. And having a 32 bit ARM processor with better math seems like a great idea as well!
But after talking with the guys from MAGfest when I was starting to get back to work, they convinced me to look at the ESP chips. I don't need the WiFi, and they seemed to start at $7 so I didn't really see how they were applicable to my project. But they convinced me that they were actually cheaper now, and hugely faster and posessing of tons more memory. The new ESP32 is even a dual core part!
They also told me about these great D/A audio converters called PT8211 that does stereo and can be used over SPI... furthermore, they cost $0.02, so completely within my budget!
So I ordered a bunch of parts! But AliExpress is a minimum of two weeks...
But I'm not gonna sit on my hands in the mean time, so I guess I'll keep working with the STM32...
When the parts finally did get here, I was kinda already too far along in the design with STM32, so the parts have kinda been sitting on my desk. Maybe for version 2...
-
Google Photos Album Added
09/30/2018 at 06:25 • 0 commentsGoogle Photos Album is here: https://photos.app.goo.gl/Ampxw5hUv5ACdvGE6
-
STM32F103 development environment woes
09/01/2018 at 10:40 • 0 commentsI discovered that the STM32 chips supported debugging through various Eclipse-based IDEs like System Workbench and Atollic (which ST Microelectronics eventually bought). I'd been missing that capability when developing through the Arduino environment, so I endeavored to try to get that running. I really HATE Eclipse tho. It seems like the majority of the tools that originate on Linux are needlessly complex and require additional command-line futzing to get anything to work, even if the tool is a GUI tool.
I was able to get debugging to work by November (having started in August; It takes time for parts to come in from China), but I was never able to get it set up so that I could build Arduino-library based software, allow for source level debugging, and still have a printf output. If I develop using the Arduino environment, I get at least two of those things; I just don't get source level debugging.The reason for the Arduino libraries is that I am hoping to leverage a lot of the well-tested open source libraries out there and save myself a bunch of coding. I looked into writing everything raw on STM32, but found it rather confusing to get started with.
The trucker belt buckle idea solidified by December 1st, having messed around with a more traditional toy synth shape earlier.
The holidays were a busy time, and while I was working on stuff, I didn't really write any more logs until February 17th. I was also spending some time helping Null Space Labs hackerspace get set up; we'd be packing them up again less than a year later.
About this time, the MAGwest folks asked for a different piece of swag, the Blinky 8-bit Couples Heart Pendant. I thought I could knock that out quickly and get back to the belt synth, but it ended up taking 5 months and basically killing the belt synth for 2018.
-
In the beginning...
09/01/2018 at 10:25 • 0 commentsI'd been kicking around the idea of a cheap stylus-based synthesizer project for awhile, and after my great success with the Blinky 8-bit Tiara and Earring set project for MAGwest 2017, they were hip to let me do whatever project I wanted, and so I got approval to start design on a synthesizer project. The budget is supposed to be $20 a unit or less (same as the tiaras). I started on it before I even left the convention site of the 2017 MAGwest show.
At the time I was pretty keen on the Arduino environment, because my experience using it to develop using the Teensy microcontrollers, but at $20 each those were too expensive to put in a project with a complete project of $20. I discovered that STM32 "Blue Pill" boards were available from Aliexpress for less than $2, and having a 32 bit processor at 72Mhz and a ton of I/O lines seemed like a pretty good solution.
I decided to try to use as many off-the-shelf components as possible so that I could just solder them together myself if necessary. At the time, I hadn't ever manufactured anything in China other than bare PCBs, and wasn't really sure about the idea of sending the whole project out. You can get a lot of "maker parts" cloned off the open-source hardware designs that Adafruit and Sparkfun release for much cheaper from Aliexpress, which would enable me to get just about everything I need for ~$10.
It sounds like a plan!