Tool/software: Code Composer Studio
When I add System_printf and System_flush 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 , System_printf and System_flush in simple_peripheral.c:
/*********************** simple_peripheral.c ******************************/ /* XDC Module Headers */ #include <xdc/std.h> #include <xdc/runtime/System.h> /* BIOS Module Headers */ #include <ti/sysbios/BIOS.h> static void SimpleBLEPeripheral_init(void) { ...... // Start the GAPRole VOID GAPRole_StartDevice(&SimpleBLEPeripheral_gapRoleCBs); System_printf("hello world\n"); System_flush(); }
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、my complete workspace can be downloaded from here:
3、you can download the project in simplelink_cc2640r2_sdk_1_40_00_45 from the following website:
4、my develop invironment:
CCS:Code Composer Studio 7.2.0
SDK:simplelink_cc2640r2_sdk_1_40_00_45
hardware:CC26640R2 develop kit