-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
XMC flash support - WIP #6725
XMC flash support - WIP #6725
Conversation
Called from user_init().
Waiting on eboot bits. |
Part 1 - still some work to do
Part 2 - Identify the chip type. Note: there may still be issues with the access speed change. This is very much experimental.
Some work still required on the eboot part. |
@ChocolateFrogsNuts I did a manual code merge, but you'll need to rebuild and push the new Right now it's ever-so-slightly beyond the 4K limit so we need to find a way to reduce the code size somehow:
|
If we drop some sanity checks in the eboot section handler, it all just barely fits. I don't think there is much reason to have the checks there if we're using our own elf2bin.py script and can guarantee anything we create is valid. If anything was uploaded that's invalid, well, that would kind of crash anyway I think.
|
I'll try to get back to this soon, but for now you could probably leave out the eboot bits if you need the space.
|
@ChocolateFrogsNuts What's the status with this one? |
What's here works except for the case where the power is cycled during the eboot copy phase. I haven't had a chance to get back to why my version of spi_flash_get_id() doesn't work :( |
I think this requires a new eboot.elf? |
Yes, it will need a new eboot.elf added to the PR. @ChocolateFrogsNuts , you've On my own noname D1 Mini clone it works fine, just tested it. It's not XMC (was working before) and works with this patch. |
It has no effect at all as long as the chip ID doesn't match XMC's. Should be no problem leaving it all in. |
Great, thanks @ChocolateFrogsNuts . Can you build an If you can't regen the bootloader, we can still do it with a new PR, but it would be cleaner to have the bins and sources match in GIT. |
Merged master to my local copy, but now have an issue with a missing uzlib.h Did it get missed in a commit elsewhere, or do I need to do something to bring uzlib into my copy? |
|
Thanks, my lack of git usage is showing :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This has been merged as still WIP, because there is still one detail pending. As explained above, for XMC flash chips it is possible that if there is a power failure during the eboot copy process, the ESP could be bricked. That will be handled if/when needed in the future. |
XMC Flash output drive power support for the core.
WIP because there is a component for eboot that will be pushed here later, but it still has a few kinks to be worked out. The eboot component is only required / in play where an OTA update is being applied and the power fails during the eboot copy phase. Without it a power failure during the reboot after an OTA update may brick the esp until the firmware is reloaded via USB, but this is untested, and there is a good chance that the eboot copy will succeed when power is reapplied anyway.
This PR has no effect if your board does not have an XMC brand spi flash chip.
Third and final part of the solution to #6559