Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Last active January 10, 2020 04:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lupyuen/41fffaddade277d27c48697bca21d837 to your computer and use it in GitHub Desktop.
Save lupyuen/41fffaddade277d27c48697bca21d837 to your computer and use it in GitHub Desktop.

What is "flash memory" / "flashing" / "firmware"?

Inside PineTime is a Microcontroller: Nordic nRF52832. Let's call it nRF52.

The nRF52 Microcontroller contains a CPU (Arm Cortex-M4 with Floating-Point Unit), 64 KB of RAM (Random Access Memory), 512 KB of Flash ROM (Read-Only Memory), plus other components.

Think of the Flash ROM (or Flash Memory) as a USB Drive... We may write data to it, and the data stays there after we power it off.

Flash ROM doesn't disappear like RAM when we power it off. We use Flash ROM on PineTime to store our program code, so that PineTime can run our program every time it's powered on.

Programs stored in Flash ROM are called Firmware.

When we say "Building the Firmware" it means that we are compiling the source code (in C and Rust) to create the Firmware.

When we say "Flashing to PineTime" it means that we are overwriting the Firmware (programs) in Flash ROM with a new version of the Firmware. It's like overwriting our files on a USB Drive with new files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment