diff --git a/JLINK.md b/JLINK.md new file mode 100644 index 0000000000000000000000000000000000000000..e40dcb6d3ea58d89ceb501367e0e973f2e6b4364 --- /dev/null +++ b/JLINK.md @@ -0,0 +1,40 @@ +# Debugging + +# Cloning the repo +Clone to a known or common directory. +``` +git clone --recurse-submodules https://git.unl.edu/pscalise2/py32-keychain.git +``` + +# Prerequisites +Install [Visual Studio Code](ms-windows-store://pdp/?productid=XP9KHM4BK9FZ7Q) if not already installed. + +Install the Cortext-Debug extension in vscode. See image below. Close vscode when the extension is installed. + + +# Run the setup Puya 32 Environment Setup script (Windows) +First, open Windows Powershell in *Administrator Mode*. This script will install all of the dependencies for the building, flashing, and debugging of the py32f030x8, and the other PY32 chipsets. + +``` +cd py32-keychain\puya-32-environment-setup +powershell -ExecutionPolicy Bypass -File .\py32-env-setup.ps1 --AcceptSEGGERLicense +``` +Once the setup script is complete, restart vscode and open the folder 'py32-keychain'. + +# Build and Program +If the JLink and the target are plugged in you will see the debug panel below. + +1. Select 'Run and Debug' on the side menu. +2. Select 'JLink' from the drop down. +3. Click the green play button. + +This will flash the target, and will begin live debugging. + + +If you want to test compilation of the code without flashing or debugging the target open the terminal in vscode and run: + +``` +make +``` +*** +More information on manual installation can be found at https://github.com/jaydcarlson/py32-template. diff --git a/README.md b/README.md index a04f7f1dd91b4f4b4088b8002781f399f68b3b28..b2988eb6ca132eaafb12ed10a40716f3dd355206 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # UNL ECEN OLED Keychain Project -This repository includes the code and build materials to program the UNL ECEN OLED Keychain. JLink Programmer necessary to target the device. +This repository includes the code and build materials to program the UNL ECEN OLED Keychain. UNL Keychain Utility app required to program via USB. - + # Cloning the repo Clone to a known or common directory. @@ -12,32 +12,32 @@ git clone --recurse-submodules https://git.unl.edu/pscalise2/py32-keychain.git # Prerequisites Install [Visual Studio Code](ms-windows-store://pdp/?productid=XP9KHM4BK9FZ7Q) if not already installed. -Install the Cortext-Debug extension in vscode. See image below. Close vscode when the extension is installed. - -# Run the setup Puya 32 Environment Setup script (Windows) -First, open Windows Powershell in *Administrator Mode*. This script will install all of the dependencies for the building, flashing, and debugging of the py32f030x8, and the other PY32 chipsets. +# Run the setup ``` -cd py32-keychain\puya-32-environment-setup -powershell -ExecutionPolicy Bypass -File .\py32-env-setup.ps1 --AcceptSEGGERLicense -``` -Once the setup script is complete, restart vscode and open the folder 'py32-keychain'. - -# Build and Program -If the JLink and the target are plugged in you will see the debug panel below. -1. Select 'Run and Debug' on the side menu. -2. Select 'JLink' from the drop down. -3. Click the green play button. +``` -This will flash the target, and will begin live debugging. - +# 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. -If you want to test compilation of the code without flashing or debugging the target open the terminal in vscode and run: +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 ``` -*** -More information on manual installation can be found at https://github.com/jaydcarlson/py32-template. \ No newline at end of file +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. + diff --git a/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/Info.plist b/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/Info.plist new file mode 100644 index 0000000000000000000000000000000000000000..601166c169974d0158c40f78d937c0b7be7091ba --- /dev/null +++ b/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/Info.plist @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDisplayName</key> + <string>UNL Keychain Utility</string> + <key>CFBundleExecutable</key> + <string>UNL Keychain Utility</string> + <key>CFBundleIconFile</key> + <string>unlkeychain.icns</string> + <key>CFBundleIdentifier</key> + <string>UNL Keychain Utility</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>UNL Keychain Utility</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>0.0.0</string> + <key>NSHighResolutionCapable</key> + <true/> +</dict> +</plist> diff --git a/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/MacOS/UNL Keychain Utility b/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/MacOS/UNL Keychain Utility new file mode 100755 index 0000000000000000000000000000000000000000..d5f5fac29f4721ff89af3641f13831fff05f24be Binary files /dev/null and b/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/MacOS/UNL Keychain Utility differ diff --git a/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/MacOS/error_log.txt b/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/MacOS/error_log.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/Resources/unlkeychain.icns b/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/Resources/unlkeychain.icns new file mode 100644 index 0000000000000000000000000000000000000000..e9606ff186a093e7198971c89160b5ae28f516ee Binary files /dev/null and b/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/Resources/unlkeychain.icns differ diff --git a/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/_CodeSignature/CodeResources b/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/_CodeSignature/CodeResources new file mode 100644 index 0000000000000000000000000000000000000000..cdec14765af48ca69bb45089dfca4428c8add629 --- /dev/null +++ b/UNL Keychain Utility App/UNL Keychain Utility.app/Contents/_CodeSignature/CodeResources @@ -0,0 +1,128 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>files</key> + <dict> + <key>Resources/unlkeychain.icns</key> + <data> + WF/CGvaGu+iY2rXuIxDTjMZFQZc= + </data> + </dict> + <key>files2</key> + <dict> + <key>Resources/unlkeychain.icns</key> + <dict> + <key>hash2</key> + <data> + /pAgv4tVw8zx1AwotBMXItCrT2cAbgdCbcZ0AZCC/ow= + </data> + </dict> + </dict> + <key>rules</key> + <dict> + <key>^Resources/</key> + <true/> + <key>^Resources/.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^Resources/.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Resources/Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^version.plist$</key> + <true/> + </dict> + <key>rules2</key> + <dict> + <key>.*\.dSYM($|/)</key> + <dict> + <key>weight</key> + <real>11</real> + </dict> + <key>^(.*/)?\.DS_Store$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>2000</real> + </dict> + <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^.*</key> + <true/> + <key>^Info\.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^PkgInfo$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^Resources/</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^Resources/.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^Resources/.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Resources/Base\.lproj/</key> + <dict> + <key>weight</key> + <real>1010</real> + </dict> + <key>^[^/]+$</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^embedded\.provisionprofile$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^version\.plist$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + </dict> +</dict> +</plist> diff --git a/PY32F030_User_Manual.chm b/assets/PY32F030_User_Manual.chm similarity index 100% rename from PY32F030_User_Manual.chm rename to assets/PY32F030_User_Manual.chm diff --git a/assets/new_keychain.jpg b/assets/new_keychain.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e2193a06fa66d78375694c5f4432db9fbbcc63ed Binary files /dev/null and b/assets/new_keychain.jpg differ