Hello, World! for ZMK, the latest version
The short version: After setting up ZMK, for example, with the completely linear pastable command lines provided below, use “west build -b planck//zmk” instead of “west build -b planck_rev6” to build the sample keyboard firmware (to test that building actually works). The official documentation is out of date.
Introduction
Presuming the build environment is set up for building ZMK keyboard firmware (see below for complete instructions for a non-Docker and non-GitHub Actions approach), the step in the official documentation for building the firmware for a sample keyboard is:
west build -b planck_rev6
Or if repeating (for example, after trying building keyboard firmware for some other keyboard, probably due to CMakeisms; ‘-p’ is an alias of –pristine (two ASCII dashes, not as rendered here). See also Pristine Building):
west build -p -b planck_rev6
It is also in a previous blog post, Customising the ZMK-based Keychron B6 Pro keyboard without the Via clone. And it worked at that time, with the current version of the main ZMK project at that time (about 2025-03-10).
But this results in a build error (only the essential part is shown here; see Appendix A for the full transcript, including the full error message):
Invalid BOARD;
Realising “planck_rev6” has been both moved and renamed, from /app/boards/arm/planck to /app/boards/olkb/planck (the official documentation is clearly out of date), the build command would seem to be:
west build -p -b planck
It does get further, but it also fails (only the essential part is shown here; see Appendix A for the full transcript, including the full error message):
#error "NUM_IRQ_PRIO_BITS and __NVIC_PRIO_BITS are not set to the same value"
See Appendix A for the full error output.
The solution
The correct command line for building the sample keyboard is:
west build -p -b planck//zmk
This is impossible to guess, but it is hinted at in an official ZMK blog post:
- Zephyr 4.1 Update (2025-12-09)
Section Board Revisions has:
- “planck_rev6 -> planck//zmk”
The “//zmk” probably means something along the lines of “variants” (whatever that is in this context). And “…all board definitions found in the ZMK tree now must be used with a zmk variant”. The empty content in “//” seems to be some kind of shorthand (it could apparently be explicit – “…only one SoC on the board“).
Or maybe it is just a pure naming convention used by the ZMK project?? That is, without any bearing on building the keyboard, meaning to Zephyr, etc., except using that exact string?
Result (slightly formatted):
Memory region Used Size Region Size %age Used
-------------------------------------------------
FLASH: 47624 B 256 KB 18.17%
RAM: 11736 B 40 KB 28.65%
CCM: 0 GB 8 KB 0.00%
IDT_LIST: 0 GB 32 KB 0.00%
Generating files from /home/embo/main_ZMK/app/build/zephyr/zmk.elf
for board: planck
And in the file system:
975388 Jun 4 05:33 /home/embo/main_ZMK/app/build/zephyr/zephyr_pre0.elf 974604 Jun 4 05:33 /home/embo/main_ZMK/app/build/zephyr/zmk.elf
Here is a transcript.
Installing ZMK, using completely linear command lines
Below are the (linear) command lines to set up the main ZMK project on a Debian-like system (LMDE, Linux Mint, Ubuntu, Debian itself, Lubuntu, Kubuntu, Xubuntu, BunsenLabs, Linux Lite, WSL, etc.), and compile the keyboard firmware for a sample keyboard.
It was (repeatedly) tested on LMDE 7 (Gigi) with ZMK version 26246D (2026-05-30), branch ‘main’. It took about 25 minutes on my system using a 4G connection (LTE. On the order of 30 Mbit/s).
Every step has a ‘cd’ (when required), so it can easily be resumed if something goes wrong (without having to think about what the current folder for that step is supposed to be). That is, it is independent of the current directory.
Warning: Note that with “–assume-yes” (“-y” = “–yes” = “–assume-yes”) for ‘sudo apt upgrade’ and ‘apt install’, the upgrade and installation of the ZMK prerequisites becomes unconditional (so that pasting all the lines after “sudo ls > /dev/null” can become one single step). For a more cautious approach, remove the two “–assume-yes”s and upgrade and install the prerequisites as separate steps.
# Based on the official ZMK install instructions
# (for "native" building):
#
# <https://zmk.dev/docs/development/local-toolchain/setup/native>
#
# Prime sudo. Though only required for
# installing the dependencies, etc.
#
sudo ls > /dev/null
# <https://docs.zephyrproject.org/3.5.0/develop/getting_started/index.html#select-and-update-os>
sudo apt update
# Note: This will upgrade packages which may be
# completely unrelated to the ZMK build,
# for example, package 'dotnet-sdk-10.0'
#
sudo apt-get --assume-yes upgrade
# Install the required dependencies:
sudo apt-get --assume-yes install --no-install-recommends
git cmake ninja-build gperf \
ccache dfu-util device-tree-compiler wget \
python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file \
make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
cd $HOME
echo ; echo "Start cloning: $(date +%FT%T_%N_ns)" ; echo
git clone https://github.com/zmkfirmware/zmk.git main_ZMK
echo ; echo "End cloning: $(date +%FT%T_%N_ns)" ; echo
python3 -m venv ~/.main_ZMK_environment4
source ~/.main_ZMK_environment4/bin/activate
cd $HOME/main_ZMK
git status # Confirm Git branch "main"
# Install 'west'
cd $HOME/main_ZMK
pip install west
# Initialise the application and update
# to fetch modules, including Zephyr:
cd $HOME/main_ZMK
echo ; echo "Start 'west init & update': $(date +%FT%T_%N_ns)" ; echo
west init -l app/ # Current directory at the top of the
# cloned repository is assumed
#cd $HOME
#west init $HOME/main_ZMK # Zephyr. Absolute. Without "/app"
#cd $HOME/main_ZMK
west update
echo ; echo "End 'west init& update': $(date +%FT%T_%N_ns)" ; echo
# Export a Zephyr CMake package. This allows CMake to
# automatically load boilerplate code required for
# building Zephyr applications.
cd $HOME/main_ZMK
west zephyr-export
cd $HOME/main_ZMK
west packages pip --install
# It takes a lot of time!
#
# '/zephyr' is critical...
#
# But on LMDE 6, it failed due to a
# requirement of Python 3.12... It
# apparently only has 3.11.2...
#
# LMDE 7: Python 3.13.5
#
# Starts by downloading the Zyphyr SDK v. 1.0.1
# compressed tar ball (70 MB).
#
# And installs things like (downloading 45 - 145 MB
# for each):
#
# 'arm-zephyr-eabi' GNU toolchain.
# 'riscv64-zephyr-elf' GNU toolchain.
#
cd $HOME/main_ZMK/zephyr
echo ; echo "Start 'west sdk install': $(date +%FT%T_%N_ns)" ; echo
west sdk install
echo ; echo "End 'west sdk install': $(date +%FT%T_%N_ns)" ; echo
# Exit the virtual Python environment
deactivate
# #####################################
#
# Build
#
# Start state:
#
# A new terminal window, thus activating the
# virtual Python environment is required
#
# '-p' to erase the memory of a previous
# build, e.g, 'rtl87x2g_evb_a', if any
#
source ~/.main_ZMK_environment4/bin/activate
cd $HOME/main_ZMK/app
# -- Zephyr version: 4.1.0 (/home/embo/main_ZMK/zephyr), build: 58a5874a446a
# [187/187] Linking C executable zephyr/zmk.elf
#
# Memory region Used Size Region Size %age Used
# FLASH: 47624 B 256 KB 18.17%
# RAM: 11736 B 40 KB 28.65%
# CCM: 0 GB 8 KB 0.00%
# IDT_LIST: 0 GB 32 KB 0.00%
# Generating files from /home/embo/main_ZMK/app/build/zephyr/zmk.elf for board: planck
#
echo ; echo "Start 'west build': $(date +%FT%T_%N_ns)" ; echo
west build -p -b planck//zmk
echo ; echo "End 'west build': $(date +%FT%T_%N_ns)" ; echo
find $HOME/main_ZMK/app | grep elf | xargs ls -l
# 975388 Jun 4 05:33 /home/embo/main_ZMK/app/build/zephyr/zephyr_pre0.elf
# 974604 Jun 4 05:33 /home/embo/main_ZMK/app/build/zephyr/zmk.elf
# Exit the virtual Python environment
deactivate
# Extra (is here, because it may or may not block
# with prompts, 'less' paging, etc.):
#
# Check ZMK version. For example, FF09F2 (2026-06-08)
git -C $HOME/main_ZMK status # 'On branch main'
git -C $HOME/main_ZMK log -1
Conclusion
This was prompted by trying to compile the firmware for a Keychron V6 Ultra 8K keyboard, the first step being using the main ZMK project, including compiling keyboard firmware for a sample keyboard (to demonstrate setting it all up actual works for a particular version on a particular version of a (Linux) system), before addressing the added complexity of Keychron’s fork.
For the current version of the main ZMK project, Python 3.12 may or may not be required, and thus LMDE 6 would be too old, with its Python 3.11.2. But reverting to an older version of ZMK and/or using Keychron’s fork (which may be based on an older version of ZMK), it may be possible to use some older Linux systems.
References
- Zephyr glossary. For example, board. But not “shield” (claimed to be a Zephyr concept in the ZMK documentation); here is a list of shields in the Zephyr documentation
Appendix A: Full transcript for the two build errors
‘planck_rev6’
For building with ‘west build -p -b planck_rev6’:
(.main_ZMK_environment4) embo@emboLMDE7:~/main_ZMK/app$ west build -p -b planck_rev6 -- west build: making build dir /home/embo/main_ZMK/app/build pristine -- west build: generating a build system Loading Zephyr default modules (Zephyr base). -- Application: /home/embo/main_ZMK/app -- CMake version: 3.31.6 -- Found Python3: /home/embo/.main_ZMK_environment4/bin/python3 (found suitable version "3.13.5", minimum required is "3.10") found components: Interpreter -- Cache files will be written to: /home/embo/.cache/zephyr -- Zephyr version: 4.1.0 (/home/embo/main_ZMK/zephyr) -- Found west (found suitable version "1.5.0", minimum required is "0.14.0") No board named 'planck_rev6' found. Please choose one of the following boards: proton_c mikoto nrfmicro puchi_ble nrf52840_m2 pillbug nice_nano bluemicro840 ferris tofu65 bdn9 s40nc nice60 preonic planck adv360pro_left adv360pro_right bt60_hs bt60 bt75 bt65 glove80_rh glove80_lh corneish_zen_left corneish_zen_right particle_xenon particle_boron nrf52_blenano2 nrf51_blenano particle_argon innblue21 innblue22 sgrm mt8195 mt8188 mt8196 mt8186 blueclover_plt_demo_v2 arduino_opta arduino_nicla_sense_me arduino_giga_r1 arduino_zero arduino_nicla_vision arduino_mkrzero arduino_nano_33_ble arduino_nano_33_iot arduino_portenta_h7 arduino_due arduino_uno_r4_minima arduino_uno_r4_wifi 96b_carbon 96b_stm32_sensor_mez 96b_meerkat96 96b_argonkey 96b_neonkey 96b_wistrio 96b_avenger96 96b_nitrogen 96b_aerocore2 stm32f3_seco_d23 holyiot_yj16019 titanium_ti60_f225 mec15xxevb_assy6853 ev11l78a mec1501modular_assy6885 mec172xevb_assy6906 m2gl025_miv mpfs_icicle mec172xmodular_assy6930 adafruit_trinket_m0 adafruit_metro_rp2040 nrf52_adafruit_feather adafruit_feather_stm32f405 adafruit_feather_nrf52840 adafruit_grand_central_m4_express adafruit_itsybitsy_m4_express adafruit_itsybitsy adafruit_feather_m0_basic_proto adafruit_kb2040 adafruit_qt_py_esp32s3 adafruit_qt_py_rp2040 adafruit_feather_m0_lora adafruit_feather_m4_express adafruit_macropad_rp2040 sam4l_wm400_cape esp32c3_042_oled acn52832 nrf51dk nrf9161dk thingy52 nrf7002dk nrf52dk nrf9131ek nrf54l15dk nrf9280pdk nrf51dongle nrf54l20pdk nrf5340dk nrf54h20dk nrf52833dk nrf52840dk nrf9160dk nrf5340_audio_dk thingy53 nrf54l09pdk nrf21540dk nrf52840dongle nrf9151dk segger_trb_stm32f407 ip_k66f native_posix nrf52_bsim nrf5340bsim nrf54l15bsim native_sim m5stack_atom_lite m5stack_atoms3 m5stack_stamps3 m5stickc_plus m5stack_core2 stamp_c3 m5stack_atoms3_lite m5stack_cores3 altera_max10 arty_a7 zybo faze legend imx93_evk frdm_mcxc444 lpcxpresso11u68 twr_ke18f lpcxpresso55s06 lpcxpresso51u68 mimxrt1064_evk frdm_mcxw72 lpcxpresso55s69 lpcxpresso54114 twr_kv58f220m lpcxpresso55s28 mimxrt685_evk mimxrt1180_evk frdm_rw612 mimxrt1062_fmurt6 mimxrt1020_evk mimxrt1170_evk frdm_mcxa156 mimxrt1040_evk frdm_k64f mimxrt595_evk imx8mp_evk imx8qxp_mek imx8ulp_evk frdm_k22f rd_rw612_bga usb_kw24d512 frdm_ke17z frdm_mcxn236 mimxrt1050_evk hexiwear frdm_ke17z512 mr_canhubk3 frdm_mcxn947 lpcxpresso55s16 frdm_kw41z imx91_evk frdm_mcxc242 lpcxpresso55s36 frdm_kl25z ucans32k1sic vmu_rt1170 mcxw72_evk imx8mq_evk mimxrt1024_evk mimxrt1160_evk imx8mm_evk rddrone_fmuk66 frdm_ke15z frdm_mcxw71 mimxrt1015_evk s32z2xxdc2 imx8qm_mek frdm_k82f mimxrt1010_evk imx95_evk mimxrt700_evk mimxrt1060_evk imx8mn_evk ls1046ardb ttgo_t8c3 ttgo_lora32 ttgo_t8s3 ttgo_t7v1_5 nrf52832_mdk nrf52840_mdk_usb_dongle nrf52840_mdk da14695_dk_usb ek_ra2l1 rzt2m_starter_kit ek_ra4w1 rcar_salvator_xs ek_ra4m1 ek_ra6e2 ek_ra6m4 da1469x_dk_pro fpb_ra6e2 mck_ra8t1 ek_ra6m2 ek_ra4m3 rcar_h3ulcb ek_ra6m5 ek_ra4e2 ek_ra4l1 fpb_ra6e1 ek_ra8m1 ek_ra4m2 ek_ra2a1 rcar_salvator_x rcar_spider_s4 ek_ra8d1 fpb_ra4e1 ek_ra6m3 rzg3s_smarc voice_ra4e1 ek_ra6m1 nrf52840_blip nrf52840_papyr bbc_microbit bbc_microbit_v2 esp32s2_lolin_mini kincony_kc868_a32 walter apollo3_evb apollo4p_evb apollo4p_blue_kxr_evb apollo3p_evb ast1030_evb stm32_min_dev esp32c3_supermini serpente icev_wireless stm32f030_demo promicro_nrf52840 stm32f103_mini candlelight stm32f401_mini candlelightfd black_f407ve canbardo neorv32 black_f407zg_pro rpi_pico rpi_4b rpi_5 rpi_pico2 boardsource_blok sparkfun_pro_micro_rp2040 nrf52_sparkfun sparkfun_thing_plus_matter_mgm240p sparkfun_thing_plus micromod sparkfun_red_v_things_plus nrf52_vbluno52 nrf51_vbluno51 acrn acrn_ehl_crb adp_xc7k xenvm v2m_beetle v2m_musca_b1 fvp_baser_aemv8r mps2 mps3 fvp_base_revc_2xaemv8a v2m_musca_s1 octopus_io_board octopus_som odroid_go swan_r5 slwrb4104a slwrb4321a slwrb4170a xg23_rb4210a xg24_rb4187c slwrb4255a siwx917_rb4338a xg29_rb4412a slwrb4161a slwrb4180a slwrb4250b efm32wg_stk3800 slstk3701a slstk3401a slstk3400a slstk3402a sltb009a sim3u1xx_dk xg24_dk2601b sltb010a sltb004a xg27_dk2602a xg24_ek2703a rts5912_evb mm_feather mm_swiftio circuitdojo_feather we_ophelia1ev we_orthosie1ev we_oceanus1ev we_proteus2ev we_proteus3ev ganymed_bob contextualelectronics_abc lora_e5_mini xiao_esp32s3 lora_e5_dev_board xiao_esp32c6 xiao_esp32c3 xiao_ble seeeduino_xiao wio_terminal xiao_rp2040 xiao_mg24 visionfive2 pandora_stm32l475 blackpill_f401ce weact_stm32g431_core weact_stm32h5_core mini_stm32h743 usb2canfdv1 mini_stm32h7b0 blackpill_f411ce blackpill_f401cc weact_stm32f405_core sam_v71_xult sam4e_xpro sam_e70_xplained sam4s_xplained sam4l_ek samr21_xpro samc21n_xpro same54_xpro samd20_xpro samr34_xpro samd21_xpro saml21_xpro gr716a_mini generic_leon3 litex_vexriscv qomu quick_feather ronoth_lodev ebyte_e73_tbb mercury_xu esp32s2_franzininho phyboard_lyra phyboard_electra phyboard_polis phyboard_pollux reel_board phyboard_nash scobc_module1 bytesensi_l intel_ish_5_4_1 intel_ish_5_6_0 intel_ish_5_8_0 niosv_m intel_adsp intel_rpl_p_crb intel_rpl_s_crb intel_ehl_crb niosv_g intel_adl_crb intel_adl_rvp cyclonev_socdk intel_socfpga_agilex_socdk intel_socfpga_agilex5_socdk esp32s3_luatos_core esp32c3_luatos_core cc1352r_sensortag cc3220sf_launchxl msp_exp432p401r_launchxl cc26x2r1_launchxl cc3235sf_launchxl sk_am62 lp_em_cc2340r5 cc1352p7_lp cc1352p1_launchxl cc1352r1_launchxl hsdk emsdp hsdk4xd em_starterkit iotdk nsim_arc_v nsim rak11720 rak4631 rak5010 rak3172 rm1xx_dvk bl654_dvk bl654_usb bt610 mg100 bl652_dvk pinnacle_100_dvk bt510 bl653_dvk bl5340_dvk bl654_sensor_board ucan pan1783_evb pan1783a_evb pan1783a_pa_evb pan1781_evb pan1782_evb pan1770_evb pan1780_evb panb511evb olimex_stm32_e407 olimex_lora_stm32wl_devkit olimex_stm32_p405 olimex_esp32_evb olimex_stm32_h405 olimex_stm32_h103 olimex_stm32_h407 olimexino_stm32 npcx4m8f_evb numaker_pfm_m467 npcm400_evb npcx9m6f_evb numaker_pfm_m487 numaker_m2l31ki npcx7m6fb_evb ch32v003evt fk750m1_vbt6 fk7b0m1_vbt6 croxel_cx1825 ubx_bmd330eval ubx_bmd345eval ubx_evkninab1 ubx_bmd380eval ubx_evkninab4 ubx_bmd340eval ubx_evkannab1 ubx_evkninab3 ubx_bmd300eval ubx_bmd360eval actinius_icarus_som_dk actinius_icarus actinius_icarus_som actinius_icarus_bee ruuvi_ruuvitag beagley_ai beaglebone_ai64 beagleconnect_freedom beagleplay beaglev_fire verdin_imx8mm colibri_imx7d verdin_imx8mp ctcc mks_canable_v20 acp_6_0_adsp kv260_r5 mikroe_stm32_m4_clicker mikroe_clicker_2 mikroe_mini_m4_for_stm32 mikroe_clicker_ra4m1 google_icetower google_quincy google_dragonclaw google_twinkie_v2 yd_esp32 yd_stm32h750vb cy8ckit_062_ble cy8ckit_062_wifi_bt up_squared_pro_7000 up_squared bcm958402m2 bcm958401m2 pinetime_devkit0 esp32_devkitc_wrover esp8684_devkitm esp32c3_devkitm esp32_devkitc_wroom esp32s3_eye esp32c6_devkitc esp_wrover_kit esp32s2_devkitc esp32s2_saola esp32s3_devkitm esp32_ethernet_kit esp32c3_devkitc esp32c3_rust esp32s3_devkitc rv32m1_vega max32672evkit max32662evkit adi_sdp_k1 max32655fthr max32650evkit max32670evkit max32666fthr adi_eval_adin1110ebz max32690fthr max32690evkit max32672fthr ad_swiot1l_sl max32655evkit max32660evsys max32675evkit max78000evkit adi_eval_adin2111ebz max32666evkit max78002evkit max78000fthr apard32690 max32650fthr max32680evkit nucleo_f070rb nucleo_f031k6 nucleo_f207zg stm32f411e_disco stm32h745i_disco nucleo_l152re stm32h7s78_dk stm32f429i_disc1 stm32h747i_disco nucleo_l031k6 nucleo_f303re nucleo_l4a6zg b_u585i_iot02a nucleo_f302r8 stm32f4_disco stm32h573i_dk nucleo_l433rc_p nucleo_f411re nucleo_f072rb steval_fcu001v1 nucleo_f446ze sensortile_box stm32l476g_disco stm32f469i_disco b_l072z_lrwan1 sensortile_box_pro stm32f072_eval nucleo_h7a3zi_q nucleo_g070rb b_l4s5i_iot01a stm32f3_disco stm32l562e_dk nucleo_wb07cc nucleo_f091rc stm32373c_eval nucleo_wb55rg nucleo_wl55jc nucleo_h7s3l8 nucleo_u575zi_q stm32f412g_disco stm32f0_disco nucleo_wb05kz nucleo_h563zi nucleo_c031c6 nucleo_f334r8 nucleo_f103rb stm32g0316_disco nucleo_f722ze stm32u083c_dk nucleo_f429zi nucleo_c071rb nucleo_f746zg nucleo_h753zi nucleo_l053r8 nucleo_h745zi_q nucleo_wba55cg stm32l1_disco stm32l152c_disco nucleo_g0b1re stm32f7508_dk nucleo_f401re stm32wb5mmg nucleo_l011k4 stm32f746g_disco steval_stwinbx1 nucleo_l412rb_p nucleo_l452re nucleo_h503rb nucleo_l476rg stm32wb5mm_dk stm32f723e_disco nucleo_h743zi nucleo_wba52cg nucleo_f756zg stm32h735g_disco b_g474e_dpow1 disco_l475_iot1 nucleo_l432kc nucleo_f410rb nucleo_l073rz nucleo_f413zh nucleo_h723zg nucleo_g431rb stm32f072b_disco nucleo_g431kb nucleo_g071rb nucleo_h533re nucleo_l4r5zi nucleo_g031k8 nucleo_u031r8 nucleo_n657x0_q nucleo_l496zg stm32l4r9i_disco stm32vl_disco nucleo_f030r8 stm32f413h_disco nucleo_wb09ke stm3210c_eval nucleo_l552ze_q stm32h7b3i_dk nucleo_h755zi_q nucleo_f042k6 nucleo_u5a5zj_q stm32g081b_eval nucleo_f303k8 stm32mp157c_dk2 stm32f769i_disco stm32c0116_dk nucleo_f446re nucleo_u083rc stm32u5a9j_dk nucleo_g474re stm32h750b_dk stm32n6570_dk st25dv_mb1283_disco nucleo_f412zg nucleo_f767zi stm32g071b_disco stm32l496g_disco opentitan_earlgrey raytac_mdbt53v_db_40 raytac_mdbt50q_db_40 raytac_mdbt53_db_40 raytac_mdbt50q_db_33 it8xxx2_evb it82xx2_evb hifive_unleashed hifive_unmatched hifive1 longan_nano tlsr9518adk80d gd32e103v_eval gd32f450v_start gd32f350r_eval gd32vf103v_eval gd32f470i_eval gd32a503v_eval gd32f450z_eval gd32vf103c_starter gd32f450i_eval gd32f403z_eval gd32f407v_start gd32e507v_start gd32l233r_eval gd32e507z_eval decawave_dwm1001_dev decawave_dwm3001cdk rp2040_zero waveshare_open103z nrf51_ble400 esp32s3_touch_lcd_1_28 myra_sip_baseboard riscv32_virtual cortex_r8_virtual kb1200_evb roc_rk3568_pc khadas_edge2 khadas_edgev degu_evk dragino_nbsn95 dragino_lsn50 qemu_riscv32_xip qemu_cortex_m0 qemu_leon3 qemu_cortex_m3 qemu_malta qemu_nios2 qemu_riscv32e qemu_kvm_arm64 qemu_cortex_a9 qemu_riscv64 qemu_arc qemu_riscv32 qemu_x86 qemu_x86_lakemont qemu_x86_64 qemu_x86_tiny qemu_cortex_a53 qemu_cortex_r5 qemu_xtensa xt-sim w5500_evb_pico robokit1 pico_pi linum udoo_neo_full warp7 az3166_iotdevkit teensy40 teensy41 xmc47_relax_kit cy8ckit_062s4 cy8cproto_062_4343w cy8cproto_063_ble xmc45_relax_kit cy8ckit_062s2_ai cyw920829m2evk_02 heltec_wireless_stick_lite_v3 heltec_wifi_lora32_v2 CMake Error at /home/embo/main_ZMK/zephyr/cmake/modules/boards.cmake:228 (message): Invalid BOARD; see above. Call Stack (most recent call first): /home/embo/main_ZMK/zephyr/cmake/modules/zephyr_default.cmake:134 (include) /home/embo/main_ZMK/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include) /home/embo/main_ZMK/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate) CMakeLists.txt:9 (find_package) -- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/home/embo/.main_ZMK_environment4/bin/python3 -B/home/embo/main_ZMK/app/build -GNinja -DBOARD=planck_rev6 -S/home/embo/main_ZMK/app
‘planck’
For building with ‘west build -p -b planck’:
(.main_ZMK_environment4) embo@emboLMDE7:~/main_ZMK/app$ west build -p -b planck
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/embo/main_ZMK/app
-- CMake version: 3.31.6
-- Found Python3: /home/embo/.main_ZMK_environment4/bin/python3 (found suitable version "3.13.5", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/embo/.cache/zephyr
-- Zephyr version: 4.1.0 (/home/embo/main_ZMK/zephyr)
-- Found west (found suitable version "1.5.0", minimum required is "0.14.0")
-- Board: planck, Revision: 6.0.0, qualifiers: stm32f303xc
Checking /home/embo/main_ZMK/app/module
Checking /home/embo/main_ZMK/app
found /home/embo/main_ZMK/app
planck_stm32f303xc for _stm32f303xc for planck with version 6.0.0
-- Using keymap file: /home/embo/main_ZMK/app/boards/olkb/planck/planck.keymap
Checking /home/embo/main_ZMK/zephyr
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.17.0 (/home/embo/zephyr-sdk-0.17.0)
-- Found toolchain: zephyr 0.17.0 (/home/embo/zephyr-sdk-0.17.0)
-- Found Dtc: /home/embo/zephyr-sdk-0.17.0/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/embo/main_ZMK/zephyr/boards/common/stub.dts
-- Found devicetree overlay: /home/embo/main_ZMK/app/boards/olkb/planck/planck.keymap
-- Generated zephyr.dts: /home/embo/main_ZMK/app/build/zephyr/zephyr.dts
-- Generated pickled edt: /home/embo/main_ZMK/app/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/embo/main_ZMK/app/build/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/embo/main_ZMK/app/build/zephyr/dts.cmake
warning: Deprecated symbol KSCAN is enabled.
Parsing /home/embo/main_ZMK/app/Kconfig
Loaded configuration '/home/embo/main_ZMK/app/prj.conf'
Configuration saved to '/home/embo/main_ZMK/app/build/zephyr/.config'
Kconfig header saved to '/home/embo/main_ZMK/app/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/embo/zephyr-sdk-0.17.0/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/embo/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Using ccache: /usr/bin/ccache
CMake Warning at /home/embo/main_ZMK/zephyr/CMakeLists.txt:1011 (message):
No SOURCES given to Zephyr library: drivers__kscan
Excluding target from build.
-- Configuring done (6.3s)
-- Generating done (0.1s)
-- Build files have been written to: /home/embo/main_ZMK/app/build
-- west build: building application
[1/158] Preparing syscall dependency handling
[3/158] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.1.0 (/home/embo/main_ZMK/zephyr), build: 58a5874a446a
[10/158] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
FAILED: zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
ccache /home/embo/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DCORE_CM4 -DHSE_VALUE=8000000 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=0 -DPICOLIBC_DOUBLE_PRINTF_SCANF -DSTM32F303xC -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/embo/main_ZMK/zephyr/kernel/include -I/home/embo/main_ZMK/zephyr/arch/arm/include -I/home/embo/main_ZMK/app/build/zephyr/include/generated/zephyr -I/home/embo/main_ZMK/zephyr/include -I/home/embo/main_ZMK/app/build/zephyr/include/generated -I/home/embo/main_ZMK/zephyr/soc/st/stm32 -I/home/embo/main_ZMK/zephyr/soc/st/stm32/common/. -I/home/embo/main_ZMK/zephyr/drivers -I/home/embo/main_ZMK/zephyr/soc/st/stm32/stm32f3x/. -I/home/embo/main_ZMK/modules/hal/stm32/stm32cube/stm32f3xx/soc -I/home/embo/main_ZMK/modules/hal/stm32/stm32cube/stm32f3xx/drivers/include -I/home/embo/main_ZMK/modules/hal/stm32/stm32cube/common_ll/include -I/home/embo/main_ZMK/modules/hal/cmsis/CMSIS/Core/Include -I/home/embo/main_ZMK/zephyr/modules/cmsis/. -I/home/embo/main_ZMK/app/module/include -isystem /home/embo/main_ZMK/zephyr/lib/libc/common/include -fno-strict-aliasing -Os -imacros /home/embo/main_ZMK/app/build/zephyr/include/generated/zephyr/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft --sysroot=/home/embo/zephyr-sdk-0.17.0/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/embo/main_ZMK/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/embo/main_ZMK/app=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/embo/main_ZMK/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/embo/main_ZMK=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=picolibc.specs -std=c99 -Wfatal-errors -fno-lto -MD -MT zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -MF zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -c /home/embo/main_ZMK/zephyr/arch/arm/core/offsets/offsets.c
In file included from /home/embo/main_ZMK/zephyr/modules/cmsis/./cmsis_core.h:10,
from /home/embo/main_ZMK/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:24,
from /home/embo/main_ZMK/zephyr/include/zephyr/arch/arm/asm_inline.h:18,
from /home/embo/main_ZMK/zephyr/include/zephyr/arch/arm/arch.h:30,
from /home/embo/main_ZMK/zephyr/include/zephyr/arch/cpu.h:19,
from /home/embo/main_ZMK/zephyr/include/zephyr/kernel_includes.h:36,
from /home/embo/main_ZMK/zephyr/include/zephyr/kernel.h:17,
from /home/embo/main_ZMK/zephyr/arch/arm/core/offsets/offsets_aarch32.c:28,
from /home/embo/main_ZMK/zephyr/arch/arm/core/offsets/offsets.c:9:
/home/embo/main_ZMK/zephyr/modules/cmsis/./cmsis_core_m.h:27:2: error: #error "NUM_IRQ_PRIO_BITS and __NVIC_PRIO_BITS are not set to the same value"
27 | #error "NUM_IRQ_PRIO_BITS and __NVIC_PRIO_BITS are not set to the same value"
| ^~~~~
compilation terminated due to -Wfatal-errors.
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/embo/main_ZMK/app/build
Appendix B: ‘west’ information
The name west is allegedly after Zephyrus, from which Zephyr got its name, the Greek god of the west wind (a very poor choice in the search engine era).
Output of ‘west build -h’ on the command line (slightly edited for readability):
Usage:
west build
[-h]
[-b BOARD[@REV]]]
[-d BUILD_DIR]
[-S SNIPPET]
[--shield SHIELD]
[-t TARGET]
[-p {auto, always, never}]
[-c]
[--cmake-only]
[-n]
[-o BUILD_OPT] [-f]
[--sysbuild | --no-sysbuild]
[--domain DOMAIN]
[--extra-conf FILE.conf]
[--extra-dtc-overlay FILE.overlay]
[source_dir]
-- [cmake_opt [cmake_opt ...]]
Convenience wrapper for building Zephyr applications.
If the build directory is not given, the
default is build, unless the 'build.dir-fmt'
configuration variable is set. The current
directory is checked after that. If either
is a Zephyr build directory, it is used.
Positional arguments:
source_dir Application source directory
cmake_opt Extra options to pass to CMake;
implies -c (these must come
after "--" as shown above)
Options:
-h, --help Show this help message and exit.
-b, --board BOARD Board to build for with
optional board revision.
-d, --build-dir BUILD_DIR
Build directory to create or use.
-f, --force Ignore any errors and try to proceed.
--sysbuild Create multi domain build system.
--no-sysbuild Do not create multi domain
build system (default).
CMake and build tool:
-c, --cmake Force a CMake run.
--cmake-only Just run CMake; don't build (implies -c).
--domain DOMAIN Execute build tool (Make or Ninja)
only for the given domain.
-t, --target TARGET Run build system target
TARGET (try "-t usage").
-T, --test-item TEST_ITEM
Build based on test data in
'testcase.yaml' or 'sample.yaml'.
If the source directory is not
used, an argument has to be
defined as SOURCE_PATH/TEST_NAME.
E.g. samples/hello_world/sample.basic.helloworld.
If the source directory is passed
then "TEST_NAME" is enough.
-o, --build-opt BUILD_OPT
Options to pass to the build tool
(Make or Ninja); it may be given
more than once.
-n, --just-print, --dry-run, --recon
Just print build commands;
don't run them.
-S, --snippet SNIPPET
Add the argument to SNIPPET; it may
be given multiple times. It forces
CMake to run again if given. Do not
use this option with manually
specified -DSNIPPET... CMake arguments:
the results are undefined
--shield SHIELD Add the argument to SHIELD; it may
be given multiple times. It forces
CMake to run again if given. Do
not use this option with manually
specified -DSHIELD... CMake arguments:
the results are undefined
--extra-conf EXTRA_CONF_FILE
Add the argument to EXTRA_CONF_FILE;
it may be given multiple times. It
forces CMake to run again if given.
Do not use this option with manually
specified -DEXTRA_CONF_FILE... CMake
arguments: the results are undefined
--extra-dtc-overlay EXTRA_DTC_OVERLAY_FILE
Add the argument to EXTRA_DTC_OVERLAY_FILE;
it may be given multiple times. It
forces CMake to run again if given.
Do not use this option with manually
specified -DEXTRA_DTC_OVERLAY_FILE...
CMake arguments: the results are
undefined
Pristine builds:
A "pristine" build directory is empty.
The -p option controls whether the build directory
is made pristine before the build is done. A bare
'--pristine' with no value is the same as
--pristine=always.
Setting --pristine=auto uses heuristics to
guess if a pristine build may be necessary.
-p, --pristine [{auto,always,never}]
Pristine build folder setting
Forward reference for building the Keychron Ultras.
Leave a Reply