Closed Hadatko closed 2 years ago
Without this modification -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING \
demo works. So combination usage of this macro and a many large prints usage result in app freeze.
I think putting DbgConsole_Flush after printf when this macro is used made it freezing too.
Hi @Hadatko, thank you for reporting the issue. To summarize the situation, do you mean that:
So, the key point may be: using -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING in flags.cmake makes the demo run to freeze. And when uses -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING, reduce use of printf or adding DbgConsole_Flush after printf both could improve the situation and demo works. Please help clarify if my understanding is correct. Appreciate for your energetic contribution. For your information, you could also follow the guide in https://github.com/NXPmicro/mcux-sdk/#overview to obtain the whole GitHub SDK distribution via zephyr west tool, then you could be able to also get the examples delivery in https://github.com/NXPmicro/mcux-sdk-examples/ and no need to MCUXpresso SDK package to reproduce your issue.
Hi @mcuxsusan , The main issue is combination of -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING and many printf function in main_core1.c. Using DbgConsole_Flush freezing too may be additional or same issue. Not sure, but in current state not important.
@lylezhu2014, may you please help comment on the situation?
Any news here?
Hi @Hadatko, thanks for your patience. @lylezhu2014, please help update your progress here.
Hi Hadatko,
The PRINTF and DbgConsole_Flush should be called in task context. Because FreeRTOS resource is used by debug console.
Thank you very much. I moved more context into tasks and rest i removed. This is working well.
Describe the bug Here is modified example for imx7ulp erpc_matrix_multiply_rpmsg_rtos_imxcm4.zip. Changes are in
source/main_core1.c
and cmake related files (flags for release target -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING \ -DPRINTF_ADVANCED_ENABLE=1 \ -DFILENAME='\"$(notdir $(abspath $<))\"' ) Zip file contains alsorelease
dir with built binaries. If few printf are removed from modification, program is working. But with all modification program will freeze.To Reproduce described above
Expected behavior To not freeze at printf function.
Screenshots and console output