...
What firmware is
An overview of our firmware system
How we’re working remotely
What our process for writing firmware is
Just a quick note before we jump into the content. All of our modules assume that you have some familiarity with programming, specifically the C language. You unfortunately won’t be able to do much until you have some familiarity with the language (specifically pointers, functions and structures).
C Language Resources:
Midnight sun specific Intro to C programming (Shoutout Arshan Khanifar)
Interactive tutorial - Learn-C.org. If you’ve programmed before in other languages before, the most important parts for our team are listed below:
...
In our firmware team, we work mainly on writing code for microcontrollers (think Arduino) that control electrical signals or monitor the solar car. Microcontrollers are essentially just computers but much smaller, and directly connected to hardware components.way cooler!
Why does it matter?
Firmware generally has a lot more restrictions than software. The processor we use isn’t (comparatively) very fast and there isn’t much memory available, so our code needs to be simple and not too demanding. We can get around this restriction by breaking the firmware into small projects and running it on different boards, each responsible for controlling a different part of the car. Breaking it down also helps us work on different parts at the same timeprojects in parallel.
Systems overview
Here’s a diagram of the car’s electrical system:
...
If this scares you, don’t worry! It scares us too. Thankfully, implementing what’s in this diagram is the hardware team’s job, not ours!
Hardware and Firmware
Our team coexists with hardware and it is mandatory for you to be interested and willing to learn electronic basics. This is what makes firmware super cool! It isn’t just software and it isn’t just hardware. We bring life to PCBs and give our vehicle functionality.
Systems overview
Here’s a diagram of the car’s electrical system:
...
If this scares you, don’t worry! It scares us too. Thankfully, implementing what’s in this diagram is the hardware team’s job, not ours!
Firmware system overview
...
See, we don’t even need to worry about wires. Much cleaner and easier to understand.
...
Unfortunately, it’s not quite that simple. Some things are really hard to emulate on x86, especially things that are time-sensitive since you don’t know what else your laptop might be doing while you’re running the code. Microcontrollers have internal clocks which may differ from the one on your computer. However, it still gives us enough capability to write code and test our main logic.Also, the hardware is still around, we’re just not close to it anymore. Good thing zoom, discord, and slack all exist! If we want to run our code on real hardware, we just have to call up the hardware member with the board and ask them to run it for us. Yes, this is more inconvenient, but it’s better than showing up a month later without having tested anything at all on hardwarefrom the one on your computer. However, it still gives us enough capability to write code and test our main logic.
Our Process
Writing Code
Our firmware runs in safety-critical situations, and as such it can be dangerous if it goes wrong. To help prevent this we have a structure for creating and testing our firmware.
...