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.
Tool/software: Code Composer Studio
When I add System_printf function into simple_peripheral project ,System_printf("hello world\n") cannot print message to Console on debugger. There is no console window named in "ble5_simple_peripheral_cc2640r2lp_app:CIO" either, as shown is picture 1 .
Where am I wrong?
picture 1
My steps of adding System_printf function into simple_peripheral project is as followed:
1、Add header files and System_printf in main.c:
/*********************** main.c ******************************/ #include <xdc/runtime/System.h> ...... int main() { System_printf("hello world\n"); ...... SimpleBLEPeripheral_createTask(); BIOS_start(); return 0; }
2、Add configuring funcitons in app_ble.cfg
/*********************** app_ble.cfg ******************************/ var SysStd = xdc.useModule('xdc.runtime.SysStd'); var System = xdc.useModule('xdc.runtime.System'); System.SupportProxy = SysStd; utils.importFile("common/cc26xx/kernel/cc2640/config/cc2640_r2_csdk.cfg"); utils.importFile("common/cc26xx/kernel/cc2640/config/ble_stack_heap.cfg");
Attachments:
1、the positon of simple_peripheral project in my computer is as followed:
C:\ti\simplelink_cc2640r2_sdk_1_40_00_45\examples\rtos\CC2640R2_LAUNCHXL\ble5stack\simple_peripheral
2、you can download the project in simplelink_cc2640r2_sdk_1_40_00_45 from the following website:
Hi,
Can you try adding a call to System_flush to ensure the output is being sent to the console, as such:
System_printf("hello world"); System_flush();
Hope that helps,
Gerardo
Hi,
Looks like the problem is your cfg file, you have to put the new System configuration at the end of your cfg file as such:
utils.importFile("common/cc26xx/kernel/cc2640/config/cc2640_r2_csdk.cfg"); utils.importFile("common/cc26xx/kernel/cc2640/config/ble_stack_heap.cfg"); var SysStd = xdc.useModule('xdc.runtime.SysStd'); var System = xdc.useModule('xdc.runtime.System'); System.SupportProxy = SysStd;
After those changes your project should print correctly to the console.
Thanks,
Gerardo