Skip to content

Commit a0cce48

Browse files
committed
Modify uvision templates to conditionally enable post build
1 parent d004828 commit a0cce48

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

tools/export/uvision/uvision.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@
8282
<nStopB2X>0</nStopB2X>
8383
</BeforeMake>
8484
<AfterMake>
85-
<RunUserProg1>0</RunUserProg1>
85+
<RunUserProg1>{{postbuild_step_active}}</RunUserProg1>
8686
<RunUserProg2>0</RunUserProg2>
87-
<UserProg1Name></UserProg1Name>
87+
<UserProg1Name>{{postbuild_step if postbuild_step_active else ''}}</UserProg1Name>
8888
<UserProg2Name></UserProg2Name>
8989
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
9090
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
@@ -182,7 +182,7 @@
182182
<bUseTDR>1</bUseTDR>
183183
<Flash2>BIN\UL2CM3.DLL</Flash2>
184184
<Flash3></Flash3>
185-
<Flash4></Flash4>
185+
<Flash4>{{'./flash_init.ini' if postbuild_step_active else ''}}</Flash4>
186186
<pFcarmOut></pFcarmOut>
187187
<pFcarmGrp></pFcarmGrp>
188188
<pFcArmRoot></pFcArmRoot>

tools/export/uvision/uvision_debug.tmpl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@
66
<ToolsetNumber>0x4</ToolsetNumber>
77
<ToolsetName>ARM-ADS</ToolsetName>
88
<TargetOption>
9+
{% if postbuild_step_active %}
10+
<OPTTT>
11+
<RunAbUc>1</RunAbUc>
12+
</OPTTT>
13+
{% endif %}
914
<DebugOpt>
1015
<uSim>0</uSim>
1116
<uTrg>1</uTrg>
1217
<nTsel>11</nTsel>
1318
<pMon>{{device.debug_interface.bin_loc}}</pMon>
19+
{% if postbuild_step_active %}
20+
<tIfile>./debug_init.ini</tIfile>
21+
<tLdApp>0</tLdApp>
22+
{% endif %}
1423
</DebugOpt>
1524
<TargetDriverDllRegistry>
1625
<SetRegEntry>
@@ -21,4 +30,4 @@
2130
</TargetDriverDllRegistry>
2231
</TargetOption>
2332
</Target>
24-
</ProjectOpt>
33+
</ProjectOpt>

0 commit comments

Comments
 (0)