RTOS
Unix and Linux config :: Containers :: Clusters :: <link>
2021-02-02 Tuesday
Real Time Operating System references . . .
Contents
^ ChibiOS
A brief history of ChibiOS development:
How to create static threads and dynamic threads, in ChibiOS:
How to choose thread's working area or memory size:
^ ChibiOS ports
This section dedicated to references and notes on ChibiOS ports to processors outside of the immediate, STM32xxx families of parts.
Adding this Nordicsemi Devzone article link regarding ChibiOS port to nRF9160 System In Package:
^ Zephyr RTOS
Introduction to Zephyr and some guides . . .
- https://docs.zephyrproject.org/latest/introduction/index.html
- https://docs.zephyrproject.org/latest/guides/dts/index.html#dt-guide
- https://docs.zephyrproject.org/latest/guides/dts/intro.html
Example code . . .
- https://docs.zephyrproject.org/latest/samples/hello_world/README.html
- https://docs.zephyrproject.org/latest/samples/philosophers/README.html
A tutorial for setting up support and build environment for Zephyr, and for flashing and testing on yet undetermined targets:
Zephyr demo supported boards
YAML data serialization language
There appears to be an important high-level tool called west
which Zephyr developers and community use. It's also mentioned as the build tool for one or more of Nordic Semiconductor's nRF9160 example projects. A link to the github west
documentation is,
The west
project top level Github URL:
^ To configure Zephyr SDK
2021-07-27 Tuesday
While configuring Zephyr SDK for Linux command line builds having trouble with basic build after following Nordic Semi 'Getting Started' instructions. Meta-tool west
complains "not able to find toolchain.":
ted@localhost:~/zephyrproject/zephyr$ west build -b nrf9160dk_nrf9160@1.0.0 ./samples/basic/blinky -- west build: generating a build system Including boilerplate (Zephyr base (cached)): /home/ted/zephyrproject/zephyr/cmake/app/boilerplate.cmake -- Application: /home/ted/zephyrproject/zephyr/samples/basic/blinky -- Zephyr version: 2.6.99 (/home/ted/zephyrproject/zephyr), build: zephyr-v2.6.0-1460-g17d2e9d084b2 -- Found west (found suitable version "0.11.0", minimum required is "0.7.1") -- Board: nrf9160dk_nrf9160, Revision: 1.0.0 (Active: 0.14.0) -- Cache files will be written to: /home/ted/.cache/zephyr -- Using toolchain: zephyr 0.12.4 (/opt/zephyr-sdk-0.12.4) -- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6") -- Found toolchain: cross-compile (arm-unknown-linux-gnueabi-) CMake Error at /home/ted/zephyrproject/zephyr/cmake/compiler/gcc/generic.cmake:8 (message): Zephyr was unable to find the toolchain. Is the environment misconfigured? User-configuration: ZEPHYR_TOOLCHAIN_VARIANT: cross-compile Internal variables: CROSS_COMPILE: arm-unknown-linux-gnueabi- TOOLCHAIN_HOME: Call Stack (most recent call first): /home/ted/zephyrproject/zephyr/cmake/generic_toolchain.cmake:42 (include) /home/ted/zephyrproject/zephyr/cmake/app/boilerplate.cmake:570 (include) /home/ted/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include) /home/ted/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate) CMakeLists.txt:4 (find_package) -- Configuring incomplete, errors occurred! FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/ted/zephyrproject/zephyr/build -S/home/ted/zephyrproject/zephyr/samples/basic/blinky -GNinja
^ edit point
Questions:
(1) what is in this file: /home/ted/zephyrproject/zephyr/cmake/compiler/gcc/generic.cmake
?
(2) where originates this string pattern: arm-unknown-linux-gnueabi
?
Answers:
(2) the pattern 'arm-unknown-linux-gnueabi-' does not appear to original in ~/zephyrproject/zephyr
:
ted@localhost:~/zephyrproject/zephyr$ grep -nr 'arm-unknown-linux-gnueabi-' ./* ./build/CMakeCache.txt:53:CROSS_COMPILE:PATH=arm-unknown-linux-gnueabi-
Unsure whether this is correct but we have these newly drafted environment variables set:
ted@localhost:~/zephyrproject/zephyr$ set | grep ZEPHYR ZEPHYR_SDK_INSTALL_DIR=/opt ZEPHYR_TOOLCHAIN_VARIANT=zephyr
^ generic cmake
Zephyr project file generic.cmake
looks to be the most likely source of the fatal error message above. A search for part of the message text pattern gives:
ted@localhost:~/zephyrproject$ grep -nr 'unable to find the toolchain' ./* ./zephyr/cmake/compiler/xcc/generic.cmake:8: message(FATAL_ERROR "Zephyr was unable to find the toolchain. Is the environment misconfigured? ./zephyr/cmake/compiler/gcc/generic.cmake:8: message(FATAL_ERROR "Zephyr was unable to find the toolchain. Is the environment misconfigured? ./zephyr/doc/releases/release-notes-2.0.rst:1230:* :github:`15587` - Zephyr was unable to find the toolchain ./zephyr/doc/releases/release-notes-2.1.rst:663:* :github:`19802` - Zephyr was unable to find the toolchain after update to zephyr version 1.13.0 ted@indulkana:~/zephyrproject$
The content of generic.cmake
raises a question, how and where may we as users set the variable ${TOOLCHAIN_HOME}
? Here is the cmake file, line 5 catches our attention because TOOLCHAIN_HOME is passed to a function as the only path set to search for Zephyr project's build tools:
1 # SPDX-License-Identifier: Apache-2.0 2 3 set_ifndef(CC gcc) 4 5 find_program(CMAKE_C_COMPILER ${CROSS_COMPILE}${CC} PATHS ${TOOLCHAIN_HOME} NO_DEFAULT_PATH) 6 7 if(CMAKE_C_COMPILER STREQUAL CMAKE_C_COMPILER-NOTFOUND) 8 message(FATAL_ERROR "Zephyr was unable to find the toolchain. Is the environment misconfigured? 9 User-configuration: 10 ZEPHYR_TOOLCHAIN_VARIANT: ${ZEPHYR_TOOLCHAIN_VARIANT} 11 Internal variables: 12 CROSS_COMPILE: ${CROSS_COMPILE} 13 TOOLCHAIN_HOME: ${TOOLCHAIN_HOME} 14 ") 15 endif() 16 17 execute_process( 18 COMMAND ${CMAKE_C_COMPILER} --version 19 RESULT_VARIABLE ret 20 OUTPUT_QUIET 21 ERROR_QUIET 22 ) 23 if(ret) 24 message(FATAL_ERROR "Executing the below command failed. Are permissions set correctly? 25 '${CMAKE_C_COMPILER} --version' 26 " 27 ) 28 endif()
^ General RTOS Considerations
^ References