You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>You can just copy the <strong>bin</strong> file to mbed drive,
247
235
or can flash the <strong>hex</strong> file with ST-Link utility.</p>
248
236
<p>If you don't like to compile from source code, you can immediately upload <ahref="https://github.com/dinau/stm32-wave-player-pwm-super-lite-nim/tree/main/doc/hex">doc/hex/*.hex or *.bin files</a> to flash.</p>
@@ -305,29 +293,41 @@ <h4>
305
293
</table>
306
294
<h4>
307
295
<aid="user-content-pursue-small-code-size" class="anchor" href="#pursue-small-code-size" aria-hidden="true"><spanaria-hidden="true" class="octicon octicon-link"></span></a>Pursue small code size</h4>
308
-
<p>In src/conf_sys.nim,by eliminating some functionalities, the code size can be further reduced.
309
-
For instance, set as follows:<br>
310
-
<strong>UART_INFO* = false</strong>
311
-
<strong>PWM16BIT* = false</strong> ( set simple less bits mode)<br>
312
-
<strong>DATA_8BIT_SUPPORT* = false</strong> ( only support PCM16bit format,neglect PCM8bit format)
313
-
<strong>HAVE_LED_IND_PWM* = false</strong> ( eliminate LED indicator function)<br>
314
-
<strong>FS_48KHZ_QUP* = false</strong> ( only supoort less than fs=48KHz)<br>
315
-
will result in about:</p>
316
-
<pre><code>text data bss dec hex filename
317
-
2964 0 104 3068 bfc BUILD/nucleo_l152re.elf
318
-
</code></pre>
319
-
<p>In src/config.nims, uncomment and enable below option,</p>
320
-
<pre><code>--passC:"-flto"
321
-
--passL:"-flto"
322
-
</code></pre>
323
-
<p>and recompile project,</p>
324
-
<pre><code>make clean
325
-
make
326
-
</code></pre>
296
+
<p>In <code>src/conf_sys.nim</code>,by eliminating some functionalities,<br>
297
+
the code size can be further reduced. For instance, set as follows:</p>
298
+
<table>
299
+
<thead>
300
+
<tr>
301
+
<th>Flags</th>
302
+
<th>Descriptions</th>
303
+
</tr>
304
+
</thead>
305
+
<tbody>
306
+
<tr>
307
+
<td>UART_INFO* = false</td>
308
+
<td>Show information through UART</td>
309
+
</tr>
310
+
<tr>
311
+
<td>PWM16BIT* = false</td>
312
+
<td>Set simple less bits mode</td>
313
+
</tr>
314
+
<tr>
315
+
<td>DATA_8BIT_SUPPORT* = false</td>
316
+
<td>Only support PCM16bit format,neglect PCM8bit format</td>
317
+
</tr>
318
+
<tr>
319
+
<td>HAVE_LED_IND_PWM* = false</td>
320
+
<td>Eliminate LED indicator function</td>
321
+
</tr>
322
+
<tr>
323
+
<td>FS_48KHZ_QUP* = false</td>
324
+
<td>Only supoort less than fs=48KHz</td>
325
+
</tr>
326
+
</tbody>
327
+
</table>
327
328
<p>will result in about:</p>
328
-
<pre><code>text data bss dec hex filename
329
-
2916 0 136 3052 bec BUILD/nucleo_l152re.elf
330
-
</code></pre>
329
+
<divclass="highlight highlight-source-shell"><pre>text data bss dec hex filename
0 commit comments