build: fix getting cmake_c_compiler from cache
CMakeCache.txt is showing CMAKE_C_COMPILER as a STRING instead of FILEPATH the first time that we build from plugin. When plugin retrieves cache information, it is failing to recover CMAKE_C_COMPILER, and triggering an exception during build. Searching for STRING if FILEPATH is not found solves the issue.
Signed-off-by: Marta Navarro marta.navarro@intel.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Eclipse Plug-in for Zephyr Project
Overview
This contains a set of Eclipse plug-ins which extends Eclipse CDT to support application development on Zephyr RTOS, including building and target hardware debugging.
How to Install
Prerequisites
The minimum requirements for running the plugins are:
Also, please make sure the development host is setup to build Zephyr application by following the Getting Started guide.
Installing the Plugin
The plugin can be installed via update sites in Eclipse.
Helpin the menu bar, and selectInstall New Software.Addbutton to add a new update site:zephyr-eclipseZephyr ProjectandZephyr Project Development Supportand clickNext.Updating the Plugin
Go to
Helpin the menu bar, and selectCheck for Updates.How to Use
Create a New Project for Zephyr Application
Project creation is similar to creating other project type under Eclipse. This will create a
Hello Worldproject.File,NewandProject...Zephyr ApplicationunderZephyr Project.NextZephyr Base Path (ZEPHYR_BASE), put in (or browse to) the path to the Zephyr tree.NextNextFinishC/C++perspective.Window,Perspective,Open Perspective, andOther....C/C++and clickOk.Building the Project
Project Explorerand selectBuild Project.Run Emulator
Project Explorerand selectRun As, andRun Configurations....Zephyr Emulator Target, andNew.RunConsoleview will contain the output of the emulator.Terminateto stop the emulator.Flash to Hardware
Project Explorerand selectRun As, andRun Configurations....Zephyr Hardware Target, andNew.RunConsoleview will contain the output of the flashing process.Debugging on Emulator
Project Explorerand selectDebug As, andDebug Configurations....Zephyr Emulator Target, andNew.C/C++ Applicationpoints to the correct ELF file.Debuggertab:GDB Commandshould be pre-populated with the GDB project discovered by CMake. If not, select the correct GDB program corresponding to the target.Debugand the debug session should start.Debugging on Hardware
Project Explorerand selectDebug As, andDebug Configurations....Zephyr Hardware Target, andNew.C/C++ Applicationpoints to the correct ELF file.Maintab, default is to also flash the image to the target. This can be skipped with the appropriate option.Debuggertab:GDB Commandshould be pre-populated with the GDB project discovered by CMake. If not, select the correct GDB program corresponding to the target.Debugand the debug session should start.How to Build
Prerequisites
The minimum requirements for building the plugins are:
Running Maven
The resulting p2 repository is at
maven/repository/target/repository.OpenOCD and Thread awareness
The OpenOCD in the Zephyr SDK can export information on threads for GDB. To utilize this capability,
CONFIG_OPENOCD_SUPPORTmust be enabled in the project configuration file to export information on threads. Also, the board’s openocd configuration file must have the following line:This line tells OpenOCD to search for exported information on threads.
With the correct configuration mentioned above, information on available threads will be displayed in Eclipse’s debug perspective.
Troubleshooting