-
Notifications
You must be signed in to change notification settings - Fork 3k
[Exporters] Update exporters to include and use mbed_conf.h (Was #1964) #1975
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4f29483
Update exporters to include the generated mbed_conf.h
theotherjimmy 5532fb8
Export command line for including mbed_conf.h from toolchains
theotherjimmy d9b4109
Update progen-style flags with the toolchains include mbed_conf.h
theotherjimmy 879ae8c
Fixed gcc.py typo
screamerbg a1b73c9
Fix typo after rebase
theotherjimmy c06dad5
Change uVisoun[45] to get preincludes
theotherjimmy 3a273f7
Create and enable exporter flag mbed_conf_active for exporters
theotherjimmy f92d3ec
Move name of config file to one location
theotherjimmy 4746beb
Switch to = style for preincludes
theotherjimmy 7b83c30
for file in `ls tofor file in `ls tools/export`; do sed -i tools/expo…
theotherjimmy 8e11fa2
Undelete defines from IAR
theotherjimmy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,16 +126,20 @@ def cc_extra(self, object): | |
base, _ = splitext(object) | ||
return ["-l", base + '.s.txt'] | ||
|
||
def get_config_option(self, config_header): | ||
return ['--preinclude=' + config_header] | ||
|
||
def get_compile_options(self, defines, includes, for_asm=False): | ||
opts = ['-D%s' % d for d in defines] + ['-f', self.get_inc_file(includes)] | ||
config_header = self.get_config_header() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicated (see below in the |
||
if for_asm: | ||
# The assembler doesn't support '--preinclude', so we need to add | ||
# the macros directly | ||
opts = opts + ['-D%s' % d for d in self.get_config_macros()] | ||
else: | ||
config_header = self.get_config_header() | ||
if config_header is not None: | ||
opts = opts + ['--preinclude', config_header] | ||
opts = opts + self.get_config_option(config_header) | ||
return opts | ||
|
||
@hook_tool | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Just realized that you might need to add this to ASM files as well, since some toolchains (like GCC) can preprocess the ASM file before invoking the assembler, and we use this feature in a few parts of the system. Not sure though if this is something that we want to enable for all toolchains or only for a few of them.