Date   

Re: Zephyr Enhancement Proposals

Flavio Santes <flavio.santes@...>
 

I also second "proposals".


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 3
[ZEP-283] need to support development in subsystem branches
https://jira.zephyrproject.org/browse/ZEP-283

[ZEP-281] nios2: TCF support
https://jira.zephyrproject.org/browse/ZEP-281

[ZEP-285] FAT filesystem support on top of SPI Flash
https://jira.zephyrproject.org/browse/ZEP-285


UPDATED JIRA items within last 24 hours: 3
[ZEP-163] AIO doesn't work on QUARK_D2000_CRB
https://jira.zephyrproject.org/browse/ZEP-163

[ZEP-10] @Lakemont failed to receive profiler events, with printk @Arc after fiber_start
https://jira.zephyrproject.org/browse/ZEP-10

[ZEP-212] "~" not working in build env variables
https://jira.zephyrproject.org/browse/ZEP-212


CLOSED JIRA items within last 24 hours: 3
[ZEP-282] (Duplicate) nios2: Implement JTAG UART driver
https://jira.zephyrproject.org/browse/ZEP-282

[ZEP-247] (Duplicate) MQTT support
https://jira.zephyrproject.org/browse/ZEP-247

[ZEP-214] (Fixed) CC2520 Rx not working with QMSI drivers
https://jira.zephyrproject.org/browse/ZEP-214


RESOLVED JIRA items within last 24 hours: 5
[ZEP-186] (Fixed) Add a new toolchain script for supporting ISSM with both IA32 and ARC
https://jira.zephyrproject.org/browse/ZEP-186

[ZEP-219] (Fixed) We should be able to use Zephyr with original Arduino 101 bootloader
https://jira.zephyrproject.org/browse/ZEP-219

[ZEP-85] (Fixed) build failure of public event handler defined within application MDEF file
https://jira.zephyrproject.org/browse/ZEP-85

[ZEP-176] (Won't Do) [regression] profiler sleep event not received
https://jira.zephyrproject.org/browse/ZEP-176

[ZEP-189] (Fixed) PINMUX QMSI shim api pinmux_pin_get is not implemented
https://jira.zephyrproject.org/browse/ZEP-189


Re: Zephyr Enhancement Proposals

Iván Briano <ivan.briano at intel.com...>
 

On Thu, 05 May 2016 15:21:11 +0000, Nashif, Anas wrote:
Hi,
We are looking for a better workflow and tools for making and maintaining enhancement proposals for Zephyr.

Currently contributors and developers are asked to send an email to the mailing list with their enhancement proposal. The mailing list is perfect for discussion of any proposals or issues, however we are looking for a more formal location for submitting and tracking proposal changes. The idea is that we continue to discuss any proposals on the mailing list, however, any incremental changes up to adoption will need to be submitted and maintained in version control system and later made available on the web site or some other form.

A few notes:
- To get to the above, we will create a gerrit project dedicated for proposals
- Proposals will be submitted using the RST documentation syntax, the same format we also use for documentation
- Proposals will follow a template and sections some of which would be mandatory, some will be optional
- Every proposal will need to have a matching JIRA item submitted as a story with a brief description
- Proposals will be maintained in GIT and will be categorised based on state, i.e. adopted, rejected, deferred, pending…
- The link between the proposal in git, JIRA and later the submitted code implementing a proposal has to always be established and maintained.


Feedback and comments welcome.

P.S: We need to give the process a name. We have been using RFC on the mailing list, Personally I prefer to call those *proposals* or *blueprints* or *enhancements* (and the git tree containing them would carry this name as well).
Of those three, I prefer 'proposals'. Enhancement doesn't feel
appropriate when you add something entirely new, and blueprints could be
better used for something involving board diagrams and the such.
And for once I will refrain myself from suggesting some idiotic
alternative name.



Anas


Zephyr Enhancement Proposals

Nashif, Anas
 

Hi,
We are looking for a better workflow and tools for making and maintaining enhancement proposals for Zephyr.

Currently contributors and developers are asked to send an email to the mailing list with their enhancement proposal. The mailing list is perfect for discussion of any proposals or issues, however we are looking for a more formal location for submitting and tracking proposal changes. The idea is that we continue to discuss any proposals on the mailing list, however, any incremental changes up to adoption will need to be submitted and maintained in version control system and later made available on the web site or some other form.

A few notes:
- To get to the above, we will create a gerrit project dedicated for proposals
- Proposals will be submitted using the RST documentation syntax, the same format we also use for documentation
- Proposals will follow a template and sections some of which would be mandatory, some will be optional
- Every proposal will need to have a matching JIRA item submitted as a story with a brief description
- Proposals will be maintained in GIT and will be categorised based on state, i.e. adopted, rejected, deferred, pending…
- The link between the proposal in git, JIRA and later the submitted code implementing a proposal has to always be established and maintained.


Feedback and comments welcome.

P.S: We need to give the process a name. We have been using RFC on the mailing list, Personally I prefer to call those *proposals* or *blueprints* or *enhancements* (and the git tree containing them would carry this name as well).


Anas


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1852 : arc: Set __start entry point to be same as __reset
- https://gerrit.zephyrproject.org/r/1855 : nanokernel: Introduce workqueue API
- https://gerrit.zephyrproject.org/r/1869 : qemu: disable vga and avoid annoying warning message
- https://gerrit.zephyrproject.org/r/1831 : build: rename non-generated linker scripts to .x extension
- https://gerrit.zephyrproject.org/r/1854 : nanokernel: Add fiber_config structure and wrapper
- https://gerrit.zephyrproject.org/r/1867 : sensor: add support for *_ANY get channel
- https://gerrit.zephyrproject.org/r/1868 : sensor: remove unnecessary return variables
- https://gerrit.zephyrproject.org/r/1856 : sensor: Rework core to use workqueue API
- https://gerrit.zephyrproject.org/r/1857 : sensor: Migrate drivers to the new workqueue API
- https://gerrit.zephyrproject.org/r/1864 : sensor: sx9500: fix compile error
- https://gerrit.zephyrproject.org/r/1828 : meta-zephyr-sdk-build.sh: Add Nios2 toolchain
- https://gerrit.zephyrproject.org/r/1851 : arc: early init should invalidate d-cache and set vector table
- https://gerrit.zephyrproject.org/r/1834 : nios2: add missing linker script
- https://gerrit.zephyrproject.org/r/1833 : nios2: fatal: add _SysFatalErrorHandler and _Fault stub
- https://gerrit.zephyrproject.org/r/1835 : event_logger: add arc support for sleep event
- https://gerrit.zephyrproject.org/r/1832 : nios2: add minimal crt0.S
- https://gerrit.zephyrproject.org/r/1829 : DO NOT MERGE altera_max10: Add board/CPU configuration for Zephyr
- https://gerrit.zephyrproject.org/r/1827 : test: fix a comment
- https://gerrit.zephyrproject.org/r/1825 : net: configure TCP receive window size

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1713 : Bluetooth: BR/EDR: Reset pairing context when needed
- https://gerrit.zephyrproject.org/r/1754 : test: timestamp_serialize for arc can be no-op
- https://gerrit.zephyrproject.org/r/1770 : arc: improve code-density by using ld_s and st_s with r0-r3
- https://gerrit.zephyrproject.org/r/1769 : arc: can use small-variant instructions to load/store %r13
- https://gerrit.zephyrproject.org/r/1577 : Set kernel event logger timestamps to HW cycles
- https://gerrit.zephyrproject.org/r/1583 : kernel event profiler: add dynamic enable/disable/configure

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1866 : tests: build using newlib also on ARC
- https://gerrit.zephyrproject.org/r/1865 : libc: newlib: fix RAM config names for ARC
- https://gerrit.zephyrproject.org/r/1862 : Bluetooth: Add new conn on LE Connection Complete only for slave
- https://gerrit.zephyrproject.org/r/1863 : Bluetooth: Don't update responder for master role connection
- https://gerrit.zephyrproject.org/r/1860 : drivers/nble: Fix setting SCAN_RSP data twice
- https://gerrit.zephyrproject.org/r/1861 : sensor: bmg160: fix compile error when not using trigger
- https://gerrit.zephyrproject.org/r/1853 : samples: shell now emits a banner
- https://gerrit.zephyrproject.org/r/1859 : checkpatch: Remove Change-Id warning
- https://gerrit.zephyrproject.org/r/1858 : kernel: _MOVE_INSTR needs to be defined for CONFIG_ARC
- https://gerrit.zephyrproject.org/r/1826 : scripts/sysgen: Fix indentation inconsistency
- https://gerrit.zephyrproject.org/r/1830 : Bluetooth: monitor: Add 32-bit timestamp support
- https://gerrit.zephyrproject.org/r/1824 : Bluetooth: Use le_set_rpa in check_pending_conn
- https://gerrit.zephyrproject.org/r/1823 : Bluetooth: Refactor check_pending_conn error handling
- https://gerrit.zephyrproject.org/r/1822 : Bluetooth: Fix connection leak if failed to generate RPA
- https://gerrit.zephyrproject.org/r/1623 : device: simplify synchronization
- https://gerrit.zephyrproject.org/r/1375 : nanokernel: Add back pointer to microkernel task
- https://gerrit.zephyrproject.org/r/1788 : microkernel: Fibers and ISRs may invoke microkernel no-op
- https://gerrit.zephyrproject.org/r/1374 : microkernel: Add TF_NANO wait flag reason
- https://gerrit.zephyrproject.org/r/1376 : kernel: Init back pointer to microkernel task
- https://gerrit.zephyrproject.org/r/1719 : nanokernel: Fix nanokernel object timeout recalculation
- https://gerrit.zephyrproject.org/r/1380 : nanokernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1381 : tests: Pend microkernel tasks on nanokernel objects
- https://gerrit.zephyrproject.org/r/1557 : doc: update installation to add PLY library to Python3
- https://gerrit.zephyrproject.org/r/1077 : sanitycheck: allow for more expressive filtering in testcase.ini
- https://gerrit.zephyrproject.org/r/1076 : expr_parser.py: simple expression language
- https://gerrit.zephyrproject.org/r/1379 : microkernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1078 : test_tickless: improve testcase.ini filter
- https://gerrit.zephyrproject.org/r/1821 : microkernel: lock interrupts in _k_state_bit_[re]set()
- https://gerrit.zephyrproject.org/r/1810 : errno: implement _get_errno() in common code
- https://gerrit.zephyrproject.org/r/1695 : openocd: Upgrade to 0.9
- https://gerrit.zephyrproject.org/r/1820 : drivers/nble: Pass read_params as nble user_data
- https://gerrit.zephyrproject.org/r/1819 : drivers/nble: Fix NULL pointer dereference
- https://gerrit.zephyrproject.org/r/1809 : microkernel: events: fix undefined function error
- https://gerrit.zephyrproject.org/r/1735 : arch/arc/include: start_task_arch.h needed so ARC can build microkernel apps
- https://gerrit.zephyrproject.org/r/1708 : include/arch/arc: fix memory permissions
- https://gerrit.zephyrproject.org/r/1808 : doc: Fixed broken link to development documentation
- https://gerrit.zephyrproject.org/r/1752 : arch/arc: add ICCM_BASE_ADDRESS and ICCM_SIZE


Re: [PATCH 2/4] nanokernel: Introduce workqueue API

Vlad Dogaru <vlad.dogaru@...>
 

On Thu, May 05, 2016 at 03:53:54PM +0300, Johan Hedberg wrote:
Hi Vlad,

On Thu, May 05, 2016, Vlad Dogaru wrote:
+struct nano_work {
+ work_handler_t work_handler;
+ void *work_arg;
+};
Instead of storing and passing work_arg to the callback, did you
consider passing just the nano_work struct itself and then using
CONTAINER_OF() in the callback to get the context its part of? That
would save four bytes for every nano_work struct.
Sounds good. I'll do this in the next iteration.

+/**
+ * @brief Initialize a @ref nano_work structure.
+ *
+ * @param work The structure to initialize.
+ * @param handler The function to run when @ref work is run.
+ * @param arg The argument to pass to the handler.
+ */
+static inline void nano_work_init(struct nano_work *work,
+ work_handler_t handler,
+ void *arg)
+{
+ work->work_handler = handler;
+ work->work_arg = arg;
+}
+
+/**
+ * @brief Submit a work item to a workqueue.
+ */
+static inline void nano_work_submit(struct nano_workqueue *wq,
+ struct nano_work *work)
+{
+ nano_fifo_put(&wq->wq_fifo, work);
+}
Maybe I'm missing something here, but don't you need to reserve four
bytes in the beginning of nano_work for the nano_fifo internal use (the
"next" pointer)? To me it looks like the nano_fifo_put() above would
overwrite the first four bytes of your work struct (i.e. the
work_handler pointer).
One of us is certainly missing something, that's for sure. And it's
likely me :)

I was under the impression that nano_fifos did their own bookkeeping.
After reading the code and docs, it's clear that they do not. Now the
question remains how on earth my code works. I suspect it's because
when an item is added to a fifo, a fiber is always waiting. So we never
actually call enqueue_data, we just context switch to the waiting fiber.

I'll fix this silliness in v2, along with your suggestion above. The
overall delta is 0. We save 4 bytes from removing the explicit
argument, but expend them on the fifo reserved field. The negligible
effect being that we have properly working fifos, of course :)

Thanks for your input,
Vlad


Re: [PATCH 2/4] nanokernel: Introduce workqueue API

Johan Hedberg
 

Hi Vlad,

On Thu, May 05, 2016, Vlad Dogaru wrote:
+struct nano_work {
+ work_handler_t work_handler;
+ void *work_arg;
+};
Instead of storing and passing work_arg to the callback, did you
consider passing just the nano_work struct itself and then using
CONTAINER_OF() in the callback to get the context its part of? That
would save four bytes for every nano_work struct.

+/**
+ * @brief Initialize a @ref nano_work structure.
+ *
+ * @param work The structure to initialize.
+ * @param handler The function to run when @ref work is run.
+ * @param arg The argument to pass to the handler.
+ */
+static inline void nano_work_init(struct nano_work *work,
+ work_handler_t handler,
+ void *arg)
+{
+ work->work_handler = handler;
+ work->work_arg = arg;
+}
+
+/**
+ * @brief Submit a work item to a workqueue.
+ */
+static inline void nano_work_submit(struct nano_workqueue *wq,
+ struct nano_work *work)
+{
+ nano_fifo_put(&wq->wq_fifo, work);
+}
Maybe I'm missing something here, but don't you need to reserve four
bytes in the beginning of nano_work for the nano_fifo internal use (the
"next" pointer)? To me it looks like the nano_fifo_put() above would
overwrite the first four bytes of your work struct (i.e. the
work_handler pointer).

Johan


[PATCH 4/4] sensor: Migrate drivers to the new workqueue API

Vlad Dogaru <vlad.dogaru@...>
 

Rework drivers that offer the possibility of using a system-wide
workqueue to use the new API. In a second step, these drivers can be
refactored to use their own workqueue instead of a homegrown fiber.

Change-Id: Ieddc44391e2a687e2e4f2190dc827969ebe3953f
Signed-off-by: Vlad Dogaru <vlad.dogaru(a)intel.com>
---
drivers/sensor/Kconfig.bma280 | 3 +--
drivers/sensor/Kconfig.bmi160 | 2 +-
drivers/sensor/Kconfig.isl29035 | 3 +--
drivers/sensor/Kconfig.lis3dh | 3 +--
drivers/sensor/Kconfig.mcp9808 | 3 +--
drivers/sensor/Kconfig.sht3xd | 3 +--
drivers/sensor/Kconfig.sx9500 | 3 +--
drivers/sensor/Kconfig.tmp007 | 3 +--
drivers/sensor/sensor_bma280.h | 2 +-
drivers/sensor/sensor_bma280_trigger.c | 5 ++---
drivers/sensor/sensor_bmi160.h | 2 +-
drivers/sensor/sensor_bmi160_trigger.c | 7 +++----
drivers/sensor/sensor_isl29035.h | 2 +-
drivers/sensor/sensor_isl29035_trigger.c | 5 ++---
drivers/sensor/sensor_lis3dh.h | 2 +-
drivers/sensor/sensor_lis3dh_trigger.c | 5 ++---
drivers/sensor/sensor_mcp9808.h | 2 +-
drivers/sensor/sensor_mcp9808_trigger.c | 5 ++---
drivers/sensor/sensor_sht3xd.h | 2 +-
drivers/sensor/sensor_sht3xd_trigger.c | 5 ++---
drivers/sensor/sensor_sx9500.h | 2 +-
drivers/sensor/sensor_sx9500_trigger.c | 5 ++---
drivers/sensor/sensor_tmp007.h | 2 +-
drivers/sensor/sensor_tmp007_trigger.c | 5 ++---
24 files changed, 33 insertions(+), 48 deletions(-)

diff --git a/drivers/sensor/Kconfig.bma280 b/drivers/sensor/Kconfig.bma280
index 4308a2d..3618015 100644
--- a/drivers/sensor/Kconfig.bma280
+++ b/drivers/sensor/Kconfig.bma280
@@ -138,9 +138,8 @@ config BMA280_TRIGGER_NONE
config BMA280_TRIGGER_GLOBAL_FIBER
bool
prompt "Use global fiber"
- depends on GPIO
+ depends on GPIO && SENSOR_WORKQUEUE
select BMA280_TRIGGER
- select SENSOR_DELAYED_WORK

config BMA280_TRIGGER_OWN_FIBER
bool
diff --git a/drivers/sensor/Kconfig.bmi160 b/drivers/sensor/Kconfig.bmi160
index 1ac70c6..ab7774f 100644
--- a/drivers/sensor/Kconfig.bmi160
+++ b/drivers/sensor/Kconfig.bmi160
@@ -71,8 +71,8 @@ config BMI160_TRIGGER_NONE

config BMI160_TRIGGER_GLOBAL_FIBER
bool "Use global fiber"
+ depends on SENSOR_WORKQUEUE
select BMI160_TRIGGER
- select SENSOR_DELAYED_WORK

config BMI160_TRIGGER_OWN_FIBER
bool "Use own fiber"
diff --git a/drivers/sensor/Kconfig.isl29035 b/drivers/sensor/Kconfig.isl29035
index 1cf6f51..52de072 100644
--- a/drivers/sensor/Kconfig.isl29035
+++ b/drivers/sensor/Kconfig.isl29035
@@ -161,9 +161,8 @@ config ISL29035_TRIGGER_NONE
config ISL29035_TRIGGER_GLOBAL_FIBER
bool
prompt "Use global fiber"
- depends on GPIO
+ depends on GPIO && SENSOR_WORKQUEUE
select ISL29035_TRIGGER
- select SENSOR_DELAYED_WORK

config ISL29035_TRIGGER_OWN_FIBER
bool
diff --git a/drivers/sensor/Kconfig.lis3dh b/drivers/sensor/Kconfig.lis3dh
index 1f4b21a..296d348 100644
--- a/drivers/sensor/Kconfig.lis3dh
+++ b/drivers/sensor/Kconfig.lis3dh
@@ -98,9 +98,8 @@ config LIS3DH_TRIGGER_NONE
config LIS3DH_TRIGGER_GLOBAL_FIBER
bool
prompt "Use global fiber"
- depends on GPIO
+ depends on GPIO && SENSOR_WORKQUEUE
select LIS3DH_TRIGGER
- select SENSOR_DELAYED_WORK

config LIS3DH_TRIGGER_OWN_FIBER
bool
diff --git a/drivers/sensor/Kconfig.mcp9808 b/drivers/sensor/Kconfig.mcp9808
index e0a9f19..87e486e 100644
--- a/drivers/sensor/Kconfig.mcp9808
+++ b/drivers/sensor/Kconfig.mcp9808
@@ -74,9 +74,8 @@ config MCP9808_TRIGGER_NONE
bool "No trigger"

config MCP9808_TRIGGER_GLOBAL_FIBER
- depends on GPIO
+ depends on GPIO && SENSOR_WORKQUEUE
select MCP9808_TRIGGER
- select SENSOR_DELAYED_WORK
bool "Use global fiber"

config MCP9808_TRIGGER_OWN_FIBER
diff --git a/drivers/sensor/Kconfig.sht3xd b/drivers/sensor/Kconfig.sht3xd
index de33c6d..cfc1f7a 100644
--- a/drivers/sensor/Kconfig.sht3xd
+++ b/drivers/sensor/Kconfig.sht3xd
@@ -98,9 +98,8 @@ config SHT3XD_TRIGGER_NONE
config SHT3XD_TRIGGER_GLOBAL_FIBER
bool
prompt "Use global fiber"
- depends on GPIO
+ depends on GPIO && SENSOR_WORKQUEUE
select SHT3XD_TRIGGER
- select SENSOR_DELAYED_WORK

config SHT3XD_TRIGGER_OWN_FIBER
bool
diff --git a/drivers/sensor/Kconfig.sx9500 b/drivers/sensor/Kconfig.sx9500
index 46d16c2..ce98be0 100644
--- a/drivers/sensor/Kconfig.sx9500
+++ b/drivers/sensor/Kconfig.sx9500
@@ -83,9 +83,8 @@ config SX9500_TRIGGER_NONE
bool "No trigger"

config SX9500_TRIGGER_GLOBAL_FIBER
- depends on GPIO
+ depends on GPIO && SENSOR_WORKQUEUE
select SX9500_TRIGGER
- select SENSOR_DELAYED_WORK
bool "Use global fiber"

config SX9500_TRIGGER_OWN_FIBER
diff --git a/drivers/sensor/Kconfig.tmp007 b/drivers/sensor/Kconfig.tmp007
index 68b3876..202e8a5 100644
--- a/drivers/sensor/Kconfig.tmp007
+++ b/drivers/sensor/Kconfig.tmp007
@@ -134,9 +134,8 @@ config TMP007_TRIGGER_NONE
config TMP007_TRIGGER_GLOBAL_FIBER
bool
prompt "Use global fiber"
- depends on GPIO
+ depends on GPIO && SENSOR_WORKQUEUE
select TMP007_TRIGGER
- select SENSOR_DELAYED_WORK

config TMP007_TRIGGER_OWN_FIBER
bool
diff --git a/drivers/sensor/sensor_bma280.h b/drivers/sensor/sensor_bma280.h
index 28a04e4..f516708 100644
--- a/drivers/sensor/sensor_bma280.h
+++ b/drivers/sensor/sensor_bma280.h
@@ -152,7 +152,7 @@ struct bma280_data {
char __stack fiber_stack[CONFIG_BMA280_FIBER_STACK_SIZE];
struct nano_sem gpio_sem;
#elif defined(CONFIG_BMA280_TRIGGER_GLOBAL_FIBER)
- struct sensor_work work;
+ struct nano_work work;
#endif

#endif /* CONFIG_BMA280_TRIGGER */
diff --git a/drivers/sensor/sensor_bma280_trigger.c b/drivers/sensor/sensor_bma280_trigger.c
index 467b484..7c5cbfe 100644
--- a/drivers/sensor/sensor_bma280_trigger.c
+++ b/drivers/sensor/sensor_bma280_trigger.c
@@ -74,7 +74,7 @@ static void bma280_gpio_callback(struct device *dev,
#if defined(CONFIG_BMA280_TRIGGER_OWN_FIBER)
nano_sem_give(&drv_data->gpio_sem);
#elif defined(CONFIG_BMA280_TRIGGER_GLOBAL_FIBER)
- nano_isr_fifo_put(sensor_get_work_fifo(), &drv_data->work);
+ sensor_work_submit(&drv_data->work);
#endif
}

@@ -272,8 +272,7 @@ int bma280_init_interrupt(struct device *dev)
(nano_fiber_entry_t)bma280_fiber, POINTER_TO_INT(dev),
0, CONFIG_BMA280_FIBER_PRIORITY, 0);
#elif defined(CONFIG_BMA280_TRIGGER_GLOBAL_FIBER)
- drv_data->work.handler = bma280_fiber_cb;
- drv_data->work.arg = dev;
+ nano_work_init(&drv_data->work, bma280_fiber_cb, dev);
#endif

gpio_pin_enable_callback(drv_data->gpio, CONFIG_BMA280_GPIO_PIN_NUM);
diff --git a/drivers/sensor/sensor_bmi160.h b/drivers/sensor/sensor_bmi160.h
index d89a09d..78046cc 100644
--- a/drivers/sensor/sensor_bmi160.h
+++ b/drivers/sensor/sensor_bmi160.h
@@ -457,7 +457,7 @@ struct bmi160_device_data {
#endif

#ifdef CONFIG_BMI160_TRIGGER_GLOBAL_FIBER
- struct sensor_work work;
+ struct nano_work work;
#endif

#ifdef CONFIG_BMI160_TRIGGER
diff --git a/drivers/sensor/sensor_bmi160_trigger.c b/drivers/sensor/sensor_bmi160_trigger.c
index 8c0eff2..e077772 100644
--- a/drivers/sensor/sensor_bmi160_trigger.c
+++ b/drivers/sensor/sensor_bmi160_trigger.c
@@ -118,7 +118,7 @@ static void bmi160_gpio_callback(struct device *port,
#if defined(CONFIG_BMI160_TRIGGER_OWN_FIBER)
nano_sem_give(&bmi160->sem);
#elif defined(CONFIG_BMI160_TRIGGER_GLOBAL_FIBER)
- nano_isr_fifo_put(sensor_get_work_fifo(), &bmi160->work);
+ sensor_work_submit(&bmi160->work);
#endif
}
#else
@@ -131,7 +131,7 @@ static void bmi160_ipm_callback(void *context, uint32_t id, volatile void *data)
#if defined(CONFIG_BMI160_TRIGGER_OWN_FIBER)
nano_sem_give(&bmi160->sem);
#elif defined(CONFIG_BMI160_TRIGGER_GLOBAL_FIBER)
- nano_isr_fifo_put(sensor_get_work_fifo(), &bmi160->work);
+ sensor_work_submit(&bmi160->work);
#endif
}
#endif
@@ -316,8 +316,7 @@ int bmi160_trigger_mode_init(struct device *dev)
bmi160_fiber_main, (int)dev, 0,
CONFIG_BMI160_FIBER_PRIORITY, 0);
#elif defined(CONFIG_BMI160_TRIGGER_GLOBAL_FIBER)
- bmi160->work.handler = bmi160_handle_interrupts;
- bmi160->work.arg = dev;
+ nano_work_init(&bmi160->work, bmi160_handle_interrupts, dev);
#endif

/* map all interrupts to INT1 pin */
diff --git a/drivers/sensor/sensor_isl29035.h b/drivers/sensor/sensor_isl29035.h
index 5dcc304..86ef353 100644
--- a/drivers/sensor/sensor_isl29035.h
+++ b/drivers/sensor/sensor_isl29035.h
@@ -135,7 +135,7 @@ struct isl29035_driver_data {
char __stack fiber_stack[CONFIG_ISL29035_FIBER_STACK_SIZE];
struct nano_sem gpio_sem;
#elif defined(CONFIG_ISL29035_TRIGGER_GLOBAL_FIBER)
- struct sensor_work work;
+ struct nano_work work;
#endif

#endif /* CONFIG_ISL29035_TRIGGER */
diff --git a/drivers/sensor/sensor_isl29035_trigger.c b/drivers/sensor/sensor_isl29035_trigger.c
index e36f338b..cf2a324 100644
--- a/drivers/sensor/sensor_isl29035_trigger.c
+++ b/drivers/sensor/sensor_isl29035_trigger.c
@@ -87,7 +87,7 @@ static void isl29035_gpio_callback(struct device *dev,
#if defined(CONFIG_ISL29035_TRIGGER_OWN_FIBER)
nano_sem_give(&drv_data->gpio_sem);
#elif defined(CONFIG_ISL29035_TRIGGER_GLOBAL_FIBER)
- nano_isr_fifo_put(sensor_get_work_fifo(), &drv_data->work);
+ sensor_work_submit(&drv_data->work);
#endif
}

@@ -184,8 +184,7 @@ int isl29035_init_interrupt(struct device *dev)
(nano_fiber_entry_t)isl29035_fiber, POINTER_TO_INT(dev),
0, CONFIG_ISL29035_FIBER_PRIORITY, 0);
#elif defined(CONFIG_ISL29035_TRIGGER_GLOBAL_FIBER)
- drv_data->work.handler = isl29035_fiber_cb;
- drv_data->work.arg = dev;
+ nano_work_init(&drv_data->work, isl29035_fiber_cb, dev);
#endif

return 0;
diff --git a/drivers/sensor/sensor_lis3dh.h b/drivers/sensor/sensor_lis3dh.h
index 13262a7..0aeb65a 100644
--- a/drivers/sensor/sensor_lis3dh.h
+++ b/drivers/sensor/sensor_lis3dh.h
@@ -110,7 +110,7 @@ struct lis3dh_data {
char __stack fiber_stack[CONFIG_LIS3DH_FIBER_STACK_SIZE];
struct nano_sem gpio_sem;
#elif defined(CONFIG_LIS3DH_TRIGGER_GLOBAL_FIBER)
- struct sensor_work work;
+ struct nano_work work;
#endif

#endif /* CONFIG_LIS3DH_TRIGGER */
diff --git a/drivers/sensor/sensor_lis3dh_trigger.c b/drivers/sensor/sensor_lis3dh_trigger.c
index 6e90440..150c263 100644
--- a/drivers/sensor/sensor_lis3dh_trigger.c
+++ b/drivers/sensor/sensor_lis3dh_trigger.c
@@ -58,7 +58,7 @@ static void lis3dh_gpio_callback(struct device *dev,
#if defined(CONFIG_LIS3DH_TRIGGER_OWN_FIBER)
nano_sem_give(&drv_data->gpio_sem);
#elif defined(CONFIG_LIS3DH_TRIGGER_GLOBAL_FIBER)
- nano_isr_fifo_put(sensor_get_work_fifo(), &drv_data->work);
+ sensor_work_submit(&drv_data->work);
#endif
}

@@ -139,8 +139,7 @@ int lis3dh_init_interrupt(struct device *dev)
(nano_fiber_entry_t)lis3dh_fiber, POINTER_TO_INT(dev),
0, CONFIG_LIS3DH_FIBER_PRIORITY, 0);
#elif defined(CONFIG_LIS3DH_TRIGGER_GLOBAL_FIBER)
- drv_data->work.handler = lis3dh_fiber_cb;
- drv_data->work.arg = dev;
+ nano_work_init(&drv_data->work, lis3dh_fiber_cb, dev);
#endif

gpio_pin_enable_callback(drv_data->gpio, CONFIG_LIS3DH_GPIO_PIN_NUM);
diff --git a/drivers/sensor/sensor_mcp9808.h b/drivers/sensor/sensor_mcp9808.h
index e1e0b1a..473ae3e 100644
--- a/drivers/sensor/sensor_mcp9808.h
+++ b/drivers/sensor/sensor_mcp9808.h
@@ -55,7 +55,7 @@ struct mcp9808_data {
#endif

#ifdef CONFIG_MCP9808_TRIGGER_GLOBAL_FIBER
- struct sensor_work work;
+ struct nano_work work;
#endif

#ifdef CONFIG_MCP9808_TRIGGER
diff --git a/drivers/sensor/sensor_mcp9808_trigger.c b/drivers/sensor/sensor_mcp9808_trigger.c
index 21fda1d..f5958cd 100644
--- a/drivers/sensor/sensor_mcp9808_trigger.c
+++ b/drivers/sensor/sensor_mcp9808_trigger.c
@@ -161,7 +161,7 @@ static void mcp9808_gpio_cb(struct device *dev,

ARG_UNUSED(pins);

- nano_isr_fifo_put(sensor_get_work_fifo(), &data->work);
+ sensor_work_submit(&data->work);
}

static void mcp9808_gpio_fiber_cb(void *arg)
@@ -195,8 +195,7 @@ void mcp9808_setup_interrupt(struct device *dev)
mcp9808_fiber_main, POINTER_TO_INT(dev), 0,
CONFIG_MCP9808_FIBER_PRIORITY, 0);
#else /* CONFIG_MCP9808_TRIGGER_GLOBAL_FIBER */
- data->work.handler = mcp9808_gpio_fiber_cb;
- data->work.arg = dev;
+ nano_work_init(&data->work, mcp9808_gpio_fiber_cb, dev);
#endif

gpio = device_get_binding(CONFIG_MCP9808_GPIO_CONTROLLER);
diff --git a/drivers/sensor/sensor_sht3xd.h b/drivers/sensor/sensor_sht3xd.h
index bb3d9f3..629066b 100644
--- a/drivers/sensor/sensor_sht3xd.h
+++ b/drivers/sensor/sensor_sht3xd.h
@@ -92,7 +92,7 @@ struct sht3xd_data {
char __stack fiber_stack[CONFIG_SHT3XD_FIBER_STACK_SIZE];
struct nano_sem gpio_sem;
#elif defined(CONFIG_SHT3XD_TRIGGER_GLOBAL_FIBER)
- struct sensor_work work;
+ struct nano_work work;
#endif

#endif /* CONFIG_SHT3XD_TRIGGER */
diff --git a/drivers/sensor/sensor_sht3xd_trigger.c b/drivers/sensor/sensor_sht3xd_trigger.c
index 1aea4da..f945741 100644
--- a/drivers/sensor/sensor_sht3xd_trigger.c
+++ b/drivers/sensor/sensor_sht3xd_trigger.c
@@ -120,7 +120,7 @@ static void sht3xd_gpio_callback(struct device *dev,
#if defined(CONFIG_SHT3XD_TRIGGER_OWN_FIBER)
nano_sem_give(&drv_data->gpio_sem);
#elif defined(CONFIG_SHT3XD_TRIGGER_GLOBAL_FIBER)
- nano_isr_fifo_put(sensor_get_work_fifo(), &drv_data->work);
+ sensor_work_submit(&drv_data->work);
#endif
}

@@ -234,8 +234,7 @@ int sht3xd_init_interrupt(struct device *dev)
(nano_fiber_entry_t)sht3xd_fiber, POINTER_TO_INT(dev),
0, CONFIG_SHT3XD_FIBER_PRIORITY, 0);
#elif defined(CONFIG_SHT3XD_TRIGGER_GLOBAL_FIBER)
- drv_data->work.handler = sht3xd_fiber_cb;
- drv_data->work.arg = dev;
+ nano_work_init(&drv_data->work, sht3xd_fiber_cb, dev);
#endif

return 0;
diff --git a/drivers/sensor/sensor_sx9500.h b/drivers/sensor/sensor_sx9500.h
index 4ce0de6..ea08e18 100644
--- a/drivers/sensor/sensor_sx9500.h
+++ b/drivers/sensor/sensor_sx9500.h
@@ -46,7 +46,7 @@ struct sx9500_data {
#endif

#ifdef CONFIG_SX9500_TRIGGER_GLOBAL_FIBER
- struct sensor_work work;
+ struct nano_work work;
#endif

#ifdef CONFIG_SX9500_TRIGGER
diff --git a/drivers/sensor/sensor_sx9500_trigger.c b/drivers/sensor/sensor_sx9500_trigger.c
index b38dcbd..aaaf56d 100644
--- a/drivers/sensor/sensor_sx9500_trigger.c
+++ b/drivers/sensor/sensor_sx9500_trigger.c
@@ -118,7 +118,7 @@ static void sx9500_gpio_cb(struct device *port,

ARG_UNUSED(pins);

- nano_isr_fifo_put(sensor_get_work_fifo(), &data->work);
+ sensor_work_submit(&data->work);
}

static void sx9500_gpio_fiber_cb(void *arg)
@@ -153,8 +153,7 @@ int sx9500_setup_interrupt(struct device *dev)
#ifdef CONFIG_SX9500_TRIGGER_OWN_FIBER
nano_sem_init(&data->sem);
#else
- data->work.handler = sx9500_gpio_fiber_cb;
- data->work.arg = dev;
+ nano_work_init(&data->work, sx9500_gpio_fiber_cb, dev);
#endif

gpio = device_get_binding(CONFIG_SX9500_GPIO_CONTROLLER);
diff --git a/drivers/sensor/sensor_tmp007.h b/drivers/sensor/sensor_tmp007.h
index 7b74bed..5833e54 100644
--- a/drivers/sensor/sensor_tmp007.h
+++ b/drivers/sensor/sensor_tmp007.h
@@ -77,7 +77,7 @@ struct tmp007_data {
char __stack fiber_stack[CONFIG_TMP007_FIBER_STACK_SIZE];
struct nano_sem gpio_sem;
#elif defined(CONFIG_TMP007_TRIGGER_GLOBAL_FIBER)
- struct sensor_work work;
+ struct nano_work work;
#endif

#endif /* CONFIG_TMP007_TRIGGER */
diff --git a/drivers/sensor/sensor_tmp007_trigger.c b/drivers/sensor/sensor_tmp007_trigger.c
index 6272c51..9fdc0a0 100644
--- a/drivers/sensor/sensor_tmp007_trigger.c
+++ b/drivers/sensor/sensor_tmp007_trigger.c
@@ -67,7 +67,7 @@ static void tmp007_gpio_callback(struct device *dev,
#if defined(CONFIG_TMP007_TRIGGER_OWN_FIBER)
nano_sem_give(&drv_data->gpio_sem);
#elif defined(CONFIG_TMP007_TRIGGER_GLOBAL_FIBER)
- nano_isr_fifo_put(sensor_get_work_fifo(), &drv_data->work);
+ sensor_work_submit(&drv_data->work);
#endif
}

@@ -171,8 +171,7 @@ int tmp007_init_interrupt(struct device *dev)
(nano_fiber_entry_t)tmp007_fiber, POINTER_TO_INT(dev),
0, CONFIG_TMP007_FIBER_PRIORITY, 0);
#elif defined(CONFIG_TMP007_TRIGGER_GLOBAL_FIBER)
- drv_data->work.handler = tmp007_fiber_cb;
- drv_data->work.arg = dev;
+ nano_work_init(&drv_data->work, tmp007_fiber_cb, dev);
#endif

return 0;
--
1.9.1


[PATCH 3/4] sensor: Rework core to use workqueue API

Vlad Dogaru <vlad.dogaru@...>
 

In the process, also rename CONFIG_SENSOR_DELAYED_WORK to something more
meaningful and make it visible in menuconfig. Previously it was
selected implicitly by drivers when needed, but this is error prone now
that this symbol also depends on others.

Change-Id: I4a87019b17316ed69c61c7e63f5457dbb66c6dc8
Signed-off-by: Vlad Dogaru <vlad.dogaru(a)intel.com>
---
drivers/sensor/Kconfig | 21 ++++++++++++---------
drivers/sensor/Makefile | 2 +-
drivers/sensor/sensor.c | 33 ++++++++-------------------------
include/sensor.h | 31 ++++++++++++-------------------
4 files changed, 33 insertions(+), 54 deletions(-)

diff --git a/drivers/sensor/Kconfig b/drivers/sensor/Kconfig
index dc91f23..d61d023 100644
--- a/drivers/sensor/Kconfig
+++ b/drivers/sensor/Kconfig
@@ -23,18 +23,21 @@ menuconfig SENSOR
help
Include sensor drivers in system config

-config SENSOR_DELAYED_WORK
- depends on SENSOR
- bool
+config SENSOR_WORKQUEUE
+ bool "Global sensor workqueue support"
+ default n
+ depends on SENSOR && NANO_WORK
+ help
+ Say Y here to enable a global workqueue for sensor drivers.

-config SENSOR_DELAYED_WORK_STACK_SIZE
- int "Sensor delayed work fiber stack size"
- depends on SENSOR && SENSOR_DELAYED_WORK
+config SENSOR_WORKQUEUE_STACK_SIZE
+ int "Sensor workqueue stack size"
+ depends on SENSOR && SENSOR_WORKQUEUE
default 1024

-config SENSOR_DELAYED_WORK_PRIORITY
- int "Sensor delayed work fiber priority"
- depends on SENSOR && SENSOR_DELAYED_WORK
+config SENSOR_WORKQUEUE_PRIORITY
+ int "Sensor workqueue priority"
+ depends on SENSOR && SENSOR_WORKQUEUE
default 10

config SENSOR_DEBUG
diff --git a/drivers/sensor/Makefile b/drivers/sensor/Makefile
index 964ea6e..3a1f81f 100644
--- a/drivers/sensor/Makefile
+++ b/drivers/sensor/Makefile
@@ -1,6 +1,6 @@
ccflags-y +=-I$(srctree)/drivers

-obj-$(CONFIG_SENSOR_DELAYED_WORK) += sensor.o
+obj-$(CONFIG_SENSOR_WORKQUEUE) += sensor.o

obj-$(CONFIG_BMA280) += sensor_bma280.o
obj-$(CONFIG_BMA280_TRIGGER) += sensor_bma280_trigger.o
diff --git a/drivers/sensor/sensor.c b/drivers/sensor/sensor.c
index 2421f16..7b14a6e 100644
--- a/drivers/sensor/sensor.c
+++ b/drivers/sensor/sensor.c
@@ -18,38 +18,21 @@
#include <sensor.h>
#include <init.h>

-static char __stack sensor_fiber_stack[CONFIG_SENSOR_DELAYED_WORK_STACK_SIZE];
-static struct nano_fifo sensor_fifo;
+struct nano_workqueue sensor_workqueue;

-struct nano_fifo *sensor_get_work_fifo(void)
-{
- return &sensor_fifo;
-}
-
-static void sensor_fiber_main(int arg1, int arg2)
-{
- ARG_UNUSED(arg1);
- ARG_UNUSED(arg2);
+static char __stack sensor_wq_stack[CONFIG_SENSOR_WORKQUEUE_STACK_SIZE];

- while (1) {
- struct sensor_work *work;
-
- work = nano_fiber_fifo_get(&sensor_fifo, TICKS_UNLIMITED);
-
- work->handler(work->arg);
- }
-}
+static struct fiber_config sensor_wq_config = {
+ .fc_stack = sensor_wq_stack,
+ .fc_stack_size = CONFIG_SENSOR_WORKQUEUE_STACK_SIZE,
+ .fc_prio = CONFIG_SENSOR_WORKQUEUE_PRIORITY,
+};

static int sensor_init(struct device *dev)
{
ARG_UNUSED(dev);

- nano_fifo_init(&sensor_fifo);
-
- fiber_fiber_start(sensor_fiber_stack,
- CONFIG_SENSOR_DELAYED_WORK_STACK_SIZE,
- sensor_fiber_main, 0, 0,
- CONFIG_SENSOR_DELAYED_WORK_PRIORITY, 0);
+ nano_workqueue_start(&sensor_workqueue, &sensor_wq_config);

return 0;
}
diff --git a/include/sensor.h b/include/sensor.h
index b52c403..22569ed 100644
--- a/include/sensor.h
+++ b/include/sensor.h
@@ -33,6 +33,10 @@ extern "C" {
#include <device.h>
#include <errno.h>

+#ifdef CONFIG_SENSOR_WORKQUEUE
+#include <misc/nano_work.h>
+#endif
+
/** @brief Sensor value types. */
enum sensor_value_type {
/** val1 contains an integer value, val2 is unused. */
@@ -353,29 +357,18 @@ static inline int sensor_channel_get(struct device *dev,
return api->channel_get(dev, chan, val);
}

-#ifdef CONFIG_SENSOR_DELAYED_WORK
-typedef void (*sensor_work_handler_t)(void *arg);
+#ifdef CONFIG_SENSOR_WORKQUEUE

-/**
- * @brief Sensor delayed work descriptor.
- *
- * Used by sensor drivers internally to delay function calls to a fiber
- * context.
- */
-struct sensor_work {
- sensor_work_handler_t handler;
- void *arg;
-};
+extern struct nano_workqueue sensor_workqueue;

/**
- * @brief Get a fifo to which sensor delayed work can be submitted
- *
- * If @ref CONFIG_SENSOR_DELAYED_WORK is enabled, the system creates a
- * global fiber that can execute delayed work on behalf of drivers.
- * This is useful for drivers which need a mechanism of delayed work but
- * do not create their own fibers due to system resource constraints.
+ * @brief Submit a work item to the system-wide sensor workqueue.
*/
-struct nano_fifo *sensor_get_work_fifo(void);
+static inline void sensor_work_submit(struct nano_work *work)
+{
+ nano_work_submit(&sensor_workqueue, work);
+}
+
#endif

/**
--
1.9.1


[PATCH 2/4] nanokernel: Introduce workqueue API

Vlad Dogaru <vlad.dogaru@...>
 

Add a generic API for drivers to start workqueues and submit work
items. This is needed by drivers which need to schedule code that might
sleep from an ISR to run in fiber context.

Change-Id: Ia843568fde5daf6d4279ef7bf241c26c1e3dcfb7
Signed-off-by: Vlad Dogaru <vlad.dogaru(a)intel.com>
---
include/misc/nano_work.h | 91 +++++++++++++++++++++++++++++++++++++++++++
kernel/nanokernel/Kconfig | 8 ++++
kernel/nanokernel/Makefile | 1 +
kernel/nanokernel/nano_work.c | 47 ++++++++++++++++++++++
4 files changed, 147 insertions(+)
create mode 100644 include/misc/nano_work.h
create mode 100644 kernel/nanokernel/nano_work.c

diff --git a/include/misc/nano_work.h b/include/misc/nano_work.h
new file mode 100644
index 0000000..07eff59
--- /dev/null
+++ b/include/misc/nano_work.h
@@ -0,0 +1,91 @@
+
+/*
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file
+ *
+ * @brief Workqueue structures and routines.
+ */
+
+#ifndef _misc_nano_work__h_
+#define _misc_nano_work__h_
+
+#include <nanokernel.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void (*work_handler_t)(void *arg);
+
+/**
+ * A workqueue is a fiber that executes @ref nano_work items that are
+ * queued to it. This is useful for drivers which need to schedule
+ * execution of code which might sleep from ISR context. The actual
+ * fiber identifier is not stored in the structure in order to save
+ * space.
+ */
+struct nano_workqueue {
+ struct nano_fifo wq_fifo;
+};
+
+/**
+ * @brief An item which can be scheduled on a @ref nano_workqueue.
+ */
+struct nano_work {
+ work_handler_t work_handler;
+ void *work_arg;
+};
+
+/**
+ * @brief Initialize a @ref nano_work structure.
+ *
+ * @param work The structure to initialize.
+ * @param handler The function to run when @ref work is run.
+ * @param arg The argument to pass to the handler.
+ */
+static inline void nano_work_init(struct nano_work *work,
+ work_handler_t handler,
+ void *arg)
+{
+ work->work_handler = handler;
+ work->work_arg = arg;
+}
+
+/**
+ * @brief Submit a work item to a workqueue.
+ */
+static inline void nano_work_submit(struct nano_workqueue *wq,
+ struct nano_work *work)
+{
+ nano_fifo_put(&wq->wq_fifo, work);
+}
+
+/**
+ * @brief Start a new workqueue.
+ *
+ * @param wq The workqueue to start.
+ * @param config Configuration parameters for the new fiber.
+ */
+extern void nano_workqueue_start(struct nano_workqueue *wq,
+ const struct fiber_config *config);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _misc_nano_work__h_ */
diff --git a/kernel/nanokernel/Kconfig b/kernel/nanokernel/Kconfig
index 4e7c4d4..97295b2 100644
--- a/kernel/nanokernel/Kconfig
+++ b/kernel/nanokernel/Kconfig
@@ -115,4 +115,12 @@ config ATOMIC_OPERATIONS_C
do not have support for atomic operations in their instruction
set, or haven't been implemented yet during bring-up.

+config NANO_WORK
+ bool "Enable nano workqueue support"
+ default y
+ help
+ Nano workqueues allow scheduling work items to be executed in a fiber
+ context. Typically such work items are scheduled from ISRs, when the
+ work cannot be executed in interrupt context.
+
endmenu
diff --git a/kernel/nanokernel/Makefile b/kernel/nanokernel/Makefile
index d3cb2d7..6a03608 100644
--- a/kernel/nanokernel/Makefile
+++ b/kernel/nanokernel/Makefile
@@ -19,3 +19,4 @@ obj-$(CONFIG_KERNEL_EVENT_LOGGER) += kernel_event_logger.o
obj-$(CONFIG_RING_BUFFER) += ring_buffer.o
obj-$(CONFIG_ATOMIC_OPERATIONS_C) += atomic_c.o
obj-$(CONFIG_ERRNO) += errno.o
+obj-$(CONFIG_NANO_WORK) += nano_work.o
diff --git a/kernel/nanokernel/nano_work.c b/kernel/nanokernel/nano_work.c
new file mode 100644
index 0000000..634b07b
--- /dev/null
+++ b/kernel/nanokernel/nano_work.c
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file
+ *
+ * Workqueue support functions
+ */
+
+#include <misc/nano_work.h>
+
+static void workqueue_fiber_main(int arg1, int arg2)
+{
+ struct nano_workqueue *wq = (struct nano_workqueue *)arg1;
+
+ ARG_UNUSED(arg2);
+
+ while (1) {
+ struct nano_work *work;
+
+ work = nano_fiber_fifo_get(&wq->wq_fifo, TICKS_UNLIMITED);
+
+ work->work_handler(work->work_arg);
+ }
+}
+
+void nano_workqueue_start(struct nano_workqueue *wq,
+ const struct fiber_config *config)
+{
+ nano_fifo_init(&wq->wq_fifo);
+
+ fiber_fiber_start_config(config, workqueue_fiber_main,
+ (int)wq, 0, 0);
+}
--
1.9.1


[PATCH 1/4] nanokernel: Add fiber_config structure and wrapper

Vlad Dogaru <vlad.dogaru@...>
 

Many drivers need to start fibers whose parameters are based on user
configuration. Make it easier to specify such parameters by creating a
fiber_config structure and a wrapper to use it.

Change-Id: I26917ada71acbc676c0f32b6ee081aff7bb1d6d8
Signed-off-by: Vlad Dogaru <vlad.dogaru(a)intel.com>
---
include/nanokernel.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/include/nanokernel.h b/include/nanokernel.h
index 8d7a864..e8795ca 100644
--- a/include/nanokernel.h
+++ b/include/nanokernel.h
@@ -230,6 +230,31 @@ extern void fiber_yield(void);
*/
extern void fiber_abort(void);

+/**
+ * @brief Fiber configuration structure.
+ *
+ * Parameters such as stack size and fiber priority are often
+ * user configurable. This structure makes it simple to specify such a
+ * configuration.
+ */
+struct fiber_config {
+ char *fc_stack;
+ unsigned fc_stack_size;
+ unsigned fc_prio;
+};
+
+/**
+ * @brief Start a fiber based on a @ref fiber_config.
+ */
+static inline nano_thread_id_t
+fiber_fiber_start_config(const struct fiber_config *config,
+ nano_fiber_entry_t entry,
+ int arg1, int arg2, unsigned options)
+{
+ return fiber_fiber_start(config->fc_stack, config->fc_stack_size,
+ entry, arg1, arg2, config->fc_prio, options);
+}
+
#ifdef CONFIG_NANO_TIMEOUTS

/**
--
1.9.1


[PATCH 0/4] Introduce nano_workqueue API

Vlad Dogaru <vlad.dogaru@...>
 

Patches are also available on Gerrit:
https://gerrit.zephyrproject.org/r/#/q/topic:workqueue

This series introduces a generic way to schedule work that will be
executed in fiber context. The previous implementation was sensor
specific, but had no good reason to be.

The nano_workqueue API is optional. It can be deactivated in Kconfig if
a bare minimum system is desired.

Sensor drivers have been partly migrated to the new API. They can be
further simplified by starting their own workqueues instead of generic
fibers. I intend to do this when I migrate them to the new device
config style I proposed a while ago. Otherwise I'd just rewrite large
chunks of sensor drivers twice.


Vlad Dogaru (4):
nanokernel: Add fiber_config structure and wrapper
nanokernel: Introduce workqueue API
sensor: Rework core to use workqueue API
sensor: Migrate drivers to the new workqueue API

drivers/sensor/Kconfig | 21 ++++----
drivers/sensor/Kconfig.bma280 | 3 +-
drivers/sensor/Kconfig.bmi160 | 2 +-
drivers/sensor/Kconfig.isl29035 | 3 +-
drivers/sensor/Kconfig.lis3dh | 3 +-
drivers/sensor/Kconfig.mcp9808 | 3 +-
drivers/sensor/Kconfig.sht3xd | 3 +-
drivers/sensor/Kconfig.sx9500 | 3 +-
drivers/sensor/Kconfig.tmp007 | 3 +-
drivers/sensor/Makefile | 2 +-
drivers/sensor/sensor.c | 33 +++---------
drivers/sensor/sensor_bma280.h | 2 +-
drivers/sensor/sensor_bma280_trigger.c | 5 +-
drivers/sensor/sensor_bmi160.h | 2 +-
drivers/sensor/sensor_bmi160_trigger.c | 7 ++-
drivers/sensor/sensor_isl29035.h | 2 +-
drivers/sensor/sensor_isl29035_trigger.c | 5 +-
drivers/sensor/sensor_lis3dh.h | 2 +-
drivers/sensor/sensor_lis3dh_trigger.c | 5 +-
drivers/sensor/sensor_mcp9808.h | 2 +-
drivers/sensor/sensor_mcp9808_trigger.c | 5 +-
drivers/sensor/sensor_sht3xd.h | 2 +-
drivers/sensor/sensor_sht3xd_trigger.c | 5 +-
drivers/sensor/sensor_sx9500.h | 2 +-
drivers/sensor/sensor_sx9500_trigger.c | 5 +-
drivers/sensor/sensor_tmp007.h | 2 +-
drivers/sensor/sensor_tmp007_trigger.c | 5 +-
include/misc/nano_work.h | 91 ++++++++++++++++++++++++++++++++
include/nanokernel.h | 25 +++++++++
include/sensor.h | 31 +++++------
kernel/nanokernel/Kconfig | 8 +++
kernel/nanokernel/Makefile | 1 +
kernel/nanokernel/nano_work.c | 47 +++++++++++++++++
33 files changed, 238 insertions(+), 102 deletions(-)
create mode 100644 include/misc/nano_work.h
create mode 100644 kernel/nanokernel/nano_work.c

--
1.9.1


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 32
[ZEP-266] nios2: implement linker script
https://jira.zephyrproject.org/browse/ZEP-266

[ZEP-273] nios2: implement flashing scripts
https://jira.zephyrproject.org/browse/ZEP-273

[ZEP-274] nios2: document GDB debugging procedure
https://jira.zephyrproject.org/browse/ZEP-274

[ZEP-259] nios2: implement general exception vector
https://jira.zephyrproject.org/browse/ZEP-259

[ZEP-264] nios2: support serial console
https://jira.zephyrproject.org/browse/ZEP-264

[ZEP-252] nios2: implement _NanoFatalErrorHandler(), _Fault(), and _SysFatalErrorHandler()
https://jira.zephyrproject.org/browse/ZEP-252

[ZEP-255] nios2: implement _Swap()
https://jira.zephyrproject.org/browse/ZEP-255

[ZEP-279] nios2: demonstrate nanokernel hello world
https://jira.zephyrproject.org/browse/ZEP-279

[ZEP-254] nios2: define NANO_ESF struct and populate _default_esf
https://jira.zephyrproject.org/browse/ZEP-254

[ZEP-269] nios2: implement early boot sequence
https://jira.zephyrproject.org/browse/ZEP-269

[ZEP-267] nios2: implement _new_thread()
https://jira.zephyrproject.org/browse/ZEP-267

[ZEP-277] nios2: implement sys_io.h functions
https://jira.zephyrproject.org/browse/ZEP-277

[ZEP-248] Add a BOARD/SOC porting guide
https://jira.zephyrproject.org/browse/ZEP-248

[ZEP-268] nios2: implement thread/fiber abort routines if necessary
https://jira.zephyrproject.org/browse/ZEP-268

[ZEP-263] nios2: implement driver for Nios II Avalon Timer
https://jira.zephyrproject.org/browse/ZEP-263

[ZEP-260] nios2: implement static interrupts for Internal Interrupt Controller
https://jira.zephyrproject.org/browse/ZEP-260

[ZEP-249] nios2: Enable altera_max10 board in sanitycheck runs for nanokernel
https://jira.zephyrproject.org/browse/ZEP-249

[ZEP-256] nios2: implement irq_offload()
https://jira.zephyrproject.org/browse/ZEP-256

[ZEP-261] nios2: implement exception exit code
https://jira.zephyrproject.org/browse/ZEP-261

[ZEP-257] nios2: implement _arch_irq_enable() and _arch_irq_disable() for Internal Interrupt Controller
https://jira.zephyrproject.org/browse/ZEP-257

[ZEP-265] altera_max10: correctly define CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC
https://jira.zephyrproject.org/browse/ZEP-265

[ZEP-262] nios2: implement _arch_irq_lock() _arch_irq_unlock()
https://jira.zephyrproject.org/browse/ZEP-262

[ZEP-271] nios2: enable microkernel & test cases
https://jira.zephyrproject.org/browse/ZEP-271

[ZEP-276] nios2: implement find_msb_set() / find_lsb_set()
https://jira.zephyrproject.org/browse/ZEP-276

[ZEP-258] nios2: research: scope support for External Interrupt Controller (EIC)
https://jira.zephyrproject.org/browse/ZEP-258

[ZEP-272] nios2: add global pointer support
https://jira.zephyrproject.org/browse/ZEP-272

[ZEP-270] nios2: determine optimal value for PERFOPT_ALIGN
https://jira.zephyrproject.org/browse/ZEP-270

[ZEP-275] nios2: scope support for instruction/data caches
https://jira.zephyrproject.org/browse/ZEP-275

[ZEP-280] nios2: enable interrupt driven serial console
https://jira.zephyrproject.org/browse/ZEP-280

[ZEP-251] nios2: implement nano_cpu_atomic_idle()
https://jira.zephyrproject.org/browse/ZEP-251

[ZEP-250] nios2: implement nano_cpu_idle()
https://jira.zephyrproject.org/browse/ZEP-250

[ZEP-247] MQTT support
https://jira.zephyrproject.org/browse/ZEP-247


UPDATED JIRA items within last 24 hours: 4
[ZEP-241] Use gcc for linking instead of ld
https://jira.zephyrproject.org/browse/ZEP-241

[ZEP-12] Create a generic 802.15.4 driver API
https://jira.zephyrproject.org/browse/ZEP-12

[ZEP-131] Driver for BME280 temperature, pressure and humidity sensor
https://jira.zephyrproject.org/browse/ZEP-131

[ZEP-177] Windows build with MinGW
https://jira.zephyrproject.org/browse/ZEP-177


CLOSED JIRA items within last 24 hours: 2
[ZEP-178] (Duplicate) Port Zephyr to Altera Max10 (Nios 2 CPU)
https://jira.zephyrproject.org/browse/ZEP-178

[ZEP-100] (Fixed) Test bug for Gerrit
https://jira.zephyrproject.org/browse/ZEP-100


RESOLVED JIRA items within last 24 hours: 1
[ZEP-51] (Fixed) footprint benchmarks are not enabled on all arches
https://jira.zephyrproject.org/browse/ZEP-51


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1821 : microkernel: lock interrupts in _k_state_bit_[re]set()
- https://gerrit.zephyrproject.org/r/1820 : drivers/nble: Pass read_params as nble user_data
- https://gerrit.zephyrproject.org/r/1819 : drivers/nble: Fix NULL pointer dereference
- https://gerrit.zephyrproject.org/r/1815 : net: buf: Add tests for net_buf fragmentation
- https://gerrit.zephyrproject.org/r/1810 : errno: implement _get_errno() in common code
- https://gerrit.zephyrproject.org/r/1809 : microkernel: events: fix undefined function error
- https://gerrit.zephyrproject.org/r/1806 : net:apps: Add ipv6 support for zperf

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1593 : nanokernel: Add callout API
- https://gerrit.zephyrproject.org/r/1379 : microkernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1378 : kernel: Add thread parameter to _nano_wait_q_put()
- https://gerrit.zephyrproject.org/r/1623 : device: simplify synchronization
- https://gerrit.zephyrproject.org/r/1377 : nanokernel: Add thread parameter to _NANO_TIMEOUT_ADD()
- https://gerrit.zephyrproject.org/r/1381 : tests: Pend microkernel tasks on nanokernel objects
- https://gerrit.zephyrproject.org/r/1380 : nanokernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1648 : net: buf: Add fragmentation API support
- https://gerrit.zephyrproject.org/r/1649 : net: buf: Add fragmentation API tests
- https://gerrit.zephyrproject.org/r/1674 : Bluetooth: L2CAP: Move BREDR signalling management to l2cap_br.c
- https://gerrit.zephyrproject.org/r/1673 : Bluetooth: L2CAP: Move BREDR tx signalling pool definition to l2cap_br.c
- https://gerrit.zephyrproject.org/r/1764 : Bluetooth: shell: Add BR/EDR PSM server registration
- https://gerrit.zephyrproject.org/r/1786 : libc: Add modifier to print to output MAC address
- https://gerrit.zephyrproject.org/r/1594 : Bluetooth: SMP: Make use of sys_callout API
- https://gerrit.zephyrproject.org/r/1661 : tests: Add unit test for sys_callout API
- https://gerrit.zephyrproject.org/r/1800 : gpio_k64.c: configure pins as gpio alternate function in gpio_k64_configure Change-Id: I653602abeb99d4baf379e6175558c19c05678567 Signed-off-by: uLipe <ryukokki.felipe(a)gmail.com>
- https://gerrit.zephyrproject.org/r/1570 : Bluetooth: tester: Add Kconfig for nimble stack

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1808 : doc: Fixed broken link to development documentation
- https://gerrit.zephyrproject.org/r/1818 : drivers/nble: Update RPC function names
- https://gerrit.zephyrproject.org/r/1807 : pinmux_dev: Remove PINMUX_SELECT_REGISTER from quark_mcu driver
- https://gerrit.zephyrproject.org/r/1811 : ieee802154: cc2520: SPI workaround when QMSI drivers are in use
- https://gerrit.zephyrproject.org/r/1814 : Bluetooth: Make UART draining logic consistent across drivers
- https://gerrit.zephyrproject.org/r/1817 : drivers/nble: Refactor NBLE RPC function names
- https://gerrit.zephyrproject.org/r/1816 : drivers/nble: Refactor gap_internal headers
- https://gerrit.zephyrproject.org/r/1812 : Bluetooth: tester: Add possibility to set scan response data
- https://gerrit.zephyrproject.org/r/1813 : Bluetooth: Fix draining nRF51 FIFO during init
- https://gerrit.zephyrproject.org/r/1707 : drivers/interrupt_controller: initialize only NUM_IRQS interrupts
- https://gerrit.zephyrproject.org/r/1735 : arch/arc/include: start_task_arch.h needed so ARC can build microkernel apps
- https://gerrit.zephyrproject.org/r/1752 : arch/arc: add ICCM_BASE_ADDRESS and ICCM_SIZE
- https://gerrit.zephyrproject.org/r/1708 : include/arch/arc: fix memory permissions
- https://gerrit.zephyrproject.org/r/1797 : drivers: pinmux: Implement pinmux pin get API for QMSI shim driver
- https://gerrit.zephyrproject.org/r/1791 : net: timer_expired may not return the right value when called twice
- https://gerrit.zephyrproject.org/r/1779 : net: Fix ethernet headers in ipv6
- https://gerrit.zephyrproject.org/r/1720 : sensor: add support for BMG160 gyroscope
- https://gerrit.zephyrproject.org/r/1721 : sensor: bmg160: add sample application
- https://gerrit.zephyrproject.org/r/1785 : Bluetooth: Simplify advertising API
- https://gerrit.zephyrproject.org/r/1778 : build: use gcc instead of ld for linking
- https://gerrit.zephyrproject.org/r/1741 : quark_x1000: The Quark X1000 does have an FPU
- https://gerrit.zephyrproject.org/r/1742 : qemu_x86: Make the FPU available if it's not building for IAMCU
- https://gerrit.zephyrproject.org/r/1805 : drivers/nble: Implement notification for all conns
- https://gerrit.zephyrproject.org/r/1804 : drivers/nble: Implement bt_gatt_foreach_attr()
- https://gerrit.zephyrproject.org/r/1717 : drivers/nble: Refactor CCC changed logic
- https://gerrit.zephyrproject.org/r/1716 : drivers/nble: Save peer address with CCC write
- https://gerrit.zephyrproject.org/r/1795 : nios2: add prep_c to zero BSS and copy XIP data
- https://gerrit.zephyrproject.org/r/1796 : toolchain: common.h: define PERFOPT_ALIGN for Nios2
- https://gerrit.zephyrproject.org/r/1792 : altera_max10: enable RAM console
- https://gerrit.zephyrproject.org/r/1793 : nios2: move cflags hacks to main Nios2 Makefile
- https://gerrit.zephyrproject.org/r/1794 : nios2: turn on function and data sections
- https://gerrit.zephyrproject.org/r/1666 : nios2: basic build, non-functional
- https://gerrit.zephyrproject.org/r/1767 : doc: Edit arch.rst markup
- https://gerrit.zephyrproject.org/r/1508 : microkernel: use _thread_essential_set()
- https://gerrit.zephyrproject.org/r/1514 : nanokernel: tighten _is_thread_essential()


Zephyr v1.3.0 tagged

Perez Hernandez, Javier B <javier.b.perez.hernandez@...>
 

Hi,

Zephyr v1.3.0 has been tagged.
The merge window for the next release is now open. 
Below is the list of changes since v1.3.0-rc2.

Regards
Javier B. Perez



Anas Nashif (18):
      samples: magn_polling: include stdio.h and remove redundant configs
      samples: gpio: sanitize test and remove obsolete options
      Revert "samples: philosophers: reduce stack size used"
      quark_se: remove hardcoded reset vector for ARC
      doc: fixed bullet list for bluetooth
      sensor: apds9660: remove IP specific GPIO configs
      gpio: unify kernel configuration for all architectueres
      led_apa102c: rename local configuration and use printk
      samples: pwm: rename local configuration and use printk
      samples: i2c_lsm9ds0: we are using printk only
      samples: cpp_synchronization: rename local configuration and use one config
      arduino_101: support booting with original bootloader
      arduino_101: add support for factory configuration
      arduino_101: add missing version_header.h file
      gpio: fix typo in function documentation
      doc: add section about 3rd party compilers
      update sanitycheck footprint data for the release
      Zephyr 1.3.0

Daniel Leung (8):
      adc/qmsi: use new DEVICE_AND_API_INIT()
      aio_comparator/qmsi: use new DEVICE_AND_API_INIT()
      counter/qmsi: use new DEVICE_AND_API_INIT()
      pwm/qmsi: use new DEVICE_AND_API_INIT()
      rtc/qmsi: use new DEVICE_AND_API_INIT()
      watchdog/qmsi: use new DEVICE_AND_API_INIT()
      spi/qmsi: don't assign driver_api if init fails
      boards/arduino_due: remove redundant I2C default kconfigs

Grzegorz Kolodziejczyk (2):
      Bluetooth: tester: Return pre defined db offset on start server
      Bluetooth: drivers/nble: Fix calling cmd from discov callback

Johan Hedberg (1):
      include/arch/arc: Fix minor space vs tab issue in indentation

Juan Manuel Cruz (3):
      build: support icx llvm compiler
      build: add arc support to issm toolchain
      doc: Updates the toolchain path format instruction

Luiz Augusto von Dentz (5):
      misc: Add sys_slist_insert
      tests: test_slist: Add test for sys_slist_insert
      Bluetooth: Fix not being able to set CONF_FILE for init test
      Bluetooth: GATT: Fix error type
      Bluetooth: GATT: Update documentation to include error domain

Mariusz Skamra (3):
      drivers/nble: Fix status returned from on_nble_gatts_write_evt
      drivers/nble: Fix passing NULL pointer instead of conn to write() cb
      drivers/nble: Fix missing write flush() callback

Roger Lendenmann (1):
      Bluetooth: gatt: include service api definition proposal

Szymon Janc (1):
      Bluetooth: Fix using invalid responder address as peripheral

 Makefile                                           |   21 +-
 arch/arm/soc/atmel_sam3/Kconfig.defconfig          |   14 +-
 arch/x86/Makefile                                  |    9 +
 arch/x86/core/Makefile                             |    2 +-
 arch/x86/core/i386_sysV_abi/Makefile               |    2 +-
 arch/x86/soc/quark_d2000/Makefile                  |    4 +
 arch/x86/soc/quark_se/Kconfig                      |    7 +
 arch/x86/soc/quark_se/Makefile                     |    4 +
 arch/x86/soc/quark_se/soc.h                        |    2 +-
 boards/arduino_101/arduino_101_factory_defconfig   |   20 +
 boards/arduino_101/board.c                         |   13 +
 boards/arduino_101/version_header.h                |   88 +
 .../arduino_101_sss_factory_defconfig              |   19 +
 boards/arduino_101_sss/board.c                     |   12 +
 boards/arduino_101_sss/version_header.h            |   88 +
 boards/arduino_due/Kconfig.defconfig               |   10 -
 doc/getting_started/getting_started.rst            |   52 +-
 doc/getting_started/installation_win.rst           |   11 +-
 doc/subsystems/bluetooth/bluetooth.rst             |   34 +-
 drivers/adc/adc_qmsi.c                             |    7 +-
 drivers/aio/aio_qmsi_comparator.c                  |    9 +-
 drivers/bluetooth/nble/gatt.c                      |   62 +-
 drivers/counter/counter_qmsi_aon.c                 |    9 +-
 drivers/counter/counter_qmsi_aonpt.c               |    9 +-
 drivers/pwm/pwm_qmsi.c                             |    8 +-
 drivers/rtc/rtc_qmsi.c                             |    6 +-
 drivers/spi/spi_qmsi.c                             |    4 +-
 drivers/watchdog/wdt_qmsi.c                        |    6 +-
 include/arch/arc/v2/linker.cmd                     |    4 +
 include/arch/x86/linker-common-sections.h          |    8 +
 include/bluetooth/gatt.h                           |   18 +-
 include/gpio.h                                     |    2 +-
 include/misc/slist.h                               |   21 +
 misc/Kconfig                                       |    8 +
 net/bluetooth/gatt.c                               |   39 +-
 net/bluetooth/hci_core.c                           |   13 +-
 net/bluetooth/hci_core.h                           |    4 +-
 samples/bluetooth/peripheral/src/main.c            |    4 +-
 samples/cpp_synchronization/microkernel/Makefile   |    2 +-
 samples/cpp_synchronization/microkernel/prj.conf   |    2 +
 .../cpp_synchronization/microkernel/prj_arm.conf   |    2 -
 .../cpp_synchronization/microkernel/prj_x86.conf   |    3 -
 samples/drivers/gpio/Makefile                      |   11 +-
 samples/drivers/gpio/prj.conf                      |    3 +
 samples/drivers/gpio/prj_arc.conf                  |    9 -
 samples/drivers/gpio/prj_arm.conf                  |    6 -
 samples/drivers/gpio/prj_x86.conf                  |    5 -
 samples/drivers/gpio/src/main.c                    |   22 +-
 samples/drivers/gpio/testcase.ini                  |    1 -
 samples/drivers/i2c_lsm9ds0/prj.conf               |    2 -
 samples/drivers/led_apa102c/Makefile               |    2 +-
 samples/drivers/led_apa102c/prj.conf               |    4 +
 samples/drivers/led_apa102c/prj_x86.conf           |    5 -
 samples/drivers/led_apa102c/src/main.c             |   12 +-
 samples/drivers/pwm/Makefile                       |    2 +-
 samples/drivers/pwm/prj.conf                       |    5 +
 samples/drivers/pwm/prj_arm.conf                   |    5 -
 samples/drivers/pwm/prj_x86.conf                   |    5 -
 samples/drivers/pwm/src/main.c                     |   10 +-
 samples/drivers/sensor_apds9960/prj_arc.conf       |    3 -
 samples/philosophers/microkernel/prj.mdef          |   14 +-
 samples/philosophers/microkernel/src/phil_task.c   |    2 +-
 samples/sensor/magn_polling/prj.conf               |    6 -
 samples/sensor/magn_polling/src/main.c             |    1 +
 scripts/Kbuild.include                             |    2 +-
 scripts/Makefile.toolchain.iamcu                   |   20 -
 scripts/Makefile.toolchain.issm                    |   38 +
 scripts/sanity_chk/sanity_last_release.csv         | 2532 ++++++++++----------
 tests/bluetooth/init/Makefile                      |    2 +-
 tests/bluetooth/shell/src/main.c                   |    2 +-
 tests/bluetooth/tester/btp_spec.txt                |    7 +-
 tests/bluetooth/tester/src/bttester.h              |    4 +
 tests/bluetooth/tester/src/gatt.c                  |   41 +-
 tests/kernel/test_slist/README.txt                 |    2 +
 tests/kernel/test_slist/src/slist.c                |   30 +-
 75 files changed, 1988 insertions(+), 1489 deletions(-)


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 4
[ZEP-245] Restructure Documentation content
https://jira.zephyrproject.org/browse/ZEP-245

[ZEP-242] Collaboration Guidelines Restructure
https://jira.zephyrproject.org/browse/ZEP-242

[ZEP-243] Create Wiki Structure
https://jira.zephyrproject.org/browse/ZEP-243

[ZEP-244] Multiple Published Versions Support
https://jira.zephyrproject.org/browse/ZEP-244


UPDATED JIRA items within last 24 hours: 0

CLOSED JIRA items within last 24 hours: 0

RESOLVED JIRA items within last 24 hours: 0


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1805 : drivers/nble: Implement notification for all conns
- https://gerrit.zephyrproject.org/r/1804 : drivers/nble: Implement bt_gatt_foreach_attr()
- https://gerrit.zephyrproject.org/r/1800 : gpio_k64.c: configure pins as gpio alternate function in gpio_k64_configure Signed-off-by: Felipe Neves <ryukokki.felipe(a)gmail.com>
- https://gerrit.zephyrproject.org/r/1797 : drivers: pinmux: Implement pinmux pin get API for QMSI shim driver
- https://gerrit.zephyrproject.org/r/1794 : nios2: turn on function and data sections
- https://gerrit.zephyrproject.org/r/1795 : nios2: add prep_c to zero BSS and copy XIP data
- https://gerrit.zephyrproject.org/r/1796 : toolchain: common.h: define PERFOPT_ALIGN for Nios2
- https://gerrit.zephyrproject.org/r/1793 : nios2: move cflags hacks to main Nios2 Makefile
- https://gerrit.zephyrproject.org/r/1792 : altera_max10: enable RAM console
- https://gerrit.zephyrproject.org/r/1788 : microkernel: Fibers and ISRs may invoke microkernel no-op
- https://gerrit.zephyrproject.org/r/1791 : net: timer_expired may not return the right value when called twice

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1717 : drivers/nble: Refactor CCC changed logic
- https://gerrit.zephyrproject.org/r/1716 : drivers/nble: Save peer address with CCC write
- https://gerrit.zephyrproject.org/r/1594 : Bluetooth: SMP: Make use of sys_callout API
- https://gerrit.zephyrproject.org/r/1784 : nanokernel: Add callback to _nano_timeout
- https://gerrit.zephyrproject.org/r/1593 : nanokernel: Add callout API
- https://gerrit.zephyrproject.org/r/1661 : tests: Add unit test for sys_callout API
- https://gerrit.zephyrproject.org/r/1786 : libc: Add modifier to print to output MAC address
- https://gerrit.zephyrproject.org/r/1584 : Added profiler application and scripts
- https://gerrit.zephyrproject.org/r/1785 : Bluetooth: Simplify advertising API
- https://gerrit.zephyrproject.org/r/1722 : build: Add MinGW dependencies in makefile
- https://gerrit.zephyrproject.org/r/1723 : build: allows CC and CCX override from Makefile source files
- https://gerrit.zephyrproject.org/r/1768 : build: Fixes an issue with file permissions on windows
- https://gerrit.zephyrproject.org/r/1520 : ipm console: Implement flow control between sender and receiver
- https://gerrit.zephyrproject.org/r/1778 : build: use gcc instead of ld for linking
- https://gerrit.zephyrproject.org/r/1666 : nios2: basic build, non-functional
- https://gerrit.zephyrproject.org/r/1380 : nanokernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1381 : tests: Pend microkernel tasks on nanokernel objects
- https://gerrit.zephyrproject.org/r/1379 : microkernel: [un]block tasks on nanokernel objects infrastructure
- https://gerrit.zephyrproject.org/r/1623 : device: simplify synchronization
- https://gerrit.zephyrproject.org/r/1707 : drivers/interrupt_controller: initialize only NUM_IRQS interrupts
- https://gerrit.zephyrproject.org/r/1378 : kernel: Add thread parameter to _nano_wait_q_put()
- https://gerrit.zephyrproject.org/r/1377 : nanokernel: Add thread parameter to _NANO_TIMEOUT_ADD()
- https://gerrit.zephyrproject.org/r/1376 : kernel: Init back pointer to microkernel task
- https://gerrit.zephyrproject.org/r/1719 : nanokernel: Fix nanokernel object timeout recalculation
- https://gerrit.zephyrproject.org/r/1374 : microkernel: Add TF_NANO wait flag reason
- https://gerrit.zephyrproject.org/r/1375 : nanokernel: Add back pointer to microkernel task
- https://gerrit.zephyrproject.org/r/1583 : kernel event profiler: add dynamic enable/disable/configure
- https://gerrit.zephyrproject.org/r/1577 : Set kernel event logger timestamps to HW cycles

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1803 : Bluetooth: SMP: Avoid using hard-coded constant
- https://gerrit.zephyrproject.org/r/1802 : Bluetooth: Increase HCI_LE_rand delay for MyNewt
- https://gerrit.zephyrproject.org/r/1801 : Bluetooth: Move bt_conn functions to conn.c
- https://gerrit.zephyrproject.org/r/1789 : Bluetooth: SMP: Fix unaligned access usage fault.
- https://gerrit.zephyrproject.org/r/1798 : update sanitycheck footprint data for the release
- https://gerrit.zephyrproject.org/r/1799 : Zephyr 1.3.0
- https://gerrit.zephyrproject.org/r/1756 : arm/nxp_kinetis/k6x: always inline clock init function
- https://gerrit.zephyrproject.org/r/1757 : arm/nxp_kinetis/k6x: simplify uart init
- https://gerrit.zephyrproject.org/r/1755 : arm/atmel_sam3: always inline clock init function
- https://gerrit.zephyrproject.org/r/1774 : doc: add section about 3rd party compilers
- https://gerrit.zephyrproject.org/r/1411 : build: add arc support to issm toolchain
- https://gerrit.zephyrproject.org/r/1263 : build: support icx llvm compiler
- https://gerrit.zephyrproject.org/r/1656 : doc: Updates the toolchain path format instruction


Re: Build a filesystem service

Flavio Santes <flavio.santes@...>
 

Hello Gapry,

Even without knowing the Zephyr's structure, you can create your own "service". Remember, Zephyr is a library-based RTOS[1] with a monolithic structure that allows you to access almost any feature you want from your application.

You can start with the hello world example, growing the code to support your own file system and the storage device you wish. However, the best way to understand the code is by reading and experimenting.

Best regards,
Flavio

[1] https://www.zephyrproject.org/sites/local-zephyr/files/zephyr_project_technical_overview.pdf


Daily JIRA Digest

donotreply@...
 

NEW JIRA items within last 24 hours: 1
[ZEP-241] Use gcc for linking instead of ld
https://jira.zephyrproject.org/browse/ZEP-241


UPDATED JIRA items within last 24 hours: 1
[ZEP-186] Add a new toolchain script for supporting ISSM with both IA32 and ARC
https://jira.zephyrproject.org/browse/ZEP-186


CLOSED JIRA items within last 24 hours: 0

RESOLVED JIRA items within last 24 hours: 0


Daily Gerrit Digest

donotreply@...
 

NEW within last 24 hours:
- https://gerrit.zephyrproject.org/r/1786 : libc: Add modifier to print to output MAC address
- https://gerrit.zephyrproject.org/r/1787 : libc: Add modifier to printf to output IP address
- https://gerrit.zephyrproject.org/r/1785 : Bluetooth: Simplify advertising API
- https://gerrit.zephyrproject.org/r/1784 : nanokernel: Add callback to _nano_timeout
- https://gerrit.zephyrproject.org/r/1779 : net: Fix ethernet headers in ipv6
- https://gerrit.zephyrproject.org/r/1778 : build: use gcc instead of ld for linking

UPDATED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1594 : Bluetooth: SMP: Make use of sys_callout API
- https://gerrit.zephyrproject.org/r/1661 : tests: Add unit test for sys_callout API
- https://gerrit.zephyrproject.org/r/1593 : nanokernel: Add callout API
- https://gerrit.zephyrproject.org/r/1583 : kernel event profiler: add dynamic enable/disable/configure
- https://gerrit.zephyrproject.org/r/1577 : Set kernel event logger timestamps to HW cycles
- https://gerrit.zephyrproject.org/r/1648 : net: buf: Add fragmentation API support
- https://gerrit.zephyrproject.org/r/1766 : net: buf: Add net_buf_pull_le32() helper API

MERGED within last 24 hours:
- https://gerrit.zephyrproject.org/r/1781 : Bluetooth: GATT: Update documentation to include error domain
- https://gerrit.zephyrproject.org/r/1780 : Bluetooth: GATT: Fix error type
- https://gerrit.zephyrproject.org/r/1777 : gpio: fix typo in function documentation
- https://gerrit.zephyrproject.org/r/1776 : arduino_101: add missing version_header.h file
- https://gerrit.zephyrproject.org/r/1775 : arduino_101: add support for factory configuration

7661 - 7680 of 8333