Skip to content

Commit cc3dcf6

Browse files
committed
Update KL25Z uVision project template. Use an RTOS project as exporter test case.
1 parent 992f341 commit cc3dcf6

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

workspace_tools/export/uvision4_kl25z.uvproj.tmpl

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@
347347
<uSurpInc>0</uSurpInc>
348348
<VariousControls>
349349
<MiscControls>--gnu</MiscControls>
350-
<Define>TARGET_KL25Z</Define>
350+
<Define>TARGET_KL25Z, NDEBUG, TOOLCHAIN_ARM, __CMSIS_RTOS, __CORTEX_M0PLUS</Define>
351351
<Undefine></Undefine>
352352
<IncludePath> {% for path in include_paths %} {{path}}; {% endfor %} </IncludePath>
353353
</VariousControls>
@@ -362,7 +362,7 @@
362362
<NoWarn>0</NoWarn>
363363
<uSurpInc>0</uSurpInc>
364364
<VariousControls>
365-
<MiscControls>--gnu</MiscControls>
365+
<MiscControls></MiscControls>
366366
<Define></Define>
367367
<Undefine></Undefine>
368368
<IncludePath></IncludePath>
@@ -377,7 +377,7 @@
377377
<useFile>0</useFile>
378378
<TextAddressRange>0x00000000</TextAddressRange>
379379
<DataAddressRange>0x10000000</DataAddressRange>
380-
<ScatterFile>.\mbed\KL25Z\ARM\MKL25Z4.sct</ScatterFile>
380+
<ScatterFile>{{scatter_file}}</ScatterFile>
381381
<IncludeLibs></IncludeLibs>
382382
<IncludeLibsPath></IncludeLibsPath>
383383
<Misc>
@@ -399,6 +399,17 @@
399399
<FileName>{{file.name}}</FileName>
400400
<FileType>{{file.type}}</FileType>
401401
<FilePath>{{file.path}}</FilePath>
402+
{%if file.type == "1" %}
403+
<FileOption>
404+
<FileArmAds>
405+
<Cads>
406+
<VariousControls>
407+
<MiscControls>--c99</MiscControls>
408+
</VariousControls>
409+
</Cads>
410+
</FileArmAds>
411+
</FileOption>
412+
{% endif %}
402413
</File>
403414
{% endfor %}
404415

@@ -409,5 +420,3 @@
409420
</Targets>
410421

411422
</Project>
412-
413-

workspace_tools/export_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from workspace_tools.utils import mkdir, cmd, copy_file
88
from workspace_tools.export import export
99

10+
from shutil import copytree
11+
1012

1113
USR_PRJ_NAME = "export_test"
1214
USER_PRJ = join(BUILD_DIR, USR_PRJ_NAME)
@@ -25,7 +27,8 @@ def setup_test_user_prj():
2527

2628
# Sources
2729
print 'Coping sources...'
28-
copy_file(join(TEST_DIR, "mbed", "hello", "main.cpp"), join(USER_SRC, "main.cpp"))
30+
copy_file(join(TEST_DIR, "rtos", "mbed", "basic", "main.cpp"), join(USER_SRC, "main.cpp"))
31+
copytree(join(LIB_DIR, "rtos"), join(USER_LIB, "rtos"))
2932

3033
# FAKE BUILD URL
3134
open(join(USER_SRC, "mbed.bld"), 'w').write("http://mbed.org/users/mbed_official/code/mbed/builds/976df7c37ad5\n")

0 commit comments

Comments
 (0)