hashmismatch / freertos.rs

A Rust wrapper for FreeRTOS.
232 stars 22 forks source link

Linking errors when some features are disabled in FreeRTOS (at least stack high water mark) #14

Closed uzytkownik closed 6 years ago

uzytkownik commented 6 years ago
/tmp//libkvm.a(freertos_rs-4d6cd4cda3cfed3d.freertos_rs0.rcgu.o): In function `freertos_rs::task::Task::get_stack_high_water_mark::h2ebc848c0d006b62':
/home/mpiechotka/.cargo/registry/src/github.com-1ecc6299db9ec823/freertos_rs-0.2.0/src/task.rs:257: undefined reference to `freertos_rs_get_stack_high_water_mark'
/tmp//libkvm.a(freertos_rs-4d6cd4cda3cfed3d.freertos_rs0.rcgu.o): In function `freertos_rs::task::CurrentTask::get_stack_high_water_mark::ha19f8026cb3c6f12':
/home/mpiechotka/.cargo/registry/src/github.com-1ecc6299db9ec823/freertos_rs-0.2.0/src/task.rs:275: undefined reference to `freertos_rs_get_stack_high_water_mark'

freertos_rs_get_stack_high_water_mark is not compiled as INCLUDE_uxTaskGetStackHighWaterMark is not equal to 1.

rudib commented 6 years ago

I've modified the shim to just return 0 in case FreeRTOS's config doesn't support reporting the stack's watermark. Thanks for the report.