<h3>Contribution description</h3>
<p>This reverts commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/RIOT-OS/RIOT/commit/422644bd3a1d4247ae74253ca2fa50d7d59fbd1b/hovercard" href="https://github.com/RIOT-OS/RIOT/commit/422644bd3a1d4247ae74253ca2fa50d7d59fbd1b"><tt>422644b</tt></a>.</p>
<p>The option is only supported after 2.6 which is currently not the<br>
version given with 'esp' toolchain.<br>
It was a bit too early to switch to the new version.<br>
Version 2.7 also supports the old option with only a warning.</p>
<p>The version installed in the 'esp8266' toolchain is version 2.5┬áthat do not support the option. So use the old name as it is still compatible.</p>
<p>This could be re-added when the installed <code>esptool.py</code> is at least 2.6 everywhere.</p>
<p><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #12247.">Fixes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="493993609" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/12247" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/12247/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/12247">#12247</a></p>
<h3>Testing procedure</h3>
<p>Please test the procedure from <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="493993609" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/12247" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/12247/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/12247">#12247</a></p>
<p>I used this adapted test procedure for my machine:</p>
<pre><code>git clone https://github.com/gschorcht/RIOT-Xtensa-ESP8266-toolchain.git /tmp/opt/esp
export PATH=/tmp/opt/esp/esp-open-sdk/xtensa-lx106-elf/bin:$PATH
</code></pre>
<p>It works again with this PR:</p>
<pre><code>RIOT_CI_BUILD=1 ESP8266_NEWLIB_DIR=/tmp/opt/esp/newlib-xtensa ESP8266_SDK_DIR=/tmp/opt/esp/esp-open-sdk/sdk make -C examples/hello-world BOARD=esp8266-esp-12x flash
make: Entering directory '/home/harter/work/git/RIOT/examples/hello-world'
Building application "hello-world" for "esp8266-esp-12x" with MCU "esp8266".

   text    data     bss     dec     hex filename
  63851    4304    7008   75163   1259b /home/harter/work/git/RIOT/examples/hello-world/bin/esp8266-esp-12x/hello-world.elf
esptool.py elf2image -fs 8m /home/harter/work/git/RIOT/examples/hello-world/bin/esp8266-esp-12x/hello-world.elf
esptool.py v1.2
Warning: ELF binary has undefined symbol LoadStoreErrorHandler
esptool.py -p /dev/ttyUSB0 -b 460800 write_flash -fm dout 0 /home/harter/work/git/RIOT/examples/hello-world/bin/esp8266-esp-12x/hello-world.elf-0x00000.bin 0x10000 /home/harter/work/git/RIOT/examples/hello-world/bin/esp8266-esp-12x/hello-world.elf-0x10000.bin; esptool.py -p /dev/ttyUSB0 run
esptool.py v1.2
# fails as no board connected
</code></pre>
<p>With master:</p>
<pre><code>RIOT_CI_BUILD=1 ESP8266_NEWLIB_DIR=/tmp/opt/esp/newlib-xtensa ESP8266_SDK_DIR=/tmp/opt/esp/esp-open-sdk/sdk make -C examples/hello-world BOARD=esp8266-esp-12x flash
make: Entering directory '/home/harter/work/git/RIOT/examples/hello-world'
Building application "hello-world" for "esp8266-esp-12x" with MCU "esp8266".

   text    data     bss     dec     hex filename
  63851    4304    7008   75163   1259b /home/harter/work/git/RIOT/examples/hello-world/bin/esp8266-esp-12x/hello-world.elf
esptool.py elf2image -fs 1MB /home/harter/work/git/RIOT/examples/hello-world/bin/esp8266-esp-12x/hello-world.elf
usage: esptool elf2image [-h] [--output OUTPUT] [--version {1,2}]
                         [--flash_freq {40m,26m,20m,80m}]
                         [--flash_mode {qio,qout,dio,dout}]
                         [--flash_size {4m,2m,8m,16m,32m,16m-c1,32m-c1,32m-c2}]
                         input
esptool elf2image: error: argument --flash_size/-fs: invalid choice: '1mb' (choose from '4m', '2m', '8m', '16m', '32m', '16m-c1', '32m-c1', '32m-c2')
/home/harter/work/git/RIOT/examples/hello-world/../../Makefile.include:605: recipe for target 'preflash' failed
make: *** [preflash] Error 2
make: Leaving directory '/home/harter/work/git/RIOT/examples/hello-world'
</code></pre>
<h3>Issues/PRs references</h3>
<p>Reported in:</p>
<ul>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="453027829" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/11646" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/11646/hovercard?comment_id=531739891&comment_type=issue_comment" href="https://github.com/RIOT-OS/RIOT/pull/11646#issuecomment-531739891">#11646 (comment)</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="493993609" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/12247" data-hovercard-type="issue" data-hovercard-url="/RIOT-OS/RIOT/issues/12247/hovercard" href="https://github.com/RIOT-OS/RIOT/issues/12247">#12247</a></li>
</ul>

<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/12252'>https://github.com/RIOT-OS/RIOT/pull/12252</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Revert "cpu/esp8266: update deprecated flash_size argument"</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/12252/files#diff-0">cpu/esp8266/Makefile.include</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12252.patch'>https://github.com/RIOT-OS/RIOT/pull/12252.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/12252.diff'>https://github.com/RIOT-OS/RIOT/pull/12252.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/12252?email_source=notifications&email_token=ABE7WYBNMAU4IZ4BXM4N6L3QJ6HTHA5CNFSM4IXCZ5CKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLS7PSA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYGINVNKTGMHI3VHD7TQJ6HTHANCNFSM4IXCZ5CA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYEK4VMDBX764BQ6UM3QJ6HTHA5CNFSM4IXCZ5CKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLS7PSA.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/12252?email_source=notifications\u0026email_token=ABE7WYBNMAU4IZ4BXM4N6L3QJ6HTHA5CNFSM4IXCZ5CKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLS7PSA",
"url": "https://github.com/RIOT-OS/RIOT/pull/12252?email_source=notifications\u0026email_token=ABE7WYBNMAU4IZ4BXM4N6L3QJ6HTHA5CNFSM4IXCZ5CKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HLS7PSA",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>