How sandeepmistry/arduino-nrf5 works
Main Components
a. Hardware Layer:
• nRF5 Microcontroller (nRF51/nRF52/nRF52833)
• External Components (32 kHz crystal - optional)
• Hardware Interfaces (SPI, I2C/Wire, UART)
b. Software Stack:
• Nordic SoftDevice Layer (S110/S130/S132)
• Arduino Core Layer
• User Application Layer
Key Architectural Elements
a. Core Components (cores/nRF5/):
• Base Arduino Classes (Print, Stream, etc.)
• Hardware Abstraction Layer
• Core Utilities (WMath, WString, etc.)
b. Variant Support (variants/):
• Board-specific configurations
• Pin mappings
• Hardware definitions
c. Libraries (libraries/):
• SPI Implementation
• Wire (I2C) Implementation
d. Nordic SDK Components (cores/nRF5/SDK/):
• Device Definitions
• Driver Layer
• CMSIS Support
• Toolchain Support
[User Arduino Sketch]
• ↓
[Arduino API Layer]
• ↓
[Arduino Core Implementation]
• ↙ ↓ ↘
[SPI] [Wire] [UART]
• ↓
[Hardware Abstraction Layer]
• ↓
[Nordic SoftDevice (Optional)]
• ↓
[Nordic SDK Components]
• ↓
[nRF5 Hardware]
Important Relationships
a. Compilation Flow:
• Toolchain integration (gcc-arm-embedded)
• Build process flow
b. Programming Flow:
• Programming interfaces (J-Link, ST-Link V2, CMSIS-DAP)
• SoftDevice flashing path
c. Hardware Interfaces:
• Variant-specific pin configurations
• Peripheral connections