micro-os-plus/micro-os-plus-iii

Compilation failure with OS_EXCLUDE_DYNAMIC_MEMORY_ALLOCATIONS

valenistiy opened this issue · 5 comments

When I'm trying to compile uOs++ with OS_EXCLUDE_DYNAMIC_MEMORY_ALLOCATIONS macro defined, I get the following error:
os-main.cpp:159:21: error: cannot convert 'std::aligned_storage<2168, 8>::type*' to 'os::rtos::thread*' in assignment
on the line
os_main_thread = &os_main_thread_;
The compiler is arm-none-eabi-g++ (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
OS is Ubuntu 16.04.4 LTS.
Explicit type conversion solves the problem:
os_main_thread = reinterpret_cast<rtos::thread*>(&os_main_thread_); // This works

I'm preparing a new release (today or tomorrow), could you try the develop branch?

Yes I can. Thanks for your response.

I added a cast, it should compile now.

Please update to the latest commit on the develop branch and confirm, I'm delaying the release to be sure the bug is fixed.

It compiles now. Thanks.

Great!

Then tomorrow I'll release 6.3.14.