-
-
Notifications
You must be signed in to change notification settings - Fork 17
Add support for nRF52810 #46
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
Great work so far, there are some tweaks that need to be made to the linker file to reduce the ram use as they all have been modified for use here. |
@positron96 I've pushed a few changes to the config and startup scripts, please test them and let me know how it works out. |
Thanks!
I'll test on the MCU later. |
@positron96 I changed the linker script so there is some defined space for data storage and added the board as a generic. |
I don't have Arduino IDE, only PlatformIO, I think it doesn't use boards file. |
I thought that since in terms of RAM nRF52810 is closer to nrf51 than to nRF52832, it's better to take some settings from that definition. So I set MYNEWT_VAL_MSYS_1_BLOCK_SIZE to 88 (instead of 292) to save a Kb or two. Could you tell me what MSYS refers to actually? |
The max upload needs to be adjusted lower because the bond storage and user data storage each need 2 pages of flash. Yes the nRF51 settings are memory optimal, you'll need to adjust the settings for your application, like main task stack size, disabling ble roles etc. The msys is the internal memory system used by NimBLE, mainly for long reads and writes and scan results. |
We should add a board to the platform as well |
Done in h2zero/platform-n-able#1 |
LGTM, let me know when you are done testing/ready for this to be merged please. |
Well, I've been using it for a week and it's working well for me. |
Awesome, thanks! |
Fixes #45
Uses info from #17
Also needs patch to PlatformIO python script (it adds FPU compiler flags), see h2zero/platform-n-able#1
I was able to compile blink and basic BLE example (BLE-server-test).
Here are some comparisons with other cores (neither work without modifications):
blink:
n-able:
zephyr (probably contains BLE stack, as numbers are not much different from below):
official PlatformIO RF52 core (no RTOS gives you these numbers, yes):
basic BLE example
The examples are different for each core, BLE beacon in zephyr, BLE-controlled LED in RF52, BLE-server-test for n-able.
Though I don't expect much different resources requirements.
n-able:
zephyr:
RF52 (need to add softdevice size, 114kb flash + 8kb RAM):
I'd be fine with n-able using 62% of flash (there is still plenty left), but I am concerned that it uses 77% or RAM, leaving like 5Kb for all my code. Is there anything I can tweak to reduce RAM usage?