-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
stm32/boards: Add support for Arduino Portenta H7. #8547
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
3a13a81
to
79b86ff
Compare
#define MICROPY_PY_SYS_PLATFORM "Portenta" | ||
#define MICROPY_HW_FLASH_FS_LABEL "portenta" | ||
#define MICROPY_PY_SYS_STDIO_BUFFER (0) | ||
#define MICROPY_STREAMS_POSIX_API (1) |
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.
Is this needed?
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.
I wanted to enable the btree module (I just forgot to add MICROPY_PY_BTREE
to mpconfigboard.mk
) but now I realized more changes are needed to enable btree in the stm32 port, so not sure what to do.
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.
Should I add support for btree in stm32
port ? It requires the posix_helpers.c
file from esp8266
port, which can be compiled conditionally if btree module is enabled.
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.
I've been holding off on adding btree to stm32 because after you add something it's hard to then take it away. btree is a good example of a library that is specialised and relatively large so you don't want to include it if you don't use it, and it is available as a native .mpy file so can be very easily installed on the filesystem when needed.
Do you have a use case for it? Is it acceptable to use btree.mpy?
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.
Do you have a use case for it? Is it acceptable to use btree.mpy?
No, but I enabled it by default for all boards because some users asked for this module specifically in the past. Are you saying there's a pure Python btree module ? If it has the same functionality I think we don't need the C module. If not, I have local changes that enable it conditionally if MICROPY_PY_BTREE=1
is set.
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.
Are you saying there's a pure Python btree module ?
There is a .mpy file that can be built and deployed using:
$ cd examples/natmod/btree
$ make ARCH=armv7m
$ mpremote cp btree_armv7m.mpy :btree.py
It is 13479 bytes 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.
Sorry I didn't realize you're talking about a natmod
, don't "compiled" (bytecode) modules also have a .mpy extension? Anyway, this is one option, but it requires the user to clone the repo, build mpy-cross ? build the module, copy to storage, which is a lot of work, I actually thought it was something I could just add to the manifest. Adding support for btree
in stm32
on the other hand certainly makes it a lot easier to enable builtin btree for board if it's needed.
Anyway, I removed both the POSIX_API and PY_BTREE options for now, if you want the btree
support PR let me know.
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.
Anyway, this is one option, but it requires the user to clone the repo, build mpy-cross ? build the module, copy to storage, which is a lot of work,
It is a bit of work. But we need to move in that direction eventually (we can't include all modules in every build) so need to find a way to make it easier for users. Eg provide pre-build .mpy files and a web-based mpremote
to install it.
23440ec
to
3fe61a5
Compare
Would it be possible to support a custom jump to bootloader from NORETURN void powerctrl_enter_bootloader(uint32_t r0, uint32_t bl_addr) {
#if defined(MICROPY_RESET_TO_BOOTLOADER)
MICROPY_RESET_TO_BOOTLOADER();
#elif MICROPY_HW_ENTER_BOOTLOADER_VIA_RESET EDIT: See the second commit. |
74e3a51
to
f37944b
Compare
b4b98b5
to
44d3ed8
Compare
44d3ed8
to
3802fca
Compare
@iabdalkader are there any plans for future specific drivers like DisplayPort over USB-C (anx7625), and secure elements (se050c2)? |
Not that I know of. |
@iabdalkader i have started with anx7625, currently is a working in progress. If someone is interested can and wants to help me, I more than willingly accept any form of help! |
@dmazzella Good luck, sorry if I can't help with that right now as I have lots of other things to do. And btw the secure elements will be supported soon maybe. |
Board images: micropython/micropython-media#16
Note, this depends on the following PRs: