美文网首页
CCS项目开发 之 结构

CCS项目开发 之 结构

作者: 诺之林 | 来源:发表于2021-08-29 22:57 被阅读0次

本文基于物联网开发板简介

本文的主线 名词 => 项目 => 结构

名词

Code Composer Studio؜™ software is an integrated development environment (IDE) that supports TI's microcontroller (MCU) and embedded processor portfolios
Real-Time Software Components (RTSC, pronounced "rit-see") is a program designed to bring component based development to embedded C programmers

XDCtools is a product that contains all of the tools necessary to create, test, deploy, install, and use RTSC components
TI Code Generation Tools include C/ C++ Compilers and Assembly Language tools for many instruction set architectures
The CDT Project provides a fully functional C and C++ Integrated Development Environment based on the Eclipse platform

项目

  • 打开Code Composer Studio => File => New => CSS Project
Target => SimpleLink Wireless MCU CC2640R2F

SDK Examples => Open Resource Explorer

BLE5-Stack => project_zero => Import to CCS IDE
ccs-introduction-01.png ccs-introduction-02.png

结构

ccs-introduction-03.png

协议栈项目

ble5_project_zero_cc2640r2lp_stack_library

find .
./FlashROM_Library
./TOOLS
./TOOLS/defines
./TOOLS/defines/ble5_project_zero_cc2640r2lp_stack_library_FlashROM_Library.opt
./TOOLS/build_config.opt
./.ccsproject
./.cproject
./.project

ble5_project_zero_cc2640r2lp_stack_library => .ccsproject

<origin value="/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/examples/rtos/CC2640R2_LAUNCHXL/ble5stack/project_zero/tirtos/ccs/ble5_project_zero_cc2640r2lp_stack_library.projectspec"/>

ble5_project_zero_cc2640r2lp_stack_library => .ccsproject => preBuild

  • /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/examples/rtos/CC2640R2_LAUNCHXL/ble5stack/project_zero/tirtos/ccs/ble5_project_zero_cc2640r2lp_stack_library.projectspec
preBuildStep="
        ${TOOLS_BLE_DIR}/lib_search/lib_search
        --opt ${PROJECT_LOC}/TOOLS/build_config.opt
        --lib-dir ${SRC_BLE_DIR}/blelib/cc26x0r2
        --cmd ${PROJECT_LOC}/FlashROM_Library/lib_linker.cmd
        --xml ${TOOLS_BLE_DIR}/lib_search/lib_search.xml
        --sym-dir ${SRC_BLE_DIR}/symbols/cc26x0r2"
  • /Users/kevin/ti/Workspace/ble5_project_zero_cc2640r2lp_stack_library/.ccsproject
ccs-introduction-04.png
  • /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/tools/ble5stack/lib_search/lib_search.py
if __name__ == '__main__':
    lib_search_args = parse_args()
    main(lib_search_args)

def main(args):
    # Search for all necessary libraries
    final_libs_list = lib_search(args.opt, args.lib_dir, args.xml)

    # If valid libraries were found generate linker cmd file
    if final_libs_list:
        if generate_cmd(args.cmd, final_libs_list):
            print('<<< Modifying {}. Stack configurations have changed. '
                  '>>>'.format(os.path.basename(args.cmd)))

def lib_search(opt, lib_dir, xml_path):
    pass

def generate_cmd(cmd_file, libs):
    cmd_header = ('/*\n * DO NOT MODIFY. This file is automatically generated '
                  'during the pre-build\n *                step by the '
                  'lib_search utility\n */\n\n')
  • /Users/kevin/ti/Workspace/ble5_project_zero_cc2640r2lp_stack_library/TOOLS/build_config.opt
/* BLE Host Build Configurations */
-DHOST_CONFIG=PERIPHERAL_CFG

/* Include GAP Bond Manager */
-DGAP_BOND_MGR

/* Include Transport Layer (Full or PTM) */
-DHCI_TL_NONE
  • /Users/kevin/ti/Workspace/ble5_project_zero_cc2640r2lp_stack_library/FlashROM_Library/lib_linker.cmd
/*
 * DO NOT MODIFY. This file is automatically generated during the pre-build
 *                step by the lib_search utility
 */

"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/ctrl/hci_pxxx.a"
"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/ctrl/ll_pxxx.a"
"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/hci_tl/hci_tl_none.a"
"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/host/gap_pxxx.a"
"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/host/profiles_pxxx.a"
"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/host/att_pxxx.a"
"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/host/sm_pxxx.a"
"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/host/l2cap_pxxx.a"
"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/host/smp_pxxx.a"
"/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib/cc26x0r2/host/gatt_pxxx.a"
  • /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib
find /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/blelib | less -N

ble5_project_zero_cc2640r2lp_stack_library => .ccsproject => preBuild => build

  • /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/examples/rtos/CC2640R2_LAUNCHXL/ble5stack/project_zero/tirtos/ccs/ble5_project_zero_cc2640r2lp_stack_library.projectspec
compilerBuildOptions="
--cmd_file=${PROJECT_LOC}/TOOLS/defines/ble5_project_zero_cc2640r2lp_stack_library_FlashROM_Library.opt
--cmd_file=${SRC_BLE_DIR}/config/build_components.opt
--cmd_file=${SRC_BLE_DIR}/config/factory_config.opt
--cmd_file=${PROJECT_LOC}/TOOLS/build_config.opt
-mv7M3 -O4 --opt_for_speed=0 --code_state=16 --abi=eabi -me -g --c99 --gcc --gen_func_subsections=on --display_error_number --diag_wrap=off
-D${XDC_SYMBOLS}
-DDeviceFamily_CC26X0R2
-I${CG_TOOL_ROOT}/include
-I${XDC_INCLUDE_PATH}
-I${SRC_BLE_DIR}/controller/cc26xx/inc
-I${SRC_BLE_DIR}/inc
-I${SRC_BLE_DIR}/rom
-I${SRC_BLE_DIR}/common/cc26xx
-I${SRC_BLE_DIR}/common/cc26xx/npi/stack
-I${SRC_BLE_DIR}/icall/inc
-I${SRC_BLE_DIR}/inc
......"
  • /Users/kevin/ti/Workspace/ble5_project_zero_cc2640r2lp_stack_library/TOOLS/defines/ble5_project_zero_cc2640r2lp_stack_library_FlashROM_Library.opt
-DCC26XX
-DCC26XX_R2
-DDeviceFamily_CC26X0R2
-DEXT_HAL_ASSERT
-DFLASH_ROM_BUILD
-DICALL_EVENTS
-DICALL_JT
-DICALL_LITE
-DOSAL_CBTIMER_NUM_TASKS=1
-DOSAL_SNV=1
-DPOWER_SAVING
-DRF_SINGLEMODE
-DSTACK_LIBRARY
-DUSE_ICALL

应用主项目

ble5_project_zero_cc2640r2lp_app

find .

ble5_project_zero_cc2640r2lp_app => .ccsproject

<origin value="/Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/examples/rtos/CC2640R2_LAUNCHXL/ble5stack/project_zero/tirtos/ccs/ble5_project_zero_cc2640r2lp_app.projectspec"/>

ble5_project_zero_cc2640r2lp_app => .ccsproject => import

  • /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/examples/rtos/CC2640R2_LAUNCHXL/ble5stack/project_zero/tirtos/ccs/ble5_project_zero_cc2640r2lp_app.projectspec
<import spec="ble5_project_zero_cc2640r2lp_stack_library.projectspec"/>

ble5_project_zero_cc2640r2lp_app => .ccsproject => import => build

  • /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/examples/rtos/CC2640R2_LAUNCHXL/ble5stack/project_zero/tirtos/ccs/ble5_project_zero_cc2640r2lp_app.projectspec
<property name="configuroOptions" value="--compileOptions ${COMPILER_FLAGS} --xdcpath ${SRC_BLE_DIR}/../../../source;${SRC_BLE_DIR}/../../../kernel/tirtos/packages;${SRC_BLE_DIR}"/>

compilerBuildOptions="
--cmd_file=${PROJECT_LOC}/TOOLS/defines/ble5_project_zero_cc2640r2lp_app_FlashROM_StackLibrary.opt
--cmd_file=${SRC_BLE_DIR}/config/build_components.opt
--cmd_file=${SRC_BLE_DIR}/config/factory_config.opt
--cmd_file=${WORKSPACE_LOC}/ble5_project_zero_cc2640r2lp_stack_library/TOOLS/build_config.opt
--silicon_version=7M4 -O2 --opt_for_speed=0 --code_state=16 --abi=eabi -me -g --c99 --gcc --gen_func_subsections=on --display_error_number --diag_wrap=off
-DDeviceFamily_CC26X0R2
-Duartlog_FILE=&quot;\&quot;${InputFileName}\&quot;&quot;
-DUARTLOG_ENABLE
-I${PROJECT_LOC}/Application
-I${PROJECT_LOC}/Startup
-I${PROJECT_LOC}/PROFILES
-I${PROJECT_LOC}/Include
-I${EXAMPLE_BLE_ROOT}/src/extra
......"

linkerBuildOptions="
-l${SRC_BLE_DIR}/../../../source/ti/devices/cc26x0r2/driverlib/bin/ccs/driverlib.lib
-l${SRC_BLE_DIR}/../../../kernel/tirtos/packages/ti/dpl/lib/dpl_cc26x0r2.aem3
-l${SRC_BLE_DIR}/../../../source/ti/drivers/lib/drivers_cc26x0r2.aem3
-l${SRC_BLE_DIR}/../../../source/ti/drivers/rf/lib/rf_singleMode_cc26x0r2.aem3
-l${SRC_BLE_DIR}/../../../source/ti/display/lib/display.aem3
-l${SRC_BLE_DIR}/../../../source/ti/grlib/lib/ccs/m3/grlib.a
-l${WORKSPACE_LOC}/ble5_project_zero_cc2640r2lp_stack_library/FlashROM_Library/ble_r2.symbols
-l${WORKSPACE_LOC}/ble5_project_zero_cc2640r2lp_stack_library/FlashROM_Library/lib_linker.cmd
-l${WORKSPACE_LOC}/ble5_project_zero_cc2640r2lp_stack_library/FlashROM_Library/ble5_project_zero_cc2640r2lp_stack_library.lib
-l${SRC_BLE_DIR}/common/cc26xx/ccs/cc26xx_app.cmd
-x
--define=CC26X0ROM=2
--diag_suppress=16002-D
--diag_suppress=10247-D
--diag_suppress=10325-D
--diag_suppress=10229-D
--diag_suppress=16032-D"
ccs-introduction-05.png

ble5_project_zero_cc2640r2lp_app => .ccsproject => import => build => link

  • /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/examples/rtos/CC2640R2_LAUNCHXL/ble5stack/project_zero/tirtos/ccs/ble5_project_zero_cc2640r2lp_app.projectspec
-l${SRC_BLE_DIR}/common/cc26xx/ccs/cc26xx_app.cmd
  • /Applications/ti/simplelink_cc2640r2_sdk_5_10_00_02/source/ti/ble5stack/common/cc26xx/ccs/cc26xx_app.cmd
#define FLASH_BASE   0x00000000
#define GPRAM_BASE   0x11000000
#define RAM_BASE     0x20000000
#define ROM_BASE     0x10000000

参考

相关文章

  • CCS项目开发 之 结构

    本文基于物联网开发板简介[https://blog.nuozhilin.site/2021/08/23/2021-...

  • 舞钢CCS/D690钢板

    舞钢CCS/D690钢板 CCS/D690钢板为焊接结构用高强度淬火回火钢板,可选择中国船级社CCS认证,CCS/...

  • iOS开发之项目结构

    写在开头,本人是一名资深伸手党(手动滑稽),工作了差不多四年了,而现在对iOS已经怀疑人生了,具体原因都懂。现在对...

  • iOS 项目依赖子模块工程

    上一节我们讲了项目结构优化中的《项目嵌套子工程》,接下来我们继续学习项目结构优化系列之项目依赖子模块工程。在开发中...

  • PacBio CCS 质量评估

    CCS 读取的质量评估 为了研究 CCS reads中的少许错误,记录了reads与 GIAB HG002 基准之...

  • 项目开发之经验分享

    项目开发之经验分享 项目开发之经验分享

  • Python web开发----->快速搭建Django项目结

    Python web开发----->快速搭建Django项目结构 一,Django的概述.. 完善的项目结构——...

  • 微信小程序

    微信项目结构 项目开发的目录结构,微信已经为开发者规范好了,结构清楚明了,很容易分辨和阅读。 小程序的主体部分(程...

  • ccs之标签

    使用 标签链接到另一个页面 语法 xxxxx title属性的作用,鼠标滑过链接文字时会显示这个属性的文本内容。,...

  • ccs之表单

    使用来插入图片 语法: 举例: 图像可以是GIF,PNG,JPEG格式的图像文件 网站怎样与用户进行交互...

网友评论

      本文标题:CCS项目开发 之 结构

      本文链接:https://www.haomeiwen.com/subject/xnjdiltx.html