From 537b28c68deb9540d54a7415d00e1b7145913a6e Mon Sep 17 00:00:00 2001 From: Joris Aerts Date: Mon, 16 Sep 2013 09:57:54 -0700 Subject: [PATCH 1/2] Add LPC11C24 as project target, baseline templates from LPC1114 --- workspace_tools/export/uvision4.py | 2 +- .../export/uvision4_lpc11c24.uvopt.tmpl | 222 +++++++++ .../export/uvision4_lpc11c24.uvproj.tmpl | 423 ++++++++++++++++++ 3 files changed, 646 insertions(+), 1 deletion(-) create mode 100644 workspace_tools/export/uvision4_lpc11c24.uvopt.tmpl create mode 100644 workspace_tools/export/uvision4_lpc11c24.uvproj.tmpl diff --git a/workspace_tools/export/uvision4.py b/workspace_tools/export/uvision4.py index 2859e2df7e5..b74720dbbce 100644 --- a/workspace_tools/export/uvision4.py +++ b/workspace_tools/export/uvision4.py @@ -21,7 +21,7 @@ class Uvision4(Exporter): NAME = 'uVision4' TOOLCHAIN = 'ARM' - TARGETS = ['LPC1768', 'LPC11U24', 'KL25Z', 'LPC1347', 'LPC1114'] + TARGETS = ['LPC1768', 'LPC11U24', 'KL25Z', 'LPC1347', 'LPC1114', 'LPC11C24'] FILE_TYPES = { 'c_sources':'1', 'cpp_sources':'8', diff --git a/workspace_tools/export/uvision4_lpc11c24.uvopt.tmpl b/workspace_tools/export/uvision4_lpc11c24.uvopt.tmpl new file mode 100644 index 00000000000..4734a72b06f --- /dev/null +++ b/workspace_tools/export/uvision4_lpc11c24.uvopt.tmpl @@ -0,0 +1,222 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + + + + 0 + 0 + + + + mbed NXP LPC1114 + 0x4 + ARM-ADS + + 12000000 + + 1 + 1 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 1 + 0 + 1 + + 8 + + + 0 + Data Sheet + DATASHTS\NXP\LPC11xx\LPC111x_DS.pdf + + + 1 + User Manual + DATASHTS\NXP\LPC11xx\LPC111x_LPC11Cxx_UM.pdf + + + 2 + Technical Reference Manual + datashts\arm\cortex_m0\r0p0\DDI0432C_CORTEX_M0_R0P0_TRM.PDF + + + 3 + Generic User Guide + datashts\arm\cortex_m0\r0p0\DUI0497A_CORTEX_M0_R0P0_GENERIC_UG.PDF + + + + SARMCM3.DLL + + DARMP1.DLL + -pLPC1114 + SARMCM3.DLL + + TARMP1.DLL + -pLPC1114 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + + + + + + + + + + + BIN\UL2CM3.DLL + + + + 0 + DLGTARM + (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(250=-1,-1,-1,-1,0)(450=-1,-1,-1,-1,0)(311=-1,-1,-1,-1,0)(420=-1,-1,-1,-1,0)(421=-1,-1,-1,-1,0)(422=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(440=-1,-1,-1,-1,0)(431=-1,-1,-1,-1,0)(433=-1,-1,-1,-1,0)(434=-1,-1,-1,-1,0)(301=-1,-1,-1,-1,0)(470=-1,-1,-1,-1,0)(460=-1,-1,-1,-1,0)(321=-1,-1,-1,-1,0)(500=-1,-1,-1,-1,0)(511=-1,-1,-1,-1,0)(480=-1,-1,-1,-1,0)(490=-1,-1,-1,-1,0)(360=-1,-1,-1,-1,0)(339=-1,-1,-1,-1,0)(340=-1,-1,-1,-1,0)(341=-1,-1,-1,-1,0)(342=-1,-1,-1,-1,0)(381=-1,-1,-1,-1,0)(261=-1,-1,-1,-1,0)(262=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(126=-1,-1,-1,-1,0)(127=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(280=-1,-1,-1,-1,0) + + + 0 + ARMDBGFLAGS + + + + 0 + DLGUARM + (105=-1,-1,-1,-1,0) + + + 0 + UL2CM3 + -UV0100LBE -O4303 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD10000000 -FC800 -FN1 -FF0LPC1xxx_32 -FS00 -FL08000 + + + + + 0 + + + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + src + 1 + 0 + 0 + + 1 + 1 + 8 + 0 + 0 + 0 + 0 + 1 + 7 + 0 + main.cpp + main.cpp + + + +
diff --git a/workspace_tools/export/uvision4_lpc11c24.uvproj.tmpl b/workspace_tools/export/uvision4_lpc11c24.uvproj.tmpl new file mode 100644 index 00000000000..ddb8e210933 --- /dev/null +++ b/workspace_tools/export/uvision4_lpc11c24.uvproj.tmpl @@ -0,0 +1,423 @@ + + + + 1.1 + +
###This file was automagically generated by mbed.org. For more information, see http://mbed.org/handbook/Exporting-To-Uvision
+ + + + mbed NXP LPC1114 + 0x4 + ARM-ADS + + + LPC1114/102 + NXP (founded by Philips) + IRAM(0x10000000-0x10000FFF) IROM(0-0x7FFF) CLOCK(12000000) CPUTYPE("Cortex-M0") + + "STARTUP\NXP\LPC11xx\startup_LPC11xx.s" ("NXP LPC11xx Startup Code") + UL2CM3(-O4303 -S0 -C0 -FO7 -FD10000000 -FC800 -FN1 -FF0LPC1xxx_32 -FS00 -FL08000) + 6526 + LPC11xx.h + + + + + + + + + + SFD\NXP\LPC11xx\LPC111x.sfr + 0 + + + + NXP\LPC11xx\ + NXP\LPC11xx\ + + 0 + 0 + 0 + 0 + 1 + + .\ + lpc1114_test + 1 + 0 + 0 + 1 + 1 + .\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + + + 0 + 0 + fromelf --bin -o build\{{name}}_LPC1114.bin build\{{name}}.axf + + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + + + SARMCM3.DLL + + DARMP1.DLL + -pLPC1114 + SARMCM3.DLL + + TARMP1.DLL + -pLPC1114 + + + + 1 + 0 + 0 + 0 + 16 + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + + + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 1 + + 0 + 1 + + + + + + + + + + + + + + BIN\UL2CM3.DLL + + + + + 1 + 0 + 0 + 1 + 0 + -1 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M0" + + 1 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 8 + 1 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x10000000 + 0x1000 + + + 1 + 0x0 + 0x8000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x8000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x10000000 + 0x1000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + {% for s in symbols %} {{s}}, {% endfor %} + + {% for path in include_paths %} {{path}}; {% endfor %} + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 0 + 0 + 0 + 0 + 1 + 0 + 0x00000000 + 0x10000000 + {{scatter_file}} + + + + {% for file in object_files %} + {{file}} + {% endfor %} + + + + + + + + + src + + {% for file in source_files %} + + {{file.name}} + {{file.type}} + {{file.path}} + {%if file.type == "1" %} + + + + + --c99 + + + + + {% endif %} + + {% endfor %} + + + + + + +
From 9107e8997550c4d2a3e6a9ecc77f167689c052c9 Mon Sep 17 00:00:00 2001 From: Joris Aerts Date: Tue, 17 Sep 2013 19:27:55 -0700 Subject: [PATCH 2/2] Split source_files up in groups mbed/hal/src Split up source files in three groups to make project more friendly to use. Note that the KL25Z, LPC11U24 and LPC1347 did not have the --c99 setting for c files before, please verify if this is intended or not. Fix Output Name and Directory for LPC1114 --- workspace_tools/export/uvision4.py | 19 ++++++--- .../export/uvision4_kl25z.uvproj.tmpl | 41 ++++++++++--------- .../export/uvision4_lpc1114.uvopt.tmpl | 2 +- .../export/uvision4_lpc1114.uvproj.tmpl | 12 +++--- .../export/uvision4_lpc11c24.uvopt.tmpl | 2 +- .../export/uvision4_lpc11c24.uvproj.tmpl | 12 +++--- .../export/uvision4_lpc11u24.uvproj.tmpl | 30 ++++++++++---- .../export/uvision4_lpc1347.uvproj.tmpl | 30 ++++++++++---- .../export/uvision4_lpc1768.uvproj.tmpl | 40 +++++++++--------- 9 files changed, 114 insertions(+), 74 deletions(-) diff --git a/workspace_tools/export/uvision4.py b/workspace_tools/export/uvision4.py index b74720dbbce..e8fbaee88f9 100644 --- a/workspace_tools/export/uvision4.py +++ b/workspace_tools/export/uvision4.py @@ -31,18 +31,27 @@ class Uvision4(Exporter): # 'headers':'5', def generate(self): - source_files = [] + source_files = { + 'mbed': [], + 'hal': [], + 'src': [] + } for r_type, n in Uvision4.FILE_TYPES.iteritems(): for file in getattr(self.resources, r_type): - source_files.append({ - 'name': basename(file), 'type': n, 'path': file - }) + f = {'name': basename(file), 'type': n, 'path': file} + if file.startswith("mbed\\common"): + source_files['mbed'].append(f) + elif file.startswith("mbed\\targets"): + source_files['hal'].append(f) + else: + source_files['src'].append(f) + ctx = { 'name': self.program_name, 'include_paths': self.resources.inc_dirs, 'scatter_file': self.resources.linker_script, 'object_files': self.resources.objects + self.resources.libraries, - 'source_files': source_files, + 'source_files': source_files.items(), 'symbols': self.toolchain.get_symbols() } target = self.target.lower() diff --git a/workspace_tools/export/uvision4_kl25z.uvproj.tmpl b/workspace_tools/export/uvision4_kl25z.uvproj.tmpl index 7ed0ff70ad4..96765f0908b 100644 --- a/workspace_tools/export/uvision4_kl25z.uvproj.tmpl +++ b/workspace_tools/export/uvision4_kl25z.uvproj.tmpl @@ -391,30 +391,31 @@ + {% for group,files in source_files %} - src + {{group}} - {% for file in source_files %} - - {{file.name}} - {{file.type}} - {{file.path}} - {%if file.type == "1" %} - - - - - --c99 - - - - - {% endif %} - - {% endfor %} - + {% for file in files %} + + {{file.name}} + {{file.type}} + {{file.path}} + {%if file.type == "1" %} + + + + + --c99 + + + + + {% endif %} + + {% endfor %} + {% endfor %} diff --git a/workspace_tools/export/uvision4_lpc1114.uvopt.tmpl b/workspace_tools/export/uvision4_lpc1114.uvopt.tmpl index 4734a72b06f..ba241df1f05 100644 --- a/workspace_tools/export/uvision4_lpc1114.uvopt.tmpl +++ b/workspace_tools/export/uvision4_lpc1114.uvopt.tmpl @@ -43,7 +43,7 @@ 79 66 8 - .\ + .\build\ 1 diff --git a/workspace_tools/export/uvision4_lpc1114.uvproj.tmpl b/workspace_tools/export/uvision4_lpc1114.uvproj.tmpl index ddb8e210933..3b24b2feab1 100644 --- a/workspace_tools/export/uvision4_lpc1114.uvproj.tmpl +++ b/workspace_tools/export/uvision4_lpc1114.uvproj.tmpl @@ -43,14 +43,14 @@ 0 1 - .\ - lpc1114_test + .\build\ + {{name}} 1 0 0 1 1 - .\ + .\build\ 1 0 0 @@ -393,10 +393,11 @@ + {% for group,files in source_files %} - src + {{group}} - {% for file in source_files %} + {% for file in files %} {{file.name}} {{file.type}} @@ -416,6 +417,7 @@ {% endfor %} + {% endfor %} diff --git a/workspace_tools/export/uvision4_lpc11c24.uvopt.tmpl b/workspace_tools/export/uvision4_lpc11c24.uvopt.tmpl index 4734a72b06f..ba241df1f05 100644 --- a/workspace_tools/export/uvision4_lpc11c24.uvopt.tmpl +++ b/workspace_tools/export/uvision4_lpc11c24.uvopt.tmpl @@ -43,7 +43,7 @@ 79 66 8 - .\ + .\build\ 1 diff --git a/workspace_tools/export/uvision4_lpc11c24.uvproj.tmpl b/workspace_tools/export/uvision4_lpc11c24.uvproj.tmpl index ddb8e210933..3b24b2feab1 100644 --- a/workspace_tools/export/uvision4_lpc11c24.uvproj.tmpl +++ b/workspace_tools/export/uvision4_lpc11c24.uvproj.tmpl @@ -43,14 +43,14 @@ 0 1 - .\ - lpc1114_test + .\build\ + {{name}} 1 0 0 1 1 - .\ + .\build\ 1 0 0 @@ -393,10 +393,11 @@ + {% for group,files in source_files %} - src + {{group}} - {% for file in source_files %} + {% for file in files %} {{file.name}} {{file.type}} @@ -416,6 +417,7 @@ {% endfor %} + {% endfor %} diff --git a/workspace_tools/export/uvision4_lpc11u24.uvproj.tmpl b/workspace_tools/export/uvision4_lpc11u24.uvproj.tmpl index b139402c836..dfca40328c8 100644 --- a/workspace_tools/export/uvision4_lpc11u24.uvproj.tmpl +++ b/workspace_tools/export/uvision4_lpc11u24.uvproj.tmpl @@ -387,19 +387,31 @@ + {% for group,files in source_files %} - src + {{group}} - {% for file in source_files %} - - {{file.name}} - {{file.type}} - {{file.path}} - - {% endfor %} - + {% for file in files %} + + {{file.name}} + {{file.type}} + {{file.path}} + {%if file.type == "1" %} + + + + + --c99 + + + + + {% endif %} + + {% endfor %} + {% endfor %} diff --git a/workspace_tools/export/uvision4_lpc1347.uvproj.tmpl b/workspace_tools/export/uvision4_lpc1347.uvproj.tmpl index caee2b356dc..f3c97a80223 100644 --- a/workspace_tools/export/uvision4_lpc1347.uvproj.tmpl +++ b/workspace_tools/export/uvision4_lpc1347.uvproj.tmpl @@ -388,19 +388,31 @@ + {% for group,files in source_files %} - src + {{group}} - {% for file in source_files %} - - {{file.name}} - {{file.type}} - {{file.path}} - - {% endfor %} - + {% for file in files %} + + {{file.name}} + {{file.type}} + {{file.path}} + {%if file.type == "1" %} + + + + + --c99 + + + + + {% endif %} + + {% endfor %} + {% endfor %} diff --git a/workspace_tools/export/uvision4_lpc1768.uvproj.tmpl b/workspace_tools/export/uvision4_lpc1768.uvproj.tmpl index 3acacadf387..6a2dbb912de 100644 --- a/workspace_tools/export/uvision4_lpc1768.uvproj.tmpl +++ b/workspace_tools/export/uvision4_lpc1768.uvproj.tmpl @@ -392,29 +392,31 @@ + {% for group,files in source_files %} - src + {{group}} - {% for file in source_files %} - - {{file.name}} - {{file.type}} - {{file.path}} - {%if file.type == "1" %} - - - - - --c99 - - - - - {% endif %} - - {% endfor %} + {% for file in files %} + + {{file.name}} + {{file.type}} + {{file.path}} + {%if file.type == "1" %} + + + + + --c99 + + + + + {% endif %} + + {% endfor %} + {% endfor %}