TMS320C6678开发笔记---IBL编译与分析2

9.3节  IBL从I2C启动移植到SPI-NOR启动

  1. 编译器版本:ti_cgt_c6000_7.3.0_setup_win32.exe,下载地址参考1.3.5 编译器工具链下载地址
  2. 编译参考文章《IBL_Build_Burn.doc》自己网上下载

 

9.3.0 编译命令

  1. 运行C:\MinGW\msys\1.0\msys.bat (命令行操作方式与linux基本一致)
  2. 切换到C:\MinGW\msys\1.0\ibl\boot_loader目录下
  3. 编译时将360等软件关闭
  4. 运行以下命令即可
./ IBL_buildibl_6678

9.3.1 拷贝文件

  1. 将C:\ti\mcsdk_2_01_02_06\tools\boot_loader\工程文件拷贝到C:\MinGW\msys\1.0\ibl\boot_loader目录下

9.3.2 修改setupenvMsys.sh文件

C:\MinGW\msys\1.0\ibl\boot_loader\ibl\src\make\setupenvMsys.sh

#!/bin/bash

# Environment setup to be done if using MSYS Bash shell for build

# Specify the base directory of the c6000 compiler with UNIX style path separator
#export C6X_BASE_DIR='"C:/Program Files/Texas Instruments/C6000 Code Generation Tools 7.2.4"'
export C6X_BASE_DIR='"C:/ti/C6000 Code Generation Tools 7.3.0"'

# Specify the base directory of the c6000 compiler in format understandable by the MSYS Bash shell 
#export C6X_BASE_DIR_MSYS=/c/Program\ Files/Texas\ Instruments/C6000\ Code\ Generation\ Tools\ 7\.2\.4
export C6X_BASE_DIR_MSYS=/c/ti/C6000\ Code\ Generation\ Tools\ 7\.3\.0

# Don't modify the below variables. They are derived from the above definitions 
export PATH=$PATH:$C6X_BASE_DIR_MSYS/bin
export TOOLSC6X=$C6X_BASE_DIR
export TOOLSC6XDOS=$C6X_BASE_DIR

9.3.3 修改IBL_buildibl文件

  1. TI官方提供的IBL编译是针对多个平台的,此处将其他平台删除,重命名IBL_buildibl_6678

C:\MinGW\msys\1.0\ibl\boot_loader\ IBL_buildibl_6678

cd ibl/src/make		#此文件产生NOR flash启动的IBL文件
source setupenvMsys.sh
#make clean
make evm_c667x_spi ENDIAN=little I2C_BUS_ADDR=0x51 
#make evm_c6678_i2c ENDIAN=little I2C_BUS_ADDR=0x51 
cp -f ibl_c66x/spiRom.bin ../../../spiRom.bin	//通过nor_write烧写到nor 0地址处即可运行
cp -f ../util/btoccs/b2ccs.exe ../../../b2ccs.exe
cp -f ../util/btoccs/b2i2c.exe ../../../b2i2c.exe
cp -f ../util/btoccs/ccs2bin.exe ../../../ccs2bin.exe
cp -f ../util/bconvert/bconvert64x.exe ../../../bconvert64x.exe
cp -f ../util/romparse/romparse.exe ../../../romparse.exe
cp -f ../util/iblConfig/build/iblConfig.out ../../../iblConfig.out
cp -f ../util/iblConfig/build/input.txt ../../../input.txt
cd ../../../

9.3.4 修改xxx.cmd文件

出现问题:

 

解决问题:修改对应cmd文件的段信息,将对应段大小调大。

C:\MinGW\msys\1.0\ibl\boot_loader\ibl\src\make\ibl_c66x\ibl_common.inc

修改前:

修改后:

9.3.5 增加printf打印信息

  1. 代码增加printf函数后,相应c文件必须包含stdio.h文件,即可打印正常。此处在ibl.h文件中增加stdio.h
  2. 此语句可能导致编译出来的程序变大,导致cmd文件要修改。

9.3.6 添加编译器库头文件

  • 出现问题:
make -C ../util/iblConfig/build EVM=c6678l I2C_MAP_ADDR=0x500
make[3]: Entering directory `/ibl/boot_loader/ibl/src/util/iblConfig/build'
gcc  -c  -O2 -DEVM=c6678l -DI2C_MAP_ADDR=0x500 -I../src  ../src/iblConfig.c -o obj/iblConfig.obj
In file included from ../src/device.h:60,
                 from ../src/iblConfig.c:2:
../src/types.h:56:20: stdint.h: No such file or directory
In file included from ../src/device.h:60,
                 from ../src/iblConfig.c:2:
../src/types.h:60: error: parse error before "int16"
../src/types.h:60: warning: data definition has no type or storage class
../src/types.h:61: error: parse error before "uint16"
../src/types.h:61: warning: data definition has no type or storage class
../src/types.h:63: error: parse error before "int32"
../src/types.h:63: warning: data definition has no type or storage class
../src/types.h:64: error: parse error before "uint32"
../src/types.h:64: warning: data definition has no type or storage class
../src/types.h:66: error: parse error before "char8"
../src/types.h:66: warning: data definition has no type or storage class
../src/types.h:67: error: parse error before "uchar8"
../src/types.h:67: warning: data definition has no type or storage class
  • 解决问题:经验证只有ti_cgt_c6000_7.3.0_setup_win32.exe编译器include中的stdint.h文件拷贝到C:\MinGW\msys\1.0\ibl\boot_loader\ibl\src\util\iblConfig\src即可。

  • 0
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值