Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "cpu/esp8266: update deprecated flash_size argument" #12252

Merged

Conversation

cladmi
Copy link
Contributor

@cladmi cladmi commented Sep 16, 2019

Contribution description

This reverts commit 422644b.

The option is only supported after 2.6 which is currently not the
version given with 'esp' toolchain.
It was a bit too early to switch to the new version.
Version 2.7 also supports the old option with only a warning.

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.

This could be re-added when the installed esptool.py is at least 2.6 everywhere.

Fixes #12247

Testing procedure

Please test the procedure from #12247

I used this adapted test procedure for my machine:

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

It works again with this PR:

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

With master:

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'

Issues/PRs references

Reported in:

This reverts commit 422644b.

The option is only supported after 2.6 which is currently not the
version given with 'esp' toolchain.
It was a bit too early to switch to the new version.
Version 2.7 also supports the old option with only a warning.
@miri64 miri64 added Area: toolchain Area: toolchains; everything related to compilation, libc, linking, … Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Sep 16, 2019
@miri64 miri64 requested a review from gschorcht September 16, 2019 14:21
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Sep 16, 2019
Copy link
Contributor

@gschorcht gschorcht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense for the moment according to the discussion in issue #12247.

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that with this change, flashing is working again with the esptool that's coming with the toolchain.

@benpicco benpicco merged commit 1d90617 into RIOT-OS:master Sep 16, 2019
@kb2ma kb2ma added this to the Release 2019.10 milestone Sep 17, 2019
@cladmi cladmi deleted the pr/esp8266/revert_uncompatible_option branch September 17, 2019 10:23
@cladmi
Copy link
Contributor Author

cladmi commented Sep 17, 2019

Thank you for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: toolchain Area: toolchains; everything related to compilation, libc, linking, … CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ESP Platform: This PR/issue effects ESP-based platforms Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

esp8266: make flash fails
5 participants