打印

Keil 4.74下编译FX3 工程

[复制链接]
1198|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
zengweitotty|  楼主 | 2015-7-20 10:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 zengweitotty 于 2015-7-20 10:05 编辑

1. FX3 SDK main components.
User firmware Libraries
ThreadX RTOS (cyu3threadx.a)
FX3 API Library (cyfxapi.a)
Serial Peripheral API Library (cyu3lpp.a)
Storage API Library (cyu3sport.a)
MIPI CSI-2 API Library (cyu3mipicsi.a)
Take the example firmware lowpowertest debug reversion for the test, need link following library.
libcyu3lpp.a libcyfxapi.a libcyu3threadx libc.a libgcc.a
-lcyu3lpp -lcyfxapi -lcyu3threadx -lc -lgcc
While the search path will be:
-L"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\lib\gcc\arm-none-eabi\4.8.1"
-L"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\arm-none-eabi\lib" -L"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\fw_lib\1_3_3\fx3_debug"
Link script will be fx3.ld for 512KB SRAM.
From fx3 initialization block, could understand the fx3 entry point is CyU3PFirmwareEntry() function, so need manually assign entry point by follow linker command.
--entry,CyU3PFirmwareEntry

So Keil 4.74 IDE Linker page needs to configure as following pic.


2. Specific GNU cross compile tool path.
Under tap project->Manage Project Items… -> Folders/Extensions
Point to use GCC cross compile tools, please fill GNU-Tool-Prefix “arm-none-eabi-” while GNU-Tool Folder “C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\ARM GCC\”

3. C compile tap page configure.
Predefined symbols __CYU3P_TX__=1.
Include Path: ..\inc
Without optimizations

4. Specific output file type.
Under tap page Project->Options for target fx3->Output
Need create object file with debug information.

5. After build elf file, execute user command.
After precompiler, compiler and linker could get object file fx3.elf, need to convert to img file for download.
So need execute user command:
"C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\util\elf2img\elf2img.exe" -i fx3.elf -o fx3.img –v

Summary
After configuration, click Build button will show build output log like following pic.

Keil 4.74 for FX3.pdf

276.44 KB

沙发
关小波522| | 2015-7-21 09:11 | 只看该作者
USB3.0好高端啊

使用特权

评论回复
板凳
USB-Emily| | 2015-8-4 10:16 | 只看该作者
谢谢楼主分享

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

26

主题

61

帖子

19

粉丝