1.新建工程,生成lib库还是生成out?

生成lib库,其他工程可以链接linked

生成out文件,可以直接烧写,也可以进一步转为hex或bin文件(一般为app工程)

2.pre-build steps&post-build steps

编译前添加一些文件

编译后out转hex或bin,把一些文件copy到其他文件夹,便于其他工程进行链接

{CCS_INSTALL_ROOT} 表示CCS安装路径

{CG_TOOL_ROOT}表示cgTool安装路径

{PROJECT_LOC}表示工程路径

此截图中,out2rprc.exe放在工程文件夹下的tools/out2bin中!

3.out2rprc工具

C6748 StarterWare Booting And Flashing

The StarterWare Bootloader

The StarterWare bootloader is a platform-specific helper application that makes it easy to transition from running a StarterWare application in a debug context (i.e. in Code Composer Studio with a GEL file) to a production context (i.e. running the application automatically when the board is powered on). The bootloader acts as an intermediary between the ROM bootloader (RBL) and the application. During boot, the StarterWare bootloader takes the following actions:

  1. Applies common PLL and DDR/EMIF settings
  2. Copies application program and data sections from flash memory to DDR
  3. Jumps to application entrypoint

If the bootloader encounters an error during boot, it prints diagnostic messages to the UART console.

The StarterWare bootloader comes pre-built with the standard installation and typically does not need to be modified or rebuilt unless you want to port it to a custom hardware platform. The prebuilt binary can be found in the following location:

<StarterWare Installation Path>/binary/armv5/<toolchain>/c6748/evmC6748/bootloader/Release/boot.out

Booting a StarterWare Application

Binary Image Generation

Booting a StarterWare application requires two binary images:

  1. An AIS file containing the StarterWare bootloader
  2. A binary file containing the application

These images are generated using two separate tools, both of which are included in the tools folder of the standard StarterWare installation.

Using AISgen to Create the Bootloader AIS File

The AISgen GUI can be used to generate the StarterWare bootloader AIS file. All of the critical settings are located on the General tab of the AISgen GUI:

  • Boot Mode - Set to SPI0 Flash
  • Application File - Set to bootloader .out file
  • AIS Output File - Desired AIS file name/path

The AISgen tool has many options to configure the device at boot time, but these are generally not necessary since the StarterWare bootloader will boot very quickly and apply its own configuration immediately. The following screenshot shows the typical settings that should be specified to generate the bootloader AIS file. Simply click the Generate AIS button to create the AIS file.

NOTE 
You will typically need to generate the bootloader AIS file only once. That same AIS file can be used with any number of different applications.

Using out2rprc to Create the Application Binary

The out2rprc command line utility is used to generate the application binary image. This tool strips out the initialized sections from the executable file (i.e. *.out) and places them in a compact format that the StarterWare bootloader can understand. Generating this binary file is very simple:

$> out2rprc.exe [application].out [application].bin

The output (bin) file is typically much smaller than the original executable (out) file.

Flashing the Application

Once you have generated both binary images (i.e. the AIS and bin files described above), you are ready to flash these images to the EVM's SPI flash memory. This can be done using the standard serial flasher utility that's included in the tools folder of the standard StarterWare installation:

  1. Set the boot switches for UART2 boot (5:8 = 0011 on EVM)
  2. Run SFH from the command line:
    • $> sfh_OMAP-L138.exe -flash -targetType C6748 [bootloader].ais [application].bin
  3. Power on or reset the EVM

The SFH tool may take several minutes to complete depending on the size of the application. When SFH completes successfully, your application is ready to boot.

NOTE 
The SFH tool automatically adds simple header information to the application binary file. This header tells the bootloader basic information about the application contents, including its total size in bytes.

Booting the Application

After the binary images have been flashed to the EVM, the application is ready to boot. This is as simple as setting the boot switches for SPI0 flash boot (5:8 = 0000 on the EVM) and powering on or resetting the board.

During boot, control passes from the ROM bootloader to the StarterWare bootloader, which configures the system and loads the application. Finally, the bootloader jumps to the application entrypoint. The overall process is summarized in the following diagram.

out2rprc命令行实用程序用于生成应用程序二进制映像。这个工具从可执行文件(即*.out)中去掉初始化的部分,并将它们以StarterWare引导加载程序可以理解的紧凑格式放置。

out文件生成bin文件,并且把没用的部分去掉,只留有用数据

4.编译生成bin文件

CCS编译生成二进制文件方法

"${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd6x" "${CG_TOOL_ROOT}/bin/hex6x" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

其中:ofd6x, hex6x在安装目录下, mkbex4bin在utils目录下(见最后一幅图,ccs 默认安装路劲是c:/ti/...)

如下实例:
"c:/ti/ccsv6/utils/tiobj2bin/tiobj2bin" "hello_DM8148_C67XX.out" "hello_DM8148_C67XX.bin" "c:/ti/ccsv6/tools/compiler/c6000_7.4.8/bin/ofd6x" "c:/ti/ccsv6/tools/compiler/c6000_7.4.8/bin/hex6x" "c:/ti/ccsv6/utils/tiobj2bin/mkhex4bin"

CCS:pre-build stepspost-build steps生成bin文件相关推荐

  1. 在KEIL中生成bin文件的方法

    生成hex文件 KEIL中默认生成的是axf文件. 如果想要生成hex文件,则只需要简单地勾一下: 生成bin文件 要生成bin文件,则需要用到fromelf. Keil自带了一个小工具,可以通过执行 ...

  2. KEIL / MDK生成BIN文件的两种方式

    KEIL / MDK生成BIN文件的两种方式 1 KEIL工程配置入口 点击"魔术棒"图标(Option for Target) 在After Build/Rebuild选项卡中, ...

  3. Keil如何生成bin文件 - 附详细操作图文

    Keil如何生成bin文件 第一步:生成axf输入文件 点击魔术棒"Options for Target" → 单击" Output " → 按下面截图所示配置 ...

  4. 国民单片机通过Keil生成bin文件

    大部分单片机通过Keil生成bin文件的操作如下: Option–Output–Select Folder for Objects找到.axf文件,并且将Name of Executable填入和.b ...

  5. keil5生成bin文件配置方法

    KEIL / MDK生成BIN文件的两种方式 1 KEIL工程配置入口 点击"魔术棒"图标(Option for Target) 在After Build/Rebuild选项卡中, ...

  6. Keil使用 fromelf 生成bin文件

    一.语法格式如下: fromelf    [options]    input_file [options] 选项如下,可以组合使用,两者之间用空格隔开: 二.在Keil中的使用过程 1.配置Outp ...

  7. MDK4 如何生成bin文件

    1.首先打开keil4的Options for Target 'Target1' 2.按照下图进行配置 配置有3种方法: 1.直接添加:  fromelf.exe --bin -o "$L@ ...

  8. keil 生成bin找不到afx文件_【学习笔记】Keil不能正确生成.bin文件的解决办法

    前段时间我写过如何利用CW.IAR和Keil生成image文件,效果还不错,有些用户反馈挺有帮助的,毕竟待项目开发到最后是需要生成image文件用来量产烧写,我们总不至于到最后使用调试下载吧(不过还别 ...

  9. LPC1768生成bin文件夹问题

    问题描述 因为要远程升级,所以要需要生成.bin文件.但是发现生成的是.bin文件夹,里面有两个看不懂的文件,如下图所示: 解决方案 只要在下图所示的地方加上NO_CRP就ok了

最新文章

  1. webpack打包html里面img后src为“[object Module]”问题
  2. 2.3.6 操作系统之进程同步与互斥经典问题(生产者-消费者问题、多生产者-多消费者问题、吸烟者问题、读者-写者问题、哲学家进餐问题)
  3. Centos7修改主机名
  4. DHTML4(select与checkbox应用)
  5. sql语句的一些细节东西学起来还是很费劲的,希望以后注意下。算是经验吧
  6. 中台彻底搞砸了?下一站,小中台大前台
  7. html5 js 手机剪切板,JavaScript+Html5实现按钮复制文字到剪切板功能(手机网页兼容)...
  8. 改善C#公共程序类库质量的10种方法
  9. 【鱼眼镜头5】[中央全向相机畸变模型]:统一相机模型,四阶多项式对统一相机模型进行建模
  10. centos7添加新硬盘并挂载
  11. win10怎么更新显卡驱动_更新Win10设备驱动程序的4种方法,方便实用,你知道几种...
  12. div水平垂直居中方法汇总(共六种)
  13. python不是5的倍数_python – 低于1000的3或5的所有倍数的总和
  14. 查看linux系统显卡型号
  15. ArcGis Server10.2 授权文件教程
  16. ChatGPT提问指令大全
  17. 大一作业HTML网页作业:中华传统文化题材网页设计(纯html+css实现)
  18. 如何使用计算机做海报,用word做的海报步骤_word怎么设计海报
  19. 使用js拖拽盒子移动()
  20. 谷歌地图升级后,地图运行一会儿就卡住的ANR分析及解决方法

热门文章

  1. 直接收藏-超级好用的国内配色网站
  2. QT开发(一)—— 安装QT Creator,创建属于你的Hello QT
  3. PHP引擎php.ini参数优化
  4. 网络流24题-太空飞行计划
  5. P2762 太空飞行计划问题【最大权闭合子图 】
  6. 基于PHP排课和选课系统设计与实现 开题报告
  7. python中plt.legend_matplotlib中plt.legend等的使用方法
  8. 从脚本学python(秋名山车神)
  9. 汉语韵律短语切分方法初探
  10. 冒泡排序和字符串(String)对象及处理字符串的方法