UNL ECE OLED Keychain Project
This repository includes the code and build materials to program the UNL ECE OLED Keychain. UNL Keychain Utility app required to program via USB.
Prerequisites
Visual Studio Code for your system, macOS or Windows, if not already installed:
DownloadNow we need two additional tools, the ARM GCC compiler, and Make.
ARM GCC Compiler
Click the appropriate link to download and install the ARM GCC compiler here for macOS or Windows:
The download may take 30 seconds to a minute. Open the downloaded software and follow the instructions in the installer.
On macOS, after the software install is complete, run this command to add the toolchain to the system PATH:
echo 'export PATH="/Applications/ARM/bin:$PATH"' >> ~/.zprofile && source ~/.zprofile
Make
We will now install the last dependency for this project called Make, which allows us to easily build a binary file for the keychain.
Windows
Open PowerShell and run the following command:
winget install ezwinports.make
macOS
Open Terminal and run the following command:
xcode-select --install
Build
Open VSCode, select File from the top menu bar, and click 'Open Folder...'. Select this repository that you downloaded. You can find the main code in src/main.c, and the file for storing images and GIFs at inc/frames.h.
After any additions are made, open a new terminal in VSCode by selecting the Terminal option from the top menu bar, then select 'New Terminal'. In the terminal type 'make' and click enter to compile, as seen below.
make
If there are no errors, you will see something like this at the bottom of the terminal:
Memory region Used Size Region Size %age Used
FLASH: 62020 B 64 KB 94.64%
RAM: 1548 B 8 KB 18.90%
arm-none-eabi-objcopy -O ihex build/py32-keychain.elf build/py32-keychain.hex
arm-none-eabi-objcopy -O binary -S build/py32-keychain.elf build/py32-keychain.bin
This means that a binary file which includes all code, images, and GIFs has been successfully created that can be flashed to the keychain.