Hi,
I’m trying to build these examples:
But even trying to build the blinky example causes the following errors:
src\main.c:19:23: error: missing binary operator before token “(”
#if DT_NODE_HAS_STATUS(LED0_NODE, okay)
^
src\main.c:27:2: error: #error “Unsupported board: led0 devicetree alias is not defined”
#error “Unsupported board: led0 devicetree alias is not defined”
^~~~~
src\main.c: In function ‘main’:
src\main.c:55:3: warning: implicit declaration of function ‘k_msleep’; did you mean ‘k_usleep’? [-Wimplicit-function-declaration]
k_msleep(SLEEP_TIME_MS);
^~~~~~~~
k_usleep
*** [.pio\build\frdm_k64f\src\main.o] Error 1
Anything I might be missing?
Not reproducable.
C:\Users\Maxi\.platformio\platforms\freescalekinetis\examples\zephyr-blink>pio run -e frdm_k64f
CONFIGURATION: https://docs.platformio.org/page/boards/freescalekinetis/frdm_k64f.html
PLATFORM: Freescale Kinetis 5.3.0 > Freescale Kinetis FRDM-K64F
HARDWARE: MK64FN1M0VLL12 120MHz, 256KB RAM, 1MB Flash
DEBUG: Current (cmsis-dap) On-board (cmsis-dap) External (jlink)
PACKAGES:
- framework-zephyr 2.20300.200623 (2.3.0)
- framework-zephyr-canopennode 0.0.0-alpha+sha.5c6b0566d5
- framework-zephyr-civetweb 0.0.0-alpha+sha.99129c5efc
- framework-zephyr-cmsis 0.0.0-alpha+sha.542b2296e6
- framework-zephyr-fatfs 0.0.0-alpha+sha.9ee6b9b951
- framework-zephyr-hal-nxp 0.0.0-alpha+sha.80a337dc4c
- framework-zephyr-libmetal 0.0.0-alpha+sha.3c3c9ec83b
- framework-zephyr-littlefs 0.0.0-alpha+sha.0aefdda69d
- framework-zephyr-loramac-node 0.0.0-alpha+sha.29e516ec58
- framework-zephyr-lvgl 0.0.0-alpha+sha.74fc2e753a
- framework-zephyr-mbedtls 0.0.0-alpha+sha.4bf099f125
- framework-zephyr-mcuboot 0.0.0-alpha+sha.e88113bbeb
- framework-zephyr-mcumgr 0.0.0-alpha+sha.5885efb7ca
- framework-zephyr-mipi-sys-t 0.0.0-alpha+sha.957d46bc3c
- framework-zephyr-open-amp 0.0.0-alpha+sha.724f7e2a45
- framework-zephyr-openthread 0.0.0-alpha+sha.a83d18cf18
- framework-zephyr-segger 0.0.0-alpha+sha.6fcf61606d
- framework-zephyr-tinycbor 0.0.0-alpha+sha.40daca97b4
- framework-zephyr-tinycrypt 0.0.0-alpha+sha.3e9a49d267
- framework-zephyr-trusted-firmware-m 0.0.0-alpha+sha.7de2daa196
- tool-cmake 3.16.4
- tool-dtc 1.4.7
- tool-ninja 1.9.0
- toolchain-gccarmnoneeabi 1.80201.190214 (8.2.1)
Reading CMake configuration...
Parsing system calls...
Generating syscall files
Generating KObject files...
Validating driver...
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio\build\frdm_k64f\zephyr_prebuilt\zephyr\misc\empty_file.c.o
Compiling .pio\build\frdm_k64f\src\main.o
Compiling .pio\build\frdm_k64f\zephyr_final\zephyr\misc\empty_file.c.o
Compiling .pio\build\frdm_k64f\offsets\zephyr\arch\arm\core\offsets\offsets.c.o
Archiving .pio\build\frdm_k64f\zephyr\liboffsets.a
Generating header file with offsets .pio\build\frdm_k64f\zephyr\include\generated\offsets.h
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\time\gmtime.c.o
Compiling .pio\build\frdm_k64f\arch__common\zephyr\arch\common\isr_tables.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdlib\strtol.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\msg_q.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\crc16_sw.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\timeout.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\sem.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m\zephyr\arch\arch\arm\core\aarch32\cortex_m\irq_init.c.o
Indexing .pio\build\frdm_k64f\zephyr\liboffsets.a
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdout\fprintf.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\prep_c.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\init.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\rb.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\version.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\configs.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\drivers\clock_control\clock_control_mcux_sim.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m\zephyr\arch\arch\arm\core\aarch32\cortex_m\fault_s.S.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\swap_helper.S.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\soc\arm\nxp_kinetis\k6x\nxp_mpu_regions.c.o
Compiling .pio\build\frdm_k64f\lib__posix\zephyr\lib\posix\pthread_common.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m__mpu\zephyr\arch\arch\arm\core\aarch32\cortex_m\mpu\arm_core_mpu.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdlib\bsearch.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\sched.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\irq_manage.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\sem.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\nmi.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\string\string.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\timeutil.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\crc32_sw.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\string\strncasecmp.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\queue.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\onoff.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\string\strspn.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\cpu_idle.S.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\thread.c.o
Archiving .pio\build\frdm_k64f\zephyr\lib\posix\liblib__posix.a
Compiling .pio\build\frdm_k64f\zephyr\zephyr\drivers\clock_control\clock_control_mcux_mcg.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdout\prf.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\soc\arm\nxp_kinetis\k6x\soc.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdlib\strtoul.c.o
Indexing .pio\build\frdm_k64f\zephyr\lib\posix\liblib__posix.a
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\device.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m\zephyr\arch\arch\arm\core\aarch32\cortex_m\fault.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\drivers\timer\cortex_m_systick.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\system_work_q.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\mempool.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\heap-validate.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\pipes.c.o
Generating linker script .pio\build\frdm_k64f\zephyr\linker.cmd
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdout\sprintf.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdlib\atoi.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\mem_slab.c.o
Compiling .pio\build\frdm_k64f\drivers__gpio\zephyr\drivers\gpio\gpio_mcux.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m\zephyr\arch\arch\arm\core\aarch32\cortex_m\reset.S.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m\zephyr\arch\arch\arm\core\aarch32\cortex_m\exc_exit.S.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\thread.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\drivers\pinmux\pinmux_mcux.c.o
Compiling .pio\build\frdm_k64f\zephyr\framework-zephyr-hal-nxp\mcux\devices\MK64F12\fsl_clock.c.o
Compiling .pio\build\frdm_k64f\boards__arm__frdm_k64f\zephyr\boards\arm\frdm_k64f\pinmux.c.o
Compiling .pio\build\frdm_k64f\arch__common\zephyr\arch\common\sw_isr_common.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\idle.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\heap.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\printk.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\thread_entry.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\isr_wrapper.S.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\smp.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\fdtable.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\mailbox.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m\zephyr\arch\arch\arm\core\aarch32\cortex_m\thread_abort.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\notify.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\soc\arm\nxp_kinetis\k6x\wdog.S.o
Archiving .pio\build\frdm_k64f\zephyr\drivers\gpio\libdrivers__gpio.a
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\dec.c.o
Archiving .pio\build\frdm_k64f\zephyr\arch\common\libarch__common.a
Indexing .pio\build\frdm_k64f\zephyr\drivers\gpio\libdrivers__gpio.a
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m\zephyr\arch\arch\arm\core\aarch32\cortex_m\vector_table.S.o
Archiving .pio\build\frdm_k64f\zephyr\boards\arm\frdm_k64f\libboards__arm__frdm_k64f.a
Indexing .pio\build\frdm_k64f\zephyr\arch\common\libarch__common.a
Compiling .pio\build\frdm_k64f\zephyr\zephyr\drivers\timer\sys_clock_init.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\soc\arm\nxp_kinetis\flash_configuration.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\nmi_on_reset.S.o
Indexing .pio\build\frdm_k64f\zephyr\boards\arm\frdm_k64f\libboards__arm__frdm_k64f.a
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\fatal.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\timer.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\hex.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\fatal.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdlib\malloc.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\kheap.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\errno.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\crc8_sw.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\work_q.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32\zephyr\arch\arch\arm\core\aarch32\swap.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\mempool.c.o
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\crc7_sw.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m__mpu\zephyr\arch\arch\arm\core\aarch32\cortex_m\mpu\nxp_mpu.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdlib\exit.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\thread_abort.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\mutex.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\stdout\stdout_console.c.o
Compiling .pio\build\frdm_k64f\lib__libc__minimal\zephyr\lib\libc\minimal\source\string\strstr.c.o
Compiling .pio\build\frdm_k64f\arch__arm__core__aarch32__cortex_m\zephyr\arch\arch\arm\core\aarch32\cortex_m\scb.c.o
Generating final linker script .pio\build\frdm_k64f\zephyr\linker_pass_final.cmd
Compiling .pio\build\frdm_k64f\zephyr\zephyr\lib\os\work_q.c.o
Compiling .pio\build\frdm_k64f\kernel\zephyr\kernel\stack.c.o
Archiving .pio\build\frdm_k64f\zephyr\arch\arch\arm\core\aarch32\libarch__arm__core__aarch32.a
Archiving .pio\build\frdm_k64f\zephyr\lib\libc\minimal\liblib__libc__minimal.a
Indexing .pio\build\frdm_k64f\zephyr\arch\arch\arm\core\aarch32\libarch__arm__core__aarch32.a
Archiving .pio\build\frdm_k64f\zephyr\arch\arch\arm\core\aarch32\cortex_m\mpu\libarch__arm__core__aarch32__cortex_m__mpu.a
Indexing .pio\build\frdm_k64f\zephyr\lib\libc\minimal\liblib__libc__minimal.a
Indexing .pio\build\frdm_k64f\zephyr\arch\arch\arm\core\aarch32\cortex_m\mpu\libarch__arm__core__aarch32__cortex_m__mpu.a
Archiving .pio\build\frdm_k64f\zephyr\arch\arch\arm\core\aarch32\cortex_m\libarch__arm__core__aarch32__cortex_m.a
Archiving .pio\build\frdm_k64f\zephyr\libzephyr.a
Indexing .pio\build\frdm_k64f\zephyr\arch\arch\arm\core\aarch32\cortex_m\libarch__arm__core__aarch32__cortex_m.a
Archiving .pio\build\frdm_k64f\zephyr\kernel\libkernel.a
Indexing .pio\build\frdm_k64f\zephyr\libzephyr.a
Indexing .pio\build\frdm_k64f\zephyr\kernel\libkernel.a
Linking .pio\build\frdm_k64f\firmware-pre.elf
Memory region Used Size Region Size %age Used
FLASH: 11536 B 1 MB 1.10%
SRAM: 4032 B 192 KB 2.05%
IDT_LIST: 88 B 2 KB 4.30%
Generating ISR list .pio\build\frdm_k64f\zephyr\isrList.bin
Generating ISR table .pio\build\frdm_k64f\zephyr\isr_tables.c
Compiling .pio\build\frdm_k64f\zephyr_final\zephyr\isr_tables.c.o
Linking .pio\build\frdm_k64f\firmware.elf
Memory region Used Size Region Size %age Used
FLASH: 11536 B 1 MB 1.10%
SRAM: 4032 B 192 KB 2.05%
IDT_LIST: 0 GB 2 KB 0.00%
Building .pio\build\frdm_k64f\firmware.bin
Checking size .pio\build\frdm_k64f\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 1.5% (used 3962 bytes from 262144 bytes)
Flash: [ ] 1.0% (used 10140 bytes from 1048576 bytes)
=========================================================== [SUCCESS] Took 124.12 seconds ===========================================================
Environment Status Duration
---------------- -------- ------------
frdm_k64f SUCCESS 00:02:04.122
frdm_kl25z IGNORED
segger_ip_switch IGNORED
============================================================ 1 succeeded in 00:02:04.122 ============================================================
Make sure you have the latest platform versions (pio platform update
), pio version (pio upgrade --dev
) and are executing for the correct environment, frdm_k64f
in the blinky example case.