Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still can't use the plugin #43

Open
tolezk opened this issue Jan 27, 2021 · 8 comments
Open

Still can't use the plugin #43

tolezk opened this issue Jan 27, 2021 · 8 comments
Assignees

Comments

@tolezk
Copy link

tolezk commented Jan 27, 2021

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.

@tolezk
Copy link
Author

tolezk commented Jan 28, 2021

Some additional info from log:

!ENTRY org.eclipse.core.resources 4 2 2021-01-28 15:29:37.379
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.core.internal.preferences.EclipsePreferences.put(EclipsePreferences.java:860)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.putValue(ScopedPreferenceStore.java:455)
	at org.zephyrproject.ide.eclipse.core.build.ZephyrApplicationBuildConfiguration.parseCMakeCache(ZephyrApplicationBuildConfiguration.java:632)
	at org.zephyrproject.ide.eclipse.core.build.ZephyrApplicationBuildConfiguration.cmakeBuild(ZephyrApplicationBuildConfiguration.java:324)
	at org.zephyrproject.ide.eclipse.core.build.ZephyrApplicationBuildConfiguration.build(ZephyrApplicationBuildConfiguration.java:366)
	at org.zephyrproject.ide.eclipse.core.ZephyrApplicationBuilder.build(ZephyrApplicationBuilder.java:84)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:832)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:515)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:412)
	at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:291)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

!ENTRY org.eclipse.core.resources 4 75 2021-01-28 15:29:37.380
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.zephyrproject.ide.eclipse.core 4 75 2021-01-28 15:29:37.381
!MESSAGE Errors running builder 'Zephyr Application Builder' on project 'Sticky'.
!STACK 0
java.lang.NullPointerException
	at org.eclipse.core.internal.preferences.EclipsePreferences.put(EclipsePreferences.java:860)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.putValue(ScopedPreferenceStore.java:455)
	at org.zephyrproject.ide.eclipse.core.build.ZephyrApplicationBuildConfiguration.parseCMakeCache(ZephyrApplicationBuildConfiguration.java:632)
	at org.zephyrproject.ide.eclipse.core.build.ZephyrApplicationBuildConfiguration.cmakeBuild(ZephyrApplicationBuildConfiguration.java:324)
	at org.zephyrproject.ide.eclipse.core.build.ZephyrApplicationBuildConfiguration.build(ZephyrApplicationBuildConfiguration.java:366)
	at org.zephyrproject.ide.eclipse.core.ZephyrApplicationBuilder.build(ZephyrApplicationBuilder.java:84)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:832)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:263)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:316)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:319)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:371)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:392)
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:515)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:412)
	at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:291)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

@mczerski
Copy link

mczerski commented Feb 16, 2021

I don't know if this is the same issue as mine but at least I have the same error in .metadata/.log file.
I found out that the plugin requires that CMAKE_C_COMPILER and CMAKE_CXX_COMPILER variable be defined in CMaceCache.txt with 'FILEPATH=' prefix like this:

CMAKE_C_COMPILER:FILEPATH=/usr/bin/arm-none-eabi-gcc

But in my CMakeCache.txt file generated by the plugin those variables are defined with 'STRING=' prefix:

CMAKE_C_COMPILER:STRING=/usr/bin/arm-none-eabi-gcc

Changing the CMakeCache.txt file fixes my issue. I'm using cmake version 3.19.3. And I set up the project with GNU ARM embedded toolchain.

@pasurb
Copy link

pasurb commented Mar 18, 2021

I have the same problem. Even after using the fix stated by @mczerski the error remains the same. It looks like the plugin resets the value in the "CMakeCache.txt".

@OortJacek
Copy link

OortJacek commented May 19, 2021

Still cannot build any project with the Eclipse plugin, even though the command line build works fine.

Version: 2021-03 (4.19.0)
Build id: 20210312-0638
OS: Windows 10, v.10.0, x86_64 / win32
Java version: 11.0.9
Zephyr Version: 0.2.99.202009250453

@mmurty
Copy link

mmurty commented Sep 28, 2021

I am also facing the same issue. Does anyone know a workaround for this issue?

OS: Ubuntu 20.04
Eclipse Plugin version: 0.2.99.202009250453
openjdk version "16.0.1" 2021-04-20
Zephyr Kernel Version: 2.7.0.0-rc1

@oeah2
Copy link

oeah2 commented Dec 13, 2021

For me the solution of mczerski worked out.

@embucla
Copy link

embucla commented Dec 22, 2021

I had the same Issue, the solution to change the CMaceCache.txt works fine for me.
The Problem does not appear for me if I downgrade cmake to 3.17.0 or lower, unfortunately the newest zephyr version 2.7.99 requires cmake 3.20.0

@Burt-Silverman
Copy link

It does not work for me either. Even using the mczerski fix, but a newer version of cmake than 3.17.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants