-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add new port to Alif Ensemble MCUs #17050
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #17050 +/- ##
=======================================
Coverage 98.54% 98.54%
=======================================
Files 169 169
Lines 21890 21890
=======================================
Hits 21571 21571
Misses 319 319 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Code size report:
|
Commits that can be squashed:
This should be enough for a first pass, will take another look after these are squashed. |
@dpgeorge - YAY! It's almost merged! |
@dpgeorge - Any update on getting this merged? |
@dpgeorge I see we're down to 127 commits. Note you could drop some of the commits here if you merge #16848 and rebase. Also, some more commits could be easily squashed if you like: Initial port:
Systick:
Makefile:
SE services:
ADC:
|
b67b57b
to
1ed5e01
Compare
Thanks @iabdalkader for looking at the commits. It's now down to 88 and I think I've applied almost all your suggestions. Do you think we can squash down |
I think you should squash these too on initial port or in a single "Add DCD driver" commit.
Note that the second commit just disables USB IRQ in deinit and that all three precede the initial port, which doesn't make sense. Or maybe you want to see changes to the original DCD driver? In this case, should probably move them after initial port? Could possibly also squash the following on initial port:
Might be tricky, but we could probably squash the following commits:
|
In any case, I think it's good enough as it is. |
Yes, that's the intention. That driver is copied from upstream Alif GitHub and then modified by those two small commits. I put this before the actual alif port commit because it's like adding the SDK and security toolkit submodules, only they are files rather than submodules. (They could go in |
They all rely on adding SE services, which is currently done as a separate commit. |
Okay, then this should be good to go. |
I now have this down to 76 commits after squashing a few smaller ones that were fixing things. I also fixed cyw43 BLE on stm32 and mimxrt ports (they will continue to use the old |
Testing this on OPENMV_AE3, the WiFi cannot connect... not sure exactly what is wrong. It can associated with the AP but sending out a DHCP discover packet the board gets no response. |
I rebooted all the routers here and now it works...! I also tested the OPENMV_AE3 in STA mode connecting to a PYBD in AP mode, and that worked. So, the WLAN support seems fine. |
I tested it, seems to be working fine. However, I noticed this was dropped at some point: mp_obj_t machine_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
@@ -279,8 +284,6 @@
machine_spi_obj_t *self = (machine_spi_obj_t *)self_in;
// Disable all interrupts.
spi_mask_interrupts(self->inst);
- // Disable SCLK clock
- spi_set_bus_speed(self->inst, 0, self->is_lp ? GetSystemCoreClock() : GetSystemAHBClock()); Not sure if it's important. |
I had to remove that, it was causing a crash when deiniting the SPI due to a divide by zero. |
This file is part of the updated cyw43-driver. It will only be used if `CYW43_USE_SPI` is enabled. Signed-off-by: Damien George <damien@micropython.org>
The cyw43-driver now provides the Bluetooth initialisation code, making `drivers/cyw43/cywbt.c` obsolete. To use the new code a port must enable the `CYW43_ENABLE_BLUETOOTH_OVER_UART` option. Some ports have yet to migrate to the new code, so in the meantime they can explicitly add the old source to their source list and continue to use it without change. Signed-off-by: Damien George <damien@micropython.org>
This word appears in the upcoming alif port. Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
This allows HE to execute code from the ROMFS in MRAM. Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
They will be generated as part of the build. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Now raises an exception if the pin doesn't support the alternate function unit number and line type, eg UART0_TX (previously it only checked the peripheral). Signed-off-by: Damien George <damien@micropython.org>
It's not needed, the MPU configures the XIP as non-cacheable. Signed-off-by: Damien George <damien@micropython.org>
To match the instruction length, so the DFS is restored to the XIP value after an erase or write (due to the final wait WIP). Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
Supports Murata 1YN for WiFi and BLE. Signed-off-by: iabdalkader <i.abdalkader@gmail.com> Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This test is not intended to be run automatically and does not have a corresponding .exp file. Signed-off-by: Damien George <damien@micropython.org>
Signed-off-by: Damien George <damien@micropython.org>
Merged!! |
Yay! |
Congratulations, a wonderful effort & development. We posted about it |
Note! This MCU blows others away. You have 11MB of RAM onboard at 3.2GB/s peak speed. It's truly the first MCU where you can just abuse the heap using MicroPython. Meaning, you can write code like how you would on the PC. |
I'm really looking forward to experimenting with it! @kwagyeman do you know of any affordable development boards for the micro? I'm only aware of the official E7-based board which is ~$400, a little above the buy-to-experiment cost... (and I'm waiting in anticipation for an AE3!) [Sorry, this is off-topic but a few folks have asked me the same question.] |
We're kinda the first. So, the OpenMV N6 and AE3 Kickstarter is your best bet. We will probably ship the AE3 before December. |
Summary
This PR adds a new
alif
port with support for Alif Ensemble MCUs; https://alifsemi.com/Supported features of this port:
openamp
module support for the second HE coreSupported boards:
General notes about the port:
make
, similar to other bare-metal ports herearm-none-eabi-
toolchainThere are 175 commits in this PR, showing the development history. Some of those should probably be squashed down (a few already have been).
OpenMV have generously sponsored the development of this port.
Testing
Extensive testing has been done during development over the past 15 months. Most of the existing MicroPython test suite passes, including hardware and networking tests. (There are a few anomalies which still need fixing, such as an implementation of RTC.datetime.)