You are not Logged In!

Difference between revisions of "Public:Onboarding 2021 - What is Firmware?"

From Illini Solar Car Wiki
Jump to navigation Jump to search
m (Change display title)
 

Latest revision as of 18:33, 15 February 2022


At ISC, we use the term “firmware” to refer to any code that gets executed on the microcontroller units (MCUs for short) on our PCBs. Every major PCB on the car, from the BMS to the dash to the steering wheel, has an MCU that we program to control functions on that PCB.

So how do these MCUs work? Well, an MCU is a very small computer, in the form of a chip, that we use on our PCBs. It doesn’t have an operating system, but it has a CPU and RAM to run executable code. Every MCU we use has a set of pins on it. Take the LPC1519JBD64, an MCU we commonly use, as an example.

LPC1519JBD64, used on the wheel and MCC. Look at all those pins!

These pins do things like provide power/ground and connect the MCU to other chips/components. The fundamental goal of any firmware you write is to work with the necessary pins to send and receive data/commands to other connected chips/components. All the variables, objects, functions and higher-level constructs that you use are meant to help you do that.

You might be familiar with object-oriented languages like Java or Python, especially if you took a computer science class in high school. At ISC, we write our firmware in a similar language called C++. We use C++ because it requires less memory than Java or Python (for various technical reasons) and because there is a set of pre-written C/C++ code libraries called “Mbed OS” that we use which makes it easier to write code for our MCUs. The “mbed” folder that you should have in your MCUXpresso workspace contains these libraries.

Each major PCB (wheel, dash, MCC, etc.) will have its own folder containing all of its firmware.