TI中文支持网
TI专业的中文技术问题搜集分享网站

CC1310 IAR8.40.1 调试时可运行程序,直接下载不能正常运行,仿真器为xds110

/*
* ======== heartBeatFxn ========
* Toggle the Board_LED0. The Task_sleep is determined by arg0 which
* is configured for the heartBeat Task instance.
*/
Void heartBeatFxn(UArg arg0, UArg arg1)
{
while (1) {
Task_sleep(10000);
PIN_setOutputValue(ledPinHandle, Board_LED0,
!PIN_getOutputValue(Board_LED0));
}
}

/*
* ======== echoFxn ========
* Task for this function is created statically. See the project's .cfg file.
*/
Void echoFxn(UArg arg0, UArg arg1)
{
char input;
UART_Handle uart;
UART_Params uartParams;
const char echoPrompt[] = "\fEchoing characters:\r\n";

/* Create a UART with data processing off. */
UART_Params_init(&uartParams);
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.baudRate = 115200;
uart = UART_open(Board_UART0, &uartParams);

if (uart == NULL) {
System_abort("Error opening the UART");
}

UART_write(uart, echoPrompt, sizeof(echoPrompt));

/* Loop forever echoing */
while (1) {
UART_read(uart, &input, 1);
UART_write(uart, &input, 1);
}
}

/*
* ======== main ========
*/
int main(void)
{
Task_Params taskParams;

/* Call board init functions */
Board_initGeneral();
Board_initUART();

/* Construct heartBeat Task thread */
Task_Params_init(&taskParams);
taskParams.stackSize = TASKSTACKSIZE;
taskParams.stack = &task0Stack;
taskParams.priority = 2;
Task_construct(&task0Struct, (Task_FuncPtr)heartBeatFxn, &taskParams, NULL);

/* Construct BIOS objects */
taskParams.stackSize = TASKSTACKSIZE;
taskParams.stack = &task1Stack;
taskParams.priority = 1;
Task_construct(&task1Struct, (Task_FuncPtr)echoFxn, &taskParams, NULL);
/* Open LED pins */
ledPinHandle = PIN_open(&ledPinState, ledPinTable);
if(!ledPinHandle) {
System_abort("Error initializing board LED pins\n");
}

PIN_setOutputValue(ledPinHandle, Board_LED0, 1);

System_printf("Starting the example\nSystem provider is set to SysMin. "
"Halt the target to view any SysMin contents in ROV.\n");
/* SysMin will only print to the console when you call flush or exit */
System_flush();

/* Start BIOS */
BIOS_start();

return (0);
}

Viki Shi:

直接下载不能运行?可以提供一下烧录步骤和工具吗?

Hony Gao:

回复 Viki Shi:

您好,我这边刚开始用这个CC1310,有些可能不太熟悉,用这个download and debug ,停止DEBUG后,程序还在运行,如果重新上电,就不行了。用下面的Programmer2直接下载也试了。

Viki Shi:

回复 Hony Gao:

都无法运行?复位一下再试试

Hony Gao:

回复 Viki Shi:

复位也试过,也是不行,用CCS没这个问题,IAR我是安照 https://processors.wiki.ti.com/index.php/Creating_TI-RTOS_Applications_in_IAR_Embedded_Workbench 中的步骤来添加工程的

Hony Gao:

回复 Viki Shi:

试了下,程序停在System_flush()

赞(0)
未经允许不得转载:TI中文支持网 » CC1310 IAR8.40.1 调试时可运行程序,直接下载不能正常运行,仿真器为xds110
分享到: 更多 (0)