Any C programmers wander these lands?

Associate
Joined
25 Jan 2014
Posts
166
Location
127.0.0.1 - Home
Just wondering if there were any C programmers around these parts. Looking to get into embedded device development for a career change and was looking for advice/tips etc. If anyone would be kind enough to share their experiences/thoughts I'd be really greatful.

Thanks.
 
Soldato
Joined
1 Nov 2007
Posts
4,506
Location
England
C was the first programming language I learnt. I haven't used it in years, but I might be able to help.

Personally, though if I were getting into embedded development now, I would use Rust and not C or C++. It has the same (or better) performance, is a safer language (no dangling or NULL pointers, etc.) and is updated regularly. Furthermore, it has full ARM support so you can use it on a Raspberry Pi. The Linux kernel developers are discussing whether to allow it to be included in Linux kernel code so as you can imagine it is gaining quite a large following.

https://www.rust-lang.org/
 
Associate
Joined
20 Jan 2003
Posts
13
Location
Chester
I've not done much C for a while apart from the odd bit of Arduino code.

A colleague of mine just released a new C programming book which looks to be quite good - Effective C: An Introduction to Professional C Programming Paperback.

Another vote for Rust, but from a job perspective C may still be more common at present.
 
Man of Honour
Joined
19 Oct 2002
Posts
27,828
Location
Surrey
I agree with the others about Rust. But as you want to make a career of it then I think C would be safer for now and then learn Rust later.
 
Associate
Joined
9 Jun 2004
Posts
423
The great majority of embedded jobs are still C or C++ but Rust surely does have a future in the space (I'd like to learn it myself at some point!).

It's also useful to get a bit familiar with assembly language (most commonly ARM) because you really do get an appreciation of what's actually going on.
 
Soldato
Joined
17 Jun 2012
Posts
11,111
Assembly really makes my eyes glaze over :)

I never did learn assembly but thought it looked cool. If you were proficient in it in the 80s and some 90s you could have done alright making games for the zx spectrum.

I only say done alright as apparently in those days your manager/publisher or what ever you call them only paid their programmers about 2% of the takings. How things have changed.
 
Associate
Joined
25 Jan 2014
Posts
166
Location
127.0.0.1 - Home
The great majority of embedded jobs are still C or C++ but Rust surely does have a future in the space (I'd like to learn it myself at some point!).

It's also useful to get a bit familiar with assembly language (most commonly ARM) because you really do get an appreciation of what's actually going on.

Thanks I'll look into reading up on the Arm architecture.

C was the first programming language I learnt. I haven't used it in years, but I might be able to help.

Personally, though if I were getting into embedded development now, I would use Rust and not C or C++. It has the same (or better) performance, is a safer language (no dangling or NULL pointers, etc.) and is updated regularly. Furthermore, it has full ARM support so you can use it on a Raspberry Pi. The Linux kernel developers are discussing whether to allow it to be included in Linux kernel code so as you can imagine it is gaining quite a large following.

https://www.rust-lang.org/

Oh I thought Linus was totally against Rust, thanks for the heads up.
 
Soldato
Joined
13 Jan 2003
Posts
21,182
Just wondering if there were any C programmers around these parts. Looking to get into embedded device development for a career change and was looking for advice/tips etc. If anyone would be kind enough to share their experiences/thoughts I'd be really greatful.

Are you a developer already?

I used to write 6052 assembler back at school, ARM code back in the 90s, C/C++/Java and many others plus embedded with ARM, Blackfin etc. I used to be a developer but left that back in 2005 as a day job, moving into product and management. I also have a degree in software engineering specialising in parallel and distributed systems (we used to use 68000 embedded systems, I used to code ARM for RISCOS on the side).

One cheap way to start coding embedded is use an Arduino - it allows you play and pick up before moving to the lower levels. An ARM based Arduino or a uboot ARM based chip is also another option. uCLinux and many other OSes such as realtime OSes exist. So embedded is rarely coding on metal nowadays. You'll learn a lot about the compiler toolchain too for targeting the architecture.

I would study concurrency systems - this should help you with async, interrupts, parallel processing, and general concurrency theory in systems. I don't expect you to go down to mathematically defining and proving the validity of the system states as we had to (think ADA/formal methods mixed with concurrency) but it would be good for you to understand theory, understand architecture support and from that firm footing into the embedded OS and FPGAs etc.

You can get a cheap FPGA with an ARM core built in - allowing you to combine the two but you'll need an oscilloscope/logic analyser, JTAG, UART/RS232 to USB if you're going down to this level.

K&R C is still a good starting point for C.
Straustrup for C++

There's a couple of books on good programming style for C and C++ that focus on not falling into the bad programming practices that lead to serious issues.

Most embedded will operate in C, few will operate with assembler. However I agree the ARM assembler is one of the nicest to work with.
 
Last edited:
Associate
Joined
15 Sep 2005
Posts
1,739
If you want to tinker with C in a lowish resource environment, get an Arduino or the new Raspberry Pi Pico.

I ordered 3 Picos yesterday and they turned up today. Totally no idea what I’m going to use them for but 3 quid each and I'm a sucker for small computers. Makes me all nostalgic for my days as an engineer.
:D
 
Top Bottom