-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fixes issues found when compiling for fvm with gcc #154
base: master
Are you sure you want to change the base?
Conversation
Adds header for missing macros. Fixes parameter ordering issues in flipper.mk. Fixes section naming issue due to clang vs gcc differences.
library/include/flipper/posix/pio.h
Outdated
@@ -0,0 +1,296 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file shouldn’t be added here. There must be something wrong with the install or the file that needs this include. Did you define ATSAM4S
at the top?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When building the app for fvm, the macros for PIO_P*
are referenced. This is here to provide those macros for the POSIX platform headers. Should I define ATSAM4S
in posix.h?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A build for posix should still have access to the SAM headers, as they are installed. I can build the app for FVM fine on macOS so I think we have another case of this doesn't d.t.r.t on Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check build/include
to see what's copied to $PREFIX/include
. IIRC PIO.h
is under flipper/atsam4s/asf
somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can both the posix and atsam4s headers be included? The carbon.h file included in flipper.h will include the atsam4s headers if ATSAM4S
is defined, but then it won't include the posix headers. Based on lines 7-15 of flipper/carbon.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed 11fc8c6, which gets the app to compile, but still not link, for me. Does that work on your end?
@@ -30,8 +31,8 @@ | |||
#define __use_wdt__ | |||
|
|||
/* Declare the LF_VAR and LF_FUNC types for this platform. */ | |||
#define LF_VAR __attribute__((section("__DATA,.lf.vars"))) | |||
#define LF_FUNC __attribute__((section("__TEXT,.lf.funcs"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break macOS. Need this here for clang because of how section names work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a6f261d should fix this.
Hey @wastevensv, can you confirm that these issues are still present in the |
Sure, I can rebuild the |
Adds header to posix includes for missing pio macros.
Fixes parameter ordering issues in flipper.mk.
Fixes section naming issue due to clang vs gcc differences.
Updated flipper.mk to fix missing c bindings in fvm binary.