ncs-mem

Optimize and debug memory usage in Nordic nRF Connect SDK applications.

1|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/chshzh/charlie-skills --skill ncs-mem
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ncs-mem
Source: https://github.com/chshzh/charlie-skills/tree/main/Developer/ncs/mem-opt
Command: npx skills add https://github.com/chshzh/charlie-skills --skill ncs-mem

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimizes and debugs memory usage in Nordic nRF Connect SDK (NCS) applications, helping teams reduce RAM/Flash footprint and prevent memory-related crashes.

Core Features & Use Cases

  • Memory profiling and analysis: guidance to generate memory reports, examine flash and RAM usage, and locate hotspots.
  • Heap and stack optimization: strategies to size heaps, adjust stack usage, and minimize fragmentation.
  • Debugging memory issues: steps to detect stack overflows, memory leaks, and heap exhaustion, with recommended tooling.
  • Use Case: For a complex NCS project using WPA/WPA2, size memory to meet TLS requirements and ensure stable AP bring-up.

Quick Start

Follow the workflow to start memory analysis: build with west, generate rom_report and ram_report, and run Puncover.

Frequently Asked Questions about ncs-mem

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

FAQPage Schema
How do I optimize memory usage in Nordic nRF Connect SDK projects?

To optimize memory in Nordic nRF Connect SDK projects, build with west, generate rom_report and ram_report, and run Puncover to locate flash and RAM hotspots for reduction.

What's the best way to debug stack overflows and heap exhaustion in Zephyr?

Debugging stack overflows and heap exhaustion in Zephyr involves using the thread analyzer to detect memory leaks, sizing heaps properly, and adjusting stack usage to prevent crashes.

How do I generate memory reports to analyze flash and RAM usage in NCS?

Generate memory reports in NCS by building with west and producing rom_report and ram_report outputs, which detail flash and RAM usage to identify hotspots.

Can I use Puncover to examine memory hotspots in embedded projects with tight RAM budgets?

Yes, Puncover can be used to examine memory hotspots in embedded projects where RAM and Flash budgets are tight, helping identify areas for memory optimization.

Why does my NCS application crash during WPA/WPA2 AP bring-up with TLS requirements?

NCS applications crash during WPA/WPA2 AP bring-up when memory is not sized to meet TLS requirements; analyze heap usage and adjust sizing to ensure stable operation.

When do I need to adjust heap sizing and stack protection for memory-related crashes?

Adjust heap sizing and stack protection when memory-related crashes occur, using memory profiling to detect heap exhaustion and minimize fragmentation in Zephyr applications.