chipKIT32 / chipKIT-importer

chipKIT importer plugin for MPLAB X
Apache License 2.0
6 stars 2 forks source link

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

Open db-electronics opened 6 years ago

db-electronics commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

messages.log.zip

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

EmbeddedMan commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

It was the Fubarino SD. I'll try building that sketch for that board in Arduino idea to make sure it builds.

Brian

On Mon, Sep 17, 2018, 1:43 PM Grzegorz Hołdys notifications@github.com wrote:

@EmbeddedMan https://github.com/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.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chipKIT32/chipKIT-importer/issues/34#issuecomment-422126211, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbeCDEMpSR6c-TO1HTDfXYGdJaAsGMVks5ub-1egaJpZM4Wjz8f .

EmbeddedMan commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Thanks Brian. I do have an idea about what is going on. I'll have some time this weekend to work on this.

On Thu, 20 Sep 2018, 20:34 Brian Schmalz, notifications@github.com wrote:

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 https://github.com/chipKIT32/chipKIT-importer/files/2402604/messages.zip

Any ideas?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/chipKIT32/chipKIT-importer/issues/34#issuecomment-423288055, or mute the thread https://github.com/notifications/unsubscribe-auth/APsO_3RQkyKaJ0oW0V3vLhjpCOtSRs3Vks5uc9-egaJpZM4Wjz8f .

lamdaelectronics commented 5 years ago

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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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

lamdaelectronics commented 5 years ago

@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 commented 5 years ago

@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.