diff --git a/workspace_tools/export/exporters.py b/workspace_tools/export/exporters.py
index fec4d4a191..d7353e9898 100644
--- a/workspace_tools/export/exporters.py
+++ b/workspace_tools/export/exporters.py
@@ -18,9 +18,12 @@ class Exporter():
self.inputDir = inputDir
self.target = target
self.program_name = program_name
- self.toolchain = TOOLCHAIN_CLASSES[self.TOOLCHAIN](TARGET_MAP[target])
+ self.toolchain = TOOLCHAIN_CLASSES[self.get_toolchain()](TARGET_MAP[target])
self.build_url_resolver = build_url_resolver
+ def get_toolchain(self):
+ return self.TOOLCHAIN
+
def __scan_and_copy(self, src_path, trg_path):
resources = self.toolchain.scan_resources(src_path)
diff --git a/workspace_tools/export/uvision4.py b/workspace_tools/export/uvision4.py
index d1f3432ad4..8525989f50 100644
--- a/workspace_tools/export/uvision4.py
+++ b/workspace_tools/export/uvision4.py
@@ -20,8 +20,11 @@ from os.path import basename
class Uvision4(Exporter):
NAME = 'uVision4'
- TOOLCHAIN = 'ARM'
- TARGETS = ['LPC1768', 'LPC11U24', 'KL25Z', 'LPC1347', 'LPC1114', 'LPC4088']
+
+ TARGETS = ['LPC1768', 'LPC11U24', 'KL25Z', 'LPC1347', 'LPC1114', 'LPC4088', 'LPC812']
+
+ USING_MICROLIB = ['LPC11U24', 'LPC1114', 'LPC812']
+
FILE_TYPES = {
'c_sources':'1',
'cpp_sources':'8',
@@ -30,6 +33,9 @@ class Uvision4(Exporter):
# By convention uVision projects do not show header files in the editor:
# 'headers':'5',
+ def get_toolchain(self):
+ return 'uARM' if (self.target in self.USING_MICROLIB) else 'ARM'
+
def generate(self):
source_files = []
for r_type, n in Uvision4.FILE_TYPES.iteritems():
diff --git a/workspace_tools/export/uvision4_lpc812.uvopt.tmpl b/workspace_tools/export/uvision4_lpc812.uvopt.tmpl
new file mode 100644
index 0000000000..97b424e241
--- /dev/null
+++ b/workspace_tools/export/uvision4_lpc812.uvopt.tmpl
@@ -0,0 +1,198 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
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+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+ src
+ 1
+ 0
+ 0
+ 0
+
+
+
diff --git a/workspace_tools/export/uvision4_lpc812.uvproj.tmpl b/workspace_tools/export/uvision4_lpc812.uvproj.tmpl
new file mode 100644
index 0000000000..a1fd19fee1
--- /dev/null
+++ b/workspace_tools/export/uvision4_lpc812.uvproj.tmpl
@@ -0,0 +1,424 @@
+
+
+
+ 1.1
+
+ ###This file was automagically generated by mbed.org. For more information, see http://mbed.org/handbook/Exporting-To-Uvision
+
+
+
+ mbed LPC812
+ 0x4
+ ARM-ADS
+
+
+ LPC812M101
+ NXP (founded by Philips)
+ IRAM(0x10000000-0x10000FFF) IROM(0-0x3FFF) CLOCK(12000000) CPUTYPE("Cortex-M0+")
+
+ "STARTUP\NXP\LPC8xx\startup_LPC8xx.s" ("NXP LPC8xx Startup Code")
+ UL2CM3(-O4303 -S0 -C0 -FO7 -FD10000000 -FC800 -FN1 -FF0LPC8xx_16 -FS00 -FL04000)
+ 6712
+ LPC8xx.h
+
+
+
+
+
+
+
+
+
+ SFD\NXP\LPC8xx\LPC800.SFR
+ 0
+
+
+
+ NXP\LPC8xx\
+ NXP\LPC8xx\
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\build\
+ {{name}}
+ 1
+ 0
+ 0
+ 1
+ 1
+ .\build\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 1
+ 0
+ fromelf --bin -o build\{{name}}_LPC812.bin build\{{name}}.axf
+
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+
+
+ SARMCM3.DLL
+
+ DARMCM1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