完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
本帖最后由 一只耳朵怪 于 2018-6-22 09:53 编辑
我选择用SPI flash来进行boot,可是编译工程的时候提示undefined symbol BlPlatformSPIImageCopy 整个startware包里面找过了都没有这个这个函数的定义。我该怎么做才能解决这个问题? |
|
相关推荐
10个回答
|
|
是编译的哪个工程?
http://processors.wiki.ti.com/index.php/Main_Page Think Over Before Asking. http://www.catb.org/~esr/faqs/smart-questions.html#goal |
|
|
|
lifei639156 发表于 2018-6-21 20:58 StarterWare目录下的bootloader |
|
|
|
工程路径: C:tiOMAPL138_StarterWare_1_10_03_03buildarmv5cgt_ccsomapl138evmOMAPL138bootloader 编译结果:我咋没看到编译信息里提到你说的函数: **** Clean-only build of configuration Debug for project bootloader_armv5_omapl138_evmOMAPL138 **** "C:\ti\ccsv6\utils\bin\gmake" -k clean DEL /F "boot.out" Could Not Find C:tiOMAPL138_StarterWare_1_10_03_03buildarmv5cgt_ccsomapl138evmOMAPL138bootloaderDebugboot.out DEL /F "bl_copy_rprc.pp" "bl_main.pp" "bl_platform.pp" "bl_spi.pp" Could Not Find C:tiOMAPL138_StarterWare_1_10_03_03buildarmv5cgt_ccsomapl138evmOMAPL138bootloaderDebugbl_copy_rprc.pp DEL /F "bl_copy_rprc.obj" "bl_main.obj" "bl_platform.obj" "bl_spi.obj" Could Not Find C:tiOMAPL138_StarterWare_1_10_03_03buildarmv5cgt_ccsomapl138evmOMAPL138bootloaderDebugbl_copy_rprc.obj 'Finished clean' ' ' **** Build Finished **** **** Build of configuration Debug for project bootloader_armv5_omapl138_evmOMAPL138 **** "C:\ti\ccsv6\utils\bin\gmake" -k all 'Building file: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_copy_rprc.c' 'Invoking: TMS470 Compiler' "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv5e -g --define=omapl138 --define=evmOMAPL138 --define=SPI --define=RPRC_IMAGE --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="../../../../../../../include" --include_path="../../../../../../../bootloader/include" --include_path="../../../../../../../bootloader/include/evmOMAPL138" --include_path="../../../../../../../include/hw" --include_path="../../../../../../../include/armv5" --include_path="../../../../../../../include/armv5/omapl138" --include_path="../../../../../../../grlib/include" --include_path="../../../../../../../u***lib/include" --include_path="../../../../../../../ipclite/include" --include_path="../../../../../../../nandlib/include" --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="bl_copy_rprc.pp" "C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_copy_rprc.c" 'Finished building: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_copy_rprc.c' ' ' 'Building file: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_main.c' 'Invoking: TMS470 Compiler' "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv5e -g --define=omapl138 --define=evmOMAPL138 --define=SPI --define=RPRC_IMAGE --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="../../../../../../../include" --include_path="../../../../../../../bootloader/include" --include_path="../../../../../../../bootloader/include/evmOMAPL138" --include_path="../../../../../../../include/hw" --include_path="../../../../../../../include/armv5" --include_path="../../../../../../../include/armv5/omapl138" --include_path="../../../../../../../grlib/include" --include_path="../../../../../../../u***lib/include" --include_path="../../../../../../../ipclite/include" --include_path="../../../../../../../nandlib/include" --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="bl_main.pp" "C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_main.c" 'Finished building: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_main.c' ' ' 'Building file: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/evmOMAPL138/bl_platform.c' 'Invoking: TMS470 Compiler' "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv5e -g --define=omapl138 --define=evmOMAPL138 --define=SPI --define=RPRC_IMAGE --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="../../../../../../../include" --include_path="../../../../../../../bootloader/include" --include_path="../../../../../../../bootloader/include/evmOMAPL138" --include_path="../../../../../../../include/hw" --include_path="../../../../../../../include/armv5" --include_path="../../../../../../../include/armv5/omapl138" --include_path="../../../../../../../grlib/include" --include_path="../../../../../../../u***lib/include" --include_path="../../../../../../../ipclite/include" --include_path="../../../../../../../nandlib/include" --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="bl_platform.pp" "C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/evmOMAPL138/bl_platform.c" 'Finished building: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/evmOMAPL138/bl_platform.c' ' ' 'Building file: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_spi.c' 'Invoking: TMS470 Compiler' "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv5e -g --define=omapl138 --define=evmOMAPL138 --define=SPI --define=RPRC_IMAGE --include_path="C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" --include_path="../../../../../../../include" --include_path="../../../../../../../bootloader/include" --include_path="../../../../../../../bootloader/include/evmOMAPL138" --include_path="../../../../../../../include/hw" --include_path="../../../../../../../include/armv5" --include_path="../../../../../../../include/armv5/omapl138" --include_path="../../../../../../../grlib/include" --include_path="../../../../../../../u***lib/include" --include_path="../../../../../../../ipclite/include" --include_path="../../../../../../../nandlib/include" --diag_warning=225 -me --abi=eabi --code_state=32 --preproc_with_compile --preproc_dependency="bl_spi.pp" "C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_spi.c" 'Finished building: C:/ti/OMAPL138_StarterWare_1_10_03_03/bootloader/src/bl_spi.c' ' ' 'Building target: boot.out' 'Invoking: TMS470 Linker' "C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/bin/armcl" -mv5e -g --define=omapl138 --define=evmOMAPL138 --define=SPI --define=RPRC_IMAGE --diag_warning=225 -me --abi=eabi --code_state=32 -z -m"bootloader_armv5_omapl138_evmOMAPL138.map" --warn_sections -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/lib" -i"C:/ti/ccsv6/tools/compiler/ti-cgt-arm_15.12.1.LTS/include" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/drivers/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/evmOMAPL138/platform/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/system_config/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/ipclib/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/omapl138/u***lib/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/utils/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/grlib/Debug" -i"../../../../../../../binary/armv5/cgt_ccs/nandlib/Debug" --reread_libs --xml_link_info="boot_linkInfo.xml" --rom_model -o "boot.out" "./bl_copy_rprc.obj" "./bl_main.obj" "./bl_platform.obj" "./bl_spi.obj" "../boot.cmd" -l"libc.a" -ldrivers.lib -lutils.lib -lplatform.lib -lsystem_config.lib warning: entry-point symbol other than "_c_int00" specified: "Entry" 'Finished building target: boot.out' ' ' A subdirectory or file ..............binaryarmv5cgt_ccsomapl138evmOMAPL138bootloaderDebug already exists. boot.out 1 file(s) copied. ' ' **** Build Finished **** spi flash copy的函数如下。你的starterware是不是用的别人改过的啊 #if defined(SPI) static unsigned int SPIBootCopy(void) [ BL_SPI_Header spiBootHeader; rprcFileHeader rprcHeader; rprcSectionHeader section; int offset = IMAGE_OFFSET; int sectionCount; /* Spi Initialization */ BL_PLATFORM_SPISetup(); BL_SPI_Configure(); // check magic number and read image size from SPI header SPI_readBytes(&spiBootHeader, &offset, sizeof(spiBootHeader)); if ((spiBootHeader.magicNum != MAGIC_NUM_SF) && (spiBootHeader.magicNum != MAGIC_NUM_GF)) [ UARTPuts("Invalid magic number in boot imagern", -1); BootAbort(); ] // read application image header SPI_readBytes(&rprcHeader, &offset, sizeof(rprcFileHeader)); // check magic number if (rprcHeader.magic != RPRC_MAGIC_NUMBER) [ UARTPuts("Invalid magic number in boot imagern", -1); BootAbort(); ] else if ( 4 < rprcHeader.text_len) [ UARTPuts("WARNING: RPRC Boot image header has larger text section than expected.rn", -1); ] else if ( 4 > rprcHeader.text_len) [ UARTPuts("ERROR: RPRC Boot image header is malformed.rn", -1); BootAbort(); ] /* Get loadable section count */ SPI_readBytes(§ionCount, &offset, 4); /* Skip over any remaining text header */ offset += (rprcHeader.text_len - 4); /* Read entrypoint(s) and copy sections to memory */ while (sectionCount> 0) [ /* Read new section header */ SPI_readBytes(§ion, &offset, sizeof(rprcSectionHeader)); if (section.type == RPRC_RESOURCE) [ /* check that resource has BOOTADDR type (ignore other resources) */ SPI_readBytes(§ion.type, &offset, sizeof(int)); if (section.type == RPRC_BOOTADDR) [ if (entryPoint == 0) entryPoint = section.addr; else if (DspEntryPoint == 0) DspEntryPoint = section.addr; else UARTPuts("Ignoring extra entrypoint in boot imagern", -1); ] /* Skip the rest of the resource section */ offset += section.size - sizeof(int); ] else [ /* Copy section to memory */ SPI_readBytes((void *)section.addr, &offset, section.size); --sectionCount; ] ] return E_PASS; ] http://processors.wiki.ti.com/index.php/Main_Page Think Over Before Asking. http://www.catb.org/~esr/faqs/smart-questions.html#goal |
|
|
|
lifei639156 发表于 2018-6-21 21:31 能不能给我看下你的工程Properties里面的build->C6000 Compiler->Predefined Symbols里面都预定义了什么?? 我这边装的starterware里的工程都不能正常打开 |
|
|
|
小句句63 发表于 2018-6-21 21:42 默认配置: http://processors.wiki.ti.com/index.php/Main_Page Think Over Before Asking. http://www.catb.org/~esr/faqs/smart-questions.html#goal |
|
|
|
终于可以编译通过了。3Q 还有一个问题,我的板子是logicPD的evmOMAPL138,然后我想通过sfh工具烧写程序。将S7的5:8设为了0101,然后已经链接上串口,给板子重新上电还是没收到BOOTME |
|
|
|
小句句63 发表于 2018-6-21 22:14 自己连上仿真器通过寄存器看是不是UART boot模式,主机UART baud rate设的对不对,无非就是这些东西。 http://processors.wiki.ti.com/index.php/Main_Page Think Over Before Asking. http://www.catb.org/~esr/faqs/smart-questions.html#goal |
|
|
|
lifei639156 发表于 2018-6-21 22:25 您好:请问 1.这个startware bootloader 工程就是烧写在arm rom中的bootrom 的源代码吗?如果不是拿这个工程的作用是什么? 2.该工程中的RPRC IMAGE 的magic num是0x43525052,这个跟AIS 的magic num 不一样,就是说该工程不能加载AIS 镜像? 3.看到网上资料说 bootloader包括了 RBL、UBL和u-boot ,请问这些boot函数都是通用的吗?不在乎加载的操作系统镜像是什么?请问哪里可以看这些boot函数源代码? |
|
|
|
q510954672 发表于 2018-6-21 22:44 #1. 这个不是烧写在ROM中的源代码,这是一个二级boot的例子。类似于UBL之类的。它的作用仅仅是一个例子。不是必需的,也可以说不是必要的。我就几乎没看过这个工程。我也很少见别人用这个工程。它应该是结合tools目录下的ti_image和flash_writer来使用的。用ti_image打包你的应用程序成这个bootloader可识别的格式,并用flash_writer写到相应的偏移地址,这样这个bootlaoder才能从这个地址去读image,并解析它。 #2. 这个magic number应该是跟ti_image相关了。 #3. bootloader是个概念,只要是功能上是为了boot,都叫bootloader,RBL只芯片ROM里的bootloader,UBL指user bootloader,可以称之为second bootloader,之所以有UBL存在的必要,因为ROM本身不会去初始化PLL, DDR等,如果代码过大需要放到DDR上,则需要启动运行一个程序来初始化它,再搬移真正的应用代码到相应的位置运行,这个程序除了初始化,和搬代码,一般也不需要其它功能,所以俗称之为second bootloader. 当然在L138上,RBL支持AIS,可以在AIS里传配置给RBL里的初始化函数,UBL也是可以不要的了。 UBOOT则功能上更宽一些了,其主要目的是用来启动Linux,也有其它操作系统也借用UBOOT来启动,其目的不在于启动芯片这个层面了,UBOOT里支持各种接口如UART, 网口,USB等,其本身几经比普通的应用程序都要复杂而强大了。 http://processors.wiki.ti.com/index.php/Main_Page Think Over Before Asking. http://www.catb.org/~esr/faqs/smart-questions.html#goal |
|
|
|
lifei639156 发表于 2018-6-21 22:51 谢谢您 |
|
|
|
只有小组成员才能发言,加入小组>>
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
694 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
605 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1065 浏览 1 评论
757 浏览 0 评论
普中科技F28335开发板每次上电复位后数码管都会显示,如何熄灭它?
529 浏览 1 评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
171浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
133浏览 14评论
在使用3254进行录音的时候出现一个奇怪的现象,右声道有吱吱声,请教一下,是否是什么寄存器设置存在问题?
129浏览 13评论
TLV320芯片内部自带数字滤波功能,请问linein进来的模拟信号是否是先经过ADC的超采样?
126浏览 12评论
GD32F303RCT6配置PA4 ADC引脚,将PA2代替key功能,PA2连接时无法实现预期功能,为什么?
64浏览 10评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-29 07:01 , Processed in 1.074704 second(s), Total 98, Slave 81 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号