<p><b>@cladmi</b> requested changes on this pull request.</p>

<p>I would like to have a namespaced variable and homogenous in the way <code>OPENOCD_..._CMDS</code> work in flash.</p><hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/8856#discussion_r181153427">dist/tools/openocd/openocd.sh</a>:</p>
<pre style='color:#555'>> @@ -178,6 +178,13 @@ do_flash() {
 do_debug() {
     test_config
     test_elffile
+
+    # Configure halt command: prepend a reset if required by the board config
+    local _pre_reset_halt=''
+    if [ -n "${PRE_DEBUG_RESET_HALT}" ]; then
</pre>
<p>For me, the <code>PRE</code> here is wrong, because it changes the command from <code>halt</code> to <code>reset halt</code> it's not a previous command. Also, introducing a new really specific variable only for this specific way of handling the case seems bad to me.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/8856#discussion_r181157250">dist/tools/openocd/openocd.sh</a>:</p>
<pre style='color:#555'>> @@ -178,6 +178,13 @@ do_flash() {
 do_debug() {
     test_config
     test_elffile
+
+    # Configure halt command: prepend a reset if required by the board config
+    local _pre_reset_halt=''
+    if [ -n "${PRE_DEBUG_RESET_HALT}" ]; then
</pre>
<p>I would prefer the following</p>
<pre><code># A meaningful comment on what this is :p
: ${OPENOCD_EXTRA_INIT:=-c 'halt'}
</code></pre>
<p>And in the given board set</p>
<pre><code>export OPENOCD_DEBUG_HALT_CMD = -c 'reset halt'
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/8856#pullrequestreview-111709435">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AEn7YA0_AMbZokFOdSSIGG761rDM-gG9ks5tn4vQgaJpZM4TBjVu">mute the thread</a>.<img src="https://github.com/notifications/beacon/AEn7YEnNcosN_pjsHDvmTvQ351kcfDRmks5tn4vQgaJpZM4TBjVu.gif" height="1" width="1" alt="" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/RIOT-OS/RIOT/pull/8856#pullrequestreview-111709435"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/RIOT-OS/RIOT","title":"RIOT-OS/RIOT","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/RIOT-OS/RIOT"}},"updates":{"snippets":[{"icon":"PERSON","message":"@cladmi requested changes on #8856"}],"action":{"name":"View Pull Request","url":"https://github.com/RIOT-OS/RIOT/pull/8856#pullrequestreview-111709435"}}}</script>