joelguittet / mender-mcu-client

Mender client for MCU, just because it's cool to have it
Apache License 2.0
37 stars 7 forks source link

platform : zephyr mender_rtos_task_create does not use stack_size #4

Closed joelguittet closed 1 year ago

joelguittet commented 1 year ago

Currently zephyr has no API to create a dynamic stack. This should be available in a near future (v3.4.0 ?)

References:

As a consequence a stack size is used in the mender_rtos.c zephyr implementation. This is suitable for the moment because only one thread is created. This should be reworked when dynamic API will be available.

Note: today the mender client thread consumes a stack size of 14KB. A work is scheduled to avoid mender client thread to be active every time in order to reduce the memory used. This is particularly interesting because the mender client runs rarely (periods are minutes and probably hours or days in industrial projects).

This issue will have no impact on the mender client API (will be managed internally).

joelguittet commented 1 year ago

The following rework: https://github.com/joelguittet/mender-mcu-client/issues/8 will address this issue because a different solution will be used.

Closing this issue now.