CCS項目開發 之 結構

本文基於物聯網開發板簡介

本文的主線 名詞 => 項目 => 結構

名詞

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

結構

協議棧項目

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
  • /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"

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

參考

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章