uxTaskGetStackHighWaterMark in a primarily C++ system

gohaggett wrote on Wednesday, September 25, 2019:

Having trouble creating watermarks within my project, specifically with passing the Null pointer involved with this function. Just curious if anyone else has already worked through this problem and had any tips to offer. Any suggestions are appreciated.

rtel wrote on Wednesday, September 25, 2019:

Can’t know if anybody has worked through this problem without knowing
what the problem is :o) What happens when you attempt to get the high
water mark? Eg. does it crash, does it always return 0 - or a random
number, etc. Also, what do you see happen if you step into the function
in the debugger? Finally, are you building the kernel code as C inside
your C++ application, or are you building the kernel as C++ too?

gohaggett wrote on Wednesday, September 25, 2019:

Didn’t expect that fast of a reply. The kernal is built in C but we use C++ wrappers to interact with with the RTOS. I am having compiler errors when trying to use this function. I will get back to you with more detail on the exact problem. I believe the problem has to deal with use using c++ wrappers, when the watermark function needs to be compiled in C, or it could be the data type that uxTaskGetStackHighWaterMark uses for parameters.

gohaggett wrote on Wednesday, September 25, 2019:

Didn’t expect that fast of a reply. The kernal is built in C but we use C++ wrappers to interact with with the RTOS. I am having compiler errors when trying to use this function. I will get back to you with more detail on the exact problem. I believe the problem has to deal with use using c++ wrappers, when the watermark function needs to be compiled in C, or it could be the data type that uxTaskGetStackHighWaterMark uses for parameters.