-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
nrf/mpconfig: Set default MICROPY_CONFIG_ROM_LEVEL for each chip type. #8317
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
I suggest do it like stm32 and near the top of
That will default it to extra features, like rp2 and stm32. But boards can let a lower level if needed. Any board with 1M or more of flash could use extra features?
If it's only enabling features, and only done on boards that have enough flash, then it should be an easy transition (because nothing is removed). The way @jimmo was converting existing ports to use this feature was to make a commit that was a no-op in terms of features changes. That would then allow you to see exactly what was the difference between the existing config and one of the pre-defined feature levels. |
f23f75c
to
0f0a126
Compare
I've updated the PR to keep it generally in I'm not too sure about nrf52832 - it's only I've essentially copied all the define's from EXTRA into mpconfigboard in a61e120 to show changes, I hope this is generally what you were suggesting? The duplications of these / other things set to default were then cleaned up in the later commit. |
Good question. It should probably be BASIC (although that is pretty much the same as CORE, but it will change in the future). I suggest BASIC for nrf52832.
Not really... is that first commit a no-op in terms of feature change, even for nrf51822? Anyway, doesn't really matter, just leave it as you have it. |
ports/nrf/mpconfigport.h
Outdated
@@ -283,6 +287,7 @@ extern const struct _mp_obj_module_t ble_module; | |||
NRF_MODULE \ | |||
|
|||
|
|||
#define BLE_MODULE |
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 don't think this is supposed to be here.
Yeah I broke nrf51 in that commit, fixed later, it's a bit of a mess. I'd like to do this properly, so I'll scan through the git log for one of @jimmo's previous ones as a pattern to follow. |
66f9149
to
316aa16
Compare
I've reworked this PR to make a much cleaner change. The first commit
The second commit enables extra features from the ROM levels and further simplifies
An additional minor commit was then needed to support building/using |
I'm not sure about this commit, it looks like it completely removes the nrf's moduos.c code? That means uos will lose Also, the biggest issue with uos is that if So I suggest to just drop that last commit for now and do the moduos conversion later/separately. |
Also, please rebase on latest master (that will bring up a few conflicts, but shouldn't be too hard to resolve). |
ports/nrf/nrfx_config.h
Outdated
@@ -28,7 +28,7 @@ | |||
#ifndef NRFX_CONFIG_H | |||
#define NRFX_CONFIG_H | |||
|
|||
#include "mpconfigport.h" | |||
#include <py/mpconfig.h> |
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.
please use "py/mpconfig.h"
to be consistent with other includes of this file
316aa16
to
772ce22
Compare
This commit is a no-op change to simplify existing config.
772ce22
to
c568c80
Compare
Merge 8.2.x into main
I think
MICROPY_CONFIG_ROM_LEVEL
is a fantastic idea and should be used in more places / ports.As it stands, the nrf52840 is a relatively powerful chip but is missing many features I'd consider standard for a decent micropython port. Using the
MICROPY_CONFIG_ROM_LEVEL
defines is a quick way to bring these up to standard.I do understand that this will change the default features on pretty much every nrf board however, is there something we should do to ease any transision for users?