<h3>Contribution description</h3>
<p>Update to use FLASHFILE as file to be flashed on the board.</p>
<p>This also removes <code>OFLAGS</code> that is set by <code>Makefile.include</code> in the <code>.bin</code> and <code>.hex</code> rules.</p>
<h3>Testing procedure</h3>
<p>You can flash on a board using <code>pyocd</code></p>
<pre><code>PYOCD_BOARDS=$(git grep -l -e pyocd.inc.mk -e 'common/particle-mesh' '*' ':!boards/common' | cut -f 2 -d/ | sort -u)
echo ${PYOCD_BOARDS}
calliope-mini microbit nrf51dk nrf52832-mdk nrf52840-mdk particle-argon particle-boron particle-xenon
</code></pre>
<h3>Testing without a board</h3>
<p>The output of the FFLAGS is the same on master and this PR with the default and <code>pyocd</code> programmer.</p>
<details><summary><code>for board in ${PYOCD_BOARDS}; do echo ${board}; BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; PROGRAMMER=pyocd BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; done</code></summary><p>
</p><pre><code>for board in ${PYOCD_BOARDS}; do echo ${board}; BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; PROGRAMMER=pyocd BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; done
calliope-mini
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/calliope-mini/hello-world.elf
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/calliope-mini/hello-world.hex
microbit
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/microbit/hello-world.elf
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/microbit/hello-world.hex
nrf51dk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dk/hello-world.elf
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf51dk/hello-world.hex
nrf52832-mdk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52832-mdk/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52832-mdk/hello-world.hex
nrf52840-mdk
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52840-mdk/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/nrf52840-mdk/hello-world.hex
particle-argon
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-argon/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-argon/hello-world.hex
particle-boron
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-boron/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-boron/hello-world.hex
particle-xenon
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-xenon/hello-world.hex
true flash /home/harter/work/git/RIOT/examples/hello-world/bin/particle-xenon/hello-world.hex
</code></pre>
<p></p></details>
<p>And the value can be changed from environment variable:</p>
<details><summary><code>for board in ${PYOCD_BOARDS}; do echo ${board}; FLASHFILE=lala PROGRAMMER=pyocd BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; done </code></summary><p>
</p><pre><code>for board in ${PYOCD_BOARDS}; do echo ${board}; FLASHFILE=lala PROGRAMMER=pyocd BOARD=${board} make --no-print-directory -C examples/hello-world/ FLASHER=true flash-only; done 
calliope-mini
true flash lala
microbit
true flash lala
nrf51dk
true flash lala
nrf52832-mdk
true flash lala
nrf52840-mdk
true flash lala
particle-argon
true flash lala
particle-boron
true flash lala
particle-xenon
true flash lala
</code></pre>
<p></p></details>
<h3>Issues/PRs references</h3>
<p>Part of <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="308966540" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/8838" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/8838/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/8838">#8838</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/11696'>https://github.com/RIOT-OS/RIOT/pull/11696</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>makefiles/pyocd.inc.mk: remove OFLAGS</li>
  <li>makefiles/pyocd.inc.mk use FLASHFILE</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/11696/files#diff-0">makefiles/tools/pyocd.inc.mk</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/11696.patch'>https://github.com/RIOT-OS/RIOT/pull/11696.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/11696.diff'>https://github.com/RIOT-OS/RIOT/pull/11696.diff</a></li>
</ul>

<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/11696?email_source=notifications&email_token=ABE7WYH54F74Y3TTV4RIXS3P2NYGFA5CNFSM4HYGUIPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZQYASA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYHK4FAY2CK2XR2PDG3P2NYGFANCNFSM4HYGUIPA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYE2PVSBHUZH2B4IGYLP2NYGFA5CNFSM4HYGUIPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZQYASA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/11696?email_source=notifications\u0026email_token=ABE7WYH54F74Y3TTV4RIXS3P2NYGFA5CNFSM4HYGUIPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZQYASA",
"url": "https://github.com/RIOT-OS/RIOT/pull/11696?email_source=notifications\u0026email_token=ABE7WYH54F74Y3TTV4RIXS3P2NYGFA5CNFSM4HYGUIPKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GZQYASA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>