-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
mimxrt: Provide WiFi and BLE support for MIMXRT boards. #12937
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
base: master
Are you sure you want to change the base?
Conversation
235bff0
to
1f69e92
Compare
I think you may have some really outdated changes, I didn't look at the whole PR but note that |
Thanks for the hint and maybe it's the case. The history of this PR starts earlier than the inclusion of the cyw43 support. Since you looked at it already, can you be specific about the places were things are duplicated? Edit: I see the duplicate of deinit. And I used already earlier the mpbthciport.c file introduced with the cyw43 support. |
I left a quick review, anything removed I think is duplicated.
I understand, but what I meant is: there's already working support for |
Thanks for the review. I was a little bit overwhelmed by the fact that git managed to merge 3 branches with almost no conflict. But I did not check for duplicated. Still CI reports a build error: |
1f69e92
to
db843d7
Compare
Yes it looked like a bad git merge. Anyway, I can take another look tomorrow.
You must |
About Proto-c: It works locally. And when I do the make BOARD=xxx submodules and try to push it, there is no change to push. |
db843d7
to
514267a
Compare
Code size report:
|
I'm not sure why boards are built twice, but I think you need to add submodules to every build. |
Oh okay first line checks out the submodules, in that case I'm not sure why it's failing. |
Proto-c was not installed. See a few lines up. The error about proto-c is now gone, only I have to clean up the manifest.py files. But maybe not today anymore. |
8e93e0c
to
669c652
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12937 +/- ##
=======================================
Coverage 98.54% 98.54%
=======================================
Files 169 169
Lines 21889 21889
=======================================
Hits 21570 21570
Misses 319 319 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
84d2805
to
ac1a591
Compare
ac1a591
to
e6f1364
Compare
e6f1364
to
c6336e4
Compare
c6336e4
to
ce107f6
Compare
ce107f6
to
6b72cd3
Compare
6b72cd3
to
c0e9b76
Compare
de45501
to
516ac48
Compare
516ac48
to
af418c4
Compare
Closing in favor of supporting instead PPP. Then the user can go for a communication suitable method. |
Hi @robert-hh other than the chain of dependencies of this PR is there anything particularly wrong with it? For context in planning on using this PR at work to add wireless networking to mimxrt platforms, PPP doesn't really help here at all. I don't have suitable hardware set up though so haven't scheduled testing this yet. |
No. It works fine. And there should be not conflict with PPP, other than lacking PPP would not work on MIMXRT101x boards. If you think it's useful, I can reopen it. Only keeping such a large PR alive and working is quite laborious. |
5d41c79
to
36dc348
Compare
Thanks @robert-hh for this piece of work. It is worth merging, I just didn't get a chance to review it. I'll try to do that soon. |
@dpgeorge Thank you for your response. I had a PR for similar support at the SAMD port. I closed it, expecting that with the VFSROM support the flash space would not be sufficient any more. The WiFI only version leaves ~90k free, the WiFi+BLE variant about 5k. |
Let's get this one through first, then we can consider the samd version. |
Using the network.WLAN module with Pin settings defined in mpconfigboard.h. To allow for port specific WiFi configurations, the functions in drivers/ninaw10/nina_wifi_bsp.c are declared as MP_WEAK. Signed-off-by: robert-hh <robert@hammelrath.com>
Change Makefile and mpconfigport.h. Add a port specific nina_wifi_bsp.c file, which just increases the poll rate. The flag for enabling NinaW10 is MICROPY_PY_NETWORK_NINAW10. Signed-off-by: robert-hh <robert@hammelrath.com>
- MIMXRT1010_EVK - MIMXRT1015_EVK - ADAFRUIT Metro M7 For the *_EVK boards the pins are those used by the Adafruit Airlift shield. Signed-off-by: robert-hh <robert@hammelrath.com>
RTS must be low for operation. Allow CS as alias for GPIO1. Signed-off-by: robert-hh <robert@hammelrath.com>
And reduce the stack size for BLE. Nibmle uses 13k of static data, increasing the .bss section. Moving the stack or bss to OCRM is possible, but reduces the Python heap size. Signed-off-by: robert-hh <robert@hammelrath.com>
For: MIMXRT1010_EVK MIMXRT1015_EVK ADAFRUIT Metro M7 OLIMEX RT1010 Adafruit Metro M7 board: Add the SD variant of the Adafruit Metro M7 board. It supports WIFI/BLE as well, but at pins matching the Airlift UNO breakout. Olimex 1010 board: The pins are selected in a way that they are accessible at the UEXT1 connector of the Dev board. There is no free Pin for GPIO0. So GPIO0 must be connected with a resistor to a Pin which is not used for FW upload and is used as output during normal operation, e.g. SPI SCL. The NINA FW configures GPIO0 as output during normal operation. Signed-off-by: robert-hh <robert@hammelrath.com>
At first with the board files for MIMXRT1020 only. MIMXRT1010 and MIMXRT1015 do not build due to insufficient RAM size. Signed-off-by: robert-hh <robert@hammelrath.com>
- Teensy 4.0 - Teensy 4.1 - MIMXRT1050_EVK - SEEED Arch Mix WiFi & BLE work for Teensy 4.x and SEEED Arch Mix with the given wiring. The Teensy 4.x wiring matches the combination of a Adafruit Feather Airlift module with Teensy - Feather adapter. Limited activity for MIMXRT1050, since the SPI wires are not connected. BLE on MIMXRT1050EVK worked, with CS and MOSI of the airlift shield hardwired to GND. Signed-off-by: robert-hh <robert@hammelrath.com>
Instead of waiting a fixed long time for absorbing ESP32 boot messages, just wait a shorter time for no more data to arrive Signed-off-by: robert-hh <robert@hammelrath.com>
Inluding instructions for connecting external modules and uploading the WLAN/BLE firmware. Signed-off-by: robert-hh <robert@hammelrath.com>
- Makefile, main.c: Remove duplicated code and settings, which were added through combining several branches. - Install the proto-c compiler in ci.sh. - Move _dcd_data to the start of the .bss segment. This data item has to be 2k aligned. Moving it to the start of the segment avoids wasting memory. - Remove the board's manifest.py, now that many boards support networking. - Remove obsolete settings from mpconfigboard.mk files. Signed-off-by: robert-hh <robert@hammelrath.com>
36dc348
to
5f10e49
Compare
This support uses ESP32 modules with either NINAW10 firmware or esp-hosted firmware. For MIXRT101x devices, the NINAW10 firmware is expected. For MIMXRT102x, MIMXRT105x and MIMXRT106x the esp_hosted firmware has to be used. The esp_hosted firmware is faster and has a more robust BLE support, but the MIMXRT to support it gets too larger for MIMXRT101x devices. This PR includes Pin definitions and enables WiFI and BLE for:
As ESP32 device, e.g. Adafruit Airlift modules, Nina W10 modules or any generic ESP32 breakout can be used. The NINAW10 or esp_hosted firmware has to be installed to that device. Therefore there are dependencies of this device to a few other PR's to micropython-lib, especially micropython/micropython-lib#642 and micropython/micropython-lib#654. The PR micropython/mynewt-nimble#2 prevents a rare lock-up situation in the ble-nimble stack, which occurred during testing with the BLE test suite.