Skip to content

Commit 91cab7d

Browse files
committed
[fix] coide and c++ libraries correction
1 parent 84a8f2b commit 91cab7d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

workspace_tools/export/coide.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def generate(self):
4848
'source_files': source_files,
4949
'include_paths': self.resources.inc_dirs,
5050
'scatter_file': self.resources.linker_script,
51+
'library_paths': self.resources.lib_dirs,
5152
'object_files': self.resources.objects,
5253
'libraries': libraries,
5354
'symbols': self.toolchain.get_symbols()

workspace_tools/export/coide_kl25z.coproj.tmpl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,18 @@
2323
<Option name="Library" value="Not use C Library"/>
2424
<Option name="nostartfiles" value="0"/>
2525
<Option name="UserEditLinker" value="--specs=nano.specs; -u _printf_float; -u _scanf_float; {% for file in object_files %}
26-
${project.path}/{{file}}; {% endfor %} {% for lib in libraries %} -l{{lib}}; {% endfor %} -lstdc++; -lsupc++; -lm; -lc; -lgcc; -lnosys;"/>
27-
<LinkedLibraries/>
26+
${project.path}/{{file}}; {% endfor %} {% for p in library_paths %}-L{{p}}; {% endfor %}"/>
27+
<LinkedLibraries>
28+
{% for lib in libraries %}
29+
<Libset dir="" libs="{{lib}}"/>
30+
{% endfor %}
31+
<Libset dir="" libs="stdc++"/>
32+
<Libset dir="" libs="supc++"/>
33+
<Libset dir="" libs="m"/>
34+
<Libset dir="" libs="gcc"/>
35+
<Libset dir="" libs="c"/>
36+
<Libset dir="" libs="nosys"/>
37+
</LinkedLibraries>
2838
<MemoryAreas debugInFlashNotRAM="1">
2939
<Memory name="IROM1" type="ReadOnly" size="0x00020000" startValue="0x00000000"/>
3040
<Memory name="IRAM1" type="ReadWrite" size="0x00001000" startValue="0x1FFFF000"/>

0 commit comments

Comments
 (0)