News for hackers. Stuff that matters.
Re:Should you Rust in embedded yet? by pknopf on Wednesday February 28, 2018 @09:46PM (#16489271)
Ah, I forgot about the assembly.

Is assembly important in microcontrollers?

Re:Should you Rust in embedded yet? by viraptor on Wednesday February 28, 2018 @10:25PM (#16489438)
Sometimes. Usually you just write "normal" C, until you realise your single `sprintf` use took 20% of your ROM size. Or until you need some interrupt handler to take no more than N cycles. You probably don't switch to assembly at that point, but you definitely start checking what the compiler output is and where are the bytes/cycles wasted.

Actually writing assembly is more of a last resort time.

Re:Should you Rust in embedded yet? by tluyben2 on Thursday March 01, 2018 @02:53AM (#16490361)
Because of cost we use very constrained microcontrollers; every byte literally counts. In the end it really matters cost wise (in mass production embedded every cent counts as well; using a high spec mcu just costs more) but we had to rewrite from C to assembly to get a few more kb for features in the flash. C++ or Rust are generally not good for the cost of materials.
Re:Should you Rust in embedded yet? by pjc50 on Thursday March 01, 2018 @07:09AM (#16491348)
Writing assembly tends to be restricted to the bits where you need it - special function prologues for interrupt handlers, requiring a particular unusual instruction for something, time-sensitive or cycle-accurate "beam racing" code.

Reading assembly is more useful, especially if your platform's debugger isn't very good.

Re:Should you Rust in embedded yet? by torn_pages on Wednesday February 28, 2018 @09:58PM (#16489327)
I would say it does. I learned microcontroller programming in assembly before I learned about C.