diff --git a/config/nrfconnect/app/sample-defaults.conf b/config/nrfconnect/app/sample-defaults.conf index 7e451f40ed6536..9dc094c92f2052 100644 --- a/config/nrfconnect/app/sample-defaults.conf +++ b/config/nrfconnect/app/sample-defaults.conf @@ -25,6 +25,7 @@ CONFIG_PRINTK_SYNC=y CONFIG_ASSERT=y CONFIG_HW_STACK_PROTECTION=y CONFIG_SHELL=y +CONFIG_FPU=y # Enable getting reboot reasons information CONFIG_HWINFO=y diff --git a/examples/lighting-app/nrfconnect/rpc.overlay b/examples/lighting-app/nrfconnect/rpc.overlay index eac4807039a8d4..aee22afb4a39c5 100644 --- a/examples/lighting-app/nrfconnect/rpc.overlay +++ b/examples/lighting-app/nrfconnect/rpc.overlay @@ -26,6 +26,9 @@ CONFIG_CHIP_PW_RPC=y CONFIG_STD_CPP14=n CONFIG_STD_CPP17=y +# Disable HW floating point, as libprotobuf nano doesn't support building with it +CONFIG_FPU=n + # Add support for Zephyr console component to use it for Pigweed console purposes CONFIG_CONSOLE_SUBSYS=y CONFIG_CONSOLE_GETCHAR=y diff --git a/examples/pigweed-app/nrfconnect/prj.conf b/examples/pigweed-app/nrfconnect/prj.conf index 58a0fe63277b34..0895493dcc8f72 100644 --- a/examples/pigweed-app/nrfconnect/prj.conf +++ b/examples/pigweed-app/nrfconnect/prj.conf @@ -30,6 +30,9 @@ CONFIG_CHIP_PW_RPC=y CONFIG_STD_CPP14=n CONFIG_STD_CPP17=y +# Disable HW floating point, as libprotobuf nano doesn't support building with it +CONFIG_FPU=n + # Add support for Zephyr console component to use it for Pigweed console purposes CONFIG_CONSOLE_SUBSYS=y CONFIG_CONSOLE_GETCHAR=y diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.cpp b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.cpp index b8358b59f269bf..6b4d5996d250be 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.cpp +++ b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.cpp @@ -174,7 +174,10 @@ void GenericPlatformManagerImpl_Zephyr::EventLoopTaskMain(void * this template CHIP_ERROR GenericPlatformManagerImpl_Zephyr::_StartEventLoopTask(void) { - const auto tid = k_thread_create(&mChipThread, mChipThreadStack, K_THREAD_STACK_SIZEOF(mChipThreadStack), EventLoopTaskMain, + if (!mChipThreadStack) + return CHIP_ERROR_WELL_UNINITIALIZED; + + const auto tid = k_thread_create(&mChipThread, mChipThreadStack, CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE, EventLoopTaskMain, this, nullptr, nullptr, CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY, 0, K_NO_WAIT); #ifdef CONFIG_THREAD_NAME diff --git a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.h b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.h index 9fc1438f4beff6..884a052a207ea6 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.h +++ b/src/include/platform/internal/GenericPlatformManagerImpl_Zephyr.h @@ -45,7 +45,7 @@ template class GenericPlatformManagerImpl_Zephyr : public GenericPlatformManagerImpl { protected: - using ThreadStack = k_thread_stack_t[K_THREAD_STACK_LEN(CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE)]; + using ThreadStack = k_thread_stack_t *; // Members for select() loop int mMaxFd; @@ -65,7 +65,7 @@ class GenericPlatformManagerImpl_Zephyr : public GenericPlatformManagerImpl(stack) {} + explicit PlatformManagerImpl(ThreadStack stack) : Internal::GenericPlatformManagerImpl_Zephyr(stack) {} static PlatformManagerImpl sInstance; };