-
Notifications
You must be signed in to change notification settings - Fork 3k
NRF52 SDK15 update #9019
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
NRF52 SDK15 update #9019
Conversation
@cmonr We can look at BLE changes included in this PR but I think you should require a review from the Hal team as most changes are in the HAL. |
@JanneKiiskila Would you and your team like to review this as well? |
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S112/headers/ble_types.h
Show resolved
Hide resolved
@@ -0,0 +1,53 @@ | |||
/* mbed Microcontroller Library | |||
* Copyright (c) 2015 ARM Limited |
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.
add SPDX identifier and fix the year (new files 2018), also the company name
* Copyright (c) 2018, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
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.
@0xc0170 Is the following commit appropriate: bc4aed0 ? I've excluded any old files we didn't touch such as itm_api.c. Would you want the company name and SPDX added for those files (and not touch the date)? I'll then follow this model for any other Arm source files located under the TARGET_NORDIC tree.
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 follow for any, would be good 👍
Thanks
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.
What testing did you perform? As a minimum I would imagine all the tests on all base nrf boards + BLE testing should be performed locally.
@@ -9,17 +9,6 @@ | |||
#define MBED_APP_SIZE 0x80000 | |||
#endif | |||
|
|||
/* If softdevice is present, set aside space for it */ |
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.
What has changed that we don't need to block space for softdevice anymore?
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.
The new memory stats collection (specifically #8607) broke Nordic SD builds as it defines MBED_RAM_START so the scatterfile needed to change. We now define MBED_RAM_START and MBED_RAM_SIZE in the library json file when building with the SD:
This works out good because if one changes the BLE config the RAM requirements might also change and then they only need to touch one file.
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.
We have only done on NRF52_DK and NRF52840_DK for now, I think that means we should add NRF51_DK to the verification, thank you for comments on this.
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.
@desmond-blue SDK15 doesn't include support for the NRF51 so there is no need to verify on the NRF51_DK.
Any chance of TWIM and SPIM support? |
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.
So, I wanted to try and test ble but I faced several issues with that PR:
- Serial reception doesn't work with this PR in our test application; looks like the RX interrupt is not triggered.
- The following files should enable the BLE feature (reference here):
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_FULL/mbed_lib.json
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S132_OTA/mbed_lib.json
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_FULL/mbed_lib.json targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/TARGET_SOFTDEVICE_S140_OTA/mbed_lib.json
Hello Vincent,
Could you add the a link or reference to the test application where you see the issue? We would really like to get this closed.
Thanks,
Earl
|
Here is a small snippet that reproduces the issue: #include <stdio.h>
int main(void)
{
while (true) {
int c = getc(stdin);
putc(c, stdout);
}
return 0;
} @donatieng Maybe it would be useful to have a test as simple as this one to check that UART works. My own test case was a bit mot complex and involved IRQ and custom RawSerial; you can access it here: https://gist.github.com/pan-/9c836b51116aa8e9c3c262dca60c17b5 . |
Addressed the serial issue with https://github.com/TacoGrandeTX/mbed-os/pull/6 |
Performed required rebase after test infrastructure broke resulting in a test failure for commit a770d03. Greentea results are all pass for nRF52_DK and nRF52840_DK with the the exception of mbed_hal-trng. This test also fails for my host system on master... the test performs a physical reset that doesn't play well with my laptop (results in a timeout). Test results are attached for builds with the Arm compiler. |
@TacoGrandeTX Looking at the feature branch itself, since if this PR doesn't modify/update .travis.yml, it and any PRs opened against the feature branch will be hit with the same issues that Mbed OS faced last week. Fortunately since the feature-branch doesn't have any unique commits, rebasing it was not difficult. This will need another rebase (sorry), but after that, it should be back to normal, testing-wise. |
- top level files ported from TARGET_NORDIC/TARGET_NRF5x/ Also addressed: - fixed linking issue for gcc - added support for nRF52-DK builds, but reverted to using nRF52840 sdk_config.h (must be updated) - introduced "RTC" to targets.json (might need to be removed eventually)
Also addressed: - removed dependency on legacy config (excluded apply_old_config.h) - removed legacy pwm and saadc headers - Arm Compiler 5 linking issue (a band-aid for now... needs to be properly addressed for peripheral sharing) - added missing header in SoftDevice file
- Missed some NRFX defines that needed to changed - Set PWM base clock to 125kHz (needs to be reverted back to 1 MHz) - Updated sdk_config.h for nRF52_DK builds - Brought in updates from PR7779 (fix for nRF52 PWM issues)
- Add MBR, NONE and OTA SoftDevice build options for S132 and S140 - Add S112 SoftDevice (single build option) - Some folder restructuring in TARGET_SOFTDEVICE_COMMON was required
This reverts commit 3d2fa53. This was a breaking change for the "MBR" and "NONE" builds. After testing it was also determined that copying the vector table a second time wasn't required for the "FULL" build.
* Update TARGET_NRF5x/README.md to improve "Changing SoftDevice" section and added section on NRF52840 CryptoCell310 Support * Update the file list in TARGET_SDK_15_0/TARGET_SOFTDEVICE_COMMON/README.md * Add missing CR-LF to Nordic-provided SDK file * Rename a header file in the TARGET_SOFTDEVICE_S112 tree
- Brought in new nrfx APIs - Brought in PPI additions - Removed dead code for RTC
- Adjust memory for SoftDevice - Enable PRIO=5 for interrupt priority check - Change NRF_SD_BLE_API_VERSION to 6 - Add handle and buffer for advertising and scanning - Remove guard for phy update - Change scatter files and mbed_lib.json for PR #8607
- Update (c) year and company name - Add SPDX-License-Identifier - Impacted files: - Files touched for SDK15 port - Files added in 2018
Move the check from preprocessor to the if condition
Fix nrf section iter ARMCC compiler macro check
Please re-review. Initial comments addressed.
@TacoGrandeTX Fyi: #9358 |
@elm3 Please if PR needs merging talk to @ARMmbed/mbed-os-maintainers , this should not have been merged. |
@ARMmbed/mbed-os-maintainers Yes we are waiting for this to be merged. What is the gating item? |
Description
Add support for Nordic nRF5x SDK15.0
Pull request type