Re: Weird baud rate problem
Posted: Mon Oct 24, 2016 1:55 pm
I don't use the Arduino environment much, so can't guide you through this precisely, however:
The SDK itself stores some data on the flash at an address of its chosing. Precisely where depends on how you've actually flashed your code. The SDK info is stored at 0x7c000 if you've flash it as a 512KB flash device, or 0xfc000 if you've flash it as a 1MB flash. If you've flashed it as a 4MB device it'll be at 0x3fc000.
If you don't know which you've flashed it as it'll probably be as a 512KB or 1MB device.
What you can then do is, once you've flashed your program and run it the SDK will probably have initialized this data - so you can read off what it's initialized it as, and change the appropriate byte, and then flash this back,
Something like:
This will read 0x1000 (4KB, 1 sector) of data into the file /tmp/flash.bin
Then use hexedit, or some other hex editor to tweak the byte indicated.
Then flash this back to the device:
There may well be an easier way with the IDE!
The SDK itself stores some data on the flash at an address of its chosing. Precisely where depends on how you've actually flashed your code. The SDK info is stored at 0x7c000 if you've flash it as a 512KB flash device, or 0xfc000 if you've flash it as a 1MB flash. If you've flashed it as a 4MB device it'll be at 0x3fc000.
If you don't know which you've flashed it as it'll probably be as a 512KB or 1MB device.
What you can then do is, once you've flashed your program and run it the SDK will probably have initialized this data - so you can read off what it's initialized it as, and change the appropriate byte, and then flash this back,
Something like:
Code: Select all
esptool.py read_flash 0x7c000 0x1000 /tmp/flash.bin
This will read 0x1000 (4KB, 1 sector) of data into the file /tmp/flash.bin
Then use hexedit, or some other hex editor to tweak the byte indicated.
Then flash this back to the device:
Code: Select all
esptool.py write_flash 0x7c000 /tmp/flash/bin
There may well be an easier way with the IDE!