-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
[BUG] Fix tinyuF2 BootLoader make error when emulating EEPROM #16586
Conversation
This won't work -- TinyUF2 uses a binary of about 24kB last I checked, which means the second half of the bootloader is in the same location as the emulated EEPROM implementation -- clearing EEPROM will wipe out the last 8kB of the bootloader. |
So I confirmed -- the bootloader binary is 14kB, and tbh feels a bit tight to assume that it'll never grow to 16kB in size. |
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.
.ld files are not configured for eeprom emulation so this will not work correctly.
Sorry, not ld files, config defaults https://github.com/qmk/qmk_firmware/blob/master/platforms/chibios/eeprom_stm32_defs.h#L65
I checked the LD file (https://github.com/qmk/qmk_firmware/blob/65eb0f939fb35de66e6772ca358311f2c12344f6/platforms/chibios/boards/BLACKPILL_STM32_F401/ld/STM32F401xC_tinyuf2.ld#L22) and it takes up 64K size, but I tried to compile the tinyuf2 file myself and can figure out that the minimum size of tinyuF2-bootloader on STM32F401CCU6 chip is 16K.
|
I think the starting address should start from base + 64K,which is 0x08010000, to avoid conflicting with tinyuf2 BL.(in https://github.com/qmk/qmk_firmware/blob/master/platforms/chibios/eeprom_stm32_defs.h#L65) #define FEE_PAGE_BASE_ADDRESS 0x08010000 By a way, currently, using |
|
鸭子哥, 我是你粉丝 |
See also this comment thread: #16287 (comment) — the STeMCell controller is intended to use the tinyuf2 bootloader too; that PR attempts to place the EEPROM storage at 32K, leaving 32K for the bootloader; one remaining 16K flash sector won't be used by the current EEPROM implementation (although maybe someone would want to enhance that implementation to be safe against unexpected poweroffs, and that would require using at least 2 flash sectors). |
Description
Types of Changes
Issues Fixed or Closed by This PR
Checklist