-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
samd/ports/SAMD21_XPLAINED_PRO: Update the deploy instructions and use the external flash for the file system. #15942
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
Conversation
Code size report:
|
Would it be better to instead change the linker script for this board so that the firmware is placed at the beginning of flash, so that a bootloader is not needed at all? For a dev board like this one, I would assume that someone using it would perhaps want to use MicroPython on it as-is, without a bootloader. After all, you need to use the debug port to program the bootloader initially. So why not just program MicroPython using the debug port? |
That's possible, but then this board would behave different than all other SAMD ports, and it would need the .hex version of the firmware. At the moment there are only .uf2 versions available for the SAMD port. So either the build process has to be changed and .hex version must be provided at the download site, or users have to convert .uf2 to .hex. uf2conv.py allows to convert .uf2 to .bin, and then objcopy can be used for .bin to .hex. So it's not just changing the loader script. |
OK, that's a good point. So it would be easier to make this board behave like all other samd boards. In that case it would be good to provide a bootloader. But, I don't think it's appropriate to check it into this repo. Instead can we just host it at micropython.org/resources/firmware? I can copy it there and we can link to it in the deploy.md file. |
That's good. I was wondering if there is a place to host support files likes this one. Should I keep the file in the PR? |
@dpgeorge The file deploy.md is updated to point to micropython.org/resources/firmware. And since it's a .hex files already, the step of converting a .bin file to Intel hex is not needed any more. |
Add instructions to install a bootloader to the board. The SAMD21 XPLAINED PRO board is shipped without a bootloader, which therefore has to be installed once before it can be used with MicroPython. Signed-off-by: robert-hh <robert@hammelrath.com>
A bootloader labelled for the SAMD21 XPLAINED PRO board. The only difference to a generic bootloader are the names and ID of the USB port and the label of the drive that is opened. Signed-off-by: robert-hh <robert@hammelrath.com>
The initial settings did not support it. The change required to add a dedicated handling of the Adesto 1MByte flash of the XPLAINED PRO board, which does not support the sfdp feature. Fixes the ID check of the Adesto/Renesas 1MByte flash. Signed-off-by: robert-hh <robert@hammelrath.com>
Use `self` (the first argument) instead of the global `samd_flash_obj` when accessing the `flash_base` parameter. This allows there to be multiple flash objects for various types of filesystem. Signed-off-by: robert-hh <robert@hammelrath.com>
@robert-hh I have merged this and the .hex file for the bootloader is copied across to the micropython.org URL. Actually, I think it would be good to add a README.md to the new |
Sure. I will do that, Edit: Done. |
Summary
The SAMD21 Xplained Pro board is delivered without a bootloader, making it impossible to run MicroPython. This PR tells, how to install a .uf2 bootloader and provides samples of bootloaders, which can be used for the board. In addition it
adapts and fixes MicroPython to use the on-board 1MByte flash for the file system. Commits in this PR:
Testing