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

Concatenate ino files before building #5

Closed
wants to merge 2 commits into from

Conversation

mmaret
Copy link

@mmaret mmaret commented Jun 20, 2016

As describe in the Adruino Build process
(https://www.arduino.cc/en/Hacking/BuildProcess)
ino files are concateneted before building.
So variable defined in a .ino are available in other one

As describe in the Adruino Build process
(https://www.arduino.cc/en/Hacking/BuildProcess)
ino files are concateneted before building.
So variable defined in a .ino are available in other one
@thunderace
Copy link
Owner

Hello, the Arduino build process is a little more complicated : cpp and ino files are concateneted (cpp first and ino file last) and you have to add the current directory to the INCLUDE .
I think that only one ino file is supported (to be confirmed).

@mmaret
Copy link
Author

mmaret commented Jun 21, 2016

The page linked in previous comment (https://www.arduino.cc/en/Hacking/BuildProcess) said in section Multi-file sketches:
"When your sketch is compiled, all tabs with no extension are concatenated together to form the "main sketch file". Tabs with .c or .cpp extensions are compiled separately"

@mmaret
Copy link
Author

mmaret commented Jun 21, 2016

The ino files are the one without extension

@thunderace
Copy link
Owner

You're right sorry. but you need to add sketch's directory to the include path(for sketch' include files).

@mmaret
Copy link
Author

mmaret commented Jun 21, 2016

You are right ! I was planning another PR for that. I will do it here.

2016-06-21 14:58 GMT+02:00 thunder notifications@github.com:

You're right sorry. but you need to add sketch's directory to the include
path(for sketch' include files).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAJE0HRewXolDEY6ErtLiJOL3FlV9O8bks5qN-APgaJpZM4I5qUx
.

@mmaret-geny
Copy link

Btw, you did a great job with this project !

@thunderace
Copy link
Owner

thunderace commented Jun 21, 2016

Your PRs were manualy integrated (because i have made lots of change one hour ago).

I have to add some test sketch now.

Thank you.

@thunderace thunderace closed this Jun 21, 2016
@mmaret-geny
Copy link

Cool, I was looking for spiffs size too !

@thunderace
Copy link
Owner

Another problem : we have to concatenate ino files in the right order : the main ino file at the end no?

@thunderace thunderace reopened this Jun 22, 2016
@mmaret
Copy link
Author

mmaret commented Jun 22, 2016

I specially try to put the main one at the top.
That's why it's "cat $(TARGET).ino $(filter-out $(TARGET).ino,$^) > $@"
It looks like it's working like that on arduino.

2016-06-22 10:45 GMT+02:00 thunder notifications@github.com:

Reopened #5
#5.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAJE0Kd633jF7k7W98UgCBNMzWjbqIl7ks5qOPZFgaJpZM4I5qUx
.

@thunderace
Copy link
Owner

Yes, but it's not enough as we don't have the tool to create function definitions... so i think that concatenate is not enough.

@mmaret
Copy link
Author

mmaret commented Jun 22, 2016

You are right. In my sketches I make sure that all my function have
déclaration in the main sketch.
But that's not require (anymore ?).
I wonder if the tool to create function declaration from arduino could be
reuse ...

2016-06-22 11:40 GMT+02:00 thunder notifications@github.com:

Yes, but it's not enough as we don't have the tool to create function
definitions... so i think that concatenate is not enough.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAJE0O-YM0ViojCacbdSfGUbuATaSab-ks5qOQL8gaJpZM4I5qUx
.

@mmaret
Copy link
Author

mmaret commented Jun 22, 2016

We may have something here :
https://github.com/michaelbaisch/uDino-Preprocessor
but I cannot make it work on my computer

2016-06-22 12:03 GMT+02:00 Mathieu Maret mathieu.maret@gmail.com:

You are right. In my sketches I make sure that all my function have
déclaration in the main sketch.
But that's not require (anymore ?).
I wonder if the tool to create function declaration from arduino could be
reuse ...

2016-06-22 11:40 GMT+02:00 thunder notifications@github.com:

Yes, but it's not enough as we don't have the tool to create function
definitions... so i think that concatenate is not enough.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAJE0O-YM0ViojCacbdSfGUbuATaSab-ks5qOQL8gaJpZM4I5qUx
.

@thunderace thunderace closed this Aug 30, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants