Startup files for STM32F4xx
Jens Bauer via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Apr 24 06:12:55 PDT 2015
On Friday, 24 April 2015 at 07:34:55 UTC, tom wrote:
> would something like a STM32 NUCLEO-F401RE work?
I forgot to give you a proper answer on this one: I think it
should work, as it's a STM32F401 microcontroller.
-So basically you get a 'bare metal' setup with no drivers.
However, as you know already, you can use STM's drivers, because
D works quite well with C, so you have a fairly good starting
point.
I hope to add more devices later on, and I also hope to add a few
convenience libraries and perhaps some runtime for bare-metal.
I do have some additional files, which I didn't want to put in
the STM32F4xx repository, since they're not directly D-related.
They include a few linker-scripts and a Makefile (but the
Makefile will probably not be to your liking, as it assumes a lot
of things and is not Windows-compatible).
The current linker-scripts can be downloaded here:
d.gpio.dk/dl/linker-scripts.zip
You may want to cripple the following slightly:
__exidx_start = .;
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} >flash
__exidx_end = .;
by changing it to:
__exidx_start = .;
/* .ARM.exidx : */
/DISCARD/ :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} >flash
__exidx_end = .;
Both Mike and Timo are the true pioneers here; they have done
very valuable hard work. Johannes made it possible to use the
weak, alias and section attributes, so we have the most important
functionality for microcontroller support.
Note: If anyone wants read/write access, please let me know; send
me an email to the domain name, where you replace the first dot
with @
More information about the Digitalmars-d-learn
mailing list