Fixes issues found when compiling for fvm with gcc#154
Fixes issues found when compiling for fvm with gcc#154wasv wants to merge 7 commits intoflipper-io:masterfrom
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.
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.
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.
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.
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.
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.
I just pushed 11fc8c6, which gets the app to compile, but still not link, for me. Does that work on your end?
|
|
||
| /* 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.
This will break macOS. Need this here for clang because of how section names work.
|
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.