Hi Daniel,
d.cook wrote:
I double-checked the IDF version. I did have the latest version in my last post, however we have a fork of the IDF for integration with our internal build tools. When syncing with upstream I wasn't fetching the tags, so the git describe command to pull the IDF version was seeing the latest tag as only being 2.0. Ours probably isn't a common use case, but is there a more reliable way to build the IDF version string than relying on tags?
We don't right now, although there are many more newer tags on our esp-idf master branch:
https://github.com/espressif/esp-idf/tags
(The current tag being v3.0-dev as this is the development version that master is working towards.)
You may need to review the merge strategy for your fork, to make it easier for you track the upstream. If there are any additional hooks in ESP-IDF that would make it easier to integrate with the tools you have without needing them to be part of the IDF tree itself (so you could have ESP-IDF as a submodule by itself, for example), then please let us know and we'll see if we can add support.
d.cook wrote:I may have some idea why I'm getting the 'invalid magic number' in the partition table.
When compiling the bootloader with secure boot enabled, the resulting binary is 30KB. However, the default offsets for the bootloader (0x1000) and the partition table (0x8000) only leaves ~28KB for the bootloader binary.
If you try and flash them all at once, you get an error about them overlapping. However, the default behaviour from esptool is that the bootloader is flashed separately when secure boot is enabled, thereby overwriting the partition table.
The remaining question is why the bootloader is becoming so large with secure boot enabled.
Yes, sorry for that. We're tracking both these issues (the lack of a proper error message when the bootloader grows too big, and the bootloader growing so big ion the first place.) But we don't have fixes right now.
Extra code is compiled into the bootloader when secure boot (and/or flash encryption) are turned on in menuconfig, and it can get too big. We've only ever seen this happen when the bootloader log level is set to "Debug" or higher. If you turn it back down then the bootloader should shrink.
We're working towards a proper fix for this.