firmware-core

Orchestrate Megahub ESP32 firmware development and troubleshooting for PlatformIO builds.

5|2|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/mirkosertic/Megahub --skill firmware-core
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: firmware-core
Source: https://github.com/mirkosertic/Megahub/tree/main/.claude/skills/firmware-core
Command: npx skills add https://github.com/mirkosertic/Megahub --skill firmware-core

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you work safely and efficiently on the Megahub ESP32 firmware by providing the project’s build, architecture, and debugging context in one place.

Core Features & Use Cases

  • PlatformIO and hybrid Arduino + ESP-IDF build guidance for platformio.ini and the pre-build pipeline.
  • Library architecture overview for btremote, commands, configuration, hubwebserver, imu, lpfuart, lua, megahub, portstatus, inputdevices, and statusmonitor.
  • Troubleshooting patterns for BLE race conditions, memory leaks, Lua crashes, IMU init failures, and LEGO device timeouts.
  • Use case: when a build fails, a feature misbehaves, or memory gets tight, this Skill points you to the right subsystem and fix strategy.

Quick Start

Use the firmware-core skill to explain the build process for the current Megahub firmware issue and recommend the most likely debugging steps.

Frequently Asked Questions about firmware-core

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure PlatformIO for ESP32 hybrid Arduino and ESP-IDF builds?

Configuring PlatformIO for ESP32 hybrid builds involves setting up platformio.ini for the Arduino + ESP-IDF framework, utilizing custom partitioning and pre-build scripts to manage the library structure and generate the embedded frontend.

Why does my ESP32 Bluetooth connection drop or hang during runtime?

ESP32 Bluetooth connection drops often stem from BLE race conditions or memory leaks. Debugging requires checking task-safety constraints, analyzing serial logs, and inspecting the btremote subsystem for concurrent access violations.

What is the best way to debug Lua script crashes in ESP32 firmware?

Debugging Lua crashes in ESP32 firmware involves analyzing serial logging output and tracing execution through the lua library subsystem to identify memory constraints or invalid script interactions.

Do I need custom partitioning for ESP32 firmware with an embedded web server?

Custom partitioning is required for ESP32 firmware with an embedded web server to allocate sufficient flash memory for the application, frontend assets, and OTA updates without exceeding default memory constraints.

How do I troubleshoot IMU initialization failures on an ESP32?

Troubleshooting ESP32 IMU initialization failures involves verifying the imu library configuration, checking hardware connections, and reviewing serial logs to detect task-safety issues or sensor timeout patterns.

Can PlatformIO pre-build scripts generate frontend code for ESP32 projects?

PlatformIO pre-build scripts can generate embedded frontend code for ESP32 projects. The build pipeline orchestrates this generation process, integrating the resulting assets into the firmware before compilation.