April 24, 2015
On 4/23/15 11:30 AM, Jens Bauer wrote:
> On Thursday, 23 April 2015 at 12:14:59 UTC, Steven Schveighoffer wrote:

>> You can't use something like this?
>> http://www.floodgap.com/software/tenfourfox/
>
> Wow, I thought they stopped making builds at v20! -I'm pretty sure they
> said on the Web-site that v20 was the last build. But this is great,
> thank you for letting me know. I've downloaded it (though a bit slow) it
> appears to work.

No problem :) I was a little surprised firefox proper was not continuing to support power pc Mac, but I guess as they upgrade to use new OS UI features, it would drift the codebase apart.

> In my attempt to make a read-access on my git repositories, I upgraded
> both Gitolite and git to latest versions; but I still didn't succeed in
> making it possible to clone without a SSH key.

I was hoping that github access would be possible now with a more modern browser, no?

> The most important thing, though, is that D-programmers now have a
> starting point for the STM32F4xx. It should be easy to adapt the same
> sources to other MCUs. I'm planning on adding support for some of the
> LPC microcontrollers myself.

I want to say, I remember Mike's talk last year, and having worked with ST7 micros (small ones, not even close to being supportable by D), I thought it was the coolest thing. I am very excited to see a possibility of using D for embedded programming. This really could be a niche win for D!

-Steve
April 24, 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 @
April 24, 2015
On Friday, 24 April 2015 at 13:12:56 UTC, Jens Bauer wrote:
> 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.
>

ill order a discover, i have to try this out.
http://www.digikey.com/product-detail/en/STM32F4DISCOVERY/497-11455-ND/2711743
this one right?

April 24, 2015
On Friday, 24 April 2015 at 12:55:46 UTC, Steven Schveighoffer wrote:
>
> I was hoping that github access would be possible now with a more modern browser, no?

Actually I was getting sleepy and had to do something else the next day, so I couldn't start right away.
But I'll have to learn using GitHub - I've never used it before, due to the problems, so I'm a newbie here (feels strange to be a newbie after being a nerd for so long). I'll try and see if I can find out how to mirror my repository and will post a note here if I succeed. :)

> I want to say, I remember Mike's talk last year, and having worked with ST7 micros (small ones, not even close to being supportable by D), I thought it was the coolest thing.

Mike's examples and talk was very inspiring. If he hadn't made these, I would probably not have gotten "hungry" for starting my D-support on microcontrollers.
-But showing that "it's basically possible" meant a huge difference.

> I am very excited to see a possibility of using D for embedded programming. This really could be a niche win for D!

I couldn't agree more. D has so many advantages over C and C++ on microcontrollers. :)
I hope that I can get a "low-cost" support for associative arrays. When I say low-cost, I mean something like using a minimal malloc/free, in order to reduce the final binary.
(I've written a minimal malloc/free/realloc in C already, it's stress-tested and in use in someone else's application at the moment, so it may be ready for porting already)
April 24, 2015
On Friday, 24 April 2015 at 22:18:22 UTC, tom wrote:
>
> ill order a discover, i have to try this out.
> http://www.digikey.com/product-detail/en/STM32F4DISCOVERY/497-11455-ND/2711743
> this one right?

This board will do nicely, but you may want to get a STM32F29 discovery board, because the STM32F429 support higher speeds, has more features, more on-chip SRAM and more freedom. :)
LCD/TFT support and Chrom-ART are two of my favorite features.
The STM32F429 discovery board has 64MB external SDRAM as well.

http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&keywords=stm32f429+discovery

Also available from newark (06X3667) / farnell (2355377)

-But the most important thing is that you have a working toolchain.
OpenOCD v0.9.0 just went RC1 today, so it's easy for everyone to build it.
Freddie Chopin already made a Windows binary (as usual), so if you're using Windows, I recommend getting his binary from ...
http://www.freddiechopin.info/en/download/category/10-openocd-dev
... otherwise you'll need to build it from the git repository. I recommend using v0.9.0 over any previous version, because there are several fixes for STM and LPC in v0.9.0 (OpenOCD also works well on big endian hosts now).

-So get all the free stuff working before you make a purchase (including the linker scripts).
You should be able to use arm-none-eabi-objdump -D for disassembling your .elf file.
April 25, 2015
On 4/24/15 7:42 PM, Jens Bauer wrote:
> On Friday, 24 April 2015 at 22:18:22 UTC, tom wrote:
>>
>> ill order a discover, i have to try this out.
>> http://www.digikey.com/product-detail/en/STM32F4DISCOVERY/497-11455-ND/2711743
>>
>> this one right?
>
> This board will do nicely, but you may want to get a STM32F29 discovery
> board, because the STM32F429 support higher speeds, has more features,
> more on-chip SRAM and more freedom. :)
> LCD/TFT support and Chrom-ART are two of my favorite features.
> The STM32F429 discovery board has 64MB external SDRAM as well.
>
> http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&keywords=stm32f429+discovery

This is super tempting @ $24. As someone who is not used to tinkering with raw hardware, how does one power this thing? I've tinkered with SBCs, but those had full-blown Linux. What hardware is necessary to get this thing running?

-Steve
April 25, 2015
On Saturday, 25 April 2015 at 00:33:26 UTC, Steven Schveighoffer wrote:
> On 4/24/15 7:42 PM, Jens Bauer wrote:
>>
>> http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&keywords=stm32f429+discovery
>
> This is super tempting @ $24. As someone who is not used to tinkering with raw hardware, how does one power this thing?

Simply via the USB-port on the computer or a 5V USB-plug power supply. :)

> I've tinkered with SBCs, but those had full-blown Linux. What hardware is necessary to get this thing running?

Virtually just the board itself.
-The Discovery boards have a built-in ST-Link v2 SWD programmer, so you can use OpenOCD directly with the board. The only thing you need is the USB-to-USB-mini cable, which is something you can get almost everywhere.

... I now succeeded in making a mirror on GitHub:
https://github.com/jens-gpio/STM32F4xx
(It was absolutely tedious, because the tutorial on GitHub didn't work for me; I haven't yet added automatic mirroring; hopefully I'll be able to figure it out).
April 25, 2015
On Saturday, 25 April 2015 at 00:33:26 UTC, Steven Schveighoffer wrote:

>> http://www.digikey.com/product-search/en?x=0&y=0&lang=en&site=us&keywords=stm32f429+discovery
>
> This is super tempting @ $24. As someone who is not used to tinkering with raw hardware, how does one power this thing? I've tinkered with SBCs, but those had full-blown Linux. What hardware is necessary to get this thing running?
>
> -Steve

It's powered from your PC's USB port (Using one right now, actually).  No extra hardware is needed unless you want to add features beyond what the board provides. Due to its large number of pins, and the way they are arranged, they don't plug into breadboards, but you can easily use jumper wires for that: https://www.adafruit.com/products/153.

I have a basic D demo for this board here: https://github.com/JinShil/stm32f42_discovery_demo.  It's just a blinky app at the moment, but it does all the work of configuring the clocks, flash, etc... before calling the "main" function.

There's quite a few "Discovery" boards from ST (http://www.st.com/web/en/catalog/tools/FM116/SC959/SS1532/LN1848?icmp=ln1848_pron_pr-stm32f446_dec2014&sc=stm32discovery-pr) as well as boards from other manufacturers (http://www.mikroe.com/stm32/development-boards/).

It's quite exciting to see Jens's work and the expressed interest in using D for this domain.  I hope to see more.

Mike
April 25, 2015
On Saturday, 25 April 2015 at 01:06:16 UTC, Mike wrote:
> On Saturday, 25 April 2015 at 00:33:26 UTC, Steven Schveighoffer wrote:
> Due to its large number of pins, and the way they are arranged,
> they don't plug into breadboards, but you can easily use jumper
> wires for that: https://www.adafruit.com/products/153.

If you can 'afford to wait', you can get those for a very low price on eBay:
http://shop.ebay.com/dupont%20male%20female
-It may take between 5 days and 2 months before they arrive, depending on which way the wind is blowing... ;)

> There's quite a few "Discovery" boards from ST {snip}

Yes, the STM32F446 is the newest; I really should have mentioned this board. It's quite a good chip too.

> It's quite exciting to see Jens's work and the expressed interest in using D for this domain.  I hope to see more.

This is most likely where the egg cracks open. i'm pretty sure we willl see people migrating to using D (at first a mixture between D and C, because of the libraries from the vendors), but later, there'll surely be projects which are pure D. -After all, it's not difficult to convert a library file from C to D. :)

I think I just got automatic mirroring working. It seems it's only a single line in the Gitolite conf. :)
April 25, 2015
On 25/04/2015 12:54 p.m., Jens Bauer wrote:
> ... I now succeeded in making a mirror on GitHub:
> https://github.com/jens-gpio/STM32F4xx
> (It was absolutely tedious, because the tutorial on GitHub didn't work
> for me; I haven't yet added automatic mirroring; hopefully I'll be able
> to figure it out).

Congrats!

Also I found this, https://github.com/defunkt/github-gem