Comments (2)
I think there are a lot of changes required to support different SDK packages. I'm sure that a similar directory structure makes it doable with some effort. Let's look at a few places to get a grasp of a job to be done.
1. JSON definitions
I think that the core of the project are JSON definitions located at ./ci/libraries/
folder. You can check schema inside ./ci/scripts/python/nrf5_cmake/library_description.py
file. The most important property is sdk_version
:
"nrf5_ble_gq": {
"documentation": "BLE GATT Queue library",
"variant": "object",
"sdk_version": {
"from": "16.0.0"
},
"sources": [
"components/ble/nrf_ble_gq/nrf_ble_gq.c"
],
...
It assumes that library definition applies to all nRF SDKs with a version above 16.0.0. If it's missing then it's assumed that there are no SDK requirements. Support for Zigbee will require us to:
- Add new SDK versioning with a possibility to specify that library is not supported at all (missing
zigbee_sdk_version
orsdk_version
version prop?):
"nrf5_ble_gq": {
"documentation": "BLE GATT Queue library",
"variant": "object",
"sdk_version": {
"from": "16.0.0"
},
"zigbee_sdk_version": {
"from": "4.1.0"
},
- Add cache variable so that we can detect what kind of SDK is used.
- Specify how patches are applied across SDKs:
Probably patch will be applied based on the knowledge ifzigbee_sdk_version
/sdk_version
property is present or not.
...
"patches": [
{
"operation": "add",
"sdk_version": {
"from": "16.0.0"
},
"zigbee_sdk_version": {
"from": "4.1.0"
},
"dependencies": {
"public": [
"nrf5_ble_gq"
]
}
}
]
2. Python scripts
All changes to the JSON schema should be propagated in all Python scripts, which currently assume that there is only one SDK available.
3. Templates
We should propagate SDK versioning to the templates and modify generated conditionals:
Instead of:
if(NRF5_SDK_VERSION VERSION_EQUAL 16.0.0)
target_link_libraries(nrf5_ble_db_discovery PUBLIC
nrf5_ble_gq
)
endif()
we will end up with something like:
if((USES_NRF5_SDK and NRF5_SDK_VERSION VERSION_EQUAL 16.0.0) or ((USES_ZIGBEE_NRF5_SDK and NRF5_ZIGBEE_SDK_VERSION VERSION_EQUAL 4.1.0)))
target_link_libraries(nrf5_ble_db_discovery PUBLIC
nrf5_ble_gq
)
endif()
4. SDK validation
We need to maintain separate validation checks for Zigbee SDK. Currently they are described in the ./cmake/nrf5_helpers.cmake
file.
5. CI setup
We need to adjust all scripts used by a CI and compile & tests all libaries/examples used in the new SDK.
from cmake-nrf5x.
have the problem solved?
from cmake-nrf5x.
Related Issues (20)
- Generate .map file. HOT 1
- Move legacy driver JSON definitions.
- Add a target for flashing a bootloader.
- Allow to specify debug probe serial number for all nrfjprog/nrfutil commands.
- Add support for generating signed DFU packages
- Support for nRF51 HOT 1
- Add support for Clang based toolchain
- Add 'nrf5_bsp_defs' target with include dirs. only
- Add support for the nRF5 SDK 17.0.0 HOT 1
- Correctly handle the 'flash_softdevice' custom target in 'blank' and 'mbr' configurations
- nrf5_drv_uart build failed HOT 3
- TOOLCHAIN_PREFIX should be configurable HOT 2
- [FR] linker script database HOT 1
- There's not app_uart_redirect
- Detect if nrfjprog is a recognised command
- Support pca10100 board with SDK 16.0.0
- Make "missing separator. Stop" HOT 1
- Has this gone stale? HOT 1
- Elf file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmake-nrf5x.