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

added the defines to the platform file #2469

Closed
wants to merge 3 commits into from

Conversation

brendena
Copy link
Contributor

@brendena brendena commented Feb 23, 2024

Based on the topics here, I've edited the code to put the defines in the platform_config.h

Key points

How
So what about this: we modify the Makefile to call scripts/build_platform_config.py $(BOARD) $(HEADERFILENAME) $(DEFINES) and then modify build_platform_config to pick up those defines from the command line and create a block like out define.

No side effects

@brendena
Copy link
Contributor Author

brendena commented Feb 23, 2024

Oooo, doesn't like (). So i escaped them and it now passes the test. I also needed to make a fix with the NULL string character in the bangle watch.

@fanoush
Copy link
Contributor

fanoush commented Feb 23, 2024

I would never guessed the ESPR_AUTOCOMPLETE_NOT_REQUIRED does what it does from its name. what about something similar to BOARD_DEFINES_ALREADY_DEFINED? And also some comment somewhere in makefiles and/or generated header would be nice to explain why this hack exists (like "these are defines passed already in command line, helps vscode to parse them from here")

And does it actually work in vscode now?

@gfwilliams
Copy link
Member

Great - thanks!

The define thing was my fault - merging now and changing to ESPR_DEFINES_ON_COMMANDLINE with a comment.

Also I'm wondering if we can pass the defines unescaped and unquoted (like is done for GCC) and save that fiddling in the Makefile (for the folks that insist on using MacOS some of the built-in unix functions are subtly different - it may be fine here but the less I can rely on them the better :)

@gfwilliams
Copy link
Member

Right, I think this is all merged in now - not sure why GitHub hasn't picked it up (it usually does).

@gfwilliams gfwilliams closed this Feb 23, 2024
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.

3 participants