- Fully open toolchain: arm-none-eabi-gcc inside Podman/Docker container - Platform-agnostic build via justfile (auto-detects podman vs docker) - CMake + Ninja build system with arm-none-eabi toolchain file - nRF52840 linker script and startup with full 64-entry vector table - Register access via typed bitfield unions (include/regs.h) - FHSS channel sequencer: AES-128-ECB PRNG over 40 channels (2402-2480 MHz) - Low-power sleep via SYSTEM_ON WFI + GPIOTE wakeup on button press - Vendor deps as shallow git submodules: nrfx, CMSIS_5, tiny-AES-c
67 lines
1.3 KiB
Plaintext
67 lines
1.3 KiB
Plaintext
/*
|
|
* nRF52840 — no SoftDevice
|
|
* Flash: 1 MB @ 0x00000000
|
|
* RAM: 256 KB @ 0x20000000
|
|
*
|
|
* Before first flash, erase the entire chip to remove any SoftDevice:
|
|
* pyocd erase --target nrf52840 --chip
|
|
*/
|
|
|
|
MEMORY
|
|
{
|
|
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 1024K
|
|
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 256K
|
|
}
|
|
|
|
/* stack grows downward from the top of RAM */
|
|
_estack = ORIGIN(RAM) + LENGTH(RAM);
|
|
|
|
ENTRY(Reset_Handler)
|
|
|
|
SECTIONS
|
|
{
|
|
/* vector table must be at the start of Flash */
|
|
.isr_vector :
|
|
{
|
|
KEEP(*(.isr_vector))
|
|
. = ALIGN(4);
|
|
} > FLASH
|
|
|
|
/* code and read-only data */
|
|
.text :
|
|
{
|
|
*(.text .text.*)
|
|
*(.rodata .rodata.*)
|
|
. = ALIGN(4);
|
|
_etext = .;
|
|
} > FLASH
|
|
|
|
/* load address of .data in Flash — Reset_Handler copies from here */
|
|
_sidata = LOADADDR(.data);
|
|
|
|
/* initialized variables: stored in Flash, run from RAM */
|
|
.data :
|
|
{
|
|
_sdata = .;
|
|
*(.data .data.*)
|
|
. = ALIGN(4);
|
|
_edata = .;
|
|
} > RAM AT > FLASH
|
|
|
|
/* zero-initialized variables: Reset_Handler clears this region */
|
|
.bss (NOLOAD) :
|
|
{
|
|
_sbss = .;
|
|
*(.bss .bss.*)
|
|
*(COMMON)
|
|
. = ALIGN(4);
|
|
_ebss = .;
|
|
} > RAM
|
|
|
|
/DISCARD/ :
|
|
{
|
|
*(.ARM.exidx*)
|
|
*(.gnu.linkonce.armexidx.*)
|
|
}
|
|
}
|