13 ms·
A guide to getting started with embedded systems
- Simon_O_Rourke 4y agoStarted doing a Masters in embedded software design a couple of years ago, and I could condense this guide into a more succinct explanation. Getting started with embedded systems is being repeatedly told "you're wrong" or "that won't work" until you give up and do something else.
- omniscient_oce 4y agoYou could say that about almost anything difficult that requires a lot of feedback and/or practice.
- galoisgirl 4y ago> Getting started with embedded systems is being repeatedly told "you're wrong" or "that won't work" until you give up and do something else. I had no idea I was doing embedded systems for so long.
- ocimbote 4y agoThe hard part about getting started with embedded systems is that the intersection of what you have, what you can do with it, what you know you can do with it and what you actually want to do is most likely empty.
- stephen_g 4y agoCan you elaborate? I don't understand what you mean (as somebody with 10+ years in embedded software + electronics space).
- astrobe_ 4y agoCertainly the real embedded world, which is beyond embedded "toys" [1], can be a cultural shock when you come from general CS. And indeed, just like "making games" can be attractive for young people but far less so as an actual job (from what I've heard), embedded can be fun when playing with IoT-like toys, but it actually needs a lot of patience and tenacity when you do it as a job (from experience). [1] No disdain here. Those MCUs and SoCs are used in actual products, but here they are not used "seriously".
- skybrian 4y agoThis guide should point people at a better board than an Arduino Uno. At least recommend something with a 32 bit processor. This board looks good for a beginner since it has interesting sensors built in: https://www.adafruit.com/product/3333 https://www.adafruit.com/product/3333 Shopping for electronic parts is kind of involved actually. It seems like a kit with a bunch of basic electronic components would be a good idea.
- RealityVoid 4y agoI think the critical part is not the 32bit thing, but the lack of a proper JTAG debugger on the arduinos. A debugger would give much better insight to what is happening on the board and the moment I saw a proper debugger and was able to step from the first instruction to my code was the moment I "got" microcontrollers. I know a lot of people hate debuggers, but the information they provide is extremely useful.
- flyingcircus3 4y agoI think Arduino hardware is a great place to start with embedded, specifically AVRs and avr-gcc. For one, there is a huge amount of daughterboards/shields because of the size of the userbase and common pinouts. Most importantly, devices like the ATMEGA328 (probably the most common arduino chip) are much simpler/smaller than just about any ARM device. There are less than 100 peripheral registers in an ATMEGA328. The peripherals have far less options, and are simpler to configure. You can also do real debugging on AVRs. I believe its not actually JTAG, but you can still use breakpoints, watch variables, inspect memory, and step through code.
- joshvm 4y agoIt's called the Program and Debug interface and uses two wires (PDI/O). That's for xMega though. There's also debugWire (one wire). But many chips also support JTAG as well (for both programming and debugging as opposed to using the ISP). https://microchipsupport.force.com/s/article/On-chip-debugging-with-AVR https://microchipsupport.force.com/s/article/On-chip-debuggi... The official 328 breakout board uses debugWire I think, but you get a nice USB interface. I recommend the dev boards, they're very cheap and quite capable (all pins broken out, prototyping areas, usually a few LEDs and you can use the debugger). They also have a footprint for arduino Shields! https://www.microchip.com/en-us/development-tool/ATMEGA328P-XMINI https://www.microchip.com/en-us/development-tool/ATMEGA328P-... Watching variables is flaky in my experience, but hardware breakpoints and memory inspection work fine.
- ethbr0 4y agoSomething I never understood about embedded systems work: why is the pay so bad? Maybe I was just looking at the wrong job listings, but the technical difficulty (relatively low-level programming, manual memory management, dealing with janky firmware, antiquated toolchains, and incomplete documentation) seemed much harder than the compensation being offered. At least in comparison to other types of coding you could be paid to do. The only answer I could come up with was that unit profit margin * sales volume imposed a much lower cap, relative to pure software products?
- Cthulhu_ 4y agoWhat is the pay like for the "hardware" side of these products, that is, ICB design and the like? I mean as far as I know there's not nearly as much people in that industry now compared to software development so I would assume prices go up... but with tons of international competition, price will go down. (competition as in... people will happily take Chinese designed circuits or whatever, but not so much software.
- kevin_thibedeau 4y agoIt's no better. Part of the low pay, relative to pure software, is the much greater head count for all the tasks involved in designing and manufacturing physical goods.
- polalavik 4y agoI'm an EE, and yeah, I don't get why the pay in the field is so bad. The stakes are higher too. If I mess something up I blow a very very costly PCB or even worse - an ASIC. If a software dev messes up it can cause millions of dollars of damage, but for the most part you can ship half-baked projects and patch them up as you go. You just can't do that in EE.
- cinntaile 4y agoR&D is more expensive, fixing errors is more expensive. It doesn't scale like software does. You want to produce 100x more product? You'll need a big organisation compared to a software company.
- flyingcircus3 4y agoI'm an embedded developer, and I've recently started teaching a coworker about microcontrollers. I think it's most helpful to first understand the basics of digital electronics. Transistors can be wired together to create logic gates, and logic gates can be wired together to create flip flops. A flip flop can be thought of as a single bit of RAM. Logic gates and flip flops can be used to create all sorts of useful circuits like counters, shift registers, adders, multipliers, multiplexers, etc. With this foundation, one can understand a microcontroller as a big digital circuit. A CPU executes instructions by using a digital circuit. The instruction's op code is selecting the appropriate circuit to operate on the instruction's operands. Microcontrollers also have peripherals like timers, serial communications (spi, i2c, uart), and analog to digital converters. All of these are digital circuits that are configured by writing bytes to registers. Those registers can be thought of as the inputs and outputs of those circuits, just as if they were built with discrete flip flops and logic gates. In fact, many microcontroller datasheets provide diagrams of the logic circuitry for these peripherals. Once you can truly understand how the hardware operates, writing the code to configure and operate that hardware is pretty straightforward.
- uoaei 4y agoApproximately how long does a curriculum like that take?
- burnished 4y agoYou would cover all of that material in an intro to digital logic course (no prereqs). I found it a very enjoyable topic to learn. I don't think it would be too difficult to learn on your own. I would try to find a course that included a lab component, testing things out on a bread board is very fun. Sole caveat; debugging circuits can be a challenge if you don't have anyone to help and you're learning.
- michaelt 4y agoYou say "no prereqs" but I can assure you, it takes more than a single intro course to go from "I don't know what programming is, or the difference between voltage and current" to understanding a microcontroller at a logic gate level.
- Linda703 4y ago[dead]
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- cue_the_strings 4y agoAs a recovering embedded engineer (though I am a CS grad), I strongly suggest noone enter the field: the pay is miserable, the job market is saturated with EE grads who wouldn't be able to do regular development without a major time investment. I'm switching to full-time C++ backend and GUI development (so far it was 70% embedded and 30% this. I find that there is much more complexity in developing server-client systems, which optionally integrate with other systems, than it is to write low level code (maybe I'm just good at writing low level code). It's more intelectually rewarding, and you get to use higher level concepts. There's always room for advancement and computer programming is deep in a way that embedded engineering never will be. I've worked on embedded systems for 6 years and I've tried pretty much everything there is to try, from the lowest level to graphics from scratch, RTOS development and networking.
- triyambakam 4y agoI'd read a blog about your experience
- not_the_fda 4y agoI agree, I've done decades of embedded and more think client scientific computing, going back and forth between the two. Embedded pay isn't worth the pain of fighting hardware and working with people that don't know how to write code, writing code.
- ca01an 4y agoWhat would you suggest they study in order to learn how to write code properly? I've been working in chip design for a few years (writing verilog code instead of software code) but I'm thinking of trying to make a move into the software world
- JimBlackwood 4y agoDo you have some info on C++ backend development? What is there to look for? I’ve been looking to get into a more low level development job.
- opheliate 4y agoIt's a bold move to put Learn C the Hard Way as the only book recommendation for learning C, haha. This article seems like a good jumping-off point. I would be interested to see some examples of well-written embedded software which are sufficiently limited in scope that a beginner can feasibly grok the whole codebase.
- donquichotte 4y agoFor well-written embedded software (processor peripheral drivers and OS concepts) I can recommend ChibiOS [1] and libopencm3 [2]. [1] https://github.com/ChibiOS/ChibiOS https://github.com/ChibiOS/ChibiOS [2] https://github.com/libopencm3 https://github.com/libopencm3
- tempodox 4y agoAs for learning C, I like to recommend Modern C: https://gustedt.wordpress.com/2019/09/18/modern-c-second-edition/ https://gustedt.wordpress.com/2019/09/18/modern-c-second-edi... There are also printed versions.
- chasd00 4y agoI do embedded stuff from time to time in the amateur rocketry hobby. The hardest part for me was getting the initial tool chain setup from scratch. I wanted to do it the way the “pros” did it with C, make, a compiler, and a loader no training wheels. Going from zero tools/code to a blinking led (the hello word of embedded) was pretty tough. It never dawned on me that different buses run at different speeds and you have to literally setup the clocks. Heh and before that you have to load the assembly to jump to the address where main() is located (basically your own boot loader). I wouldn’t say it’s harder than web dev per se but it’s just very different. Then I just bought a feather from Adafruit, started using micropython, and never looked back. Much better, although a buddy of mine holds his nose whenever I talk about it.
- smarx007 4y agoPros often use commercially licensed IDEs like Keil or IAR Workbench and a bunch of other tools that only run on Windows (no matter how much they dislike Windows personally). Setting up a toolchain from scratch sounds like what hackers (i.e. those who are not professional embedded devs getting paid for such work) would do.
- ChuckNorris89 4y agoExactly. Setting up your GNU based embedded toolchains and make-files from scratch is something that hackers/hobbyists do. In production, where you have deadlines to build firmware that is set to ship on millions of units, and your company's future is on the line, you just buy how many Windows Keil/IAR licenses you need, and get on with your work, regardless of how you feel about proprietary software.
- RealityVoid 4y agoCurious if you work in the field. Because in my experience, it's not like that at all. YMMV, I guess.
- deleted 4y ago[deleted]
- deleted 4y ago[deleted]
- contingencies 4y agoSoftware world founder from the west in China doing robotics. Spent half the day churning out boards for a new version of a nontrivial mechanical assembly, half the day cutting metal and doing mechanical, half the day dealing with supply chain and half the day on business crap. Currently in a bar at 10:30PM and just knocked off outstanding supply chain work. Those parts ETA Sunday/Monday. Thinking I will work tomorrow because I'm excited to see some really cool stuff coming together. Seven years and counting! Hahaha. I am become rabbit, digger of holes. Seriously though, there's more to work than immediate payment.