Hi,
I have a custom board for the nRF54L15. I have already implemented LEDs and a button, which work fine.
But I cannot get the PWM peripheral working, and I do not understand why.
When I try to build my Zephyr project, I get a linker error and the build fails.
This is the error I get:
app/libapp.a(hw_init.c.obj): in function `hw_init`:
C:/project.../src/HW/hw_init.c:38: undefined reference to `__device_dts_ord_30'
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Support information
// IMPORTANT: The following data can contain sensitive or confidential information about your environment.
// If you do not want others to see this information, make sure to remove it before sharing the data.
// For help and support, visit Nordic Semiconductor's DevZone at https://devzone.nordicsemi.com/.
{
"platform": {
"os": "win32",
"osVersion": "Windows 11 Pro",
"osKernel": "10.0.26100",
"vscode": "1.101.0",
"electron": "35.5.1",
"node": "v22.15.1"
},
"system": {
"date": "2025-06-13T06:04:28.863Z",
"vscodeRoot": "c:\\...\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
"nrfConnectForDesktopInstalled": true,
"vscodeUptime": "00:14:56",
"osUptime": "16:19:12",
"cpu": "12th Gen Intel(R) Core(TM) i7-1260P"
},
"workspace": {
"name": "ZoneGuard",
"workspaceFile": null,
"folders": [
"c:\\project"
]
},
"sdks": [
{
"version": "v3.0.1",
"path": "c:\\ncs\\v3.0.1"
}
],
"activeBuild": "c:\\project\\build\\ZoneGuard",
"apps": [
{
"workspace": "c:\\project",
"uri": "c:\\project",
"buildConfigurations": [
{
"id": "c:\\project\\build",
"name": "build",
"boardId": "ropixon_ZG_v5_0/nrf54l15/cpuapp",
"type": "Sysbuild",
"isChild": false,
"isStale": false,
"taskBindings": {
"build": [],
"pristineBuild": [],
"flash": [],
"eraseAndFlash": []
},
"sdk": "c:\\ncs\\v3.0.1",
"toolchain": "nRF Connect SDK Toolchain v3.0.1"
}
]
}
],
"toolchains": [
{
"version": "3.0.1",
"path": "c:\\ncs\\toolchains\\0b393f9e1b"
},
{
"version": "3.0.0",
"path": "c:\\ncs\\toolchains\\0b393f9e1b"
},
{
"version": "2.4.2",
"path": "c:\\ncs\\toolchains\\31f4403e35"
}
],
"connectedDevices": [],
"tools": {
"C:\\ncs\\toolchains\\0b393f9e1b\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.17.0",
"C:\\Program Files\\SEGGER\\JLink_V818\\JLink.exe": "8.18",
"C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.24.2",
"C:\\Users\\ropek\\nrfutil.exe": "8.0.0",
"C:\\ncs\\toolchains\\0b393f9e1b\\cmake": "3.21.0",
"C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin\\Scripts\\west.exe": "1.2.0",
"C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin\\python.exe": "3.12.4",
"C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin\\ninja.exe": "1.10.2",
"C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin\\gperf.exe": "3.1",
"C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin\\dtc.exe": "1.4.7",
"C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin\\gn.exe": "2223",
"C:\\ncs\\toolchains\\0b393f9e1b\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
"arm-gdbPath": "c:\\ncs\\toolchains\\0b393f9e1b\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe",
"riscv-gdbPath": "C:\\ncs\\toolchains\\0b393f9e1b\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin\\riscv64-zephyr-elf-gdb.exe"
},
"nrfutil": {
"nrfutil-device": {
"version": "2.8.8",
"binPath": "c:\\Users\\ropek\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2025.5.152-win32-x64\\platform\\nrfutil\\bin\\nrfutil-device",
"jlinkInfo": {
"name": "JlinkARM",
"version": "JLink_V8.18",
"versionFormat": "string"
}
},
"nrfutil-sdk-manager": {
"version": "1.3.0",
"binPath": "c:\\Users\\ropek\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2025.5.152-win32-x64\\platform\\nrfutil\\bin\\nrfutil-sdk-manager"
}
},
"environment": {
"westEnv": {
"HOME": "C:\\Users\\ropek",
"HOMEDRIVE": "C:",
"HOMEPATH": "\\Users\\ropek",
"PATH": "C:\\ncs\\toolchains\\0b393f9e1b;C:\\ncs\\toolchains\\0b393f9e1b\\mingw64\\bin;C:\\ncs\\toolchains\\0b393f9e1b\\bin;C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin;C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin\\Scripts;C:\\ncs\\toolchains\\0b393f9e1b\\opt\\nanopb\\generator-bin;C:\\ncs\\toolchains\\0b393f9e1b\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;C:\\ncs\\toolchains\\0b393f9e1b\\opt\\zephyr-sdk\\riscv64-zephyr-elf\\bin;c:\\Users\\ropek\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2025.5.152-win32-x64\\platform\\nrfutil\\lib\\nrfutil-sdk-manager;C:\\Program Files (x86)\\STMicroelectronics\\stlink_server;C:\\ST\\STM32CubeCLT_1.18.0;C:\\ST\\STM32CubeCLT_1.18.0\\CMake\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\Ninja\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\GNU-tools-for-STM32\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\STLink-gdb-server\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\STM32CubeProgrammer\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\TortoiseGit\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Git\\cmd;C:\\Users\\ropek\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\;C:\\Users\\ropek\\AppData\\Local\\Programs\\Python\\Python312\\;C:\\Users\\ropek\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\ropek\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\ropek\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\ropek\\AppData\\Local\\gitkraken\\bin;C:\\Users\\ropek\\;;C:\\Users\\ropek\\.lmstudio\\bin",
"ZEPHYR_BASE": "c:\\ncs\\v3.0.1\\zephyr",
"ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
"ZEPHYR_SDK_INSTALL_DIR": "C:\\ncs\\toolchains\\0b393f9e1b\\opt\\zephyr-sdk",
"PYTHONPATH": "C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin;C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin\\Lib;C:\\ncs\\toolchains\\0b393f9e1b\\opt\\bin\\Lib\\site-packages"
},
"inherited": {
"HOME": "C:\\Users\\ropek",
"HOMEDRIVE": "C:",
"HOMEPATH": "\\Users\\ropek",
"Path": "C:\\Program Files (x86)\\STMicroelectronics\\stlink_server;C:\\ST\\STM32CubeCLT_1.18.0;C:\\ST\\STM32CubeCLT_1.18.0\\CMake\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\Ninja\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\GNU-tools-for-STM32\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\STLink-gdb-server\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\STM32CubeProgrammer\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\TortoiseGit\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Git\\cmd;C:\\Users\\ropek\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\;C:\\Users\\ropek\\AppData\\Local\\Programs\\Python\\Python312\\;C:\\Users\\ropek\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\ropek\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\ropek\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\ropek\\AppData\\Local\\gitkraken\\bin;C:\\Users\\ropek\\;;C:\\Users\\ropek\\.lmstudio\\bin",
"PATH": "C:\\Program Files (x86)\\STMicroelectronics\\stlink_server;C:\\ST\\STM32CubeCLT_1.18.0;C:\\ST\\STM32CubeCLT_1.18.0\\CMake\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\Ninja\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\GNU-tools-for-STM32\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\STLink-gdb-server\\bin;C:\\ST\\STM32CubeCLT_1.18.0\\STM32CubeProgrammer\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\TortoiseGit\\bin;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Program Files\\Git\\cmd;C:\\Users\\ropek\\AppData\\Local\\Programs\\Python\\Python312\\Scripts\\;C:\\Users\\ropek\\AppData\\Local\\Programs\\Python\\Python312\\;C:\\Users\\ropek\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\ropek\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\ropek\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\ropek\\AppData\\Local\\gitkraken\\bin;C:\\Users\\ropek\\;;C:\\Users\\ropek\\.lmstudio\\bin"
}
},
"terminal": {
"defaultProfile": null
},
"config": {
"nordic-semiconductor.nrf-connect": {
"topdir": "",
"toolchain": {
"path": ""
},
"ozonePath": "",
"applications": [],
"applicationOptions": {},
"kconfig": {
"interface": "kconfig"
},
"west": {
"env": {
"$base": "terminal"
}
},
"boardRoots": [
""
],
"taskBindings": {},
"buildTerminal": {
"condensedProgress": true
},
"debugging": {
"flash": true,
"bindings": {},
"justMyCode": false
},
"activeAppFollowActiveEditor": true,
"flash": {
"softreset": false,
"erase": false,
"recover": true
},
"enableTelemetry": true,
"thirdpartyIntegration": {},
"toolchainManager": {
"indexURL": null,
"installDirectory": null
},
"nrfutil": {
"home": null
},
"defaultOpenAction": "ask",
"terminalProfile": {
"shell": null
}
},
"nordic-semiconductor.nrf-terminal": {
"terminalMode": "character"
},
"marus25.cortex-debug": {
"variableUseNaturalFormat": true,
"liveWatchRefreshRate": "300",
"armToolchainPath": null,
"armToolchainPrefix": "arm-none-eabi",
"gdbPath": null,
"objdumpPath": null,
"JLinkGDBServerPath": null,
"openocdPath": null,
"pyocdPath": null,
"PEGDBServerPath": null,
"stutilPath": null,
"stlinkPath": null,
"stm32cubeprogrammer": null,
"enableTelemetry": true,
"dbgServerLogfile": null
}
},
"extensions": {
"internal": {
"nordic-semiconductor.nrf-connect": {
"version": "2025.5.152",
"path": "c:\\Users\\ropek\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2025.5.152-win32-x64",
"isActive": true
},
"nordic-semiconductor.nrf-terminal": {
"version": "2024.9.14",
"path": "c:\\Users\\ropek\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2024.9.14",
"isActive": true
},
"nordic-semiconductor.nrf-devicetree": {
"version": "2025.4.22",
"path": "c:\\Users\\ropek\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2025.4.22",
"isActive": true
},
"nordic-semiconductor.nrf-kconfig": {
"version": "2025.4.26",
"path": "c:\\Users\\ropek\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2025.4.26",
"isActive": true
}
},
"external": {
"marus25.cortex-debug": "1.12.1",
"ms-vscode.cpptools": "1.25.3",
"ms-vscode.js-debug": "1.100.1",
"ms-vscode.js-debug-companion": "1.1.3",
"ms-vscode.vscode-js-profile-table": "1.0.10",
"actboy168.tasks": "0.16.1",
"bbenoist.QML": "1.0.0",
"cschlosser.doxdocgen": "1.4.0",
"dan-c-underwood.arm": "1.7.4",
"eamodio.gitlens": "17.1.1",
"GitHub.copilot": "1.333.0",
"GitHub.copilot-chat": "0.28.0",
"jeff-hykin.better-cpp-syntax": "1.27.1",
"mcu-debug.debug-tracker-vscode": "0.0.15",
"mcu-debug.memory-view": "0.0.25",
"mcu-debug.peripheral-viewer": "1.4.6",
"mcu-debug.rtos-views": "0.0.7",
"ms-python.debugpy": "2025.8.0",
"ms-python.python": "2025.6.1",
"ms-python.vscode-pylance": "2025.5.1",
"ms-vscode.cpptools-extension-pack": "1.3.1",
"ms-vscode.cpptools-themes": "2.0.0",
"ms-vscode.hexeditor": "1.11.1",
"ms-vscode.vscode-serial-monitor": "0.13.1",
"shd101wyy.markdown-preview-enhanced": "0.8.18",
"trond-snekvik.gnu-mapfiles": "1.1.0",
"yzane.markdown-pdf": "1.5.0",
"yzhang.markdown-all-in-one": "3.6.3",
"ZixuanWang.linkerscript": "1.0.4"
}
}
}
My use of PWM with LED is like that:
static const struct gpio_dt_spec led_green = GPIO_DT_SPEC_GET(DT_ALIAS(led1), gpios);
static const struct gpio_dt_spec button = GPIO_DT_SPEC_GET(DT_ALIAS(button0), gpios);
static const struct pwm_dt_spec pwm_beep = PWM_DT_SPEC_GET(DT_ALIAS(buzzer));
bool hw_init(void)
{
if (!device_is_ready(led_green.port)) {
printk("LED_GREEN not ready!\n");
return false;
}
gpio_pin_configure_dt(&led_green, GPIO_OUTPUT_INACTIVE);
if (!device_is_ready(pwm_beep.dev)) {
printk("PWM_BEEP not ready!\n");
return false;
}
}
My board is there:
https://github.com/witc/customBoardnRF54l15/tree/main
Aliases are in ropixon_ZG_v5_0_common.dtsi
aliases {
led0 = &led0;
led1 = &led1;
buzzer = &pwm_buzzer;
button0 = &button0;
//watchdog0 = &wdt31;
};
Thank you very much.