DEV Community

Ivan Delgado
Ivan Delgado

Posted on • Edited on

My Journey into Software Engineering #2: MSP430, Makefiles, and More

In my last post, I shared how my unexpected leap into embedded systems began with some surprising challenges. Since then, I’ve been continuing to learn, make mistakes, and figure things out as I go. This time, I’ve been focusing on working with the MSP430 microcontroller, and as you might guess, the process has been both rewarding and frustrating at times.

One thing I came across recently is a quote from Andrej Karpathy in his interview with Lex Fridman that really resonated with me:

“I feel like there's some sense of determinism about being an expert at a thing. If you spend ten thousand hours of deliberate effort and work, you will become an expert at almost anything.”

That idea has been keeping me motivated, especially when things get overwhelming. And they do—like when I blew up a MOSFET on an interface board. But moments like these are all part of the journey. Here’s an update on what I’ve been learning and working on.

Resources That Have Been Helpful
Intro to Embedded Systems Design w/ MSP430
I found an awesome YouTube playlist that’s perfect for beginners who are trying to learn this stuff.

Embedded System Project Series
Another great resource is this YouTube playlist by Artful Bytes. He builds a sumo bot using the MSP430 and walks through blinking an LED and setting up the environment with both an IDE and terminal (using Makefiles + Toolchain). Since I’m more comfortable with Linux and Vim, I went the terminal route, which was a bit tricky at first, but I eventually got it working.

Using the Terminal, Vim, and Makefiles
I used my Thinkpad with Ubuntu on it to install the MSP430 toolchain, including msp430-elf-gcc, and set up my environment to code in Vim. I’ve also started using Makefiles to flash my code onto the MSP430, and although they’re still a bit intimidating, they offer flexibility that I’m starting to appreciate. I’m also working on understanding how header files function in C/C++, which is still a bit confusing but improving!

C and Assembly: Blinking an LED
After completing the classic blinking an LED project using C, I plan to try the same project in assembly language. I’m really excited to get a deeper understanding of how software interacts with hardware at this low level.

For those working with the MSP430G2553 specifically, I found these documents from Texas Instruments super helpful:

User Guide
Datasheet
Family User Guide

Watchdog Timer Fun
One small but important lesson I learned is about disabling the watchdog timer. I didn’t understand at first why it’s necessary, but after some research, I realized it’s a crucial part of embedded development. If not disabled during development, it can reset your system unexpectedly, especially when you’re just trying to test and prototype. In production, however, it’s essential to ensure your system keeps running smoothly.

Looking Ahead
I’m continuing to work through challenges and learn as I go. Tomorrow I’ll be meeting with the manager at my internship to clarify some things, especially around the communication protocol used by the interface board (SPI, I2C, or simple GPIO analog reads?). I’ve also started looking into libraries for interfacing with ADCs, like gpiozero and gpiod for Python, which seem promising.

I plan to dive deeper into electronics soon, so I’ll probably be picking up a copy of Practical Electronics for Inventors to help me along the way. I’ve heard it’s a must-read for anyone serious about learning electronics.

Staying Motivated
It’s been a challenging journey, but I’m loving every minute of it. Embedded systems are complex but fascinating, and I’m excited to continue learning. I’ll keep sharing updates as I go, and hopefully, my experiences can inspire others to push through the initial hurdles as well.

Top comments (0)