Skip to content

Getting NullPointerException parsing board.txt or platforms.txt #197

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

Closed
DavidGoodenough opened this issue Nov 7, 2014 · 13 comments
Closed
Labels
status: usage error Op expectation of behaviour of Sloeber is not i line with the actual behaviour.

Comments

@DavidGoodenough
Copy link

I am trying to setup my eclipse teeny-3.1 development environment, and I keep getting this error. After I get this error if I try building my project (even a brand new one) I get all manner of errors because it tries using the avr-gcc compiler, not the arm-none-eabi one, but I suspect this is a symptom and not a cause.

I am using the latest nightly build of the plugin on Eclipse Luna on Debian Linux on an AMD-64 laptop. I am using the 1.5.5 version of the Arduino IDE with latest teensiduino code.

I also get the following top of a stack trace:-

java.lang.NullPointerException
at it.baeyens.arduino.toolchain.ArduinoLanguageProvider.getCompilerCommand(ArduinoLanguageProvider.java:144)
at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.resolveCommand(AbstractBuiltinSpecsDetector.java:308)
at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.calculateEnvHash(AbstractBuiltinSpecsDetector.java:422)
at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.validateEnvironment(AbstractBuiltinSpecsDetector.java:466)
at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.execute(AbstractBuiltinSpecsDetector.java:481)

which seems to be because a null value was returned a few lines earlier in:-

ICProjectDescription prjDesc = CoreModel.getDefault().getProjectDescription(currentProject);.

This according to the documentation for getProjectDescription means that this project does not have any CDT data associated with it.

I think I have followed all the installation instructions properly, although as most of them were for Mac or Windows I might have transcribed something wrongly.

David

@jantje
Copy link
Member

jantje commented Nov 7, 2014

does it work to make and compile a sketch for arduino uno?

@DavidGoodenough
Copy link
Author

Yes, or rather nearly. I had created a new Sketch, and the file for my code (test.ino) did not seem to get recognised and so main.cpp filed to link as it could not find setup() and loop(). If I rename test.ino to test.c it compiles cleanly.

@jantje
Copy link
Member

jantje commented Nov 7, 2014

It seems like you did something wrong when creating your teensy environment.
as to the ino story. Did you read the warnings and act upon them?

@DavidGoodenough
Copy link
Author

which warnings are you refering to? There are none from eclipse. If you mean in the install instructions I think I followed all that I noticed and seemed relevant to linux.

@jantje
Copy link
Member

jantje commented Nov 7, 2014

the warnings generated by the compiler when compiling the ino project

@DavidGoodenough
Copy link
Author

There are none apart from:-

Starting combiner
"/usr/local/share/arduino-1.5.5//hardware/tools/avr/bin/avr-gcc" -Os -Wl,--gc-sections -mmcu=atmega328p -o "/home/david/src/teensy/test/Release/test.elf" /home/david/src/teensy/test/Release/arduino.ar "/home/david/src/teensy/test/Release/arduino.ar" "-L/home/david/src/teensy/test/Release" -lm
/home/david/src/teensy/test/Release/arduino.ar(main.cpp.o): In function main': makefile:77: recipe for target 'test.elf' failed /usr/local/share/arduino-1.5.5/hardware/arduino/avr/cores/arduino/main.cpp:11: undefined reference tosetup'
/usr/local/share/arduino-1.5.5/hardware/arduino/avr/cores/arduino/main.cpp:14: undefined reference to `loop'
make: *** [test.elf] Error 1

All the previous bits in the console are simply saying that the arduino components are being successfully compiled.

There is no reference to test.ino at all (or anything derived from test)

@jantje
Copy link
Member

jantje commented Nov 7, 2014

sorry it are errors not warning.
Like these

../.ino.cpp:8:2: error: #error the file: Demo_1.ino is not found in the indexer though it exists on the file system.
#error the file: Demo_1.ino is not found in the indexer though it exists on the file system.
^
../.ino.cpp:9:2: error: #error this is probably due to a bad eclipse configuration : ino and pde are not marked as c++ file.
#error this is probably due to a bad eclipse configuration : ino and pde are not marked as c++ file.
^
../.ino.cpp:10:2: error: #error please check wether *.ino and *.pde are marked as C++ source code in windows->preferences->C/C++->file types.
#error please check wether *.ino and *.pde are marked as C++ source code in windows->preferences->C/C++->file types.

@TrippyLighting
Copy link

Hi, I am the author of the installation instructions that I think you are referring to. Is it possible for that you've omitted to copy the boards.txt and platform.txt file as as described in the section that describes how to creat the teensy extension file ? Feel free to leave a comment on my blog or in the thread on the teensy forum.
I have not updated to the newest version of the plugging myself and I am still on V2.2 but when I woite the instructions I successfully tested the installation process on a Ubuntu Linux.

On Nov 7, 2014, at 11:09 AM, DavidGoodenough [email protected] wrote:

There are none apart from:-

Starting combiner
"/usr/local/share/arduino-1.5.5//hardware/tools/avr/bin/avr-gcc" -Os -Wl,--gc-sections -mmcu=atmega328p -o "/home/david/src/teensy/test/Release/test.elf" /home/david/src/teensy/test/Release/arduino.ar "/home/david/src/teensy/test/Release/arduino.ar" "-L/home/david/src/teensy/test/Release" -lm
/home/david/src/teensy/test/Release/arduino.ar(main.cpp.o): In function main':
makefile:77: recipe for target 'test.elf' failed
/usr/local/share/arduino-1.5.5/hardware/arduino/avr/cores/arduino/main.cpp:11: undefined reference tosetup'
/usr/local/share/arduino-1.5.5/hardware/arduino/avr/cores/arduino/main.cpp:14: undefined reference to `loop'
make: *** [test.elf] Error 1

All the previous bits in the console are simply saying that the arduino components are being successfully compiled.

There is no reference to test.ino at all (or anything derived from test)


Reply to this email directly or view it on GitHub.

@jantje
Copy link
Member

jantje commented Nov 7, 2014

@TrippyLighting
Thanks for joining in
I recently used your instruction (again) on redhat 64 bit with arduino 1.5.7 and the very latest arduio eclipse plugin for teensy 3.1, all worked as should be.

@DavidGoodenough
Copy link
Author

There were no references to test.* (the file was test.ino) anywhere in the console. I have checked the file type associations, and both *.ico and *.pde were missing. I have entered them manually, and it made no difference.

I did copy the boards.txt and platform.txt files, but I am don't recall the extension file bit - must have missed that, I will reread.

@DavidGoodenough
Copy link
Author

Well I fixed it. It would appear that getting individual files from github - at least through the web interface - is problematic. When I cloned the repository and copied the files directly it works.

@TrippyLighting
Copy link

I have finally been able to upgrade and it seems there are no changes to my instructions necessary.
Thanks again for the Arduino Eclipse Plugin!

On Nov 7, 2014, at 12:31 PM, jantje [email protected] wrote:

@TrippyLighting https://github.com/TrippyLighting
Thanks for joining in
I recently used your instruction (again) on redhat 64 bit with arduino 1.5.7 and the very latest arduio eclipse plugin for teensy 3.1, all worked as should be.


Reply to this email directly or view it on GitHub #197 (comment).

@jantje
Copy link
Member

jantje commented Nov 15, 2014

Thanks for the positive feedback.
Note that windows and arduino IDE >1.5.5 gives problems due to changes in the toolchain delivered by arduino.
See #183
and more importantly arduino/Arduino#2422

@jantje jantje added the status: usage error Op expectation of behaviour of Sloeber is not i line with the actual behaviour. label May 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: usage error Op expectation of behaviour of Sloeber is not i line with the actual behaviour.
Projects
None yet
Development

No branches or pull requests

3 participants