chipKIT32 / chipKIT-importer

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

Mplab X doesn't know about certain Arduino variables/objects #7

Closed EmbeddedMan closed 7 years ago

EmbeddedMan commented 7 years ago

The code helper thing (red underlines) in MPLAB X doesn't appear to be given the right paths for include files or something. When I import even a simple sketch like Blink, I see red underlines for the "ledPin" constant. If I import AnalogReadSerial, I get red underlines for the "Serial" object.

gholdys commented 7 years ago

I think the problem appears when you try to open a source file right after importing when the IDE is still analysing the code. At least this is what I found out on my environment. The red underlines appeared only when I opened some file right after the wizard window disappeared. But if I waited a moment, the source files were parsed properly. Moreover, even when the red underline appeared, they disappeared after building. So the "includes" must have been set properly. It was just the source code parser that didn't make it.

EmbeddedMan commented 7 years ago

That is not the experience I have had. I waited for quite a while (several minutes), then built the code (it built without errors) and my red was still there.

Not a big deal at all, and since it works for you, it probably will for other folks,

On Tue, Feb 21, 2017 at 3:26 PM, Grzegorz Hołdys notifications@github.com wrote:

I think the problem appears when you try to open a source file right after importing when the IDE is still analysing the code. At least this is what I found out on my environment. The red underlines appeared only when I opened some file right after the wizard window disappeared. But if I waited a moment, the source files were parsed properly. Moreover, even when the red underline appeared, they disappeared after building. So the "includes" must have been set properly. It was just the source code parser that didn't make it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chipKIT32/chipKIT-importer/issues/7#issuecomment-281486198, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbeCMuGuA_z_BVmELY4WLsvjJIm9nVJks5re1adgaJpZM4MG0Qe .

gholdys commented 7 years ago

Hold on... If the build failed, then it's a serious problem. Please give more details: What was the target board? What type of import did you try (with copying files or without)? What project did you try this on?

EmbeddedMan commented 7 years ago

No, the build has no errors. It was the blink sketch for Fubarino Mini, both in Copy and NoCopy modes.

gholdys commented 7 years ago

Thanks, I'll check this.

lstandage commented 7 years ago

In the documentation of the UECIDE importer, it was indicated that certain IDE things had to be turned off due to this issue. Specifically, "Unresolved Identifier" and "Unresolved Include File".

Do we want to keep this documented this way for now?

EmbeddedMan commented 7 years ago

Well, something isn't right with MPLAB X. Here's a screen snap of what I'm seeing:

[image: Inline image 1]

If I hover over the lightbulbs, it says "unable to resolve identifier ledPin", which is crazy - I'm defining it on line 2! Completely aside from the importer, there's something messed up with X or with my settings here.

*Brian

On Tue, Feb 21, 2017 at 5:26 PM, lstandage notifications@github.com wrote:

In the documentation of the UECIDE importer, it was indicated that certain IDE things had to be turned off due to this issue. Specifically, "Unresolved Identifier" and "Unresolved Include File".

Do we want to keep this documented this way for now?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/chipKIT32/chipKIT-importer/issues/7#issuecomment-281516283, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbeCB70uVn-3XVGw6B65urdJ1_pFcqSks5re3LAgaJpZM4MG0Qe .

EmbeddedMan commented 7 years ago

I am unable to reproduce this with the latest (v0.9.10) importer plugin. I'm not sure why it's working now, but I tried several sketches (Blink, ReadAnalogSerial), for both Copy and NoCopy modes, and it appears work work just fine. So that makes me very happy. I'm going to close this and reopen it if it pops up again.