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

[question] how to flash mongoose using esptool.py? (as workaround) #21

Open
Harvie opened this issue Aug 13, 2019 · 3 comments
Open

[question] how to flash mongoose using esptool.py? (as workaround) #21

Harvie opened this issue Aug 13, 2019 · 3 comments

Comments

@Harvie
Copy link

Harvie commented Aug 13, 2019

Hello, because of #20 i can't currently flash my board using mos flash so i have to use esptool.py shipped with arduino which works fine. But i don't know what addresses to specify in order to get it to flash mongoose.

I've unzipped images in build/fw directory and tried to flash it like this:

esptool.py --port /dev/ttyUSB3 write_flash 65536 display.bin 32768 partitions_mgos.bin

But it didn't really worked. Can you please tell me what files i need to flash to what memory offsets, so i can flash mongoose to esp32 using espressif's esptool.py as workaround until #20 gets resolved?

Thanks!


I have following files:

bootloader.bin
display.bin
fs.img
manifest.json
otadata.bin
partitions_mgos.bin

manifest.json:

{
  "build_id": "20190813-200053/v2.4.1-62-g2e8ce4b-master-dirty",
  "build_timestamp": "2019-08-13T20:00:53Z",
  "name": "display",
  "parts": {
    "app": {
      "addr": 65536,
      "cs_sha1": "0ff43eccbd7cec0e7f84df3c3ae97b797cdd46bd",
      "encrypt": true,
      "ptn": "app_0",
      "size": 874624,
      "src": "display.bin",
      "type": "app"
    },
    "boot": {
      "addr": 4096,
      "cs_sha1": "2cb1d70d873db1d35b6461ba629d625a02e99b2f",
      "encrypt": true,
      "size": 22848,
      "src": "bootloader.bin",
      "type": "boot",
      "update": false
    },
    "fs": {
      "cs_sha1": "f92e21335e1d013a9ad3b60e1c8945477b7e1e5d",
      "fs_size": 262144,
      "ptn": "fs_0",
      "size": 262144,
      "src": "fs.img",
      "type": "fs"
    },
    "nvs": {
      "addr": 36864,
      "encrypt": false,
      "fill": 255,
      "size": 16384,
      "type": "nvs"
    },
    "otadata": {
      "addr": 53248,
      "cs_sha1": "471af83fac6e5bd49355879b3acbed10bab6f423",
      "encrypt": true,
      "size": 8192,
      "src": "otadata.bin",
      "type": "otadata"
    },
    "pt": {
      "addr": 32768,
      "cs_sha1": "1d31498bef0ca43611e2c095836ce6b8d777419c",
      "encrypt": true,
      "size": 3072,
      "src": "partitions_mgos.bin",
      "type": "pt"
    }
  },
  "platform": "esp32",
  "version": "1.0"
}
@Harvie Harvie changed the title [question] how to flash mongoose using esptool.py [question] how to flash mongoose using esptool.py (as workaround) Aug 13, 2019
@Harvie Harvie changed the title [question] how to flash mongoose using esptool.py (as workaround) [question] how to flash mongoose using esptool.py? (as workaround) Aug 13, 2019
@rojer
Copy link
Contributor

rojer commented Aug 13, 2019

you are on the right path, addr is the address to flash and you just need to flash all the parts and that's all.

@rojer
Copy link
Contributor

rojer commented Aug 13, 2019

however, i'm not sure esptool supports dtr/rts swap as your board requires

@Harvie
Copy link
Author

Harvie commented Aug 14, 2019

however, i'm not sure esptool supports dtr/rts swap as your board requires

i am sure, i've managed to start flashing process using esptool.py (with default settings BTW). Both directly from commandline and through the arduino ide. I've succesfully uploaded sketches from arduino ide (eg. Blink example), but not the mongoose os.

you are on the right path, addr is the address to flash and you just need to flash all the parts and that's all.

Do i need to flash all the files? Even bootloader.bin? Will that overwrite default esp32 serial bootloader? What about fs.img? It does not have any addr specified in manifest.

But if i do esptool.py --port /dev/ttyUSB3 write_flash 65536 display.bin it says there's not enough space on flash. While with mos flash there's no such problem (on different board, with same module, which can be currently flashed by mos). I will check, but i am pretty sure, both have 4MB flash.

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

No branches or pull requests

2 participants