Jump to page: 1 2
Thread overview
Dlang on $4 microcontroller board from Raspberry Pi RP2040
Mar 01, 2022
Igor Myronov
Mar 01, 2022
Nicholas Wilson
Mar 01, 2022
forkit
Mar 01, 2022
Iain Buclaw
Mar 01, 2022
forkit
Mar 02, 2022
rikki cattermole
Mar 01, 2022
norm
Mar 01, 2022
forkit
Mar 01, 2022
H. S. Teoh
Mar 02, 2022
dangbinghoo
Mar 02, 2022
dangbinghoo
Mar 05, 2022
Igor Myronov
Mar 07, 2022
dangbinghoo
Mar 07, 2022
max haughton
Mar 07, 2022
dangbinghoo
Mar 01, 2022
Guillaume Piolat
March 01, 2022

I'm wondering if a such nice programming language should be possible to use on small MCU's like RP2040,PIC32 and so on.
Thanks.

March 01, 2022

On Tuesday, 1 March 2022 at 05:07:09 UTC, Igor Myronov wrote:

>

I'm wondering if a such nice programming language should be possible to use on small MCU's like RP2040,PIC32 and so on.
Thanks.

I've used it on cortex A (A53, 2b+), and so I presume you could use it on cortex M's. GDC may have a backend for PIC, but LDC doesn't. Both of them should be able to support ARM.

There's some blog post series kicking around somewhere of people using D on microcontrollers, that explain using all the quirks of microcontrollers.

March 01, 2022
On Tuesday, 1 March 2022 at 05:07:09 UTC, Igor Myronov wrote:
> I'm wondering if a such nice programming language should be possible to use on small MCU's like RP2040,PIC32 and so on.
> Thanks.

Arhggg...32bit controllers! In 2022!

There goes any hope of ridding D of its 32bit baggage.

March 01, 2022
On Tuesday, 1 March 2022 at 07:24:07 UTC, forkit wrote:
> On Tuesday, 1 March 2022 at 05:07:09 UTC, Igor Myronov wrote:
>> I'm wondering if a such nice programming language should be possible to use on small MCU's like RP2040,PIC32 and so on.
>> Thanks.
>
> Arhggg...32bit controllers! In 2022!
>
> There goes any hope of ridding D of its 32bit baggage.

Out of curiosity, what baggage?
March 01, 2022

On Tuesday, 1 March 2022 at 05:07:09 UTC, Igor Myronov wrote:

>

I'm wondering if a such nice programming language should be possible to use on small MCU's like RP2040,PIC32 and so on.
Thanks.

I remember using it on 32-bit pi using LDC. Ported intel-intrinsics so you can even get SIMD.

March 01, 2022
On Tuesday, 1 March 2022 at 10:08:54 UTC, Iain Buclaw wrote:
> On Tuesday, 1 March 2022 at 07:24:07 UTC, forkit wrote:
>> On Tuesday, 1 March 2022 at 05:07:09 UTC, Igor Myronov wrote:
>>> I'm wondering if a such nice programming language should be possible to use on small MCU's like RP2040,PIC32 and so on.
>>> Thanks.
>>
>> Arhggg...32bit controllers! In 2022!
>>
>> There goes any hope of ridding D of its 32bit baggage.
>
> Out of curiosity, what baggage?

Huh? Are you suggesting there's no baggage associated with maintaining 32bit compatability?

Just to start with.. the build and release would be much simpler, for example.

As for source.. I expect you're in a better postion than I, do identify that baggage.

Of course if 'real' D users are using 32bit.. it's probably not correct to consider it 'baggage' as such. But that day is fast approaching ;-)
March 01, 2022
On Tuesday, 1 March 2022 at 07:24:07 UTC, forkit wrote:
> On Tuesday, 1 March 2022 at 05:07:09 UTC, Igor Myronov wrote:
>> I'm wondering if a such nice programming language should be possible to use on small MCU's like RP2040,PIC32 and so on.
>> Thanks.
>
> Arhggg...32bit controllers! In 2022!
>
> There goes any hope of ridding D of its 32bit baggage.

32 bit has smaller codegen, is less complex in PCB design, HW interfaces and driver development, more energy efficient, physically smaller, runs cooler, generally runs faster and is a cheaper component.

It does depend on the project but in the last decade where I work we have had only 1 project using a 64-bit micro. The rest have been 32 bit and two or three 8-bit devices. We have a 8-bit project running atm, which has been really fun to work on!


We surveyed D and had to turn it down unfortunately because it wasn't suitable for micro development at the time. We may revisit, but currently C++17 & C++20 dominate with support on some projects from micropython, CPython and Go. We also surveyed Rust and found the cognitive load for old embedded devs led to more bugs, sure we had fewer memory issues but the memory safety of Rust leaks into the code like Perl noise. Our devs didn't like that because the code was too hard to grok and reason about on the page. I am sure they would have gotten used to it but it wasn't worth the investment when we have Go and C++20.
March 01, 2022
On Tuesday, 1 March 2022 at 22:22:11 UTC, norm wrote:
>
> It does depend on the project but in the last decade where I work we have had only 1 project using a 64-bit micro. The rest have been 32 bit and two or three 8-bit devices. We have a 8-bit project running atm, which has been really fun to work on!
>

It's interesting to see people talking about hardware ;-)

I guess those of us who program at a higher-level (of abstraction), often forget that:

"There isn't any software! Only different internal states of hardware. It's all hardware! It's a shame programmers don't grok that better."

March 01, 2022
On Tue, Mar 01, 2022 at 10:43:38PM +0000, forkit via Digitalmars-d wrote:
> On Tuesday, 1 March 2022 at 22:22:11 UTC, norm wrote:
> > It does depend on the project but in the last decade where I work we have had only 1 project using a 64-bit micro. The rest have been 32 bit and two or three 8-bit devices. We have a 8-bit project running atm, which has been really fun to work on!
[...]
> It's interesting to see people talking about hardware ;-)
> 
> I guess those of us who program at a higher-level (of abstraction),
> often forget that:
> 
> "There isn't any software! Only different internal states of hardware. It's all hardware! It's a shame programmers don't grok that better."

	"People who are more than casually interested in computers
	should have at least some idea of what the underlying hardware
	is like. Otherwise the programs they write will be pretty
	weird."
	-- D. Knuth


T

-- 
Debian GNU/Linux: Cray on your desktop.
March 02, 2022
On Tuesday, 1 March 2022 at 07:24:07 UTC, forkit wrote:
> On Tuesday, 1 March 2022 at 05:07:09 UTC, Igor Myronov wrote:
>> I'm wondering if a such nice programming language should be possible to use on small MCU's like RP2040,PIC32 and so on.
>> Thanks.
>
> Arhggg...32bit controllers! In 2022!
>
> There goes any hope of ridding D of its 32bit baggage.

FYI.

For the MCU market (as we are now in the IoT age), most of the market share will be 32Bit, and even there's a big part is still 16bit (for industrial).

64bit for MCU now shares very very little part.

And for Dlang, the core dev is focusing on only PC and bigger computers, but, we actually have a chance.



« First   ‹ Prev
1 2