AnsweredAssumed Answered

FRDM-KW41Z评估板 MCUXpresso 调试问题

Question asked by Bin Er Employee on Jan 21, 2018
Latest reply on Jan 30, 2018 by Carlos_Mendoza

A trainee in NXP roadshow send me a question

Could you help him please?

 

我是北京杰安泰无损检测技术有限公司的贾工,听过您MCUXpresso IDE的讲座,您当时讲有问题可以给您发邮件,今天冒昧打扰您一下。

我现在在使用FRDM-KW41Z评估板测试程序,使用的是MCUXpresso IDE集成开发工具,使用SEGGER J-Link Probes在调试SDK_2.2_FRDM-KW41Z中的BLE demo application中的Wireless UART(使用FreeRTOS操作系统)时,因为MCUXpresso IDE FreeRTOS Debug Guide写的比较简单,

MCUXpresso IDE FreeRTOS Debug Guide中Task List View中有一项Runtime项(如下图最右边一项所示),可以显示FreeRTOS每个任务的运行时间,在MCUXpresso IDE FreeRTOS Debug Guide中的图例中是可以显示此项的,但在Wireless UART示例中这个选项是关闭的(configGENERATE_RUN_TIME_STATS=0),我把这个参数设置为1时,编译就报错,在FreeRTOS.h中如下文所示的一段程序,要求增加处理函数,请问真对FreeRTOS Wireless UART示例应该如何增加相关参数和处理函数可以显示出Runtime项?

================================================================

#if ( configGENERATE_RUN_TIME_STATS == 1 )

 

    #ifndef portCONFIGURE_TIMER_FOR_RUN_TIME_STATS

        #error If configGENERATE_RUN_TIME_STATS is defined then portCONFIGURE_TIMER_FOR_RUN_TIME_STATS must also be defined.  portCONFIGURE_TIMER_FOR_RUN_TIME_STATS should call a port layer function to setup a peripheral timer/counter that can then be used as the run time counter time base.

    #endif /* portCONFIGURE_TIMER_FOR_RUN_TIME_STATS */

 

    #ifndef portGET_RUN_TIME_COUNTER_VALUE

        #ifndef portALT_GET_RUN_TIME_COUNTER_VALUE

            #error If configGENERATE_RUN_TIME_STATS is defined then either portGET_RUN_TIME_COUNTER_VALUE or portALT_GET_RUN_TIME_COUNTER_VALUE must also be defined.  See the examples provided and the FreeRTOS web site for more information.

        #endif /* portALT_GET_RUN_TIME_COUNTER_VALUE */

    #endif /* portGET_RUN_TIME_COUNTER_VALUE */

 

#endif /* configGENERATE_RUN_TIME_STATS */

Outcomes