-
Notifications
You must be signed in to change notification settings - Fork 3
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
Passing Defines during generation #3
Comments
wow i'm blind -D exists |
FreeRTOS has a somewhat nasty include policy which forces us to include When compiling C files this is barely an issue (just put the But I guess you're facing a different kind of issue: The current autofff gcc-scanner works by looking at an individual header file and then trying to extract all function declarations. We essentially run the gcc preprocessor per header, which should work fine for the average API header but FreeRTOS' include policy may ruin this per-file approach. Now, don't think I'm trying to talk bad about any of these cases, it simply makes the job of automatically and reliably faking/mocking incredibly hard. One workaround I included for cases like these is the ability to inject a list of header files before the target header is preprocessed. Check out the
Alternatively, as you stated, you could just fake the include check by passing I plan on adding an alternative parser which should be able to parse for function declarations using objdump, the map-file or other compiler generated metadata apart from just relying on source-code. I might also look into clang/llvm instead of pycparser (which can't handle We'll see when I get around to look into all these possibilities... :) Your feedback is very much welcome! |
Hello,
First off, thanks so much for this! this is a fantastic project!
I'm running into an issue with some includes where generation fails becuase something is not defined.
for example. from list.h in FreeRTOS:
Is there any way i can pass defines into the generator?
The text was updated successfully, but these errors were encountered: