zephyr build steps - shijunjing/zephyr GitHub Wiki
Install higher version cmake firstly:
jshi19@ub2-uefi-b01:~$ git clone https://github.com/Kitware/CMake.git
jshi19@ub2-uefi-b01:~/CMake$ git checkout v3.17.2
jshi19@ub2-uefi-b01:~/CMake$ ./bootstrap --parallel=5
jshi19@ub2-uefi-b01:~/CMake$ make -j 5
jshi19@ub2-uefi-b01:~/CMake$ sudo make install
Install SDK
jshi19@ub2-uefi-b01:~$ wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.11.3/zephyr-sdk-0.11.3-setup.run
jshi19@ub2-uefi-b01:~$ chmod +x zephyr-sdk-0.11.3-setup.run
jshi19@ub2-uefi-b01:~$ ./zephyr-sdk-0.11.3-setup.run -- -d ~/zephyr-sdk-0.11.3
Build reel_board example
jshi19@ub2-uefi-b01:~$ cd zephyrproject/zephyr/
jshi19@ub2-uefi-b01:~/zephyrproject/zephyr$ west build -p auto -b reel_board samples/basic/blinky
-- west build: generating a build system
Including boilerplate (Zephyr base (cached)): /home/jshi19/zephyrproject/zephyr/cmake/app/boilerplate.cmake
-- Application: /home/jshi19/zephyrproject/zephyr/samples/basic/blinky
-- Zephyr version: 2.3.0-rc1 (/home/jshi19/zephyrproject/zephyr)
-- Board: reel_board
-- Found toolchain: zephyr (/home/jshi19/zephyr-sdk-0.11.3)
-- Found west: /home/jshi19/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found dtc: /home/jshi19/zephyr-sdk-0.11.3/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/jshi19/zephyrproject/zephyr/boards/arm/reel_board/reel_board.dts
-- Generated zephyr.dts: /home/jshi19/zephyrproject/zephyr/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/jshi19/zephyrproject/zephyr/build/zephyr/include/generated/devicetree_unfixed.h
Parsing /home/jshi19/zephyrproject/zephyr/Kconfig
Loaded configuration '/home/jshi19/zephyrproject/zephyr/boards/arm/reel_board/reel_board_defconfig'
Merged configuration '/home/jshi19/zephyrproject/zephyr/samples/basic/blinky/prj.conf'
Configuration saved to '/home/jshi19/zephyrproject/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/jshi19/zephyrproject/zephyr/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/jshi19/zephyr-sdk-0.11.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Cache files will be written to: /home/jshi19/.cache/zephyr
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jshi19/zephyrproject/zephyr/build
-- west build: building application
[1/139] Preparing syscall dependency handling
[134/139] Linking C executable zephyr/zephyr_prebuilt.elf
Memory region Used Size Region Size %age Used
FLASH: 19 KB 1 MB 1.86%
SRAM: 4344 B 256 KB 1.66%
IDT_LIST: 104 B 2 KB 5.08%
[139/139] Linking C executable zephyr/zephyr.elf
jshi19@ub2-uefi-b01:~/zephyrproject/zephyr$