A Platform Attribute Certificate Creator for the ESP32 microcontroller.
- Download the latest release of the official PACCOR repository
- Clone this repository and copy the contents to a new folder in "{HOME}\paccor\scripts\esp" named "esp"
The paccor project structure should look as follows:
├── bin Original [PACCOR](https://github.com/nsacyber/paccor/releases/) repository contents ├── docs ├── lib └── scripts ├── allcomponents.sh ├── get_ek.sh ├── ..... ├── smbios.sh ├── esp NEW folder with contents of this repository ├── allcomponents.py The Python log parsing module ├── CMakeLists.txt Gets automatically generated on first run ├── esp_logfile.txt Gets automatically generated on first run ├── pc_certgen.ps1 Main entrypoint for Windows machines ├── pc_certgen.sh Main entrypoint for Linux/MacOS machines ├── sdkconfig Gets automatically generated on first run └── main ├── allcomponents.c C module for extracting data from the ESP32 ├── allcomponents.h Corresponding header file ├── CMakeLists.txt Gets automatically generated on first run ├── conf.c C module for Wifi, Bluetooth, NVS initializations └── conf.h Corresponding header file └── windows ├── allcomponents.ps1 ├── get_ek.ps1 ├── ..... └── smbios.ps1
- Download and install the ESP-IDF (Espressif IoT Development Framework)
- Download and install the dependencies
- Python>=3.8 and python-pip
- Git
- CMake
- Set the variables in the pc_certgen.sh or pc_certgen.ps1 script depending on your OS
- Set the ESPRESSIF_IDF_HOME path variable (installation path of your ESP-IDF)
- Set the ESPRESSIF_IDF_HOME path variables ("{HOME}\paccor\scripts\esp")
- Adjust the certificate parameters (such as serial number and validity)
- Adjust the ESP-specific variables such as baud rate, serial port name and target device type
- Extend/amend the ESP-specific sdkconfig variables if needed
- Adjust the partition table CSV file, the sdkconfig file and generate a new secure boot signing key.
- Remove the pc_testgen directory (this is just a sample build)
- Run pc_certgen.ps1 or pc_certgen.sh
- Check your hardware connection, are you attached to the USB or UART port?
- Check if your serial port is visible on your Windows machine (Device Manager) or Linux machine (dmesg | grep tty).
- Check your baud rate.
- Did you close your serial monitor terminal window before you tried flashing the ESP again?
- Fork the repository
- Create a new feature branch (
git checkout -b my-feature-branch-name
) - Commit your new changes (
git commit -m 'commit message' <changed-file>
) - Push changes to the branch (
git push origin my-feature-branch-name
) - Create a Pull Request
Parts of the code in the pc_certgen.sh and pc_certgen.ps1 files have been reused from the official paccor repository. Copyright 2024 nsacyber. LICENSE2 applies.
The rest of the project is licensed under the MIT License. Copyright 2024 thomasgruebl. LICENSE applies.