zephyrproject-rtos / eclipse-plugin

Zephyr Eclipse Plugin
Eclipse Public License 2.0
16 stars 18 forks source link

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

Closed martanav closed 2 years ago

martanav commented 2 years ago

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.

https://github.com/zephyrproject-rtos/eclipse-plugin/blob/34bbc53cf4601e8568a01b87e4aa9ded224d647d/plugins/org.zephyrproject.ide.eclipse.core/src/org/zephyrproject/ide/eclipse/core/internal/build/CMakeCache.java#L107

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

martanav commented 2 years ago

Fixed with PR #53