Re:Discover the world of microcontrollers through Rust
by Bromskloss on Sunday September 17, 2017 @02:30PM
(#15270968)
And you might want to avoid multiplication operations, because the compiler will likely have to implement those in software, which will be slow, and might make your program too large to fit in the memory… :-)
[ Parent
| on HN ]
Re:Discover the world of microcontrollers through Rust
by fulafel on Sunday September 17, 2017 @03:43PM
(#15271317)
This is targeted at cortex m4, arm cores with hardware integer and division (and even integer simd).
Re:Discover the world of microcontrollers through Rust
by Bromskloss on Sunday September 17, 2017 @03:49PM
(#15271347)
Got it. I was thinking of the world of microcontrollers in general.
Re:Discover the world of microcontrollers through Rust
by phkahler on Sunday September 17, 2017 @09:01PM
(#15272656)
As a rule, I now try to avoid anything that isn't 32 bits with hardware multiplier. Unless you need a controller for under 50 cents I don't think that's a high bar any more. Floating point - much as I'd like to make it a minimum requirement I still enjoy doing some math in fixed point.
Oh for the day when RV32IMAF can be considered low end.
Re:Discover the world of microcontrollers through Rust
by Bromskloss on Monday September 18, 2017 @08:53AM
(#15275382)
For me, it's the elegance of making do with the least sophisticated components. Using a microcontroller at all can be seen as bringing out the big guns.
Re:Discover the world of microcontrollers through Rust
by DamonHD on Sunday September 17, 2017 @02:39PM
(#15271023)
The AVRs, at least some of them, have reasonable Flash and RAM and EEPROM (v nice), and a single-instruction multiply. Much nicer than the 8-bit CPUs that I used to program back in days of yore...
Re:Discover the world of microcontrollers through Rust
by emilfihlman on Sunday September 17, 2017 @05:57PM
(#15271917)
>a single-instruction multiply
But not single cycle ;)
This is important!
Re:Discover the world of microcontrollers through Rust
by gh02t on Sunday September 17, 2017 @06:46PM
(#15272125)
MUL/MULS/FMULS are all two cycles, to be exact.
Re:Discover the world of microcontrollers through Rust
by DamonHD on Monday September 18, 2017 @04:26AM
(#15274212)
OK, thank you for the correction!
Still a lot faster than a bunch of shift+add!
Re:Discover the world of microcontrollers through Rust
by Bromskloss on Sunday September 17, 2017 @03:38PM
(#15271294)
Pff, look at the fancy people over here!