展讯平台ARM开发环境介绍

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

2020/1/25ProprietaryandConfidentialInformation12020/1/25ProprietaryandConfidentialInformation2展讯平台ARM开发环境介绍Spreadtrum1/25/20202020/1/25ProprietaryandConfidentialInformation3基本环境创建工程文件工程设置ScatterFile简介AXDDebugger配置Trace32配置培训内容2020/1/25ProprietaryandConfidentialInformation4基本环境芯片的内核ARM7TDMI(无浮点,BigEndian):SC6600I/R/HARM926EJ-S(无浮点,BigEndian):SC6800DADS集成套件——V1.2[Build848]CodeWarriorAXDDebuggerTrace32仿真器2020/1/25ProprietaryandConfidentialInformation5创建工程文件•在CodeWarrior中创建一个工程:在File-New-Project中选择生成•ARM/Thumb可执行代码或者库,如下图所示:2020/1/25ProprietaryandConfidentialInformation6创建工程文件(续1)根据需要向工程中添加文件:2020/1/25ProprietaryandConfidentialInformation7工程设置在[Setting\Target\AccessPath]中设置访问路径(相对路径):2020/1/25ProprietaryandConfidentialInformation8工程设置(续1)设置编译/链接选项:Target-TargetSettings-Post-link:总工程必须设为ARMfromELF,否则不会生成可执行的二进制文件LanguageSettings-…-Processor:ARM7TDMI/ARM926EJ-S(对于SC6800D平台),包括ThumbCCompiler和ARMAssemblerLanguageSettings-…-ByteOrder:BigEndian(各种语言)LanguageSettings-…-ARM/Thumbinterworking:要选中LanguageSettings-…-SoftwareStackCheck:一般也要选中,特别是在调试的时候LanguageSettings-…-EnumContainerAlwaysInt:要选中2020/1/25ProprietaryandConfidentialInformation9工程设置(续2)工程中编译宏的添加:_RTOS必须添加;其它宏请参考样本工程格式:-D”宏名称”,如:-DTRACE32_DEBUG,定义了宏TRACE32_DEBUG2020/1/25ProprietaryandConfidentialInformation10工程设置(续3)链接和映像文件生成:RO/RW分别设置为0x0/0x0400_0000(用于NORFlash版本)入口点设置为0x0配置向量表在入口点位置设置输出文件格式和路径或者使用映像设置文件(ScatterFile)。目前工程设置都使用了ScatterFile2020/1/25ProprietaryandConfidentialInformation11ScatterFile简介;-----------------------------------------------------------;------------------;;sc6800platformscatterfileconfiguration;---Memorymap---;;Ifyoumodifythisfile,pleaseupdatamemorymaptoo.;;;Herewehavetwoloadregionintheconfigfile;;;Thefirstkernelimageusedtobootupthesimplestplatform;;Theseconduserimageusedtohaveapplicationsuserdefined.;;-----------------------------------------------------------;------------------;LOAD_KERNEL_IMAGE0x00x200000;;{;ReadOnlyregion;;-----------------------------------------------------------;------------------;EXEC_KERNEL_IMAGE+00x200000;(10M-16K)bytes;;RORegionfor;{;Code,RW,and;tx_illdb.o(Init,+First);constdata.;__main.o(+RO);;*(Region$$Table);Tablemust;*(ZISection$$Table);liesonroot;.any(+RO);region;};;;;;-----------------------------------------------------------;------------------;;MMU_TABLE0x002000000x4000;16Kbytes;;{;formmutable;;ifyouwantmodifythisaddress,pleasemodifymmu.c;;;indrv_sc6800.mcp.;;;};;2020/1/25ProprietaryandConfidentialInformation12ScatterFile简介(续1);-----------------------------------------------------------;------------------;;0x00D00000---0x02000000;ReadWriteregion;;-----------------------------------------------------------;------------------;RAM_RW0x00D000000x12EC000;;{;;*(+RW,+ZI);;};;;-----------------------------------------------------------;------------------;;RAM_RESERVED0x01FEC0000x0;Reservedfor;;{;otherapplications;;;;;};;;-----------------------------------------------------------;------------------;SYS_STACK0x01FEC0000x10000;64Kbytes;{;forthestacks;;inmem_cfg_xxx.cfile;;*(SYS_STACK_AREA);;};;2020/1/25ProprietaryandConfidentialInformation13ScatterFile简介(续2);-----------------------------------------------------------;------------------;;;InternalRAM;;-----------------------------------------------------------;------------------;IRAM_INT10x400040000x0D00;;;Besurenotconflictwithfiqhandlerregion;;{;;;//threadxregion;;tx_ti.o(+RW,+ZI);;tx_ts.o(+RO,+RW,+ZI);;tx_deepsleep.o(+RO,+RW,+ZI);;;;;//changefrequency;;chng_freq_asm.o(+RO,+RW,+ZI);;};;;;;;RAM_MIDI_SCLIB_RO0x400050000x00002E00;;{;;;midi_sc_api.o(MIDI_SCLIB_RO_AREA);;};;;;RAM_MIDI_SCLIB_RW0x400080000x4700;;{;;;midi_sc_api.o(MIDI_SCLIB_RW_AREA,+First);;;midi_sc_api.o(MIDI_SCLIB_CON_AREA);;};;};;;-----------------------------------------------------------;------------------;;2020/1/25ProprietaryandConfidentialInformation14ScatterFile简介(续3);-----------------------------------------------------------;------------------;;USERimageregion;;Becarefullytoputyourcodeinthisimage;;Causeitcan'tbecalledwhenstartup;;-----------------------------------------------------------;------------------;LOAD_USER_IMAGE0x002040000x00AFC000;;{;;EXEC_USER_IMAGE+0x00x00400000;;{;;*ps.a(+RO);;*tcpip.a(+RO);;*char_lib.a(+RO);;*L4.a(+RO);;*sim.a(+RO);;*bt_pal_csr.a(+RO);;*libcrypto.a(+RO);;*aac_6800.a(+RO);;*midi_sb2m.a(+RO);;*midi64_6800.a(+RO);;*mmi_gui.a(+RO);;};;;;2020/1/25ProprietaryandConfidentialInformation15ScatterFile简介(续4)EXEC_USER_IMAGE_1+0x00x00400000;;{;;*mmi_app_cstar_dvb.a(+RO);;};;;;EXEC_USER_IMAGE_2+0x00x002FC000;;{;;*CmsCommon_6800.a(+RO);;*CmsBrowser_6800.a(+RO);;};;};;;-----------------------------------------------------------;------------------;2020/1/25ProprietaryandConfidentialInformation16AXDDebugger配置选择目标环境ARMulator.dll•配置处理器ARM7TDMI/ARM926EJ-S(SC6800D平台)•选择时钟Real-Time•选择字节顺序BigEndian•浮点协处理器NO_FPU装入AXF格式的目标文件以及存储器数据文件(如果有)进行跟踪调试分析,注意memory文件的起始地址详细内容请参考使用AXD工具专门调试文档2020/1/25ProprietaryandConfidentialInformation18欢迎您提出宝贵意见和建议!

1 / 17
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功