USB虚拟串口的例程还是有问题。。。
重启一下神奇的串口就出现了。难道上次没烧录好?
]]>在Device_init();中找到时钟初始化函数SysCtl_setClock的参数DEVICE_SETCLOCK_CFG,并找到DEVICE_SETCLOCK_CFG参数的定义
可以看到这段函数库有专门针对_LAUNCHXL_F28379D的宏定义。
**** Build of configuration CPU1_FLASH for project usb_ex3_dev_keyboard ****
"D:\\ti\\ccs930\\ccs\\utils\\bin\\gmake" -k -j 16 all -O
Building file: "../device/F2837xD_CodeStartBranch.asm"
Invoking: C2000 Compiler
"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard" --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard/device" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/driverlib/f2837xd/driverlib" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/libraries/communications/usb/f2837xd/include" --include_path="D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --define=ccs_c2k --define=DEBUG --define=_FLASH --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="device/F2837xD_CodeStartBranch.d_raw" --obj_directory="device" "../device/F2837xD_CodeStartBranch.asm"
Finished building: "../device/F2837xD_CodeStartBranch.asm"
Building file: "../usb_ex3_keyboard_structs.c"
Invoking: C2000 Compiler
"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard" --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard/device" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/driverlib/f2837xd/driverlib" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/libraries/communications/usb/f2837xd/include" --include_path="D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --define=ccs_c2k --define=DEBUG --define=_FLASH --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="usb_ex3_keyboard_structs.d_raw" "../usb_ex3_keyboard_structs.c"
Finished building: "../usb_ex3_keyboard_structs.c"
Building file: "../usb_hal.c"
Invoking: C2000 Compiler
"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard" --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard/device" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/driverlib/f2837xd/driverlib" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/libraries/communications/usb/f2837xd/include" --include_path="D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --define=ccs_c2k --define=DEBUG --define=_FLASH --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="usb_hal.d_raw" "../usb_hal.c"
"../usb_hal.c", line 122 (col. 5): advice #2614-D: (Performance) Use --fp_mode=relaxed to enable TMU hardware support for FP division.
Finished building: "../usb_hal.c"
Building file: "../device/device.c"
Invoking: C2000 Compiler
"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard" --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard/device" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/driverlib/f2837xd/driverlib" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/libraries/communications/usb/f2837xd/include" --include_path="D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --define=ccs_c2k --define=DEBUG --define=_FLASH --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="device/device.d_raw" --obj_directory="device" "../device/device.c"
Finished building: "../device/device.c"
Building file: "../scistdio.c"
Invoking: C2000 Compiler
"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard" --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard/device" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/driverlib/f2837xd/driverlib" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/libraries/communications/usb/f2837xd/include" --include_path="D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --define=ccs_c2k --define=DEBUG --define=_FLASH --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="scistdio.d_raw" "../scistdio.c"
Finished building: "../scistdio.c"
Building file: "../usb_ex3_dev_keyboard.c"
Invoking: C2000 Compiler
"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard" --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard/device" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/driverlib/f2837xd/driverlib" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/libraries/communications/usb/f2837xd/include" --include_path="D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --define=ccs_c2k --define=DEBUG --define=_FLASH --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="usb_ex3_dev_keyboard.d_raw" "../usb_ex3_dev_keyboard.c"
Finished building: "../usb_ex3_dev_keyboard.c"
Building file: "../ustdlib.c"
Invoking: C2000 Compiler
"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard" --include_path="D:/ti/workspace_v9/usb_ex3_dev_keyboard/device" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/driverlib/f2837xd/driverlib" --include_path="D:/ti/c2000/C2000Ware_2_01_00_00/libraries/communications/usb/f2837xd/include" --include_path="D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --define=ccs_c2k --define=DEBUG --define=_FLASH --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="ustdlib.d_raw" "../ustdlib.c"
"../ustdlib.c", line 1416 (col. 20): advice #2614-D: (Performance) Use --fp_mode=relaxed to enable TMU hardware support for FP division.
Finished building: "../ustdlib.c"
Building target: "usb_ex3_dev_keyboard.out"
Invoking: C2000 Linker
"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/bin/cl2000" -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 -Ooff --define=ccs_c2k --define=DEBUG --define=_FLASH --define=CPU1 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi -z -m"usb_ex3_dev_keyboard.map" --heap_size=0x200 --stack_size=0x3F8 --warn_sections -i"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/lib" -i"D:/ti/ccs930/ccs/tools/compiler/ti-cgt-c2000_18.12.4.LTS/include" --reread_libs --diag_wrap=off --display_error_number --xml_link_info="usb_ex3_dev_keyboard_linkInfo.xml" --entry_point=code_start --rom_model -o "usb_ex3_dev_keyboard.out" "./scistdio.obj" "./usb_ex3_dev_keyboard.obj" "./usb_ex3_keyboard_structs.obj" "./usb_hal.obj" "./ustdlib.obj" "./device/F2837xD_CodeStartBranch.obj" "./device/device.obj" "../2837xD_FLASH_lnk_cpu1_USB.cmd" "D:/ti/c2000/C2000Ware_2_01_00_00/driverlib/f2837xd/driverlib/ccs/Debug/driverlib.lib" "D:/ti/c2000/C2000Ware_2_01_00_00/libraries/communications/usb/f2837xd/lib/usblib.lib" -llibc.a
<Linking>
Finished building target: "usb_ex3_dev_keyboard.out"
**** Build Finished ****
按如下几个步骤使能Flash的使用。因为默认是针对RAM配置的,一Reset就没了。
然后把界面配置成如图
点击apply and close