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

Regression from 1.1 to 1.2 in regards to projects with .ino files #137

Closed
aphelps opened this issue Mar 25, 2015 · 6 comments
Closed

Regression from 1.1 to 1.2 in regards to projects with .ino files #137

aphelps opened this issue Mar 25, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@aphelps
Copy link

aphelps commented Mar 25, 2015

I'm not sure if this is addressed in another issue, but I just updated from 1.1 to 1.2 (and then tried again with the dev branch), and it looks like something broke with the handling of .ino files. Previously I had projects working fine in both the Arduino IDE and platformio. The errors mostly look like this:

.pioenvs/nano/src/HMTL_Module.cpp:5:21: error: 'msg_hdr_t' was not declared in this scope
boolean process_msg(msg_hdr_t *msg_hdr, boolean from_rs485, boolean forwarded);
^
.pioenvs/nano/src/HMTL_Module.cpp:5:32: error: 'msg_hdr' was not declared in this scope
boolean process_msg(msg_hdr_t *msg_hdr, boolean from_rs485, boolean forwarded);
^
.pioenvs/nano/src/HMTL_Module.cpp:5:49: error: expected primary-expression before 'from_rs485'
boolean process_msg(msg_hdr_t *msg_hdr, boolean from_rs485, boolean forwarded);

It looks like the .cpp that is generated from my .ino is placing the generated prototypes before my #include's, and since they involve structures defined in those included headers the compiler is failing.

(For the time being I've just reverted to 1.1)

@ivankravets ivankravets added this to the 1.3.0 milestone Mar 25, 2015
@ivankravets ivankravets self-assigned this Mar 25, 2015
@ivankravets
Copy link
Member

Sorry, this issue is caused by #100
I will fix it 👍

@ivankravets
Copy link
Member

Fixed in f800b35

@aphelps and @gandy92,

Could I ask you to try latest 1.3.0.dev1? http://docs.platformio.org/en/latest/installation.html#development-version

If it works, I will release 1.3.0 as soon as possible.

Thanks in advance!

@gandy92
Copy link

gandy92 commented Mar 25, 2015

Tested this with the example from #140 and it compiles without any problems. Translated source code looks great, though the name is now pioman.ccp instead of %PDENAME%.cpp (which is fine by me).

@ivankravets
Copy link
Member

I use pioman.cpp because PlatformIO can concatenate multiple .ino/.pde files into main CPP.

See request #130

P.S: Thanks for report! 👍 😊

@aphelps
Copy link
Author

aphelps commented Mar 26, 2015

Works fine again now.

@ivankravets
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants