下面这段程序是我在官方程序上面做了一点改动,为了验证程序是否允许,我在任务里面一直使用UART_printf("Data received is\n")打印信息,在SD卡上加载了MLO和app后,只能循环输出几次这个信息,然后板子就异常关机了。
当我把这段代码“BIOS_start()”屏蔽了板子不会关机,会while循环执行UART_printf("sssssssss\n")。
char echoPrompt[]="uart driver and utils example test cases :please enetr the 50 bytes of character or press the esc \n";
char echoPrompt1[]="DATA RECEIVED IS\n ";
#define SOC_CORE_PAD_IO_REGISTERS_BASE (0x4a003400U)
/* Length of the input in number of characters */
#define INPUT_LENGTH (16U)
Void uart_test(UArg arg0, UArg arg1)
{
char input = '\n';
char *buffPointer;
buffPointer = (char*)malloc(INPUT_LENGTH);
memset(buffPointer,0,INPUT_LENGTH);
// UART_puts("uart driver and utils example test cases :please enetr the 16 bytes of character or press the esc \n",sizeof("uart driver and utils example test cases :please enetr the 16 bytes of character or press the esc or carriage return\n"));
while(1) {
UART_printf("Data received is\n");
}
}
/*
* ======== main ========
*/
int main(void)
{
/* Call board init functions */
Task_Handle task;
Error_Block eb;
Board_initCfg boardCfg;
boardCfg = BOARD_INIT_PINMUX_CONFIG |
BOARD_INIT_UART_STDIO;
Board_init(boardCfg);
Error_init(&eb);
#if 1
task = Task_create(uart_test, NULL, &eb);
if (task == NULL) {
System_printf("Task_create() failed!\n");
BIOS_exit(0);
}
#endif
/* Start BIOS */
BIOS_start();
while(1){
UART_printf("sssssssss\n");
}
return (0);
}
这个MLO是官方诊断程序里面的MLO(C:\TI\pdk_am57xx_1_0_12\packages\ti\boot\sbl\binary\idkAM574x\mmcsd\bin),官方诊断程序好像是裸机,不知道会不会有影响,我也没找到其他MLO。app是PDK创建给出的示例。就是下面这种
请问我需要主要什么吗,如何在BIOS_start()启动的情况下,程序能够正常运行。



