Skip to content

Commit f5eff81

Browse files
committed
Deployed a4e7eb4 to dev with MkDocs 1.3.0 and mike 1.1.2
1 parent 8071f3d commit f5eff81

File tree

4 files changed

+136
-68
lines changed

4 files changed

+136
-68
lines changed

dev/platform-specification/index.html

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,13 @@
16071607
Custom config for Cortext-debug plugin for Arduino IDE
16081608
</a>
16091609

1610+
</li>
1611+
1612+
<li class="md-nav__item">
1613+
<a href="#additional-debugger-config-selection-via-debugadditional_config-directive" class="md-nav__link">
1614+
Additional debugger config selection via debug.additional_config directive.
1615+
</a>
1616+
16101617
</li>
16111618

16121619
<li class="md-nav__item">
@@ -2246,6 +2253,13 @@
22462253
Custom config for Cortext-debug plugin for Arduino IDE
22472254
</a>
22482255

2256+
</li>
2257+
2258+
<li class="md-nav__item">
2259+
<a href="#additional-debugger-config-selection-via-debugadditional_config-directive" class="md-nav__link">
2260+
Additional debugger config selection via debug.additional_config directive.
2261+
</a>
2262+
22492263
</li>
22502264

22512265
<li class="md-nav__item">
@@ -3440,6 +3454,60 @@ <h3 id="custom-config-for-cortext-debug-plugin-for-arduino-ide">Custom config fo
34403454
<span class="w"> </span><span class="p">}</span>
34413455
<span class="p">}</span>
34423456
</code></pre></div>
3457+
<h3 id="additional-debugger-config-selection-via-debugadditional_config-directive">Additional debugger config selection via <code>debug.additional_config</code> directive.<a class="headerlink" href="#additional-debugger-config-selection-via-debugadditional_config-directive" title="Permanent link">&para;</a></h3>
3458+
<p>It is possible to use any sub-tree of the platform configuration to override the debugger configuration using the
3459+
directive <code>debug.additional_config=CONFIG_PREFIX</code>. This rule will use the configuration under <code>CONFIG_PREFIX.*</code> to
3460+
override the current <code>debug.*</code> config.</p>
3461+
<p>This change allows a more convenient rationalization and selection of the configs to apply to the debugger. For example,
3462+
we could factor common parts of a configuration in the platform.txt file:</p>
3463+
<div class="highlight"><pre><span></span><code># CONFIG 1
3464+
debug-overrides.esp32.cortex-debug.custom.name=Arduino on ESP32
3465+
debug-overrides.esp32.cortex-debug.custom.request=attach
3466+
debug-overrides.esp32.cortex-debug.custom.postAttachCommands.0=set remote hardware-watchpoint-limit 2
3467+
debug-overrides.esp32.cortex-debug.custom.postAttachCommands.1=monitor reset halt
3468+
debug-overrides.esp32.cortex-debug.custom.postAttachCommands.2=monitor gdb_sync
3469+
debug-overrides.esp32.cortex-debug.custom.postAttachCommands.3=thb setup
3470+
debug-overrides.esp32.cortex-debug.custom.postAttachCommands.4=c
3471+
debug-overrides.esp32.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
3472+
debug-overrides.esp32.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
3473+
debug-overrides.esp32.cortex-debug.custom.overrideRestartCommands.2=thb setup
3474+
debug-overrides.esp32.cortex-debug.custom.overrideRestartCommands.3=c
3475+
3476+
# CONFIG 2
3477+
debug-overrides.esp32s2.cortex-debug.custom.name=Arduino on ESP32-S2
3478+
debug-overrides.esp32s2.cortex-debug.custom.request=attach
3479+
debug-overrides.esp32s2.cortex-debug.custom.postAttachCommands.0=set remote hardware-watchpoint-limit 2
3480+
debug-overrides.esp32s2.cortex-debug.custom.postAttachCommands.1=monitor reset halt
3481+
debug-overrides.esp32s2.cortex-debug.custom.postAttachCommands.2=monitor gdb_sync
3482+
debug-overrides.esp32s2.cortex-debug.custom.postAttachCommands.3=thb setup
3483+
debug-overrides.esp32s2.cortex-debug.custom.postAttachCommands.4=c
3484+
debug-overrides.esp32s2.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
3485+
debug-overrides.esp32s2.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
3486+
debug-overrides.esp32s2.cortex-debug.custom.overrideRestartCommands.2=thb setup
3487+
debug-overrides.esp32s2.cortex-debug.custom.overrideRestartCommands.3=c
3488+
</code></pre></div>
3489+
<p>and choose which one to use depending on the board in the boards.txt file:</p>
3490+
<div class="highlight"><pre><span></span><code>myboard.name=My Board with esp32
3491+
myboard.debug.additional_config=debug-overrides.esp32
3492+
3493+
anotherboard.name=My Board with esp32s2
3494+
anotherboard.debug.additional_config=debug-overrides.esp32s2
3495+
...
3496+
</code></pre></div>
3497+
<p>Another possibility is to compose the configuration using another variable present in the board configuration, for
3498+
example if in the <code>platform.txt</code> we add:</p>
3499+
<div class="highlight"><pre><span></span><code>debug.additional_config=debug-overrides.{build.mcu}
3500+
</code></pre></div>
3501+
<p>we may use the <code>build.mcu</code> value as a "selector" for the board-specific debug configuration that is overlapped to the
3502+
global debug configuration:</p>
3503+
<div class="highlight"><pre><span></span><code>myboard.name=My Board with esp32
3504+
myboard.build.mcu=esp32
3505+
...
3506+
3507+
anotherboard.name=My Board with esp32s2
3508+
anotherboard.build.mcu=esp32s2
3509+
...
3510+
</code></pre></div>
34433511
<h3 id="optimization-level-for-debugging">Optimization level for debugging<a class="headerlink" href="#optimization-level-for-debugging" title="Permanent link">&para;</a></h3>
34443512
<p>The compiler optimization level that is appropriate for normal usage will often not provide a good experience while
34453513
debugging. For this reason, it may be helpful to use different compiler flags when compiling a sketch for use with the

dev/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)