Re: D for embedded system

2013-01-22 Thread Timo Sintonen
On Tuesday, 22 January 2013 at 17:02:58 UTC, Freddie Chopin wrote: Any chance for adding any example that could be used to verify that everything works correctly? It does not matter for which microcontroller it would be, just anything for a start (; I will add something when I have time. I ha

Re: D for embedded system

2013-01-22 Thread Freddie Chopin
On Tuesday, 22 January 2013 at 17:17:20 UTC, Iain Buclaw wrote: Great! (; Why are you upside-down. :) Against mainstream! <; 4\/3!!

Re: D for embedded system

2013-01-22 Thread Iain Buclaw
On 22 January 2013 17:02, Freddie Chopin wrote: > On Tuesday, 22 January 2013 at 16:25:02 UTC, Timo Sintonen wrote: > >> By request I have put my minimum library work visible at >> bitbucket.org/timosi/minlibd. It contains now the library. I hope it >> will contain other things for program develo

Re: D for embedded system

2013-01-22 Thread Freddie Chopin
On Tuesday, 22 January 2013 at 16:25:02 UTC, Timo Sintonen wrote: By request I have put my minimum library work visible at bitbucket.org/timosi/minlibd. It contains now the library. I hope it will contain other things for program development too, like makefiles and linker scripts and of course,

Re: D for embedded system

2013-01-22 Thread Timo Sintonen
By request I have put my minimum library work visible at bitbucket.org/timosi/minlibd. It contains now the library. I hope it will contain other things for program development too, like makefiles and linker scripts and of course, documentation.

Re: D for embedded system

2013-01-15 Thread Freddie Chopin
After browsing the forums a bit I've stumbled across a discussion about C-style "volatile" and lack of something like that in D (I did not get too deep in the details yet), so I'd like to ask if there is something that can be used for the purpose of forcing memory accesses to happen ALWAYS, dis

Re: D for embedded system

2013-01-09 Thread Timo Sintonen
On Wednesday, 9 January 2013 at 08:31:01 UTC, Freddie Chopin wrote: but actually I was hoping I could "drop" GDC into a linaro distribution of ARM bare-metal toolchain - launchpad.net/gcc-arm-embedded - it's a 4.7.x version, I don't know how big problem that is... So I haven't yet tried com

Re: D for embedded system

2013-01-09 Thread Freddie Chopin
On Wednesday, 9 January 2013 at 07:15:33 UTC, Timo Sintonen wrote: Meanwhile I am asking you, have you read the instructions on http://gdcproject.org/wiki/Cross%20Compiler and have you been able to make the toolchain? I've read this article, but actually I was hoping I could "drop" GDC into a

Re: D for embedded system

2013-01-08 Thread Timo Sintonen
On Tuesday, 8 January 2013 at 20:42:07 UTC, Freddie Chopin wrote: You should definetely post that to github or somewhere (dropbox, ...)! I'd be really interested to see the files (and maybe some details about strange things you need to do to get whole toolchain compiled), but I cannot see your

Re: D for embedded system

2013-01-08 Thread Freddie Chopin
On Tuesday, 8 January 2013 at 16:52:05 UTC, Freddie Chopin wrote: Well, RTOSes ("schedulers") like FreeRTOS don't do that much - you have threads, mutexes/semaphores, message queue and software timers - all of them but the last one is covered by D APIs, but now I thought that D probably just us

Re: D for embedded system

2013-01-08 Thread Dmitry Olshansky
09-Jan-2013 00:42, Freddie Chopin пишет: On Tuesday, 8 January 2013 at 20:13:54 UTC, Timo Sintonen wrote: Next I think I will make a list of required changes and then I will make a simple makefile to compile the library. If anybody is interested, please send an email to me and I will send those

Re: D for embedded system

2013-01-08 Thread Freddie Chopin
On Tuesday, 8 January 2013 at 20:13:54 UTC, Timo Sintonen wrote: Next I think I will make a list of required changes and then I will make a simple makefile to compile the library. If anybody is interested, please send an email to me and I will send those files back to you. You should definete

Re: D for embedded system

2013-01-08 Thread Timo Sintonen
There are hundreds of ARM processors from several vendors from megahertz to gigahertz and from kilobytes to gigabytes. When we talk about ARMs it should be good to mention what kind of ARM we are using. My interest is stm32f4 but everything I have done should be useful in the whole cortex-m s

Re: D for embedded system

2013-01-08 Thread Jacob Carlborg
On 2013-01-08 17:52, Freddie Chopin wrote: Yes, we're talking about real bare-metal here (; I think D with it's safety fits really nicely in the embedded niche... I think that if D could be used on a system with 128kB of flash and 8kB of RAM that would be great. If it would require the chip to h

Re: D for embedded system

2013-01-08 Thread Matthew Caron
On 01/08/2013 11:58 AM, Freddie Chopin wrote: To be even more specific - I'm talking about microCONTROLLERS (not micro-processors), ARM Cortex-M3 or Cortex-M4, STM32, LPC17xx, maybe even Cortex-M0 if the footprint is low enough... So no MMU, sometimes MPU (rarely), ROM in "hundreds of kilobytes",

Re: D for embedded system

2013-01-08 Thread Dmitry Olshansky
08-Jan-2013 20:58, Freddie Chopin пишет: On Tuesday, 8 January 2013 at 16:52:05 UTC, Freddie Chopin wrote: Yes, we're talking about real bare-metal here (; I think D with it's safety fits really nicely in the embedded niche... I think that if D could be used on a system with 128kB of flash and 8

Re: D for embedded system

2013-01-08 Thread Freddie Chopin
On Tuesday, 8 January 2013 at 16:52:05 UTC, Freddie Chopin wrote: Yes, we're talking about real bare-metal here (; I think D with it's safety fits really nicely in the embedded niche... I think that if D could be used on a system with 128kB of flash and 8kB of RAM that would be great. If it wou

Re: D for embedded system

2013-01-08 Thread Freddie Chopin
On Tuesday, 8 January 2013 at 15:45:18 UTC, Matthew Caron wrote: On 01/08/2013 09:22 AM, Freddie Chopin wrote:> Hi! > > Any progress on making D an usable alternative for C/C++ for ARM > MCUs? I had a cross compiler working based on an older version of this: http://gdcproject.org/wiki/Cross%2

Re: D for embedded system

2013-01-08 Thread Matthew Caron
On 01/08/2013 09:22 AM, Freddie Chopin wrote:> Hi! > > Any progress on making D an usable alternative for C/C++ for ARM > MCUs? I had a cross compiler working based on an older version of this: http://gdcproject.org/wiki/Cross%20Compiler/crosstool-NG Bear in mind that my embedded system is an A

Re: D for embedded system

2013-01-08 Thread Freddie Chopin
Hi! Any progress on making D an usable alternative for C/C++ for ARM MCUs? This would be VERY interesting thing! A wiki page was mentioned several times, but I guess that it didn't happen, so the only source of knowledge is this thread... Anyway - do you think that D's threads could actually rep

Re: D for embedded system

2012-11-18 Thread Jacob Carlborg
On 2012-11-18 00:07, maarten van damme wrote: Why wasn't opted for making opIndex overloadable with other objects so AA's could be moved out of druntime and in phobos? One reason for why AA's are in druntime is for the syntax sugar: int[string] aa; If the AA's where only in Phobos, this woul

Re: D for embedded system

2012-11-18 Thread Timo Sintonen
On Saturday, 17 November 2012 at 23:08:04 UTC, maarten van damme wrote: Why is so much built in to druntime? creating classes, AA's, Is it normal? does c++ do the same thing? Why wasn't opted for making opIndex overloadable with other objects so AA's could be moved out of druntime and in p

Re: D for embedded system

2012-11-17 Thread maarten van damme
Why is so much built in to druntime? creating classes, AA's, Is it normal? does c++ do the same thing? Why wasn't opted for making opIndex overloadable with other objects so AA's could be moved out of druntime and in phobos? I have no experience with language design but wouldn't it be great i

Re: D for embedded system

2012-11-11 Thread Timo Sintonen
I have been able to make a minimum library, link it with my test program and run the program in my arm cortex-m4 controller board. Some features are disabled and many features are still untested. The library does not yet have threads and memory management is done with gcstub. My test program su

Re: D for embedded system

2012-11-03 Thread Iain Buclaw
On 3 November 2012 12:44, Timo Sintonen wrote: > I have started to make a minimum libdruntime. First I compiled object and > now I am adding files one by one when needed. > The compiler generates lots of library calls. So far I have found these > flags to get the code smaller and to reduce library

Re: D for embedded system

2012-11-03 Thread Timo Sintonen
I have started to make a minimum libdruntime. First I compiled object and now I am adding files one by one when needed. The compiler generates lots of library calls. So far I have found these flags to get the code smaller and to reduce library calls: -fno-assert -fno-invariants and -fno-bouns-ch

Re: D for embedded system

2012-10-23 Thread Timo Sintonen
On Tuesday, 23 October 2012 at 16:37:11 UTC, Martin Nowak wrote: Are there any patches required to build a cross-gdc? Before compiling gcc-package there should be binutils and libc for the target installed. Binutils is the gnu binutils package and as libc I have used newlib, which is a light

Re: D for embedded system

2012-10-23 Thread Iain Buclaw
On 23 October 2012 17:37, Martin Nowak wrote: > On Saturday, 20 October 2012 at 15:27:34 UTC, Timo Sintonen wrote: > >> STM32F0 may be too small. > > > Yeah probably. Are there any patches required to build a > cross-gdc? > Nope - building a cross-compiler should be available in the gcc make infr

Re: D for embedded system

2012-10-23 Thread Martin Nowak
On Saturday, 20 October 2012 at 15:27:34 UTC, Timo Sintonen wrote: STM32F0 may be too small. Yeah probably. Are there any patches required to build a cross-gdc?

Re: D for embedded system

2012-10-21 Thread Iain Buclaw
On 20 October 2012 19:40, Johannes Pfau wrote: > Am Sat, 20 Oct 2012 17:27:33 +0200 > schrieb "Timo Sintonen" : > >> On Saturday, 20 October 2012 at 14:35:44 UTC, Martin Nowak wrote: >> > I recently did a project on the STM32F0-Discovery board. >> > After having used a nice arm-none-eabi-*/openocd

Re: D for embedded system

2012-10-21 Thread Timo Sintonen
On Saturday, 20 October 2012 at 18:40:51 UTC, Johannes Pfau wrote: BTW: Here's the dmd commit which introduced betterc: https://github.com/D-Programming-Language/dmd/commit/707949edc30f245a68145bef619f6f02b85e39ab but right now it only disables moduleinfo generation, afaics. This is only in d

Re: D for embedded system

2012-10-20 Thread maarten van damme
It's also sad that druntime is so difficult to port to other platforms because of the version(platformdependent) all over the place. Would there be a way to cleanly seperate platform-dependent stuff with platform-independent stuff (so a no-os or android version would be easier to make).

Re: D for embedded system

2012-10-20 Thread Johannes Pfau
Am Sat, 20 Oct 2012 17:27:33 +0200 schrieb "Timo Sintonen" : > On Saturday, 20 October 2012 at 14:35:44 UTC, Martin Nowak wrote: > > I recently did a project on the STM32F0-Discovery board. > > After having used a nice arm-none-eabi-*/openocd toolchain I > > wonder what is needed to build a cross

Re: D for embedded system

2012-10-20 Thread Timo Sintonen
On Saturday, 20 October 2012 at 14:35:44 UTC, Martin Nowak wrote: I recently did a project on the STM32F0-Discovery board. After having used a nice arm-none-eabi-*/openocd toolchain I wonder what is needed to build a cross-gdc. As these devices are really short on Flash and RAM I would've only

Re: D for embedded system

2012-10-20 Thread Martin Nowak
On Thu, 18 Oct 2012 13:36:45 +0200, Timo Sintonen wrote: I have written programs with C for Arm Cortex controller boards. I think that D might be an interesting nut simple enough oo language. So far I have a working gdc for my target, but I can not compile the runtime library because of

Re: D for embedded system

2012-10-20 Thread Timo Sintonen
On Saturday, 20 October 2012 at 09:40:28 UTC, Iain Buclaw wrote: Quick question, what is defined in your phobos-vers-syms file? (This will be located in the libphobos / libdruntime build directory). Regards NoSystem @DCFG_NEARBYINT@ @DCFG_TGAMMA@ @DCFG_NAN@ GNU_Need_exp2 GNU_Need_log2

Re: D for embedded system

2012-10-20 Thread Jacob Carlborg
On 2012-10-19 20:08, Johannes Pfau wrote: Druntime might not need file access/etc as long as version(Posix) isn't defined for your target. Nobody has used GDC/D/druntime on a system without OS afaik. So you have to pioneer ;-) I see two solutions: There are developers who have used D1 to crea

Re: D for embedded system

2012-10-20 Thread Iain Buclaw
On 20 October 2012 09:23, Timo Sintonen wrote: >> >> Nobody has used GDC/D/druntime on a system without OS afaik. So you >> have to pioneer ;-) > > > So I have to try it on my own... > > >> * Create your own, simple runtime library. There's no real >> documentation on the minimum interface a run

Re: D for embedded system

2012-10-20 Thread Timo Sintonen
Nobody has used GDC/D/druntime on a system without OS afaik. So you have to pioneer ;-) So I have to try it on my own... * Create your own, simple runtime library. There's no real documentation on the minimum interface a runtime must implement (the compiler calls back into the runtime)

Re: D for embedded system

2012-10-19 Thread Johannes Pfau
Am Thu, 18 Oct 2012 17:51:46 +0200 schrieb "Timo Sintonen" : > > > > I shouldn't have thought there would be any asserts when > > compiling the > > library (at least I don't get any). > > > > Regards > > Yes, but I need the library for the cross compiled target, > arm-eabi. This target doen not

Re: D for embedded system

2012-10-18 Thread Timo Sintonen
I shouldn't have thought there would be any asserts when compiling the library (at least I don't get any). Regards Yes, but I need the library for the cross compiled target, arm-eabi. This target doen not define any os. There are several places where is a test for mac/win/linux and if none

Re: D for embedded system

2012-10-18 Thread Iain Buclaw
On 18 October 2012 16:12, Timo Sintonen wrote: > >> What OS are you working on? > > > Linux I shouldn't have thought there would be any asserts when compiling the library (at least I don't get any). Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';

Re: D for embedded system

2012-10-18 Thread Timo Sintonen
What OS are you working on? Linux

Re: D for embedded system

2012-10-18 Thread Iain Buclaw
On 18 October 2012 12:36, Timo Sintonen wrote: > I have written programs with C for Arm Cortex controller boards. I think > that D might be an interesting nut simple enough oo language. So far I have > a working gdc for my target, but I can not compile the runtime library > because of too many os

D for embedded system

2012-10-18 Thread Timo Sintonen
I have written programs with C for Arm Cortex controller boards. I think that D might be an interesting nut simple enough oo language. So far I have a working gdc for my target, but I can not compile the runtime library because of too many os related assertions. With my own makefile I can compi