Commit Graph

32 Commits

Author SHA1 Message Date
Hauke Petersen 235c99db00 os/os_trace: remove os_trace_task_* defs 2018-05-28 13:33:41 +02:00
Andrzej Kaczmarek 23093dbe59 Merge pull request #104 from andrzej-kaczmarek/systemview
Add tracing via SystemView
2018-05-28 12:02:42 +02:00
Andrzej Kaczmarek 02f987d44d porting: Add local syscfg for RIOT
This is example configuration used by RIOT, mostly due to CI complaining
about this file since it does not follow RIOT style at all (it is
autogenerated by newt).

Other applications built for RIOT can decide simply not to use this file
and provide own instead.
2018-05-28 11:36:33 +02:00
Hauke Petersen 39c32e6be1 porting: Add NPL for RIOT
This patch adds NPL for RIOT, see https://www.riot-os.org/.

Example applications are included in RIOT sources and should be build
from there. RIOT build system will automatically fetch NimBLE sources as
a package.
2018-05-28 11:35:51 +02:00
Andrzej Kaczmarek b1855ebb61 porting: Fix unused parameter warning 2018-05-24 16:04:37 +02:00
Andrzej Kaczmarek 75a8801cd8 porting: Update os_mempool
Perhaps we need to figure out better way to sync these files with core,
but for now let's do this manually. Anyway, I do not expect this to
happen very often.
2018-05-24 15:37:19 +02:00
Szymon Janc c155820ccd Merge pull request #109 from sjanc/rat
Add missing license headers and  RAT excludes
2018-05-24 15:13:42 +02:00
Andrzej Kaczmarek daed64e786 porting: Fix FreeRTOS NPL
Make ble_npl_eventq_remove properly handle calling from ISR.
2018-05-24 12:03:43 +02:00
Andrzej Kaczmarek 3c07cb1898 porting: Add convenience init function in FreeRTOS NPL
This adds convenience function for FreeRTOS NPL which initializes
OS-specific things. Currently it creates tasks necessary to run ported
NimBLE.
2018-05-24 12:03:43 +02:00
Andrzej Kaczmarek 86d4b254be porting: Use common FreeRTOS macros for entering/exiting critical sect 2018-05-24 12:03:43 +02:00
Andrzej Kaczmarek 4c70f15a74 porting: Add common function to run default event queue
Now application can just call single function which will run default
event queue instead of creating "standard" loop. Also on some OS it may
be just possible to call some OS-specific API instead, so it's up to app
what to do - this is just a convenience function.
2018-05-24 12:03:43 +02:00
Andrzej Kaczmarek 095288a549 porting: Move default event queue management to common porting code
OS specific code should not care about default event queue thus it will
be created by nimble_port_init() function internally. We'll just add
simple getter in case someone wants to use it.
2018-05-24 12:03:43 +02:00
Andrzej Kaczmarek 7501d3816c porting: Add API to run an event instead of running an eventq
This makes more sense since now we have API which can just fire callback
associated with event. Running eventq is just getting an event from
queue and then running it.
2018-05-24 12:03:43 +02:00
Andrzej Kaczmarek 23d834ee03 porting: Add missing API to dummy NPL 2018-05-24 12:03:43 +02:00
Szymon Janc 58c5ac8531 Add missing license headers and RAT excludes 2018-05-24 10:51:21 +02:00
Andrzej Kaczmarek 4ff46f5e43 Revert "porting: Add FreeRTOS on nRF5 SDK porting example"
This reverts commit 27750e78f2.

Demo was included in other PR by mistake, we should not merge it like
this...
2018-05-23 18:21:59 +02:00
Andrzej Kaczmarek 27750e78f2 porting: Add FreeRTOS on nRF5 SDK porting example
nRF5 SDK (v15) is required to run this demo app. By default, it is
expected to be available at porting/examples/freertos_nrf5_sdk/nrf5_sdk
but this location can be changed by SDK_ROOT variable.

To build for nRF52832:
> cd porting/examples/freertos_nrf5_sdk
> make -C pca10040/blank/armgcc

To build for nRF52840:
> cd porting/examples/freertos_nrf5_sdk
> make -C pca10056/blank/armgcc

To build with nRF5 SDK placed in non-default location:
> cd porting/examples/freertos_nrf5_sdk
> make -C pca10040/blank/armgcc SDK_ROOT=/xxx/nRF5_SDK_15.0.0_a53641a

Flashing is done as for other examples in nRF5 SDK:
> make -C pca10040/blank/armgcc flash
2018-05-23 12:24:07 +02:00
Andrzej Kaczmarek 0217aa7b5a porting: Remove services from NimBLE port initialization
We should only initialize basic NimBLE packages in common init. Extra
services should be better initialized by application since we do not
know which ones it may want to include.
2018-05-23 12:24:07 +02:00
Andrzej Kaczmarek 02f148412c porting: Fix FreeRTOS NPL
This fixes few issues in FreeRTOS NPL related to API usage from ISR
context.
2018-05-23 12:24:07 +02:00
Andrzej Kaczmarek 7ba4796846 porting: Fix ble_npl_eventq_is_empty return value 2018-05-23 12:24:07 +02:00
Andrzej Kaczmarek c928a5050d porting: Change ble_npl_callout_reset return value
All other APIs return ble_npl_error_t already.
2018-05-23 12:24:07 +02:00
Andrzej Kaczmarek 7e958b77de porting: Rename ble_npl_callout_queued
"is_active" is more consistent with other APIs naming like "is_empty" or
"is_queued". Also "active" instead of "queued" makes more sense since
this means callout is active and can fire on timeout. "queued" is just
related to implementation on Mynewt where active callout is put on
queue.

Return value is also changes for consistency.
2018-05-23 12:24:07 +02:00
Andrzej Kaczmarek 4c215e3cbd porting: Remove redundant os_eventq_get_tmo API
Let's just add timeout parameter to os_eventq_get instead and have
single API to get event from queue. The handing of timeout can be
optimied by compiler if static inline is used to implement this.
2018-05-23 12:24:07 +02:00
Andrzej Kaczmarek ddfe8fe725 porting: Update NPL with latest tracing API 2018-05-21 13:18:44 +02:00
Andrzej Kaczmarek d17120a2a1 Merge pull request #96 from turon/pr/64-bit
porting: Add support for running on 64-bit architectures
2018-05-18 10:20:57 +02:00
Martin Turon c5a0c7a3ee porting: Add support for running on 64-bit architectures 2018-05-16 06:41:20 -07:00
Michał Narajowski a1005bd9c5 porting: Add missing API functions used by Mesh 2018-05-15 14:21:14 +02:00
Michał Narajowski c29971e38d porting: Add Mesh files to Makefile 2018-05-15 14:21:14 +02:00
Andrzej Kaczmarek 935142971f nimble/porting: Remove BLE_NPL_STORAGE_DECL
Currently nimble_npl_os.h is included before APIs are declared. This is
to make sure all OS-specific types are defined early since they are
needed for APIs declaration. This has a nice side effect since we can
simply define some simple APIs as static inlines in nimble_npl_os.h and
later declarations will simply inherit linkage of prior symbol, thus no
error is emitted. As a result, we do not need BLE_NPL_STORAGE_DECL thus
let's just remove it.
2018-05-14 22:19:09 +02:00
Andrzej Kaczmarek bf9eb17cd9 porting: Add NPL for FreeRTOS 2018-05-08 14:50:20 +02:00
Andrzej Kaczmarek d1536977af porting: Add dummy NPL 2018-05-08 14:50:20 +02:00
Andrzej Kaczmarek 84a4c118ac porting: Add Mynewt NPL 2018-05-08 14:50:20 +02:00