Skip to content

Filter support with a white list of post-bin hooks in uvision #4545

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 1 commit into from
Jun 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions tools/export/uvision/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from tools.arm_pack_manager import Cache
from tools.targets import TARGET_MAP
from tools.export.exporters import Exporter
from tools.export.exporters import Exporter, filter_supported
from tools.export.cmsis import DeviceCMSIS

cache_d = False
Expand Down Expand Up @@ -119,13 +119,19 @@ class Uvision(Exporter):
"""
NAME = 'uvision5'
TOOLCHAIN = 'ARM'
TARGETS = []
for target, obj in TARGET_MAP.iteritems():
if "ARM" not in obj.supported_toolchains:
continue
if not DeviceCMSIS.check_supported(target):
continue
TARGETS.append(target)

POST_BINARY_WHITELIST = set([
"MCU_NRF51Code.binary_hook",
"TEENSY3_1Code.binary_hook",
"LPCTargetCode.lpc_patch",
"LPC4088Code.binary_hook",
"MTSCode.combine_bins_mts_dot",
"MTSCode.combine_bins_mts_dragonfly",
"NCS36510TargetCode.ncs36510_addfib"
])
TARGETS = [tgt for tgt in filter_supported("ARM", POST_BINARY_WHITELIST)
if DeviceCMSIS.check_supported(tgt)]

#File associations within .uvprojx file
file_types = {'.cpp': 8, '.c': 1, '.s': 2,
'.obj': 3, '.o': 3, '.lib': 4,
Expand Down