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

Import - Java Runtime Exception with both 1.0.5 and 1.0.6 #34

Open
db-electronics opened this issue Sep 11, 2018 · 21 comments
Open

Import - Java Runtime Exception with both 1.0.5 and 1.0.6 #34

db-electronics opened this issue Sep 11, 2018 · 21 comments
Assignees

Comments

@db-electronics
Copy link

Using MPLABX v5.05
Chipkit 2.0.5
Arduino 1.8.5
Chipkit importer 1.0.5 and 1.0.6

Trying to a simple import of the Blink example using the UBW32 board. Although I've tried to import using Chipkit Pro MX7 board settings and I get the same error. I will gladly assist in the testing and resolution of this issue if required.

Java Runtime exception:

java.lang.RuntimeException: java.lang.RuntimeException: Failed to preprocess file "/home/rene/Git/Arduino/test-ubw32/test-ubw32.ino". Check logs for details.
at com.microchip.mplab.nbide.embedded.chipkit.importer.ArduinoBuilderRunner.preprocess(ArduinoBuilderRunner.java:109)
at com.microchip.mplab.nbide.embedded.chipkit.importer.ArduinoBuilderRunner.preprocess(ArduinoBuilderRunner.java:84)
at com.microchip.mplab.nbide.embedded.chipkit.importer.ChipKitProjectImporter.preprocessSourceProject(ChipKitProjectImporter.java:301)
at com.microchip.mplab.nbide.embedded.chipkit.importer.ChipKitProjectImporter.execute(ChipKitProjectImporter.java:168)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.importChipKitProjectFiles(ImportWorker.java:270)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.createProjectFromChipKit(ImportWorker.java:184)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.invokeImporterTasks(ImportWorker.java:141)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.doInBackground(ImportWorker.java:92)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.doInBackground(ImportWorker.java:72)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Failed to preprocess file "/home/rene/Git/Arduino/test-ubw32/test-ubw32.ino". Check logs for details.
at com.microchip.mplab.nbide.embedded.chipkit.importer.ArduinoBuilderRunner.preprocess(ArduinoBuilderRunner.java:105)
... 14 more

@gholdys gholdys self-assigned this Sep 11, 2018
@gholdys
Copy link
Collaborator

gholdys commented Sep 11, 2018

There's actually a newer version of the plugin - 1.0.7 - currently available only on GitHub. You can download it from here. I've tried importing a simple blink project for MX7 and it didn't fail (although there was something wrong with the project's settings right after import)

@db-electronics
Copy link
Author

I still get an error with the 1.0.7 plugin:

java.lang.RuntimeException: java.lang.RuntimeException: Failed to preprocess file "/home/rene/Git/Arduino/test-ubw32/test-ubw32.ino". Check logs for details.
at com.microchip.mplab.nbide.embedded.chipkit.importer.ArduinoBuilderRunner.preprocess(ArduinoBuilderRunner.java:109)
at com.microchip.mplab.nbide.embedded.chipkit.importer.ArduinoBuilderRunner.preprocess(ArduinoBuilderRunner.java:84)
at com.microchip.mplab.nbide.embedded.chipkit.importer.ChipKitProjectImporter.preprocessSourceProject(ChipKitProjectImporter.java:307)
at com.microchip.mplab.nbide.embedded.chipkit.importer.ChipKitProjectImporter.execute(ChipKitProjectImporter.java:174)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.importChipKitProjectFiles(ImportWorker.java:276)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.createProjectFromChipKit(ImportWorker.java:190)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.invokeImporterTasks(ImportWorker.java:145)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.doInBackground(ImportWorker.java:95)
at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.doInBackground(ImportWorker.java:73)
at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at javax.swing.SwingWorker.run(SwingWorker.java:334)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Failed to preprocess file "/home/rene/Git/Arduino/test-ubw32/test-ubw32.ino". Check logs for details.
at com.microchip.mplab.nbide.embedded.chipkit.importer.ArduinoBuilderRunner.preprocess(ArduinoBuilderRunner.java:105)
... 14 more

@gholdys
Copy link
Collaborator

gholdys commented Sep 11, 2018

OK, I guess we'll need some logs here... You should be able to find logs at /home/rene/.mplab_ide/dev/v5.05/var/log/ (I'm assuming you're running Linux). The log directory should contain a number of .xml and .log files. Please, zip them all up and email them to me at grzegorz.holdys@inisghtmachines.com

@EmbeddedMan
Copy link
Member

I get the same error when I try to import a sketch using the v1.0.7 importer under X v5.05. I have no \log directory under C:\Users\Brian Schmalz\AppData\Local\mplab_ide\Cache\dev\v5.05\var

@gholdys
Copy link
Collaborator

gholdys commented Sep 13, 2018

Brian, try under C:\Users\Brian Schmalz\AppData\Roaming\mplab_ide\dev\v5.05\var\log
For some reason, the logs are in the "Roaming" directory, not the "Local" one.

@EmbeddedMan
Copy link
Member

messages.log.zip

OK, here are the log files from that directory. Hopefully they will help.

@EmbeddedMan
Copy link
Member

messages2.log.zip
Here are the logs from a second machine. I am using MPLAB X 5.05, importer 1.0.7, and chipKIT 2.0.5 with Arduino IDE 1.8.6. This is on a Windows 7 machine.

In this case, when trying to perform the import, after making sure all of the fields in the Import chipKIT Project dialog box are properly filled out, clicking "Next" (even though it is active) does nothing. There's no error, and no way to proceed to the next step.

@gholdys
Copy link
Collaborator

gholdys commented Sep 17, 2018

@EmbeddedMan, and what board did you select as the target device? I've looked at the logs and it seems that this time, the importer could not parse the MCU.

@EmbeddedMan
Copy link
Member

EmbeddedMan commented Sep 17, 2018 via email

@EmbeddedMan
Copy link
Member

I was able to build the sketch in the Arduino IDE just fine on my Windows 7 machine, so that's not the problem.

I think that Target Board dropdown menu in the Import chipKIT Project dialog box is broken. It doesn't want to accept Fubarino SD, Fubarino SDZ as valid boards, and includes entries called "Installed" and "Not Installed" (which also don't work as boards)

@EmbeddedMan
Copy link
Member

Here is a fresh set of logs for you to digest. This is on Windows 7, MPLAB X 5.05, chipKIT core 2.0.5, importer 1.0.7, board is Fubarino Mini. It did get to the point where it tried to do the import, but then failed with this message :

java.lang.RuntimeException: java.lang.RuntimeException: Failed to preprocess file "C:\Users\bschmalz\Dropbox\Arduino\libraries\PICxel\examples\PICxel_demo\PICxel_demo.ino". Check logs for details.
	at com.microchip.mplab.nbide.embedded.chipkit.importer.ArduinoBuilderRunner.preprocess(ArduinoBuilderRunner.java:109)
	at com.microchip.mplab.nbide.embedded.chipkit.importer.ArduinoBuilderRunner.preprocess(ArduinoBuilderRunner.java:84)
	at com.microchip.mplab.nbide.embedded.chipkit.importer.ChipKitProjectImporter.preprocessSourceProject(ChipKitProjectImporter.java:307)
	at com.microchip.mplab.nbide.embedded.chipkit.importer.ChipKitProjectImporter.execute(ChipKitProjectImporter.java:174)
	at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.importChipKitProjectFiles(ImportWorker.java:276)
	at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.createProjectFromChipKit(ImportWorker.java:190)
	at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.invokeImporterTasks(ImportWorker.java:145)
	at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.doInBackground(ImportWorker.java:95)
	at com.microchip.mplab.nbide.embedded.chipkit.wizard.ImportWorker.doInBackground(ImportWorker.java:73)
	at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at javax.swing.SwingWorker.run(SwingWorker.java:334)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Failed to preprocess file "C:\Users\bschmalz\Dropbox\Arduino\libraries\PICxel\examples\PICxel_demo\PICxel_demo.ino". Check logs for details.
	at com.microchip.mplab.nbide.embedded.chipkit.importer.ArduinoBuilderRunner.preprocess(ArduinoBuilderRunner.java:105)
	... 14 more

messages.zip

Any ideas?

@gholdys
Copy link
Collaborator

gholdys commented Sep 21, 2018 via email

@lamdaelectronics
Copy link

Hello,
I'm watching your efforts; did you manage to solve it?
I've used your plugin with Olimex PIC32-PINGUINO-OTG, tell me if it would be of any help to test the new version on it.
Good Luck
Kostas

@gholdys
Copy link
Collaborator

gholdys commented Oct 5, 2018

@lamdaelectronics, we are working on this issue with @EmbeddedMan. There's some progress. There is a new version of the plugin in the works although not all problems have been solved so far. The code that parsed the board definition files from Arduino did not handle board variants properly but besides that there is still a bug somewhere in the code that runs the Arduino Builder to create the core library. I'm looking into this right now.

@gholdys
Copy link
Collaborator

gholdys commented Oct 16, 2018

@lamdaelectronics , @db-electronics, I've uploaded a new version of the plugin (1.1.4). We've worked on it together with @EmbeddedMan. There are still some areas that need improvement but overall, the plugin works better. We've managed to import and build a project with external dependencies for uC32. There are issues however with Fubarino boards as they have various options in the boards.txt file that the plugin fails to properly parse. I'm still working on that...

@lamdaelectronics
Copy link

lamdaelectronics commented Nov 10, 2018

@gholdys thank you for your contribution. Allthough there is an issue with Max32. The project (Blink.ino) imported OK. Build OK. But after programming the board blocked with the LED4 flashing erratically (not 1sec ON 1sec OFF).
I'll try the new version with Olimex PIC32-PINGUINO-OTG.

@gholdys
Copy link
Collaborator

gholdys commented Nov 11, 2018

@lamdaelectronics thanks for your report. I don't have a Max32 board right now so I can't reproduce your issue, but I've checked in the boards.txt file in the chipKIT package for Arduino and this board has a simple configuration - there are no options that the importer could miss during parsing. There's a CPU speed setting and a custom linker script. If one of those is incorrect, you could get erratic behaviour. I'll try to compare the options used for building a project for Max32 on Arduino and MPLAB X and maybe I'll find something.
Please, report on any other issues that you encounter.

@lamdaelectronics
Copy link

I've just tested the Digillent WF32, the response was not the expected. The LED is giving a glimpse of light, but I was not able to control with the delay() the timing. Mind you when I tried to load on v. 5.05 my old programs (16F,18F) I didn't manage to build them (:0:: error: (500) undefined symbols: without a link to supposed symbols!). So, I tried them again on v. 4.05 and I've succeeded! There is no back compatibility I'm afraid (I've changed all the C99 to C90 etc).

@gholdys
Copy link
Collaborator

gholdys commented Nov 17, 2018

@lamdaelectronics how do you upload the binaries to your boards? Are you using pic32prog or some hardware programmer?

@lamdaelectronics
Copy link

@gholdys I'm using the PICkit3. At the moment I have 3 different versions of MPLABX loaded on my PC, there is a possibility that this is a problem.

@gholdys
Copy link
Collaborator

gholdys commented Nov 22, 2018

@lamdaelectronics I've reproduced the problem with "blink" not working on hardware using uC32. The problem was caused by a Board_Data.c file that was copied from a wrong location. I already know why this happened, but I will need at least the coming weekend to sort it out.

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

4 participants