CC1310 进行System_printf的重定向,到串口;
参考的是SimpleLink Academy 中debug任务5,使用empty例程
问题是:
1.没有文中提及的empty.syscfg
2.加入UARTUtils.c和UARTUtils.h编译报错:#1965 cannot open source file "ti_drivers_config.h"
应该是 CONFIG_UART_0引用到上述文件,CONFIG_UART_0未被定义。
请问应该如何修改?谢谢!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
syscfg是图形化配置工具,相比之前的配置方式改动比较大
ti_drivers_config.h中的配置,你可以看下:
/* * ======== UART ======== */ /* * TX: DIO3 * RX: DIO2 * XDS110 UART */ extern const uint_least8_t CONFIG_DISPLAY_UART_CONST; #define CONFIG_DISPLAY_UART 0 #define CONFIG_TI_DRIVERS_UART_COUNT 1
一些说明:
.$name = 'CONFIG_UART_{num}'
]This name is declared in the generated ti_drivers_config.h file so applications can reference this instance symbolically. Additionally, this name is used to declare an 'extern const' which allows libraries to define symbolic names for required driver configurations without needing to rebuild library source files. The 'const' identifier is declared as the same name with a _CONST suffix. The name can be set to any globally unique name that is also a valid C/C++ identifier.
The SysConfig tooling ensures that all names defined in a configuration are unique. When instances are first created, SysConfig gives them a default name, CONFIG_UART_
, that's made unique by appending a numeric id. If you provide a name, it's checked against all other instance names in the configuration and, if another instance has the same name, an error is triggered. The additional 'const' declaration is assumed to also be globally unique.
Note: since not all names are added to ti_drivers_config.h, it's possible that some names will not be allowed even though they do not actually collide in the generated files.