Giter VIP home page Giter VIP logo

eclipse-plugin's Introduction

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:

  • Java SE 8 Update 212 or later
  • Eclipse 2019-12 (4.14.0) with CDT 9.10.0

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.

  1. Go to Help in the menu bar, and select Install New Software.
  2. Click the Add button to add a new update site:
  3. Select the newly added update site.
  4. Select Zephyr Project and Zephyr Project Development Support and click Next.
  5. Follow the instructions on the wizards to install the plugin.
  6. Restart Eclipse when asked to do so.

Updating the Plugin

Go to Help in the menu bar, and select Check 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 World project.

  1. Go to File, New and Project...
  2. In the dialog, select Zephyr Application under Zephyr Project.
  3. Click Next
  4. Type in the name for the project.
  5. Under Zephyr Base Path (ZEPHYR_BASE), put in (or browse to) the path to the Zephyr tree.
  6. Click Next
  7. Select the toolchain variant to be used with this project. Depending on the selection, different set of options will need to be set. These options are the same one as described in the Getting Started - Set Up a Toolchain.
  8. Click Next
  9. Type in the board name of the targat hardware.
    • Or click on the check box and select one below.
  10. Click Finish
  11. A new project is created under Eclipse.
  12. It is recommended to use the C/C++ perspective.
    1. Go to Window, Perspective, Open Perspective, and Other....
    2. Select C/C++ and click Ok.

Building the Project

  • Right click on the project name under Project Explorer and select Build Project.

Run Emulator

  1. Right click on the project name under Project Explorer and select Run As, and Run Configurations....
  2. Right click on Zephyr Emulator Target, and New.
    • Or, select a previously created configuration.
  3. In the newly created configuration, make sure the project is the correct one.
  4. Click Run
  5. The Console view will contain the output of the emulator.
  6. Click the red square Terminate to stop the emulator.

Flash to Hardware

  1. Right click on the project name under Project Explorer and select Run As, and Run Configurations....
  2. Right click on Zephyr Hardware Target, and New.
    • Or, select a previously created configuration.
  3. In the newly created configuration, make sure the project is the correct one.
  4. Click Run
  5. The Console view will contain the output of the flashing process.

Debugging on Emulator

  1. Right click on the project name under Project Explorer and select Debug As, and Debug Configurations....
  2. Right click on Zephyr Emulator Target, and New.
    • Or, select a previously created configuration.
  3. In the newly created configuration, make sure the project is the correct one, and the C/C++ Application points to the correct ELF file.
  4. In the Debugger tab:
    • The GDB Command should be pre-populated with the GDB project discovered by CMake. If not, select the correct GDB program corresponding to the target.
    • Port number is pre-populated according to the target type. Change if it is not correct.
  5. Click Debug and the debug session should start.
  6. Follow Eclipse's debugging workflow to debug the application.

Debugging on Hardware

  1. Right click on the project name under Project Explorer and select Debug As, and Debug Configurations....
  2. Right click on Zephyr Hardware Target, and New.
    • Or, select a previously created configuration.
  3. In the newly created configuration, make sure the project is the correct one, and the C/C++ Application points to the correct ELF file.
  4. In the Main tab, default is to also flash the image to the target. This can be skipped with the appropriate option.
  5. In the Debugger tab:
    • The GDB Command should be pre-populated with the GDB project discovered by CMake. If not, select the correct GDB program corresponding to the target.
    • Port number is pre-populated according to the target type. Change if it is not correct.
  6. Click Debug and the debug session should start.
  7. Follow Eclipse's debugging workflow to debug the application.

How to Build

Prerequisites

The minimum requirements for building the plugins are:

  • Java SE 11.0.3
  • Maven 3.3.9 or later (except 3.6.1)

Running Maven

$ mvn clean package

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_SUPPORT must be enabled in the project configuration file to export information on threads. Also, the board's openocd configuration file must have the following line:

$_TARGETNAME configure -rtos auto

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

  • Eclipse is not responding after clicking Finish at project creation.

Due to the Zephyr source tree being linked within the project, it may take some time for Eclipse to traverse the whole tree. For example, after running sanity check, the output folder contains a large amount of files for Eclipse to traverse.

eclipse-plugin's People

Contributors

dcpleung avatar martanav avatar nashif avatar novalisek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

eclipse-plugin's Issues

Unable to build or run due to Java error

Hey all, I am currently working with Zephyr for my senior design project. Building/running programs works fine via command line, but I wanted to try and get Eclipse functional for our project demo.

Following the wiki instructions, I run into this error when building:

image

I have tried using the current version of OpenJDK and also downgraded to OpenJDK 8 with no luck. Error occurs after building appears to be completed. Console image:

image

I am on Ubuntu 20.04 and using Eclipse 2022-03 (4.23.0)

Files in modules not found

Eclipse version 2020-12 @ ubuntu 20.04.02 LTS
Zephyr v2.6

Projects created using this plugin doesn't build.
Both a qemu_cortex_m3 and a frdm_k64f build fails on missing files. Files I can find in the modules coming from the modules folder. (core_cm3.h respectively MK64FN1M0VLL12-pinctrl.dtsi)

A native_posix project does build though

Searching for Binaries has encountered a problem.

When I was creating new project all goes OK.
But when I click project icon in "Project browser" I get this window .
Screenshot 2020-02-11 at 11 07 22

Project look empty but in editor window main.c file is open.
Screenshot 2020-02-11 at 11 14 02

I was select "GNU ARM Toolchain".

Regards,
Robert

Support Build zephyr application using west

label:enhancement

Problem description
Plugin supports build with ninja/make as options in project wizard.

However, from command line, it is possible to build with west.
Also, there is an option to launch debugserver with west.

Solution
Adding west as build option in the project creation wizard.

Unable to create a project on ARM Development Studio

Hi!
I am trying to import an external zephyr project for a custom board into ARM Development Studio. I added the eclipse-plugin, started creating a new project for a "Zephyr Application" and at the end, after stating the target board, pressing "Finish" does nothing. The interface does not register a click and nothing happens. Note that in my case the application does not hang or become unresponsive (as mentioned in the troubleshooting section). Pressing Finish just doesn't do anything. Please let me know if you have any suggestions.

Trying to resolve cmake build error=2, on build

I can build from the command line via Cmake or west. I cannot build via "Build Project" in Eclipse.

Mac 10.15.7
Eclipse Version: 2020-09 (4.17.0) / Build id: 20200910-1200

Error Description:

Errors occurred during the build.
Errors running builder 'Zephyr Application Builder' on project 'cork-demo1'.
Error invoking CMake for project cork-demo1!
Cannot run program "cmake" (in directory "/Users/john.norair/repos/cork-demo1/build"): error=2, No such file or directory
Error invoking CMake for project cork-demo1!
Cannot run program "cmake" (in directory "/Users/john.norair/repos/cork-demo1/build"): error=2, No such file or directory

The directory is most certainly present and with permissions that allow operation from command line.

I saw a previous issue -- which was apparently resolved -- although the interim resolution was to use an older version of Eclipse CDT. I will attempt to install an older version, but I am reporting this issue nonetheless.

Eclipse plugin does not work

Hi

I have problem occured when use ecplise plugin :

Errors occurred during the build.
Errors running builder 'Zephyr Application Builder' on project 'test'.
java.lang.NullPointerException

OS: Windows 10
Ecplise : 2020-09

Any ideas ?

image

Best regards

Add post-build or pre-flash custom command to be able to create and use signed app

Hi,
I need to sign the application before flashing, so that it works with mcuboot.
Now I am doing manualy:

west build
west sign -t imgtool -- --key mcuboot\test-root-rsa-2048.pem
west flash --skip-rebuild -- --hex-file build/zephyr/zephyr.signed.hex

can those steps be done in Eclipse?

If not, adding some "post-build" or "pre-flash" commands would be useful.

Or may be there could be option "create signed app" somewhere, with path to the public key and then it could create and flash signed app automaticaly ...

Plugin destroys Eclipse 2020-09

After installing the plugin on an actual Eclipse version such as 2020-09, Eclipse only shows the splash screen and do not start anymore.
I have the same issue on Ubuntu18.04 and Debian 10.
With Eclipse 2020-12 it works.

Still can't use the plugin

I had reported the zephyrproject-rtos/zephyr#28053 in September 2020.

But I still facing the same errors

Errors occurred during the build.
Errors running builder 'Zephyr Application Builder' on project 'Sticky'.
java.lang.NullPointerException

while the build log from the console looks like

----- Generating CMake files for board nrf52dk_nrf52832 in build
d:\tools\windows\msys64\mingw64\bin\cmake.exe -DBOARD=nrf52dk_nrf52832 -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON D:\projects\Sticky\Sticky
-- Application: D:/projects/Sticky/Sticky
-- Zephyr version: 2.4.0 (D:/projects/Sticky/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nrf52dk_nrf52832
-- Cache files will be written to: C:\Users\ai\AppData\Local/.cache/zephyr
-- Found dtc: D:/tools/windows/msys64/usr/bin/dtc.exe (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (D:/tools/windows/GNU Arm Embedded Toolchain/9.2.1 2019-q4)
-- Found BOARD.dts: D:/projects/Sticky/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
-- Generated zephyr.dts: D:/projects/Sticky/Sticky/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: D:/projects/Sticky/Sticky/build/zephyr/include/generated/devicetree_unfixed.h
Parsing D:/projects/Sticky/zephyr/Kconfig
Loaded configuration 'D:/projects/Sticky/Sticky/build/zephyr/.config'
No change to configuration in 'D:/projects/Sticky/Sticky/build/zephyr/.config'
No change to Kconfig header in 'D:/projects/Sticky/Sticky/build/zephyr/include/generated/autoconf.h'
-- Configuring done
-- Generating done
-- Build files have been written to: D:/projects/Sticky/Sticky/build
----- Done generating CMake files for board nrf52dk_nrf52832 in build

Here is my context:
Eclipse: 2020-09 (4.17.0)
Plugin: 0.2.99.202009250453
Java: 14.0.2

Due to limitations, I can't attach the full config of my Eclipse, so let me know if you need extra info to fix the issue.

Loading Target's CPU Register and memory

I am not able to load my targets CPU registers and memory address values with eclipse-plugin in debug mode.
Where can I find information about loading this values in debugger?

Currently my target is NUCLEO-H745ZI-Q and under development.

Device Tree (board file) Expanding - Eclipse currently blocking out code wrong

Hi,

I'm new to Zephyr, so this may already be possible, but I'm wondering if the device tree can be expanded, using the board file.

My example use case is I started a project using the "samples/basic/button/" sample, and with the "nrf51dk_nrf51422" board, however, the preprocessor line #if DT_NODE_HAS_STATUS(SW0_NODE, okay), is failing and thus eclipse has blocked out sections of code, which is incorrect (it compiles fine, and I know sw0 is in board file).
Device Tree Expansion Failure

For background details, I'm using Eclipse 2020-06, newest plugin (I downloaded from the marketplace), Windows 10, latest Zephyr (downloaded today).

Thanks in advance.

Plugin does not work with R2019-12

The plugin does not work with Eclipse R2019-12. When creating a new project, there is NullPointerException when trying to expand the project in the Project Explorer. This is probably due to some new changes in CDT.

Zephyr application preferences are not updated corectly after change.

Hi,

when changing the Toolchain path [(Project)Properties->Zephyr Application->Toolchain]
not all settings in the Zephyr .prefs file are updated correctly!

CMAKE_CXX_COMPILER, CMAKE_C_COMPILER, CMAKE_GDB stay unchanged!

Proposal: Create environment variable! Not use absolute path!

Note: Also missing configuration field for CMAKE_MAKE_PROGRAM path!

Regards,
Fränz

Help with Debug configuration using --runner jlink

Hi,

I'm not sure if this is the right place to post. I'm trying to setup a hardware debug configuration for a STM32F411RE Nucleo board (the debug interface is JLink). The Nucleo ST Link is flashed to behave like a Segger JLink

I can run west flash --runner jlink from the command prompt and it successfully programs the flash.

When I setup the debug configuration to use west (invoke flash) and provide argument '--runner jlink' I get the following errors
image

Debug Configuration setup
image

image

image

Thanks

Debug Configuration - Zephyr HW target - not reloaded additional West arguments

Summary:
Additional arguments to West are saved but not reloaded after reopening debug configuration.

Environment:
OS: Windows 10
Java sdk 11
Eclipse CDT (C/C++ Development Tooling) 09-2019

Steps to reproduce:
Open Debug Configuration -> Zephyr hardware Target (ServerGdb hardware)
Select Invoke West to flash hardware target and enter additional arguments to West.
Select Invoke West to start debug server and enter additional arguments to West.
Apply and hit Debug.
reopen previously entered debug configuration

Expected result:
Arguments should be saved in dialog when reopen.

Actual result:
image

Project was not created correctly. No Zephyr build configuration in project.

Hi,
I am having problem compiling project created by older version of the plugin. I am getting "Project was not created correctly.
No Zephyr build configuration in project."
I am using eclipse 2020-09

So I created new project by new project wizzard with new plugin and checked what is different and I think there are no changes except project name.

Anyway, the easiest way to reproduce is

  • create new workspace1

  • create new example application test1

  • compiles without problem

  • create new workspace2

  • import test1 from workspace1 (doesn't matter if "copy projects into workspace" is selected or not)

  • doesnt't compile with "Project was not created correctly. No Zephyr build configuration in project."

What is the plugin searching for to indicate. that there is no zephyr build configuration in project?
Are there any files stored outside of project, which include which projects were created by the plugin?

Thanks.

Can't build for esp32 board

I have been using the Eclipse Plugin successfully for the disco_l475_iot1 board.
Now I would like to use the esp32.

I followed the documentation for this board to set up the espressif toolchain.
I have verified that I am able to build and flash samples using west.
Zephyr, the SDK, the espressif toolchain, west, and Eclipse are all up-to-date versions and I'm running Linux.

Unfortunately, it seems that the Eclipse Plugin does not support this toolchain variant.
Naive use of the standard Zephyr SDK will fail like this:
/opt/zephyr-sdk/xtensa//xtensa-zephyr-elf/bin/xtensa-zephyr-elf-gcc not found - Please check your toolchain installation

It appears that:

  • the build process looks for the ESP32 toolchain in the main SDK folder, which is not the correct place
  • it incorrectly concatenates strings, or tries to select a subfolder that is an empty string

I tried setting up a Custom Toolchain in the project preferences, with ZEPHYR_TOOLCHAIN_VARIANT set to espressif and the toolchain path pointing to the correct location.
This build setting is silently ignored and erased by the plugin and it will default back to the standard Zephyr SDK option, yielding the same error as above.

The failed builds also break the build system somewhat. It's required to clean the project before rebuilding, otherwise the build system will crash with a NullPointerException.

I'd be happy to try out more, but I'm not sure where to go from here.

Using Eclipse-Plugin with STM32CubeIDE Debugger

I've just found, that it is possible to use STM32CubeIDE GDB debugger in Eclipse.
The huge advantages are:

  • breakpoints
  • variables watch
  • setting speed of ST-LINK V2-1/V3 as you would do it in STM32CubeIDE

To do so just follow the steps in your Eclipse CDT 2020-03:

  1. Install Zephyr Eclipse Plug-in from Eclipse Marketplace ( look for Zephyr ): Help -> Eclipse marketplace...
  2. Create simple Zephyr Application project as it was described here or by ist
  3. Now go to Help -> Install New Software... and add the following string to it: STM32CubeIDE Releases - http://sw-center.st.com/stm32cubeide/updatesite1
  4. Choose STM32CubeIDE ( IDE ) and push Next button.
  5. Wait for installation and restart Eclipse
  6. Go to Help -> Check for Updates menu with ST's blue MX symbol. Install all updates and restart Eclipse again after request.
  7. Open your Zephyr project created in step 2 and go to Debug configurations. Now you should be able to choose STM32 Cortex-M C/C++ Application debug methods.

I've tested only ST-LINK (ST-LINK GDB Server) and it worked fine for me with all advantages from above.

NOTE: Sometimes it is needed to delete .launch file created by STM32CubeIDE manually to run your program properly. Delete your STM32 config for it and recreate it. Also important to change compile flags sometimes like here.

Could/Should we add dependencies from STM32CubeIDE into Zephyr Eclipse Plug-in?

Zephyr Application Project - Not saved/reloaded Toolchain selection/corresponding path

Summary:
Previously applied Toolchan Varaint selection and corresponding path configuration are not reloaded in new Zephyr Aplication Project - Toolchain Selection.

Environment:
OS: Windows 10
Java sdk 11
Eclipse CDT (C/C++ Development Tooling) 09-2019

Steps to reproduce:
Create a simple Hello World Zephyr Application project.
Fill required in configuration.. Hit Finish button.
...
Create another project selecting Zephyr Application again.

Expected result:
Toolchain variant and corresponding path config should be saved.

Actual result:
image

eclipse XCC not work

LOG:

----- Generating CMake files for board qemu_xtensa in build
C:\Program Files\CMake\bin\cmake.exe -DBOARD=qemu_xtensa -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON C:\Users\yxh\eclipse-workspace\te
-- Application: C:/Users/yxh/eclipse-workspace/te
-- Zephyr version: 2.4.99 (E:/work/rtos_work/zephyrproject/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: qemu_xtensa
-- Cache files will be written to: E:/work/rtos_work/zephyrproject/zephyr/.cache
CMake Error at E:/work/rtos_work/zephyrproject/zephyr/cmake/generic_toolchain.cmake:65 (include):
  include could not find load file:

    c:/usr/xtensa/cmake/toolchain/xcc/generic.cmake
Call Stack (most recent call first):
  E:/work/rtos_work/zephyrproject/zephyr/cmake/app/boilerplate.cmake:588 (include)
  CMakeLists.txt:3 (include)


-- Found BOARD.dts: E:/work/rtos_work/zephyrproject/zephyr/boards/xtensa/qemu_xtensa/qemu_xtensa.dts
CMake Error at E:/work/rtos_work/zephyrproject/zephyr/cmake/dts.cmake:157 (message):
  command failed with return code: 
-- Configuring incomplete, errors occurred!
Call Stack (most recent call first):
  E:/work/rtos_work/zephyrproject/zephyr/cmake/app/boilerplate.cmake:589 (include)
  CMakeLists.txt:3 (include)

SYSTEM:
WINDOWS 10

TOOL:
XCC

FAIL:
c:/usr/xtensa/cmake/toolchain/xcc/generic.cmake File path is wrong

after creating a project a fatal error occurs " searching for binaries (projectname)"

Steps to reproduce:

1:
image
2:
image
3:
image
result:
image
image

"An internal error occurred during: "Searching for Binaries (test4)".
Receiver class org.zephyrproject.ide.eclipse.core.build.toolchain.ZephyrGCCToolChain does not define or inherit an implementation of the resolved method 'abstract java.util.List getBinaryParserIds()' of interface org.eclipse.cdt.core.build.IToolChain. "

What i've done:

+Installed maven, ammended it to my path
+installed the latest java

i can build projects through the command line

Arguments taken from "Invoke west to start debug server" are not always correctly parsed.

Summary:
Arguments taken from "Invoke west to start debug server" are not correctly parsed.

Environment:
OS: Windows 10
Java sdk 11
Eclipse CDT (C/C++ Development Tooling) 09-2019

Steps to reproduce:
Open Debug Configuration -> Zephyr hardware Target (ServerGdb hardware)
Select Invoke West to start debug server and enter additional arguments for example runner invocation (-r runner)
Apply and hit Debug.

Actual results
image

image

No Error in case:
image

Debug on Target Hardware not working

Hello, I have installed the eclipse plugin (0.2.99) from the eclipse marketplace. I was able to create a simple hello project, build it and flash it to a BL653 development board I have. All worked just fine except I am unable to debug on my target hardware. It seems to be either skipping breakpoints or not entering main. I followed the instructions in this repo readme file. Attached are screenshots of my debug configuration settings and the IDE output during debugging. Any idea how to solve this? Thanks!

Screenshot from 2021-04-08 11-46-32
Screenshot from 2021-04-08 11-46-17
Screenshot from 2021-04-08 11-45-06
Screenshot from 2021-04-08 11-44-43

pyOCD failed to load "zephyr.elf"

Im trying to debug with pyocd and im getting this error

0/1] Debugging nrf52_blenano2
-- west debugserver: using runner pyocd
-- runners.pyocd: pyOCD GDB server running on port 3333
0000515:INFO:board:Target type is nrf52
0000710:INFO:dap:DP IDR = 0x2ba01477 (v1 rev2)
0000797:INFO:ap:AP#0 IDR = 0x24770011 (AHB-AP var1 rev2)
0000874:INFO:ap:AP#1 IDR = 0x02880000 (proprietary)
0000879:INFO:target_nRF52:NRF52832 not in secure state
0000898:INFO:rom_table:AP#0 ROM table #0 @ 0xe00ff000 (designer=244 part=006)
0000910:INFO:rom_table:[0]<e000e000:SCS-M4 class=14 designer=43b part=00c>
0000920:INFO:rom_table:[1]<e0001000:DWT class=14 designer=43b part=002>
0000929:INFO:rom_table:[2]<e0002000:FPB class=14 designer=43b part=003>
0000939:INFO:rom_table:[3]<e0000000:ITM class=14 designer=43b part=001>
0000950:INFO:rom_table:[4]<e0040000:TPIU-M4 class=9 designer=43b part=9a1 devtype=11 archid=0000 devid=0:0:ca1>
0000958:INFO:rom_table:[5]<e0041000:ETM-M4 class=9 designer=43b part=925 devtype=13 archid=0000 devid=0:0:0>
0000964:INFO:cortex_m:CPU core #0 is Cortex-M4 r0p1
0000987:INFO:cortex_m:FPU present: FPv4-SP
0000996:INFO:dwt:4 hardware watchpoints
0001003:INFO:fpb:6 hardware breakpoints, 4 literal comparators
0001087:CRITICAL:main:uncaught exception: [Errno 98] Address already in use
Traceback (most recent call last):
File "/home/zephyr/.local/lib/python3.6/site-packages/pyocd/main.py", line 344, in run
self._COMMANDSself._args.cmd
File "/home/zephyr/.local/lib/python3.6/site-packages/pyocd/main.py", line 579, in do_gdbserver
server_listening_callback=self.server_listening)
File "/home/zephyr/.local/lib/python3.6/site-packages/pyocd/gdbserver/gdbserver.py", line 151, in init
self.abstract_socket.init()
File "/home/zephyr/.local/lib/python3.6/site-packages/pyocd/utility/sockets.py", line 33, in init
self.listener.bind((self.host, self.port))
OSError: [Errno 98] Address already in use
ERROR: command exited with status 1: pyocd gdbserver -p 3333 -T 4444 -t nrf52
FAILED: zephyr/cmake/flash/CMakeFiles/debugserver
cd /home/zephyr/eclipse-workspace/SmartEggLite/build && /snap/cmake/252/bin/cmake -E env /home/zephyr/.local/bin/west debugserver --skip-rebuild
ninja: build stopped: subcommand failed.

Cannot open newly created project's tree

I created a new Zephyr Application, with zephyr-demo as the project's name, following the given procedure
File > New Project > C/C++ Project > Zephyr > Zephyr Application

All the paths (Zephyr base, Zephyr SDK, ...) are set correctly and do not contain spaces.

The project is created without problems (and its files are visible in OS' file explorer), but, when I try to navigate through project files in Eclipse's left panel, the IDE shows this error message:

An internal error occurred during: "Searching for Binaries (zephyr-demo)".
Receiver class org.zephyrproject.ide.eclipse.core.build.toolchain.ZephyrGCCToolChain does not define
or inherit an implementation of the resolved method 'abstract java.util.List getBinaryParserIds()'
of interface org.eclipse.cdt.core.build.IToolChain.

The toolchain should automatically be found inside the SDK folder (in my case is arm-zephyr-eabi), but that doesn't happen for some reason. I'm struggling to find a solution.


OS: Windows 10
Eclipse version: 2022-12
Plugin version: latest (v0.2.99-20220329)
Chosen board: nucleo_f401re
Chosen toolchain: arm-zephyr-eabi

C++ pharser indexer not work

I was create project with wizard. After creating and compiling pharser and indexer works fine.
Then I change name main.c to main.cpp. And repair CMakeLists.txt to "src/main.cpp".
Compiling was Ok. But pharser trow errors. If it is zephyr function "Sytax error" or "Invalid arguments".

Is it possible to implement pharser for cpp files?

Eclipse debug QEMU zephyr fail.

Debug message is follow:

[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: cortex-m3
qemu-system-arm: warning: nic stellaris_enet.0 has no peer
qemu-system-arm: -s: Failed to find an available port: Address already in use
FAILED: zephyr/CMakeFiles/debugserver
cd /home/fu/eclipse-workspace/hello_world/build && /home/fu/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb -nographic -vga none -net none -pidfile qemu.pid -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -icount shift=6,align=off,sleep=off -rtc clock=vm -s -S -kernel /home/fu/eclipse-workspace/hello_world/build/zephyr/zephyr.elf
ninja: build stopped: subcommand failed.

Debug Environment:
zephyr-sdk-0.11.4.
project is eclipse newly create "hello world".

Please help me solve this problem.Thanks!

eclipse-plugin does not work on xtensa Xplorer ,Are there any plans to support these(xtensa Xplorer/ arm DS5/arc MetaWare IDE)

Installation problem:

Cannot complete the install because one or more required items could not be found.
  Software being installed: Zephyr Project Development Support 0.2.99.202009250453 (org.zephyrproject.ide.eclipse.feature.group 0.2.99.202009250453)
  Missing requirement: Zephyr Project Development Support 0.2.99.202009250453 (org.zephyrproject.ide.eclipse.feature.group 0.2.99.202009250453) requires 'com.google.gson 0.0.0' but it could not be found

Can't build Zephyr application, java null pointer exception is triggered during build due to missing CMAKE_CXX_COMPILER information

When trying to build a zephyr application, I get a Java null exception on project.

image

During build process, the plugin reads information from cache (CMakeCache.txt). When it reaches CMAKE_CXX_COMPILER, information retrieved is null, since CMakeCache.txt includes CMAKE_CXX_COMPILER as a STRING, and the plugin is looking for FILEPATH.

Using: Ubuntu 20.04
CDT 2019-12, CDT 2021-12, 2021-06, 2021-03
Zephyr SDK 0.13.1
Zephyr 2.7.1

Misconfigured environment

If I am running the latest eclipse plugin v0.22.99 ( available from Eclipse Marketplace ) on Eclipse CDT v2020-03 I am getting following error:

----- Generating CMake files for board nucleo_l432kc in build
/usr/local/bin/cmake -DBOARD=nucleo_l432kc -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON /Users/your_user_name/eclipse-workspace/nucleo_l432kc__TestApp
-- Application: /Users/your_user_name/eclipse-workspace/nucleo_l432kc__TestApp
-- Zephyr version: 2.2.99 (/Users/your_user_name/Documents/DevProjects/zephyrproject/zephyr)
-- Board: nucleo_l432kc
-- Found west: /Applications/anaconda3/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/usr/local/bin)
CMake Error at /Users/your_user_name/Documents/DevProjects/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: gnuarmemb
Internal variables:
CROSS_COMPILE: /usr/local/bin/bin/arm-none-eabi-
-- Configuring incomplete, errors occurred!
TOOLCHAIN_HOME: /usr/local/bin
Call Stack (most recent call first):
/Users/your_user_name/Documents/DevProjects/zephyrproject/zephyr/cmake/generic_toolchain.cmake:70 (include)
/Users/your_user_name/Documents/DevProjects/zephyrproject/zephyr/cmake/app/boilerplate.cmake:502 (include)
CMakeLists.txt:3 (include)
----- Done generating CMake files for board nucleo_l432kc in build

Same may happen sometimes by building with west. But calling zephyr-env.sh script three times solves my problem. In eclipse it is not possible.

Zephyr plugin hello world example CONFIG_BOARD could not be resolved

Hello,
When I try to create the project I get the following error for the hello world example.

Symbol 'CONFIG_BOARD' could not be resolved

When I build the project I get

Errors occurred during the build.
Errors running builder 'Zephyr Application Builder' on project 'test'.
java.lang.NullPointerException

How to fix it? Code is as below

#include <zephyr.h>
#include <sys/printk.h>

void main(void)
{
	printk("Hello World! %s\n", CONFIG_BOARD);
}

Problem Opening Wizard

I followed the "How to Install" guide step by step.
Unfortunately it fails between step 2 and 3.

Infos on About Eclipse IDE:
Version: 2024-03 (4.31.0)
Build id: 20240307-1437

Error message:

image

Log Info concerning Zephyr in the .metadata/.log file:

!ENTRY org.eclipse.launchbar.core 2 0 2024-04-17 19:20:15.260
!MESSAGE Enablement expression is missing for config provider for org.zephyrproject.ide.eclipse.core.launch.descriptorType.default

Unable to build cross-compile Zephyr project using eclipse-plugin

I'm successful in building qemu_riscv64 though west using command line. (I've built riscv64-zephyr-elf toolchain from github.com/riscv/riscv-gnu-toolchian)

export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
export CROSS_COMPILE=/opt/riscv64-zephyr-elf/bin/riscv64-zephyr-elf-
west build -b qemu_riscv64 samples/hello_world
west build -t run

It means the environment on my Ubuntu 18.04 is perfectly fine.

If I create a default project in Eclipse using Zephyr's plugin and Zephyr's SDK, the project builds and runs fine. But when I select the cross-compile in this project's settings instead of ZEPHYR SDK, build fails.

I'm creating qemu_riscv64 hello_world application in Eclipse (2020-03) through the Zephyr Application option in Create Project. After selecting the ZEPHYR_BASE, I'm setting ZEPHYR_TOOLCHAIN_VARIANT to cross-compile and CROSS_COMPILE to /opt/riscv64-zephyr-elf/bin/riscv64-zephyr-elf- while creating project. When I build this project, I get the following error:

----- Generating CMake files for board qemu_riscv64 in build
/usr/local/bin/cmake -DBOARD=qemu_riscv64 -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON /var/workspace/ecclipse_zephyr/riscv64
-- Application: /var/workspace/ecclipse_zephyr/riscv64
-- Zephyr version: 2.2.99 (/var/repos/zephyrproject/zephyr)
-- Found PythonInterp: /usr/bin/python3.6 (found suitable version "3.6.9", minimum required is "3.6") 
-- Board: qemu_riscv64
-- Found west: /var/mentor/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")
CMake Error at /var/repos/zephyrproject/zephyr/cmake/generic_toolchain.cmake:64 (include):
  include could not find load file:

    /var/repos/zephyrproject/zephyr/cmake/toolchain/cross-compiler/generic.cmake
-- Found BOARD.dts: /var/repos/zephyrproject/zephyr/boards/riscv/qemu_riscv64/qemu_riscv64.dtsCall Stack (most recent call first):

  /var/repos/zephyrproject/zephyr/cmake/app/boilerplate.cmake:484 (include)
  CMakeLists.txt:3 (include)

CMake Error at /var/repos/zephyrproject/zephyr/cmake/dts.cmake:146 (message):
  command failed with return code: No such file or directory
Call Stack (most recent call first):
  /var/repos/zephyrproject/zephyr/cmake/app/boilerplate.cmake:485 (include)
-- Configuring incomplete, errors occurred!  CMakeLists.txt:3 (include)

----- Done generating CMake files for board qemu_riscv64 in build

This error is coming because of the execution of line 64 in generic_toolchain.cmake. This means the correct cmake file isn't being created when I build through eclipse.

Build fails in first iteration, java null pointer exception is triggered during build due to missing CMAKE_C_COMPILER information

When trying to build a zephyr application, I get a Java null exception on project during first build. After cleaning and building again, build is successful.

image

During build process, the plugin reads information from cache (CMakeCache.txt). When it reaches CMAKE_C_COMPILER, information retrieved is null, since CMakeCache.txt includes CMAKE_C_COMPILER as a STRING, and the plugin is looking for FILEPATH.

Using: Ubuntu 20.04
CDT 2019-12, CDT 2021-12, 2021-06, 2021-03
Zephyr SDK 0.13.1
Zephyr 2.7.1

Problem after reopen Eclipse.

Configuring project using Zephyr eclipse wizard works. But when I reopen Eclipse, I get next error.
Screenshot 2020-02-12 at 08 53 44

And I can not build anzmore. Also Folder in Project exloprer is empty. And If I want to click next error is shown.
Screenshot 2020-02-12 at 08 57 45

Any idea.

Regards,
Robert

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.