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

Add flashing documentation #172

Open
Zokol opened this issue Jan 31, 2020 · 4 comments
Open

Add flashing documentation #172

Zokol opened this issue Jan 31, 2020 · 4 comments
Assignees
Labels
Disobey2020 documentation Improvements or additions to documentation

Comments

@Zokol
Copy link
Contributor

Zokol commented Jan 31, 2020

Erase the badge with "python2 esp-idf/components/esptool_py/esptool/esptool.py --port /dev/ttyUSB0 erase_flash", followed by this one to flash everything:

python2 esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 firmware/build/bootloader/bootloader.bin 0x8000 firmware/build/disobey2020_4MB.bin 0x10000 firmware/build/firmware.bin 0x10000 firmware/build/firmware.bin 0x191000 initial_files_disobey2020.zip

Note: to build a partition table .bin file select that table in menuconfig, then build the fw.

Note: this uses the existing 4MB partition table. The flasher should state the detected flash size. If this is 16MB then please try doing the same thing with the "sha2017_16MB.csv" partition table selected, this will increase the FAT partition to use the full flash size

@Zokol Zokol added documentation Improvements or additions to documentation Disobey2020 labels Jan 31, 2020
@Zokol Zokol self-assigned this Jan 31, 2020
@Zokol
Copy link
Contributor Author

Zokol commented Jan 31, 2020

~/ESP32-platform-firmware$ python2 esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 2000000 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 firmware/build/bootloader/bootloader.bin 0x8000 firmware/build/disobey2020_4MB.bin 0x10000 firmware/build/firmware.bin 0x10000 firmware/build/firmware.bin 0x191000 initial_files_disobey2020.zip
usage: esptool write_flash [-h] [--erase-all]
                           [--flash_freq {keep,40m,26m,20m,80m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
                           [--flash_size FLASH_SIZE]
                           [--spi-connection SPI_CONNECTION] [--no-progress]
                           [--verify] [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: 'firmware/build/disobey2020_4MB.bin'

@Zokol
Copy link
Contributor Author

Zokol commented Jan 31, 2020

Used firmware/build/sha2017_16MB.bin instead. With erase, flashing was complete and badge operates normally.

@Zokol
Copy link
Contributor Author

Zokol commented Jan 31, 2020

@renzenicolai is the ota_data_initial.bin required at all? Previously it was flashed to the badge, but it is not included in the script above?

@renzenicolai
Copy link
Member

@Zokol The "ota_data_initial.bin" file makes sure the bootloader uses OTA1 to boot from, as OTA2 does not contain valid firmware yet. Erasing the OTA-data partition has the same effect but this is the more "official" route :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Disobey2020 documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants