Closed positron96 closed 5 months ago
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.
@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! With new changes, the same BLE-server is this:
RAM: [======= ] 66.5% (used 16348 bytes from 24576 bytes)
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. Could you have a look at the board config and let me know if anything is incorrect?
I don't have Arduino IDE, only PlatformIO, I think it doesn't use boards file. It looks good, except maximum upload size should be 196608
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
We should add a board to the platform as well
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 https://github.com/h2zero/platform-n-able/pull/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?