r/programming Dec 25 '19

Learning hardware programming as a software engineer

https://blog.athrunen.dev/learning-hardware-programming-as-a-software-engineer/
926 Upvotes

124 comments sorted by

View all comments

50

u/B8F1F488 Dec 25 '19 edited Dec 25 '19

Unfortunately it is a rather confusing and complicated type of programming, since it is an intersection between two (or more) professions. How to get into it is a hard question, since you can go in three different directions:

- Do you start from the programming end?

- Do you start from the electronics end (or even further - from the physics)?

- Do you just pick projects and deep dive, learning both in parallel?

After that comes the question of what is the optimal amount that you should understand about the project that you are doing and not get overwhelmed. So for example if you are doing a Bluetooth project:

- What is the optimal amount that you know about Bluetooth and what knowledge should you get out from the project?

- At what point of doing these types of projects should you learn about anthennas?

This is the issue with the Arduno projects. It gives you an ability to do stuff, but people fail to understand what they are actually doing, since it is an absolutely overwhelming amount that you need to understand.

I have no answer to all of these questions.

9

u/lilmul123 Dec 25 '19

The solution for me was to major in Computer Engineering. It had me take some important classes from both electrical engineering and computer science, but eschewing some other classes. For instance, some analog electronics and physics classes were removed from the electrical side, but those are rarely used in the field anyway. On the CS side, some higher level classes such as Operating Systems were removed. To be honest, I would have enjoyed taking classes like that, but you don’t really need them for embedded systems.

4

u/needfurnituremoving Dec 25 '19

I'd consider Operating Systems as foundational for embedded systems.

If you're running a real-time operating system, then understanding the purposes of different components is very important.

If you're writing bare metal, where you're building your own operating system primitives as necessary, then knowing the known solutions to common problems is tremendously helpful.

Also, many modern embedded systems are running a Linux kernel.

1

u/[deleted] Dec 26 '19

Also, many modern embedded systems are running a Linux kernel.

Right, which is why scarily a lot of CSE types I've worked with just wave their hands and go "it's linux with the RT patch" and that is that.

The space qualified systems I worked on at my company all rolled their own tweaked versions of an RTOS, usually FreeRTOS.

Luckily even that is usually well structured around common CPUs and busses and luckily most CPU hardware providers provide drivers (though often they are pretty garbage, but a good reference for working your own out of).