On Tuesday, 18 August 2015 at 04:36:49 UTC, Rikki Cattermole
wrote:
On 18/08/2015 1:32 p.m., Laeeth Isharc wrote:
I don't know whether D can run on one, but from a quick look
perhaps
feasible. Running D on something like this (perhaps it's
underpowered,
but looked to have similar spec to what people had been doing
with
related ARM cortex processors) would certainly make the point
very vivid
that it can be a bare metal programming language.
Only 1Mb of flash RAM for the program - is that enough?
https://learn.adafruit.com/dash-hacking-bare-metal-stm32-programming/programming
https://learn.adafruit.com/dash-hacking-bare-metal-stm32-programming/overview
The Amazon Dash button is a tiny device that orders products
from
Amazon.com at the press of a button. It's designed to be put
wherever
you store consumeables like paper towels, trash bags, etc. so
that you
can easily order more when they run out. The Dash is great at
what it's
designed to do, but did you know inside the Dash is a powerful
ARM
Cortex-M3 processor and WiFi module that are very similar to
wireless
development boards like the Particle Photon? You'll even find
there are
easily accessible test pads on the Dash which allow you to
reprogram its
CPU and turn it into your own $5 internet button! This guide
will
explore how to take apart the Dash and reprogram its CPU to
run your own
code.
...
The CPU is a STM32F205RG6 processor which is an ARM Cortex-M3
that can
run up to 120mhz and has 128 kilobytes of RAM and 1 megabyte
of flash
memory for program storage.
The WiFi module is a BCM943362 module which in combination
with the CPU
make it a platform for Broadcom's WICED SDK.
There's a 16 megabit SPI flash ROM which is typically used in
conjunction with the WICED SDK for storing application data.
An ADMP441 microphone is connected to the CPU and used by the
Dash iOS
application to configure the device using the speaker on a
phone/tablet.
There's a single RGB LED and a button.
By what you are saying, I believe it should be doable.
Although I'm a little worried for the WiFi support. Do you need
to include the code to drive it beyond wrap up some
communication to it?
1mb flash should be enough to run D code on it. If you strip
out a good percentage of druntime and definitely no Phobos.
Although you may be able to mark and use some of that 16mb
flash rom as executable code storage. If that's so, you'll be
in a good place to have more then 1mb. It would require some
clever runtime linking tricks however.
I'm probably not the best person to go more in depth about it
or the specific chips. So I won't. Most of my knowledge comes
from reading what others says and talking with Jens Bauer.
I think its doable too. Nobody seems to have figured out the
wifi yet - more at LED flashing stage. It's funny these wifi
devices have microphones in them !