forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cbp.tmpl
103 lines (103 loc) · 3.47 KB
/
cbp.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="{{project_name}}" />
<Option pch_mode="2" />
<Option compiler="arm-elf-gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/{{project_name}}.elf" prefix_auto="1" extension_auto="0" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="arm-elf-gcc" />
<Option use_console_runner="0" />
<Compiler>
{% for f in debug_flags -%}
<Add option="{{f}}" />
{% endfor -%}
</Compiler>
<Linker>
<Add option='-Wl,-Map,"bin/Debug/{{project_name}}.map"' />
</Linker>
{% if ncs36510addfib -%}
<ExtraCommands>
<Add after="ncs36510updatefib -u bin/Debug/{{project_name}}.elf" />
</ExtraCommands>
{% endif -%}
</Target>
<Target title="Release">
<Option output="bin/Release/{{project_name}}.elf" prefix_auto="1" extension_auto="0" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="arm-elf-gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-DNDEBUG" />
{% for f in release_flags -%}
<Add option="{{f}}" />
{% endfor -%}
</Compiler>
<Linker>
<Add option='-Wl,-Map,"bin/Release/{{project_name}}.map"' />
</Linker>
{% if ncs36510addfib -%}
<ExtraCommands>
<Add after="ncs36510updatefib -u bin/Release/{{project_name}}.elf" />
</ExtraCommands>
{% endif -%}
</Target>
</Build>
<Compiler>
{% for f in comp_flags -%}
<Add option="{{f}}" />
{% endfor -%}
{% for f in include_paths -%}
<Add directory="{{f}}" />
{% endfor -%}
</Compiler>
<Linker>
{% for f in ld_flags -%}
<Add option="{{f}}" />
{% endfor -%}
<Add option="-T {{linker_script}}" />
<Add option="-Wl,--start-group {{sys_libs|join(" ")}} {{libraries|join(" ")}} -Wl,--end-group" />
{% for f in sys_libs -%}
<Add option="{{f}}" />
{% endfor -%}
{% for f in libraries -%}
<Add option="{{f}}" />
{% endfor -%}
</Linker>
{% for f in headers -%}
<Unit filename="{{f}}"/>
{% endfor -%}
{% for f in c_sources -%}
<Unit filename="{{f}}">
<Option compilerVar="CC" />
</Unit>
{% endfor -%}
{% for f in s_sources -%}
<Unit filename="{{f}}">
<Option compilerVar="CPP" />
</Unit>
{% endfor -%}
{% for f in cpp_sources -%}
<Unit filename="{{f}}">
<Option compilerVar="CPP" />
</Unit>
{% endfor -%}
<Extensions>
{% if openocdboard != '' -%}
<debugger>
<remote_debugging target="Release">
<options conn_type="3" serial_baud="115200" pipe_command="openocd -p -l openocd.log -f {{openocdboard}}" additional_cmds='monitor reset halt
monitor flash write_image erase "bin/Release/{{project_name}}.elf"
file "bin/Release/{{project_name}}.elf"
monitor reset halt
' extended_remote="1" />
</remote_debugging>
<remote_debugging target="Debug">
<options conn_type="3" serial_baud="115200" pipe_command="openocd -p -l openocd.log -f {{openocdboard}}" additional_cmds='monitor reset halt
monitor flash write_image erase "bin/Debug/{{project_name}}.elf"
file "bin/Debug/{{project_name}}.elf"
monitor reset halt
' extended_remote="1" />
</remote_debugging>
</debugger>
{% endif -%}
</Extensions>
</Project>
</CodeBlocks_project_file>