Skip to content

Commit

Permalink
uvision exporter - use toolchain flags
Browse files Browse the repository at this point in the history
progen uses flags set by the toolchain, this should produce
the same result within the build and an exporter project.
  • Loading branch information
0xc0170 committed Apr 29, 2016
1 parent 4168779 commit 690b8f0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions workspace_tools/export/uvision4.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ def generate(self):

project_data['tool_specific'] = {}
project_data['tool_specific'].update(tool_specific)

# get flags from toolchain and apply
project_data['tool_specific']['uvision']['misc'] = {}
project_data['tool_specific']['uvision']['misc']['asm_flags'] = self.toolchain.flags['common'] + self.toolchain.flags['asm']
project_data['tool_specific']['uvision']['misc']['c_flags'] = self.toolchain.flags['common'] + self.toolchain.flags['c']
# not compatible with c99 flag set in the template
project_data['tool_specific']['uvision']['misc']['c_flags'].remove("--c99")
project_data['tool_specific']['uvision']['misc']['cxx_flags'] = self.toolchain.flags['common'] + self.toolchain.flags['ld']
project_data['tool_specific']['uvision']['misc']['ld_flags'] = self.toolchain.flags['ld']

i = 0
for macro in project_data['common']['macros']:
# armasm does not like floating numbers in macros, timestamp to int
Expand Down

0 comments on commit 690b8f0

Please sign in to comment.