Skip to the content
4 layers336.7 × 281.1 mmNsec badge-2026-panel, the printed circuit board in 3D

Nsec badge-2026-panel

nsec/badge-20262

NorthSec badge 2026

Size
336.7 × 281.1 mm
Copper layers
4
Thickness
1.62 mm
Parts
851
Nets
968
Pads
3,275
Tracks, vias
8,712, 1,060
Pours
436
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
3 Aug 2026
Updated
15 Sep 2026

Overview

Nsec badge-2026-panel is an open-source printed circuit board by nsec, from the nsec/badge-2026 repository on GitHub, published under the Apache-2.0 licence. It is a 4-layer board of 336.7 × 281.1 mm with 851 parts on 968 nets, routed with 8,712 tracks and 1,060 vias.

It is built around the VEML6040A3OG, AP2112K-3.3TRG1(MS) and HC-FPC-05-09-24RLTAG, with the ST25R3916-AQWT, TPSMF05CT1G and TYPE-C-31-M-12 among its other parts. Its parts include 300 capacitors, 108 resistors, 52 connectors, 40 diodes and 36 ICs. It belongs with the lEDs and displays boards and the ESP32 boards of this library.

Main components

12

README

README.md

NorthSec Badge 2026 Firmware (ESP32-S3)

Bare-bones firmware scaffold for the NorthSec 2026 CTF badge, targeting ESP32-S3.

Design goals (repo requirements):

  • Arduino framework, but no .ino (pure C++ entrypoint)
  • PlatformIO-based build (produces flashable .bin outputs)
  • Two concurrent firmware images via partitions: conference and ctf
  • A simple serial CLI, including a command to switch which firmware boots next
  • Clear hierarchy separating:
    • lib/core/ → hardware/system modules
    • lib/challenges/ → CTF challenge modules
  • GitHub Actions workflow builds on PR/push to main, and publishes artifacts on version tags

Repo layout

text
src/
  main.cpp                     C++ Arduino entrypoint (no .ino)

lib/
  core/
    cli/                        Serial command line
    system/                     OTA boot selection / dual-firmware helpers
    hardware/                   Hardware abstraction (pins, drivers)
  challenges/
    registry.*                  Challenge init/tick hooks
    example_challenge.*         Placeholder challenge module

partitions/
  badge_factory_ota.csv         Partition table (conference + ctf)

.github/workflows/
  build.yml                     CI build + tag-based release

platformio.ini                  PlatformIO project config

PlatformIO + Arduino (no .ino)

This project uses PlatformIO with the Arduino framework. The entrypoint is src/main.cpp (standard Arduino setup() / loop()), not a .ino.

Dual firmware: conference + ctf

The partition table partitions/badge_factory_ota.csv defines:

  • conference (app) — a "golden" image
  • ctf (app) — an alternate/updated image
  • otadata (data) — controls which app partition boots next

How switching works

Under Arduino-ESP32, you can call ESP-IDF’s OTA APIs. This repo wraps them in:

  • lib/core/system/ota_manager.*

That module provides:

  • core::ota::printBootInfo(Stream&)
  • core::ota::setNextBoot(BootTarget, Stream&)

Serial CLI

The CLI is implemented in lib/core/cli/ and runs over Serial at 115200.

Commands:

  • help
  • info — print running partition and configured boot partition
  • boot conference — set next boot to conference and reboot
  • boot ctf — set next boot to ctf and reboot
  • reboot

Building locally

Prerequisites

  • VS Code with PlatformIO IDE extension installed, OR
  • PlatformIO Core (CLI) installed

Windows Setup (Important!)

This project uses ESP-IDF framework to avoid Windows path-length issues with Arduino-ESP32 SDK extraction.

Before building, set a short PlatformIO core directory to prevent path issues:

powershell
# Set environment variable permanently (restart VS Code after)
setx PLATFORMIO_CORE_DIR C:\pio

Then restart VS Code or your terminal.

First-Time Setup

  1. Clone this repository:

    powershell
    git clone https://github.com/yourusername/badge-2026.git
    cd badge-2026
  2. Set the short core directory (Windows only, see above)

  3. Open the project in VS Code with PlatformIO extension, or use CLI

Build

In VS Code: Click the PlatformIO "Build" button (checkmark icon) in the bottom toolbar

Or via CLI:

powershell
# Build for conference partition (default)
C:\pio\penv\Scripts\platformio.exe run -e esp32-s3-devkitc-1-conference

# Or if platformio is in PATH
pio run

First build will download Arduino-ESP32 framework and toolchains. Subsequent builds are much faster.

Dual Firmware Build

The badge uses a conference + CTF partition layout for dual-firmware boot:

  • conference partition (0x10000) - Conference/stable image
  • ctf partition (0x150000) - CTF challenges image

To flash both partitions:

powershell
# 1. Upload to conference partition
C:\pio\penv\Scripts\platformio.exe run -e esp32-s3-devkitc-1-conference -t upload

# 2. Upload the CTF firmware to ctf partition
C:\pio\penv\Scripts\platformio.exe run -e esp32-s3-devkitc-1-ctf -t upload

In VS Code: Use the environment switcher in the bottom toolbar to select esp32-s3-devkitc-1-conference or esp32-s3-devkitc-1-ctf, then click Upload.

After flashing both, you can use the badge CLI commands to switch between them:

  • boot conference - Set next boot to conference partition
  • boot ctf - Set next boot to ctf partition
  • info - Show current boot partition

Build outputs (including flashable binaries) appear under:

  • .pio/build/<env>/firmware.bin
  • .pio/build/<env>/bootloader.bin
  • .pio/build/<env>/partitions.bin

Flash

If you have a board connected and the correct upload port set:

powershell
pio run -t upload

Monitor

powershell
pio device monitor

Native Simulator

A desktop simulator allows running the badge firmware on your development machine without hardware. Useful for testing CLI commands, debugging, and development.

Prerequisites

  • PlatformIO Core (CLI)
  • GCC with C++17 and pthread support (Linux/macOS)
  • For Windows: WSL recommended

First-Time Setup

Initialize the FreeRTOS submodule:

bash
git submodule update --init --recursive

Build

bash
pio run -e native

Run

bash
./.pio/build/native/program

The simulator presents the same CLI as the real badge. Press Ctrl+C to exit.

CI/CD - GitHub Actions Workflow

Automated Builds

The workflow in .github/workflows/build.yml automatically builds firmware on:

  • Pull Requests targeting main - Build verification
  • Push to main - Build and upload artifacts
  • Version Tags (v*) - Build, create GitHub Release with binaries

What Gets Built

Both firmware variants are built in parallel:

  • Conference firmware (badge-conference.bin) - Conference mode with schedule and social features
  • CTF firmware (badge-ctf.bin) - CTF challenges mode
  • Supporting files: bootloader.bin, partitions.bin

Creating a Release

Step 1: Open a Pull Request

bash
git checkout -b feature-my-changes
# Make your changes
git add .
git commit -m "Add new feature"
git push origin feature-my-changes

Open PR on GitHub targeting main branch. GitHub Actions will build and verify.

Step 2: Merge to Main After review, merge the PR. This triggers a build and uploads artifacts.

Step 3: Create a Release Tag

bash
# Pull latest main
git checkout main
git pull origin main

# Create and push version tag
git tag v1.0.0
git push origin v1.0.0

Or use GitHub's web interface:

  1. Go to repository → Releases → "Create a new release"
  2. Click "Choose a tag" → Type new tag (e.g., v1.0.0) → "Create new tag"
  3. Set release title (e.g., "NorthSec Badge 2026 v1.0.0")
  4. GitHub Actions will automatically build and attach binaries

Release Artifacts

Each release includes:

  • badge-conference.bin - Conference firmware for conference partition
  • badge-ctf.bin - CTF challenges firmware for CTF partition
  • bootloader.bin - ESP32-S3 bootloader
  • partitions.bin - Partition table
  • FLASH_INSTRUCTIONS.txt - Complete flashing guide

Flashing Pre-Built Firmware

Prerequisites

Install esptool:

bash
pip install esptool

Find your serial port:

  • Windows: Check Device Manager → Ports (COM & LPT) → Look for "USB Serial Device" (e.g., COM4)
  • Linux: ls /dev/ttyACM* /dev/ttyUSB* (usually /dev/ttyACM0)
  • Mac: ls /dev/cu.* (look for cu.usbmodem*)

Download Release Files

Go to Releases and download the latest .zip or individual files.

Flash All (Recommended for New Badges)

Flash bootloader, partition table, and both firmware images:

Windows:

powershell
python -m esptool --chip esp32s3 --port COM4 --baud 460800 ^
  --before default_reset --after hard_reset write_flash -z ^
  --flash_mode dio --flash_freq 80m --flash_size 8MB ^
  0x0 bootloader.bin ^
  0x8000 partitions.bin ^
  0x10000 badge-conference.bin ^
  0x150000 badge-ctf.bin

Linux/Mac:

bash
python3 -m esptool --chip esp32s3 --port /dev/ttyACM0 --baud 460800 \
  --before default_reset --after hard_reset write_flash -z \
  --flash_mode dio --flash_freq 80m --flash_size 8MB \
  0x0 bootloader.bin \
  0x8000 partitions.bin \
  0x10000 badge-conference.bin \
  0x150000 badge-ctf.bin

Update Only Firmware (Keep Existing Bootloader/Partitions)

If badges are already initialized, flash only updated firmware:

Conference firmware only:

bash
python -m esptool --chip esp32s3 --port <PORT> --baud 460800 \
  write_flash -z 0x10000 badge-conference.bin

CTF firmware only:

bash
python -m esptool --chip esp32s3 --port <PORT> --baud 460800 \
  write_flash -z 0x150000 badge-ctf.bin

Both firmwares:

bash
python -m esptool --chip esp32s3 --port <PORT> --baud 460800 \
  write_flash -z 0x10000 badge-conference.bin 0x150000 badge-ctf.bin

Verify Flash

Connect to serial console at 115200 baud:

bash
# Windows
python -m serial.tools.miniterm COM4 115200

# Linux/Mac
python3 -m serial.tools.miniterm /dev/ttyACM0 115200

You should see the boot banner and CLI prompt. Type help to see available commands.

Switch Between Firmwares

At the CLI prompt:

  • boot conference - Reboot to conference firmware
  • boot ctf - Reboot to CTF challenges firmware
  • info - Show current running partition

Additional Documentation

Firmware Architecture

Dual-Firmware Design

This badge uses a unique dual-firmware architecture:

  • Conference Partition (0x10000) - Conference mode

    • Boots by default on new badges
    • Contains conference-specific features (schedule, social, etc.)
    • Libraries: core + conference
  • CTF Partition (0x150000) - CTF Challenges mode

    • Accessible via boot ctf command
    • Contains competition challenges (crypto, hardware, etc.)
    • Libraries: core + challenges

Both firmwares share the core library (CLI, OTA management, hardware abstraction) but have completely different feature sets.

Adding New Features

See CONTRIBUTING.md for detailed instructions on adding:

  • Conference modules (conference firmware)
  • Challenge modules (CTF firmware)
  • Core utilities (shared by both)

License

Apache-2.0 (see LICENSE).

Credits

NorthSec CTF badge 2026 is brought to you by the teamwork of:

Special thanks to:

Parts

851
QtyValueFootprintReferences
135NPTHNPTHKiKit_MB_10_1, KiKit_MB_10_2, KiKit_MB_10_3, KiKit_MB_10_4, KiKit_MB_11_1, KiKit_MB_11_2, KiKit_MB_11_3, KiKit_MB_11_4, KiKit_MB_11_5, KiKit_MB_11_6, KiKit_MB_11_7, KiKit_MB_11_8, KiKit_MB_12_1, KiKit_MB_12_2, KiKit_MB_12_3, KiKit_MB_12_4 +119
800.1uFCapacitor_SMD:C_0603_1608MetricC202, C202, C202, C202, C501, C501, C501, C501, C502, C502, C502, C502, C1101, C1101, C1101, C1101 +64
72SK6812SIDE-A_C5378721footprints:LED-SMD_SK6812SIDE-A_C5378721RGB501, RGB501, RGB501, RGB501, RGB502, RGB502, RGB502, RGB502, RGB503, RGB503, RGB503, RGB503, RGB504, RGB504, RGB504, RGB504 +56
561uFCapacitor_SMD:C_0603_1608MetricC1004, C1004, C1004, C1004, C1201, C1201, C1201, C1201, C1202, C1202, C1202, C1202, C1203, C1203, C1203, C1203 +40
4010KResistor_SMD:R_0603_1608MetricR201, R201, R201, R201, R202, R202, R202, R202, R204, R204, R204, R204, R1201, R1201, R1201, R1201 +24
3210nFCapacitor_SMD:C_0603_1608MetricC1001, C1001, C1001, C1001, C1003, C1003, C1003, C1003, C1006, C1006, C1006, C1006, C1009, C1009, C1009, C1009 +16
32Conn_01x01_FemaleTestPoint:TestPoint_Pad_1.0x1.0mmJ1001, J1001, J1001, J1001, J1002, J1002, J1002, J1002, J1003, J1003, J1003, J1003, J1004, J1004, J1004, J1004 +16
32TS-1187A-C-C-Bfootprints:SW-SMD_4P-L5.1-W5.1-P3.70-LS6.5-TL_H1.5SW201, SW201, SW201, SW201, SW202, SW202, SW202, SW202, SW601, SW601, SW601, SW601, SW602, SW602, SW602, SW602 +16
24Graphics, , , , , , , , , , , , , , , +8
242u2FCapacitor_SMD:C_0603_1608MetricC1002, C1002, C1002, C1002, C1005, C1005, C1005, C1005, C1010, C1010, C1010, C1010, C1012, C1012, C1012, C1012 +8
201KResistor_SMD:R_0603_1608MetricR203, R203, R203, R203, R801, R801, R801, R801, R802, R802, R802, R802, R1001, R1001, R1001, R1001 +4
20NCD0805R1LED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderLED201, LED201, LED201, LED201, LED301, LED301, LED301, LED301, LED302, LED302, LED302, LED302, LED1001, LED1001, LED1001, LED1001 +4
165.1KResistor_SMD:R_0603_1608MetricR301, R301, R301, R301, R303, R303, R303, R303, R401, R401, R401, R401, R402, R402, R402, R402
12LXRW0YV600-054footprints:X2SON-4_L0.6-W0.6-P0.40-BLC1025, C1025, C1025, C1025, C1026, C1026, C1026, C1026, C1027, C1027, C1027, C1027
12MBR0530Diode_SMD:D_SOD-123D1201, D1201, D1201, D1201, D1202, D1202, D1202, D1202, D1203, D1203, D1203, D1203
8100KResistor_SMD:R_0603_1608MetricR302, R302, R302, R302, R805, R805, R805, R805
810pFCapacitor_SMD:C_0603_1608MetricC1032, C1032, C1032, C1032, C1035, C1035, C1035, C1035
810uFCapacitor_SMD:C_0805_2012MetricC201, C201, C201, C201, C302, C302, C302, C302
812pFCapacitor_SMD:C_0603_1608MetricC1007, C1007, C1007, C1007, C1008, C1008, C1008, C1008
8150pFCapacitor_SMD:C_0603_1608MetricC1028, C1028, C1028, C1028, C1029, C1029, C1029, C1029
81R5Resistor_SMD:R_0603_1608MetricR1004, R1004, R1004, R1004, R1005, R1005, R1005, R1005
81k8 NFResistor_SMD:R_0603_1608MetricR1002, R1002, R1002, R1002, R1003, R1003, R1003, R1003
8220pFCapacitor_SMD:C_0603_1608MetricC1033, C1033, C1033, C1033, C1034, C1034, C1034, C1034
833pFCapacitor_SMD:C_0603_1608MetricC1023, C1023, C1023, C1023, C1024, C1024, C1024, C1024
84.7uF/50VCapacitor_SMD:C_1206_3216MetricC1210, C1210, C1210, C1210, C1212, C1212, C1212, C1212
847pFCapacitor_SMD:C_0603_1608MetricC1030, C1030, C1030, C1030, C1031, C1031, C1031, C1031
8680pFCapacitor_SMD:C_0603_1608MetricC1021, C1021, C1021, C1021, C1022, C1022, C1022, C1022
8FiducialFiducialKiKit_FID_B_1, KiKit_FID_B_2, KiKit_FID_B_3, KiKit_FID_B_4, KiKit_FID_T_1, KiKit_FID_T_2, KiKit_FID_T_3, KiKit_FID_T_4
8Jumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP1201, JP1201, JP1201, JP1201, JP1202, JP1202, JP1202, JP1202
8MBR120LSFfootprints:SOD-123_L2.8-W1.8-LS3.7-RDD301, D301, D301, D301, D302, D302, D302, D302
8MLJ1608WR27JT000Inductor_SMD:L_0603_1608MetricL1001, L1001, L1001, L1001, L1002, L1002, L1002, L1002
8PM254-2-03-S-8_5footprints:HDR-SMD_6P-P2.54-V-F-R2-C3-LS7.0J701, J701, J701, J701, J702, J702, J702, J702
8U.FL-R-SMT-1_10_Connector_Coaxial:U.FL_Hirose_U.FL-R-SMT-1_VerticalP1001, P1001, P1001, P1001, P1002, P1002, P1002, P1002
40.47Resistor_SMD:R_0603_1608MetricR1202, R1202, R1202, R1202
410uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC802, C802, C802, C802
410uHInductor_SMD:L_Vishay_IFSC-1515AH_4x4x1.8mmL1201, L1201, L1201, L1201
41nFCapacitor_SMD:C_0603_1608MetricC1017, C1017, C1017, C1017
41uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC803, C803, C803, C803
422nFCapacitor_SMD:C_0603_1608MetricC1018, C1018, C1018, C1018
427.12MhzCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1001, Y1001, Y1001, Y1001
4390KResistor_SMD:R_0603_1608MetricR804, R804, R804, R804
44.7uFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC801, C801, C801, C801
44u7FCapacitor_SMD:C_0603_1608MetricC1020, C1020, C1020, C1020
4AP2112K-3_3TRG1footprints:SOT-25-5_L2.9-W1.6-P0.95-LS2.8-BLU301, U301, U301, U301
4Bus_PCI_32bit_Universalfootprints:BUS_PCIJ901, J901, J901, J901
4ESP32-S3-WROOM-1(N16R8)footprints:WIRELM-SMD_ESP32-S3-WROOM-1U201, U201, U201, U201
4GNDTestPoint:TestPoint_Pad_D2.0mmTP203, TP203, TP203, TP203
4HC-FPC-05-09-24RLTAGfootprints:FPC-SMD_24P-P0.50_HC-FPC-05-09-24RLTAGU1202, U1202, U1202, U1202
4IRLML0100TRPBFPackage_TO_SOT_SMD:SOT-23-3Q1201, Q1201, Q1201, Q1201
4SSSS811101footprints:SW-SMD_SSSS811101KEY301, KEY301, KEY301, KEY301
4ST25R3916-AQWTfootprints:QFN50P500X500X100-33N-DU1001, U1001, U1001, U1001
4TPSMF05CT1Gfootprints:SOT-363_L2.0-W1.3-P0.65-LS2.1-BLU402, U402, U402, U402
4TYPE-C-31-M-12footprints:USB-C_SMD-TYPE-C-31-M-12U401, U401, U401, U401
4UART_RXTestPoint:TestPoint_Pad_D2.0mmTP202, TP202, TP202, TP202
4UART_TXTestPoint:TestPoint_Pad_D2.0mmTP201, TP201, TP201, TP201
4VEML6040A3OGfootprints:SENSOR_SMD_VEML6040A3OGU1101, U1101, U1101, U1101
4XDWF-0920-02Pfootprints:CONN-SMD_XDWF-0920-02PU802, U802, U802, U802
4XT4054K421MR-Gfootprints:SOT-23-5_L3.0-W1.7-P0.95-LS2.8-BLU801, U801, U801, U801

More from nsec/badge-2026

8
  • 4 layers159.8 × 139.1 mmNsec badge-2026, the printed circuit board in 3D

    Nsec badge-2026

    nsec/badge-2026

    NorthSec badge 2026

    181 parts2Apache-2.0
  • 2 layers60.6 × 87.3 mmSao Tree panel, the printed circuit board in 3D

    Sao Tree panel

    nsec/badge-2026

    NorthSec badge 2026

    82 parts2Apache-2.0
  • 2 layers94.3 × 60.3 mmSao Tree, the printed circuit board in 3D

    Sao Tree

    nsec/badge-2026

    NorthSec badge 2026

    14 parts2Apache-2.0
  • 2 layers21.2 × 51.7 mmSao Tree leaf, the printed circuit board in 3D

    Sao Tree leaf

    nsec/badge-2026

    NorthSec badge 2026

    9 parts2Apache-2.0
  • 2 layers45.7 × 45.7 mmSao SUN, the printed circuit board in 3D

    Sao SUN

    nsec/badge-2026

    NorthSec badge 2026

    8 parts2Apache-2.0
  • 2 layers32.1 × 37.5 mmSao robotplant, the printed circuit board in 3D

    Sao robotplant

    nsec/badge-2026

    NorthSec badge 2026

    4 parts2Apache-2.0

Similar boards

  • 2 layers42 × 69 mmCardboard, the printed circuit board in 3D

    Cardboard

    mcqn/nfc-st25r3916

    An RFID/NFC reader using the ST Microelectronics ST25R3916 chip

    70 parts11CERN-OHL-S-2.0
  • 4 layers45.5 × 66.7 mmSunshine pcb rounded, the printed circuit board in 3D

    Sunshine pcb rounded

    Nv7-GitHub/sunshine

    The source code and PCB design for my melty brain combat robot, Sunshine!

    54 parts1
  • 2 layers24.1 × 51.3 mmDevboard edgerail, the printed circuit board in 3D

    Devboard edgerail

    rjhsun/stm32f0-devboard

    A minimal development board featuring an STM32F030C8T6

    48 parts1MIT
  • 2 layers50 × 23 mmUSBC 3.3v breadboard power supply, the printed circuit board in 3D

    USBC 3.3v breadboard power supply

    sukhjeetsekhon/KiCad-Projects

    A repository of KiCad projects, PCBs, and modules that I make for fun or utility.

    8 partsMIT
  • 4 layers38.4 × 128.5 mmPlantpal, the printed circuit board in 3D

    Plantpal

    teapotlaboratories/plantpal

    Your pal in plant care

    121 parts98MIT
  • 2 layers173.2 × 54 mmMicrocard, the printed circuit board in 3D

    Microcard

    Volkov997/pen-card

    RF Pentesting tool, but small enough for your wallet. Features: Wifi & Bluetooth, NFC, IR, (Sub Ghz, Planned)

    138 parts5GPL-2.0

Questions

How big is the Nsec badge-2026-panel PCB?

It measures 336.7 × 281.1 mm and has 4 copper layers, 1.62 mm thick.

What parts does the Nsec badge-2026-panel use?

851 parts, built around the VEML6040A3OG, AP2112K-3.3TRG1(MS), HC-FPC-05-09-24RLTAG and ST25R3916-AQWT. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Nsec badge-2026-panel KiCad files?

From the nsec/badge-2026 repository on GitHub, at the commit this page was made from: the board is hardware/badge/panel/nsec-badge-2026-panel.kicad_pcb and its schematic hardware/badge/SAO_Female.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Nsec badge-2026-panel design in my own project?

Its repository publishes it under the Apache-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).