展讯 build环境使用手册
展讯SC7731 软件架构及编译介绍V1.1
.8
客户需要修改配置目录结构
主要修改配置的目录有device/sprd,以及vendor/sprd目录 整个4.4代码需要经常维护及修改的目录: device/sprd ├── scx35_sp7731gea │ ├── Android.mk │ ├── CleanSpec.mk │ ├── BoardConfig.mk │ ├── AndroidProducts.mk │ ├── scx35_sp7731geacuccspecBplus_UUI_dt.mk │ ├── scx35_sp7731geaplus_dt.mk │ ├── init.board.rc │ ├── init.recovery.board.rc │ ├── system.prop │ ├── vendorsetup.sh │ ├── overlay/ │ ├── audio_params/ │ └── modem_bins/ └── scx35_sp77xxxx vendor/sprd ├── proprietories │ └──scx35 │ └── system/... ├── partner │ ├── brcm │ └── ... -- 板级开发包和产品定义 -- 板级目录例1 -- 这个目录里可能需要包含编译板级的库和应用 -- Android板级配置文件 -- 定义PRODUCT_MAKEFILES的产品列表 -- 产品定义例1 -- 产品定义例2 -- 板级启动脚本 -- 板级全局属性定义 -- 编译辅助 -- 系统和应用配置参数产品目录例1 -- 音频配置参数产品目录 -- 板级私有的库等等,如果必要 -- 板级目录例2 -- 给客户的闭源包,内外都可见 -- 按安装目录组织的闭源文件 -- 主要由三方维护的模块 -- 第三方模块code -- 客户可以加自己的应用和模块等在这里
展讯 build环境使用手册
展讯 build环境使用手册一、介绍1.1 前言在展讯(Exynos)处理器的开发环境中,build环境是非常重要的一环。
为了保证开发工作的顺利进行,展讯提供了一套完整的build环境使用手册,以帮助开发人员快速搭建和使用展讯的开发环境。
1.2 目的本文旨在介绍展讯build环境的搭建和使用方法,以帮助开发人员快速上手展讯处理器的开发工作。
二、环境搭建2.1 硬件要求在搭建展讯build环境前,首先需要满足一定的硬件要求。
建议使用高性能的计算机,配置至少16GB内存和500GB磁盘空间,以保证编译过程的顺利进行。
2.2 软件要求展讯build环境需要使用特定版本的操作系统和编译工具。
目前推荐使用Ubuntu 18.04 LTS操作系统,并安装必要的开发工具和编译器,如gcc、make等。
2.3 下载代码在搭建build环境之前,需要从展讯官方全球信息湾上下载最新的代码库。
开发人员可以通过Git工具将展讯的开发代码库克隆到本地,并根据需要切换到特定的分支或标签。
2.4 编译工具链展讯build环境需要使用特定的ARM交叉编译工具链,用于编译展讯处理器的应用程序和驱动程序。
开发人员可以从展讯官方全球信息湾上下载最新的编译工具链,并按照官方文档进行安装和配置。
2.5 系统配置在搭建build环境后,还需要进行一些系统配置工作,如设置环境变量、安装必要的依赖库等。
展讯官方文档中提供了详细的配置方法,开发人员可以根据文档进行操作。
三、使用方法3.1 编译应用程序一旦搭建好build环境,开发人员就可以开始编译展讯处理器的应用程序了。
通过使用展讯提供的Makefile和编译工具链,开发人员可以很方便地将自己的应用程序编译成可执行文件,并在展讯处理器上运行。
3.2 编译内核除了应用程序外,展讯的build环境还可以用于编译展讯处理器的内核。
开发人员可以从展讯官方全球信息湾上下载最新的内核代码,并使用展讯提供的配置文件和编译工具链进行内核的编译和定制。
展讯开发环境配置
Make/Build环境使用手册Version:0.1.52009-10-21.spreadtrum.修订历史重要声明声明本文档中的任何内容受《中华人民XX国著作权法》的保护,所有 © 2006, 展讯通信XX,保留所有权利,但注明引用其他方的内容除外。
商标声明本文档中展讯通信XX的产品的所有商标是展讯通信XX专有,但注明属于其他公司拥有的商标除外。
在提及其他公司及其产品时将使用各自公司所拥有的商标,这种使用的目的仅限于引用。
不作保证声明展讯通信XX不对此文档中的任何内容作任何明示或暗示的陈述或保证,而且不对特定目的的适销性及适用性或者任何间接、特殊或连带的损失承担任何责任。
XX声明本文档(包括任何附件)包含的信息是XX信息。
接收人了解其获得的本文档是XX的,除用于规定的目的外不得用于任何目的,也不得将本文档泄露给任何第三方。
目录1说明62运行环境72.1编译环境及安装相关软件73编译架构84目录结构及关键脚本114.1make/build环境的关键目录结构114.2关键脚本124.2.1Makefile.rules124.2.2Makefile.modules134.2.3Makefile.third-party134.2.4Makefile.verify134.2.5Makefile134.2.6make.bat135基本命令145.1帮助145.2编译参数中 projectname 与项目编译脚本对应关系14 5.3编译整个项目[update]145.4重新编译整个项目[new]155.5清除所有编译结果[cleanall]155.6清除模块编译结果155.7编译模块155.8生成可执行文件155.9编译FDL/bootloader155.10编译NV155.11编译Resource165.12编译手机模拟器工程176其它命令206.1编译Logel工具206.2pclint 扫描206.3编译完成net send提醒功能206.4编译命令的简写206.5多线程编译206.6分布式编译216.7编译出错暂停216.8特别提醒217模块修改及项目定制227.1模块修改227.1.1模块目录结构调整227.1.2添加或删除文件227.1.3修改编译选项227.1.4新增模块237.2项目定制237.2.1创建全新的项目编译脚本237.2.2复制方式创建项目编译脚本237.2.3添加或删除模块247.2.4修改项目编译选项247.2.5客户发布及使用258第三方编译选项说明269相关使用技巧279.1查看log文件279.2makefile 编译过程中报错: No rule to make target ` XXX ', needed by `yyy'.27 9.3Makefile 中全局变量和转义宏的区分279.4Source Insight和ClearCase配置279.5鼠标右键命令行快捷方式设置309.6DOS下输入命令时用Tab键进行命令自动填充301 说明Make/Build环境中实现了项目开发和维护使用的GNU标准应用脚本,基于这些应用脚本和相关make工具,Make/Build环境可以完成项目全部代码的编译和二进制文件的生成,对其他一些需要的文件也可以在Make/Build环境中通过编译的方式产生,如fdl,bootloader,nv_parameter,resource等。
展讯IMEI写号使用说明书04
深圳六虹科技有限公司展讯平台扫描作业说明书该IMEI工具启动后,在主界面上方从左至右有三个下拉框可供设置,左边的Port可以设置写IMEI时所使用的串口。
中间的是设置写IMEI的方式,一种为META模式,需要database文件,该文件必须与手机软件一一对应;另一种为AT模式,不需要database文件。
默认为AT模式,可以写所有MTK的手机。
右边为选择写双卡双待手机的IMEI号码,单卡和双卡单待请选择IMEI1,因为这些手机只有一个IMEI号码,选其他会出错。
双卡双待手机可选的有IMEI1;IMEI2;IMEI1&IMEI2;IMEI1=IMEI2。
不同的选择会有不同的效果:●IMEI1:写单待手机的IMEI或者只写双待手机的第一个IMEI号码。
●IMEI2:只写双待手机的第二个IMEI号码。
●IMEI1&IMEI2:写双待手机的两个IMEI号码,需要输入两个IMEI号码。
先输入第一个IMEI号码,然后再输入第二个IMEI号码,程序将两个IMEI写入手机。
●IMEI1=IMEI2:写双待手机的两个IMEI号码,但是只需要写输入一个IMEI号码,程序将两个IMEI号码设置为相同,然后写入手机。
注意:当双待手机写入的两个IMEI相同时,则在*#06#界面只会显示一个IMEI号码。
当两个IMEI不同时,才会显示两个不同的IMEI号码。
单待手机请在Dual IMEI选择IMEI1,双待手机如果需要显示两个不同的IMEI,选择“IMEI1&IMEI2”,并在写IMEI时输入两个不同的IMEI,这样手机会显示两个不同的IMEI。
双待手机如果只需要显示一个IMEI,请选择“IMEI1=IMEI2”,这样写IMEI时只需要输入一个IMEI并且手机只会显示一个IMEI。
1.工具启动后主界面如下:启动后默认为AT模式。
2.请选择串口。
3.选择模式,默认为AT模式,选择META模式后如图:4.选择database文件。
展讯MTK6580环境搭建以及编译
针对ubuntu12.04 64位展讯1.sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-devlibc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos libxml2-utils xsltproc2.安装JDK6并修改环境变量MTK1. 在展讯的环境基础上需要修改JDK:2. 展讯要求是JDK6而MTK要求OPENJDK7,下面是openjdk安装:sudo apt-get install openjdk-7-jre (这一步不确定要不要,最好装一下sudo apt-get -y install openjdk-7-jdkJDK 安装路径默认安装在/usr/lib/jvm修改环境变量sudo gedit /etc/profileexport JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64export JRE_HOME=${JAVA_HOME}/jreexport CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/libexport PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin:$PATH3.编译source build/envsetup.shlunchmake –jX 2>&1 | tee build.logOPENJDK和jdk的切换1.安装了openjdk 在安装jdk,正常安装JDK并修改环境变量(注意原来的openjdk环境变量不要删除,用#注释掉)2.打如下命令(注意/usr/lib/jvm/jdk1.6.0/bin/java是你安装JDK的目录)sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0/bin/java 300sudo update-alternatives --install /usr/bin/javac javac/usr/lib/jvm/jdk1.6.0/bin/javac 3003.选择JDK环境sudo update-alternatives --config javasudo update-alternatives --config javac4.根据需要修改/etc/profile环境变量并重启sudo gedit /etc/profile。
展讯6820_MocorDroid杂项客户化配置
MocorDroid杂项客户化配置MocorDroid杂项客户化配置V ersion: 1.0.0DocCode:SW-MOCORSMART-UG-2011-0007Date: 2012-01-18www.spread MocorDroid 杂项客户化配置-i -Revision HistoryContentsChapter 1 介绍 (5)1.1 简介 (5)1.2 相关文档 (5)Chapter 2 杂项配置概要 (6)2.1 文件路径 (6)2.2 文件列表 (6)Chapter 3 配置build.sh (8)3.1 文件描述 (8)3.2 用户指南 (8)3.2.1 定义ANDROID_3RDPARTY_KERNEL_CONFIG (8)3.2.2 定义PRODUCT_COPY_FILES (8)Chapter 4 配置BoardConfig.mk (9)4.1 文件描述 (9)4.2 用户指南 (9)Chapter 5 配置AndroidBoard.mk (11)5.1 文件描述 (11)5.2 用户指南 (11)5.2.1 编译kl 文件 (11)5.2.2 编译kcm 文件 (11)5.2.3 编译rc 文件 (12)5.2.4 编译vold.fstab (12)5.2.5 编译rc.local (13)5.2.6 编译audio_para (13)Chapter 6 配置sprd_apps.mk (14)6.1 文件描述 (14)6.2 用户指南 (14)-ii-Chapter 7 配置apns-conf.xml (15)7.1 文件描述 (15)7.2 用户指南 (15)Chapter 8 配置init.sp6820a.rc (16)8.1 文件描述 (16)8.2 用户指南 (16)8.2.1 设定log level (16)8.2.2 设置工程模式的按键 (16)Chapter 9 配置rc.loacal (17)9.1 文件描述 (17)9.2 用户指南 (17)Chapter 10 配置sprd-keypad.kl (18)10.1 文件描述 (18)10.2 用户指南 (18)Chapter 11 配置system.prop (19)11.1 文件描述 (19)11.2 用户指南 (19)Chapter 12 配置vold.fstab (20)12.1 文件描述 (20)12.2 用户指南 (20)-iii-MocorDroid 杂项客户化配置5Chapter 1 介绍1.1 简介本文档介绍展讯Android 平台客户配置杂项文件部分。
展讯6820平台开发介绍
11/09/11
保密信息
.4
环境配置
• Adb(Android Debug Bridge)
在ubuntu中配置adb 步骤1,把adb拷贝到/usr/bin目录下 $sudo cp /home/apuser/<Android_Project>/out/host/linux-x86/bin/adb/ usr/bin 步骤2,更改adb的权限 $sudo chmod a+x /usr/bin/adb 步骤3,创建spreadtrum usb 专有 VID $[ -d ~/.android ] || mkdir ~/.android $echo 0x1782 >~/.android/adb_usb.ini 在windows中配置adb 步骤1,在C:\Documents and Settings\<User name>\目录下创建文件.android 步骤2,把adb_usb.ini放在文件夹.android中
[cts]
[customize] [dalvik] [development] [external] [frameworks] [hardware] [kernel] [mk] [out] [packages] [prebuilt] [sdk] [system] [u-boot] [vendor]
Android兼容性测试套件
11/09/11
保密信息
客户化工程配置
• 3rdparty目录结构:
├── app-----------------------------------------------------------------模块名:app
│ ├── app6810--------------------------------------------------------模块配置:app6810
展讯android平台基础
展讯android软件平台基础(for SC8810)目录1.Android基本概念 (2)2.开发环境搭建 (4)安装ubuntu操作系统 (4)设定安装源 (4)安装开发包 (5)展开IDH包 (5)3.代码目录结构 (6)4.编译方法和系统 (7)5.烧录image方法 (8)传统烧录方法 (8)fastboot烧录方法 (8)6.adb (9)7.Log系统 (11)8.Q&A (12)1.Android基本概念Software stack for mobile devices, including operating system, middleware and key applications.2.开发环境搭建安装ubuntu操作系统设定安装源$ sudo vi /etc/apt/sources.listubuntu-10.4:deb /ubuntu/ lucid main multiverse restricted universedeb /ubuntu/ lucid-backports main multiverse restricted universedeb /ubuntu/ lucid-proposed main multiverse restricted universedeb /ubuntu/ lucid-security main multiverse restricted universedeb /ubuntu/ lucid-updates main multiverse restricted universedeb-src /ubuntu/ lucid main multiverse restricted universedeb-src /ubuntu/ lucid-backports main multiverse restricted universe deb-src /ubuntu/ lucid-proposed main multiverse restricted universe deb-src /ubuntu/ lucid-security main multiverse restricted universedeb-src /ubuntu/ lucid-updates main multiverse restricted universe ubuntu-10.10:deb /ubuntu maverick partnerdeb-src /ubuntu maverick partnerdeb /ubuntu maverick maindeb-src /ubuntu maverick maindeb /ubuntu/ maverick main restricted universe multiversedeb /ubuntu/ maverick-backports restricted universe multiversedeb /ubuntu/ maverick-proposed main restricted universe multiverse deb /ubuntu/ maverick-security main restricted universe multiversedeb /ubuntu/ maverick-updates main restricted universe multiversedeb-src /ubuntu/ maverick main restricted universe multiversedeb-src /ubuntu/ maverick-backports main restricted universe multiverse deb-src /ubuntu/ maverick-proposed main restricted universe multiverse deb-src /ubuntu/ maverick-security main restricted universe multiverse deb-src /ubuntu/ maverick-updates main restricted universe multiverse安装开发包更新了安装源之后,需要执行下面的命令安装必要的包$ sudo apt-get update$ sudo apt-get upgrade$ sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind eclipse vim ssh git libodbcinstq1c2 odbcinst1debian1展开IDH包3.代码目录结构最外层目录android:-- Makefile (全局的Makefile,里面只包含build/core/main.mk)-- 3rdparty (包含编译脚本,工具,第三方driver, hal, app,binary)-- bionic (bionic C库,bionic含义为仿生,这里面是一些基础的库的源代码)-- bootable (启动引导相关代码)-- build (存放系统编译规则及generic等基础开发包配置、脚本工具)-- cts (Android兼容性测试套件标准)-- dalvik (Dalvik JA VA虚拟机)-- development (应用程序开发相关,需要的模板和工具)-- device (设备厂商的示例文件)-- external (Android使用的一些开源的模组)-- frameworks (核心框架层——java及C++语言)-- hardware (部分厂家开源的硬解适配层HAL代码)-- kernel (Linux内核)-- ndk (一系列工具合集,帮助开发者快速开发C/C++动态库)-- out (编译完成后的代码输出与此目录)-- packages (应用程序包)-- prebuilt (x86和arm架构下预编译的一些资源)-- sdk (Android sdk及模拟器)-- system (Android底层文件系统库、应用及组件——C语言)-- u-boot (Bootloader,引导加载器)-- vendor (厂商定制代码)4.编译方法和系统$ cd 3rdparty/$ ./build.products.sh00). sp8810gaExample:*1* ./build.products.sh sp8810ga2 ./build.products.sh s p8810ga [subcmd]3 jobs=16 ./build.products.sh sp8810ga++++++++++++++++++++++++++ subcmd list ++++++++++++++++++++++++++prebuild [dirname] -- 编译android工程时脚本会将第3方chip的修改动态patch到android工程中lbuild [dirname] [clean] -- 调用第3方build.sh脚本中的function my_local_build函数(主要用来编译ko)nbuild -- 只编译标准androidfprebuild -- 快速build需要的前提配置自动设置,同时完成一次彻底编译(建议使用)fbuild -- 快速build,不编译3rdparty下的ko(一旦repo sync,务必重新执行fprebuild)fbuild2 -- 快速build,在fbuild基础上,再额外编译3rdparty下的文件(建议使用)clean -- 清除第3方对android的所有修改,恢复到原始的android版本,可以认为是unpatch.diff [dirname] -- 比较第3方代码和android标准代码的差异,即生成patchdiff2 [dirname] -- 用beyondcompare比较第3方代码和android标准代码的差异install [dirname] -- 将第3方编译结果安装到out/target/product/xxxx/system/sps*目录install2 [outdir ] -- 将product产品编译结果安装到outdir目录(用来在批量编译产品时完成自动拷贝)ramdisk -- 编译product产品对应的ramdisk.img,将init.3rdparty.rc修改内容添加到ramdisk.imgrecovery -- 编译product产品对应的ramdisk-recovery.img和recovery.img system -- 重新打包system文件夹生成system.imguserdata -- 重新打包data文件夹生成userdata.imgbootimage -- 生成boot.img和linux.bin内核文件bootimage2 -- 先删除.config,然后编译整个内核,最后生成boot.img和linux.bin 内核文件5.烧录image方法编译之后产生的image目录在:Out/target/product/hsdroid/sps.images.sp8810ga/可以看到,idh包编译出来的需要烧录的image是:fdl2.bin, u-boot-spl-16k.bin, u-boot.bin,boot.img, system.img, userdata.img, recovery.img另外,展讯还会release modem image:Vmjaluna.img, DSP.bin, nvitem.bin, Modem.bin传统烧录方法使用research downloader, upgrade downloader, factory downloader, 烧录上面所有的image。
展锐 UIS8910DM编程指南 说明书
UIS8910DM Programming Guide声明Statement本文件所含数据和信息都属于紫光展锐所有的机密信息,紫光展锐保留所有相关权利。
本文件仅为信息参考之目的提供,不包含任何明示或默示的知识产权许可,也不表示有任何明示或默示的保证,包括但不限于满足任何特殊目的、不侵权或性能。
当您接受这份文件时,即表示您同意本文件中内容和信息属于紫光展锐机密信息,且同意在未获得紫光展锐书面同意前,不使用或复制本文件的整体或部分,也不向任何其他方披露本文件内容。
紫光展锐有权在未经事先通知的情况下,在任何时候对本文件做任何修改。
紫光展锐对本文件所含数据和信息不做任何保证,在任何情况下,紫光展锐均不负责任何与本文件相关的直接或间接的、任何伤害或损失。
All data and information contained in or disclosed by this document is confidential and proprietary information of UNISOC and all rights therein are expressly reserved. This document is provided for reference purpose, no license (express or implied, by estoppel or otherwise) to any intellectual property rights is granted by this document, and no express and implied warranties, including butwithout limitation, the implied warranties of fitness for any particular purpose, and non-infringement, as well as any performance. By accepting thismaterial, the recipient agrees that the material and the information contained therein is to be held in confidence and in trust and will not be used, copied, reproduced in whole or in part, nor its contents revealed in any manner to others without the express written permission of UNISOC. UNISOC may make any changes at any time without prior notice. Although every reasonable effort is made to present current and accurate information, UNISOC makes no guarantees of any kind with respect to the matters addressed in this document. In no event shall UNISOC be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content.CONTENTS: 1Getting Start11.1Overview (1)1.2Linux Build (2)1.3Windows Build (3)1.4Kconfig (4)1.5menuconfig (4)1.6guiconfig (5)2Architecture72.1Overview (7)2.2Bootloader (10)2.3HAL(Hardware Abstract Layer) (11)2.4OSI(OS Interface) (11)2.5libc (11)2.6Driver (11)2.7File System (12)2.8IPC/RPC (12)2.9CFW(Communication FrameWork) (12)2.10PS Interface (12)2.11TCP/IP (12)2.12COAP/LWM2M/ (12)2.13AT Receiver (12)2.14Open CPU (13)3Flash Layout153.1Overview (15)3.2Bootloader (16)3.3Application (16)3.4System FS (17)3.5Modem FS (17)3.6Factory FS (17)3.7Configurations (17)3.8Frequently Overwrite Small File (18)4Kernel(OS Interface)19i4.1Overview (20)4.2Thread (20)4.3osiEvent_t (20)4.4Thread Callback (21)4.5Thread Notify (22)4.6Semaphore (22)4.7Mutex (22)4.8Work and Work Queue (22)4.9Interrupt Latency (23)4.10ISR Programming (23)4.11Timer (24)4.12Elapsed Timer (26)4.13Power management (26)4.14Cache (28)4.15atomic (28)4.16Floating Point (28)4.17FreeRTOS Integration (29)4.18API Reference (30)5OSI Libraries735.1Overview (73)5.2Event Hub and Event Dispatch (73)5.3FIFO (74)5.4Value String Map (74)5.5Memory Recycler (74)5.6Generic List (76)5.7Event Hub and Dispatch API Reference (76)5.8FIFO API Reference (80)5.9Value String Map API Reference (83)5.10Memory Recycler API Reference (89)5.11Generic List API Reference (91)6C++Language936.1Compiling Options (93)6.2Global Object (93)6.3Static Object (94)7Clock Management957.1clk_sys Callback (96)7.2Fix clk_sys Constrain (96)7.3Hardware Minimal Clock Constrain (96)7.4Software Minimal Clock Constrain (96)7.5Hardware External RAM Access Constrain (97)7.6Hardware Clock Constrain and PM Source (97)7.7Reapply Constrains (97)7.8Thread Safe (98)7.9API Reference (98)8Memory Management103 ii8.1Overview (103)8.2Pool Type (104)8.3Reference Count (104)8.4Pattern Check (104)8.5Alignment (104)8.6Thread Safe and ISR (105)8.7Limitation (105)8.8API Reference (105)9Trace1139.1Overview (113)9.2Format String (113)9.3Trace Level (114)9.4Trace Tag (114)9.5Trace ID (115)9.6Basic and Extended (115)9.7API Reference (116)10SFFS(Small Flash File System)11910.1Overview (119)10.2Flash Block Device (120)10.3SFFS Blocks (121)10.4Power Failure Safe (121)10.5vfs_sfile_write (121)10.6Quick Format (122)10.7Memory Usage (122)10.8EBUSY (122)10.9Flash Block Device API Reference (123)10.10SFFS VFS API Reference (125)10.11SFFS API Reference (126)11CFW Event Dispatch13711.1Overview (137)11.2UTI Management (140)11.3Thread Safe (140)11.4API Reference (140)12IPC(Inter-Processor Communication)14312.1Overview (143)12.2Shared Registers (144)12.3Shared Memory Layout (144)12.4Thread Safe (145)12.5API Reference (145)13PS IPC Interface15313.1Overview (153)13.2Thread Safe (153)13.3API Reference (153)iii14RPC(Remote Procedure Call)15714.1Overview (158)14.2Function Call (160)14.3Event (160)14.4Code Generation (161)14.5XML by Example (162)14.6Event Router (166)14.7Dead Lock (166)14.8Command Queue (166)14.9API Reference (166)15AT Receiver Engine17315.1Overview (173)15.2AT Engine Process Flow (174)15.3AT Settings (176)15.4AT Command Line Parsing (176)15.5AT Command Parameter (177)15.6AT Response (177)15.7Add an AT command (178)15.8AT Command Asynchronous Context (179)15.9AT and SIM (179)15.10Speech Call (179)15.11Memory Free Later (180)15.12AT Engine API Reference (180)15.13AT Parameter API Reference (200)15.14AT Response API Reference (212)16Firmware Update21916.1Firmware Update in Application (219)16.2Firmware Update in Bootloader (220)16.3FUPDATE_RESULT_CANNT_START (220)16.4Files for Firmware Update (220)16.5API Reference (221)17IOMUX22717.1Overview (227)17.2API Reference (228)18Hardware Spinlock22918.1Overview (229)18.2API Reference (229)19GPIO23119.1Overview (231)19.2API Reference (231)20ADI bus for PMIC23520.1Overview (235)20.2API Reference (235)iv21PMIC Interrupt23721.1Overview (237)21.2API Reference (237)22SPI Flash24122.1Overview (241)22.2API Reference (241)23RTC and Alarm24723.1Overview (247)23.2API Reference (247)24Uart Driver25324.1Overview (253)24.2API Reference (253)25Axidma Driver26125.1Overview (261)25.2API Reference (261)26PMIC ADC26526.1Overview (265)26.2API Reference (265)27I2c Driver26927.1Overview (269)27.2API Reference (269)28IFC27328.1Overview (273)28.2Auto Mode (274)28.3Interrupt (274)28.4Channels (274)28.5Cache Coherence (275)28.6Thread Safe (275)28.7API Reference (275)29PPP Guides27929.1Linux (279)29.2Windows (281)30Coding Style Guide28330.1Copyright Header (284)30.2Indent (284)30.3Line Length (284)30.4File Name Convention (284)30.5Function Name Convention (284)30.6Static Functions (285)30.7Local Variable Name Convention (285)30.8Global Variable Name Convention (285)v30.9Struct Name Convention (285)30.10enum (286)30.11C++Class,Method and Member Name (286)30.12stdint,stdbool (287)30.13const,void* (287)30.14Object Oriented (287)30.15extern (287)30.16Global Variables (288)30.17Public Header (288)30.18extern“C” (288)30.19Parameter Checking (288)30.20Return bool or int (289)30.21Warning (289)31Indices and tables291 Index293viCHAPTERONEGETTING STARTContents•Overview•Linux Build–System Requirement–Build–CMake Options–Directory Convention•Windows Build–System Requirement–Build Under cmd.exe–Build Under msys2/MINGW/Cygwin/Cygwin64•Kconfig•menuconfig•guiconfig1.1OverviewThis SDK can be built on Windows and Linux.Most of the tools used during building the SDK are included in the SDK,including both Linux version and Windows ly:•GCC•cmake•ninja•nanopb1Programming Guide Documentation•Python3(Linux build will use the system version)•gperf1.2Linux Build1.2.1System RequirementOnly Ubuntu16.04is supported.The following packages are needed:$sudo apt install build-essential python3python3-tk qtbase5-dev1.2.2Build$.tools/launch.sh#select target by numerical index$cout$cmake../..-G Ninja$ninja.tools/launch.sh It will set PATH and several environment variables.Also,it can be called as.tools/ launch.sh<target_name><debug|release>for non-interactive mode.Non-interactive mode is useful in building script.cmake../..-G Ninja This SDK uses CMake as the building system.This step will generate ninja build file.Though CMake can support various generators.Only ninja is support in this SDK.It is only needed to run this step once.Afterward,when there are changes in source codes,CMakeLists.txt, Kconfig or target.config,ninja will invoke re-configuration automatically.ninja This command will build the selected target.In multi-processor system,Ninja will use available CPUs for parallel build.It is not needed to specify parallel job count.ninja clean CMake and ninja can handle dependency very well.In most cases,incremental build is enough.In case to clean build results for a clean build,ninja clean can be called.ninja unittests This SDK supports unit test framework.By default,unit tests are not built.If needed, ninja unittests can be called to build all unit testscout A function defined at.tools/launch.It will create target output directory,if not existed,and change directory to it.croot A function defined at.tools/launch.It will change directory to the root of project.2Chapter1.Getting StartProgramming Guide Documentation 1.2.3CMake OptionsThe supported CMake command line options:-DWITH_WERROR=on Waning is bad.However,-Werror makes development inconvenient.So,-Werror compile option isn’t added at build.When-DWITH_WERROR=on is added in the cmake command line, -Werror compile option will be added.It is recommended to add this option is CI,to make sure all warnings are solved.-DBUILR_REVISION=<revision_name>It defines a string of revision ually,it will be defined as the tag name.When not specified,the name is DEVEL.1.2.4Directory Convention<project_root>/out/<target_name>-<debug|release>Output directory of target.Out-of-source build is followed.That is,during build,there are no any build result will be generated in the source tree.All build result including intermediate build result will be created under the output directory. <project_root>/out/<target_name>-<debug|release>/lib Directory for libraries.<project_root>/out/<target_name>-<debug|release>/hex Directory for elf,map,bin and imagefiles.<project_root>/out/<target_name>-<debug|release>/include Directory for generated headerfiles.<project_root>/out/<target_name>-<debug|release>/rpcgen Sourcefiles generated by rpcgen.py.1.3Windows Build1.3.1System RequirementSupported Windows versions:•Windows7SP1,x64•Windows10,x64•Visual C++Redistributable for Visual Studio2015x86•Visual C++Redistributable for Visual Studio2015x641.3.2Build Under cmd.exe>call tools\l aunch.bat<target_name><debug|release>>cd out\t arget_name>>cmake..\..-G Ninja>ninja1.3.Windows Build3Programming Guide DocumentationIt is very similar to Linux build.tools\launch.bat doesn’t support interactive mode.The<target_name> is necessary,and<debug|release>is optional.When not specified,debug will be used.cmd.exe doesn’t support function as bash.So,cout and croot can’t be used.1.3.3Build Under msys2/MINGW/Cygwin/Cygwin64mintty and bash coming with msys2/MINGW/Cygwin/Cygwin64is more convenient than cmd.exe for inter-active.However,nothing from msys2/MINGW/Cygwin/Cygwin64will be used for building.$.tools/launch.sh#select target by numerical index$cout$cmake../..-G Ninja$ninjaIt is very similar to Linux build.After.tools/launch.sh is called,prebuilts/win32/python3will be added to the beginning of PATH.This python3is Windows native Python3.It it possible that it will affect msys2/Cygwin/Cygwin64 system.1.4KconfigKconfig is used as configuration system.For each target,target/<target_name>/target.config keeps the target configuration.At build,out/ <target_name>-<debug|release>/target.cmake will be generated,and the configurations will be used by CMake.Contrary to Linux build,there are no config.h will be generated.Rather,each module should use CMake configuration_file command to generate headerfile from a template.1.5menuconfigmconf under Linux source tree is great,but can’t run on Windows.Kconfiglib is used.Python script menuconfig can work well on Linux,and Windows cmd.exe.However,it can’t work well under mintty of msys2/Cygwin/Cygwin64.On Linux:$cd<project_root>#assume".tools/launch.sh"is already executed.$menuconfig.pyOn Windows msys2/Cygwin/Cygwin64:$cd<project_root>#assume".tools/launch.sh"is already executed.$tools/menuconfig.bat4Chapter1.Getting StartProgramming Guide DocumentationOn Windows cmd.exe:>cd<project_root>#assume"call tools\launch.bat<target_name>"is already˓→executed.>tools\m enuconfig.batDuring.tools/launch.sh or call tools\launch.bat,KCONFIG_CONFIG will be set to target/<target_name>/target.config.minconfig.py will strip down all default configurations,and only contain configuration value not equal to default value.The strip down version is suitable to keep in revision control.1.6guiconfigguiconfig is a Python script from Kconfiglib.On Linux/msys2/Cygwin/Cygwin64:$cd<project_root>#assume".tools/launch.sh"is already executed.$guiconfig.pyOn Windows cmd.exe:>cd<project_root>#assume"call tools\launch.bat<target_name>"is already˓→executed.>python3tools\g uiconfig.py1.6.guiconfig5Programming Guide Documentation6Chapter1.Getting StartCHAPTERTWOARCHITECTUREContents•Overview•Bootloader•HAL(Hardware Abstract Layer)•OSI(OS Interface)•libc•Driver•File System•IPC/RPC•CFW(Communication FrameWork)•PS Interface•TCP/IP•COAP/LWM2M/...•AT Receiver•Open CPU2.1OverviewThis SDK architecture can support various UNISOC IoT platforms.Currently,the followings are supported:•8955:2G•8908:NB IoT•8909:NB IoT/2G7Programming Guide Documentation•8915:LTE Cat1/2G,eMTC/2GThere are separated AP and CP in8915,and the architecture of the SDK for8915is:There is only one CPU for both application can stack in8955/8908/8909,and the architecture of the SDK for 8955/8908/8909is:8Chapter2.ArchitectureProgramming Guide DocumentationThough FreeRTOS is used in this SDK,there is OSI(OS Interface)layer to isolate RTOS and application.So,3rd party RTOS can be easily port to the SDK,and replace FreeRTOS.Also,3rd cloud SDK based on3rd party RTOS can run natively without porting.2.1.Overview9Programming Guide Documentation2.2BootloaderBootloader is the software entrance after system jump out of ROM.The main features of bootloader: Differential UpgradeThis SDK is target to platforms using NORflash,and most of the code are running on NORflash directly(XIP, eXecute In Place).And there is only one copy of codes on NORflash.So,at upgrade,it is needed to be done in bootloader.File system will be used for upgrade,for storing upgrade package.So,bootloader shall supportfile system.And thefile system layout in bootloader should be exactly the same with thefile system layout in application.UART/USB UpgradeIf enabled,bootloader will monitor UART/USB input for upgrade.The use case is an upgrade tool will running on PC.When the communication between PC upgrade tool and platform is established,PC upgrade tool can upgrade 10Chapter2.ArchitectureProgramming Guide Documentation thefirmware.Note:Not all platforms support USB upgrade.Application Signature VerificationWhen secure boot is enabled,ROM will verify the signature of bootloader.And bootloader shall verify the application signature.Note:Not all platforms support secure boot.Bootloader doesn’t support upgrade itself safely.Application doesn’t rely on any setting in bootloader,so in the life cycles,it doesn’t needed to upgrade bootloader.2.3HAL(Hardware Abstract Layer)HAL is platform deeply coupled layer.Examples:•System clock setting;•Memory setting;•Basic power setting;This layer can be shared with both bootloader and application.So,it can’t use RTOS features.Note:osiEnterCritical and osiExitCritical can be used in HAL.2.4OSI(OS Interface)Besides RTOS abstraction,OSI will provide other common system features.It is closer to programming environ-ment.2.5libcnewlib is used in this SDK.2.6DriverDrivers are various peripheral drivers.It is built on top of HAL and OSI.Full RTOS features can be used in drivers,including thread,semaphore,mutex,timer,work queue and etc.2.3.HAL(Hardware Abstract Layer)11Programming Guide Documentation2.7File SystemSFFS is afile system optimized for NORflash.All persistent information storage are usingfile system.Also,POSIXfile system APIs(such as open,read,write,and etc)are provided with prefix vfs_.2.8IPC/RPCFor platforms with separated AP and CP,IPC is the mechanism of AP/CP communication.RPC is a mechanism built on top of IPC.With RPC,any CPU can call APIs implemented in other CPUs.Though peer CPU API call is a serial of IPC communication,application can’t feel any differences with local API call. 2.9CFW(Communication FrameWork)CFW is a layer above protocol stack(2G,NB IoT,LTE Cat1,eMTC).On some platforms,CFW implementation may be located on other CPU.However,with the help of RPC,appli-cation is the same.Note:It is not supported to call CFW directly in customer development.2.10PS InterfacePS interface is a layer for PS data with protocol stack.The APIs is the same for platforms with protocol stack in the same CPU,and platforms with protocol stack in other CPU.2.11TCP/IPlwIP is used in this SDK to provide TCP/IP stack.2.12COAP/LWM2M/...There are many IoT IP based protocols in this SDK.Most of them are ported from open source projects.2.13AT ReceiverThis SDK provides AT receiver.AT commands can be received from UART,USB(CDC/ACM).12Chapter2.ArchitectureProgramming Guide Documentation 2.14Open CPUThis SDK provides open CPU features.Open CPU is an friendly development environment based on the base SDK.OSI,drivers and TCP/IP are well documented,and they can be used in development on top of the base SDK.Also, it supports:Dynamic LoaderAn easy-to-use dynamic loader mechanism is implemented in this SDK.The basic features:•Application can call exposed APIs in base SDK.•Base SDK and application can be upgraded independently.•Application can be loaded fromfiles onfile system,and can be loaded from NORflash directly.When loading from NORflash directly,application can run on NORflash directly.Some limitations:•Application can’t access global variables in base SDK directly.•Flash and RAM reserved for application shall be planned beforehand.AT Command by APIThere is a virtual AT channel in this SDK.With the virtual AT command channel,legacy application based on sending AT commands can be ported easily.RILDue to it is not supported to call CFW directly in customer development,RIL is provided.It is a bunch of simplified communication API.2.14.Open CPU13Programming Guide Documentation14Chapter2.ArchitectureCHAPTERTHREEFLASH LAYOUTContents•Overview•Bootloader•Application•System FS•Modem FS•Factory FS•Configurations•Frequently Overwrite Small File3.1OverviewThis IoT SDK is based on NORflash,and SFFS is thefile system for NVRAM,modem image and etc.Typicalflash layout for8MBflash:Partition Range Size Mount Pointbootloader0..0x1000064KBapplication0x10000..0x340000 3.2MBsystem FS0x340000..0x4a0000 1.4MB/modem FS0x4a0000..0x7e0000 3.2MB/modemfactory FS0x7e0000..0x800000128KB/factoryTypicalflash layout for16MBflash:15Programming Guide DocumentationPartition Range Size Mount Pointbootloader0..0x1000064KBapplication0x10000..0x9800009.6MBsystem FS0x980000..0xca0000 3.1MB/modem FS0xca0000..0xfe0000 3.2MB/modemfactory FS0xfe0000..0x1000000128KB/factoryThe size of each partition can be configured.However,it is not recommended to change the number and order of the partitions.The default layout leaves very large rooms for application,and the systemfile system is tight.When there are many customized data shall be stored,it can be considered to decrease application partition,and increase system file system partition.Whenfile system configurations(includingflash offset,size,erase block size and logic block size)are changed, the originalfiles onfile system will be destroyed.Though overhead offile system is highly optimized on SFFS,it should be considered atflash layout plan.3.2BootloaderAt boot,ROM will load bootloader to internal SRAM and execute on internal SRAM.ROM will only load size of0xbf40fromflash.When secure boot is enabled,the last0x260is used for signature.So,for one stage bootloader,the maximum code size is0xbce0.When0xbce0is not enough,two stage bootloader is needed.Also,when secure boot is needed,thefirst stage bootloader should verify the signature of second stage of bootloader.Currently,one stage bootloader is used. Feature list of bootloader:•Check application image,and jump to application;•When secure boot is enabled,verify application signature;•FOTA upgrade;Note:Due to ROM can support UART download,it is not needed to support download and/or upgrade in bootloader.3.3ApplicationApplication partition is not managed byfile system.It is for application,including SDK and customized applica-tion.And most of the application shall run onflash directly(XIP).16Chapter3.Flash LayoutProgramming Guide Documentation 3.4System FSThis is the partition for run time data,such as NVRAM,and managed byfile system.By default,it is mounted as read-write.Two directories are used by SDK:•/modemnvm(CONFIG_FS_MODEM_NVM_DIR)•/nvm(CONFIG_FS_AP_NVM_DIR)•/fota(CONFIG_FS_FOTA_DATA_DIR)FOTA upgrade data will be stored in this partition.So,it should ensure there are enough rooms for FOTA upgrade data.Also,this partition will be written frequently.For NORflashfile system,performance will downgrade whenfile system is close to full:•write will be much slower;•erase count will increase rapidly;Note:In case there are data will be stored frequently,flash life-cycle should be considered.Due to SFFS can handle wear-leveling well,the larger spare rooms infile system,the life-cycle offlash can be longer.FOTA data size is hard to estimate.Though FOTA data size can be very small when the code change is small, 10%of the original size is the minimum requirement.3.5Modem FSThis is the partition for modem image,and managed byfile system.By default,it is mounted as read-only to avoid overwrite accidentally.3.6Factory FSThis is the partition for factory data,such calibration data,IMEI,serial number and etc.,and managed byfile system.By default,it is mounted as read-only to avoid overwrite accidentally.3.7Configurations•CONFIG_BOOT_FLASH_OFFSET•CONFIG_BOOT_FLASH_SIZE•CONFIG_APP_FLASH_OFFSET3.4.System FS17Programming Guide Documentation•CONFIG_APP_FLASH_SIZE•CONFIG_FS_MODEM_MOUNT_POINT•CONFIG_FS_MODEM_FLASH_OFFSET•CONFIG_FS_MODEM_FLASH_SIZE•CONFIG_FS_MODEM_EB_SIZE•CONFIG_FS_MODEM_PB_SIZE•CONFIG_FS_SYS_MOUNT_POINT•CONFIG_FS_SYS_FLASH_OFFSET•CONFIG_FS_SYS_FLASH_SIZE•CONFIG_FS_SYS_EB_SIZE•CONFIG_FS_SYS_PB_SIZE•CONFIG_FS_FACTORY_MOUNT_POINT•CONFIG_FS_FACTORY_FLASH_OFFSET•CONFIG_FS_FACTORY_EB_SIZE•CONFIG_FS_FACTORY_PB_SIZE3.8Frequently Overwrite Small FileHere is an example of writing smallfile frequently.File system configuration:•flash size:1MB•erase block size:32KB•logical block size:512B•file size:200B•write every5minute,overwrite thefileAt worse case,thefile system is very close to full,each write will causeflash erase.And then there are105,120flash erase every year.At best case,thefile system is empty.Then,1950times offile write will cause oneflash erase of everyflash sectors.So,there are only54flash write every year.18Chapter3.Flash LayoutCHAPTERFOURKERNEL(OS INTERFACE)Contents•Overview•Thread•osiEvent_t•Thread Callback•Thread Notify•Semaphore•Mutex•Work and Work Queue•Interrupt Latency•ISR Programming•Timer–Timer and Sleep–Timer Stop Corner Case–Timer API inside Callback–Timer Pool•Elapsed Timer•Power management–PM Source–Wake Lock–Resume Order–Auto Sleep19Programming Guide Documentation–Callback Restriction•Cache•atomic•Floating Point•FreeRTOS Integration•API Reference4.1OverviewThis IoT SDK is based on RTOS.By design,SDK won’t access the used RTOS directly.Rather,OSI(OS Interface) layer is designed.SDK can only access OSI API.OSI can be implemented by various RTOS.Even the underlay RTOS is changed,the SDK itself can keep unchanged.OSI based on FreeRTOS is provided in the SDK.And it is possible and not hard to implement OSI based on other RTOS.4.2ThreadThread is the basic RTOS scheduling unit.Threads have independent stack.OSI thread has a bundled event queue.There are APIs to send event to thread.The basic model of OSI thread is event processing.An typical OSI thread is:void entry(void*argument){osiThread_t*thread=osiThreadCurrent();while(running){osiEvent_t event={};osiEventWait(thread,&event);_processEvent(&event);}osiThreadExit();}There no API to delete another thread.Rather,thread should be terminated by themselves,through some kinds of pre-defined inter-thread communication method.At the end of thread entry function,osiThreadExit() should be called.4.3osiEvent_tosiEvent_t is the data structure of OSI event:20Chapter4.Kernel(OS Interface)Programming Guide Documentation typedef struct osiEvent{uint32_t id;///<event identifieruint32_t param1;///<1st parameteruint32_t param2;///<2nd parameteruint32_t param3;///<3rd parameter}osiEvent_t;The message queue for OSI event is named as event queue.The most important inter-thread communication is to send and wait event.At send and wait event,the event body is copied.Three words are enough to carry event information in most cases.Then this design can reduce malloc and free function calls.The details of the event parameters are defined by each event.In case that three words are not enough,dynamic pointer can be carried as event parameter.The memory management convention is defined by each event.When dynamic memory is used,usually event sender allocate memory,event receiver free memory after process.4.4Thread CallbackThread callback is a callback to be executed inside specified thread.The implementation is based on OSI event. However,the codes will be more readable with osiThreadCallback,rather than huge switch/case of event IDs.With event ID,the codes will look like://senderosiEvent_t event={EVENT_ID,param1};osiEventSend(thread,&event);//receiverfor(;;){osiEvent_t event={};osiEventWait(thread,&event);switch(event.id){case EVENT_ID:function_call(event.param1);break;}}With thread call,the codes will look like:osiThreadCallback(thread,function_call,param1);4.4.Thread Callback21。
展讯编译命令集
展讯新手移植文档新手移植参考文档一、编译环境及安装相关软件:(跟 MTK 环境一样) 编译工具:ADS V1.2 (ARM Developer Suite)RVDS V2.2(Realview Devloper Suite)Microsoft Visual C++ 6.0 SP6其他工具: Microsoft Excel 2000 或者 Microsoft Excel 2003 或者 WPS 2005 及以上版本二、编译方式:1.编译整个项目用命令 updatemake PROJECT=projectname updatemakefile 根据已有的依赖关系编译因修改涉及到的相关的模块并在没有错误出现的情况下完成最终的链接,若不存在依赖关系,makefile 会在编译文件时自动生成依赖关系。
因为只编译较少的模块文件,可以节省编译时间。
这个命令也会将 fdl,bootloader,NV 同时编译出来。
2.重新编译整个项目用命令 newmake PROJECT=projectname new该命令将清除编译过程中生成的全部目标码和库文件,然后对 projectname 所指定的项目进行整体编译并在没有错误出现的情况下完成最终的链接,编译过程中会自动生成依赖关系。
该命令相当于运行如下 3 个命令make PROJECT=projectname cleanalmake PROJECT=projectname MODULES=resource lmake PROJECT=projectname update3. 清除所有编译结果用命令 cleanallmake PROJECT=projectname cleanall该命令将清除编译过程中生成的全部目标码和库文件。
4.编译模块make PROJECT=projectname MODULES=”module1 module2 …” update 该命令将对指定模块进行编译,但不会编译完成后进行自动链接。
展讯平台开发说明
Build环境使用手册Version: 0.2.52010-10-14修订历史重要声明版权声明本文档中的任何内容受《中华人民共和国著作权法》的保护,版权所有© 2006, 展讯通信有限公司,保留所有权利,但注明引用其他方的内容除外。
商标声明本文档中展讯通信有限公司的产品的所有商标是展讯通信有限公司专有,但注明属于其他公司拥有的商标除外。
在提及其他公司及其产品时将使用各自公司所拥有的商标,这种使用的目的仅限于引用。
不作保证声明展讯通信有限公司不对此文档中的任何内容作任何明示或暗示的陈述或保证,而且不对特定目的的适销性及适用性或者任何间接、特殊或连带的损失承担任何责任。
保密声明本文档(包括任何附件)包含的信息是保密信息。
接收人了解其获得的本文档是保密的,除用于规定的目的外不得用于任何目的,也不得将本文档泄露给任何第三方。
目录1说明 (6)2编译环境及相关软件 (7)3Source Code目录结构 (8)4基本编译命令 (10)4.1全新编译整个项目[new] (10)4.2更新项目[update] (11)4.3单独编译模块 (11)4.4清除模块编译结果 (11)4.5清除所有编译结果[cleanall] (11)4.6生成可执行文件 (11)4.7编译FDL/bootloader (11)4.8编译NV (11)4.9编译MMI Resource 文件 (12)4.10编译PC模拟器工程 (12)5其它编译命令 (15)5.1编译Logel工具 (15)5.2pclint 扫描 (15)5.3编译完成net send提醒功能 (15)5.4编译命令的简写 (15)5.5多线程编译 (15)5.6分布式编译 (16)5.7编译出错暂停 (16)5.8生成编译选项 (16)6Makefile 工作流程 (17)6.1重要脚本 (17)6.2Makefile 执行流程 (18)6.3两种编译方式 (19)7模块修改及项目定制 (21)7.1添加或删除模块 (21)7.2修改模块 (21)7.3创建新项目 (22)7.4修改项目Feature Options (23)8第三方编译选项说明 (24)9相关使用技巧 (25)9.1查看log文件 (25)9.2makefile 报错:No rule to make target ` XXX ', needed by `yyy'. (25)9.3makefile 报错:Can't return outside a subroutine at ./make/perl_script/sprd_macro_check.pl line XXX (25)9.4Source Insight和ClearCase配置 (25)9.5鼠标右键命令行快捷方式设置 (28)9.6DOS下输入命令时用Tab键进行命令自动填充 (28)1 说明Build环境中实现了项目开发和维护使用的GNU标准应用脚本,基于这些应用脚本和相关make工具,Build环境可以完成项目全部代码的编译和二进制文件的生成,同时在此环境中可以通过脚本执行的方式产生其他软件以及开发工具,如fdl, bootloader, nv_parameter,resource等。
展讯平台工具使用介绍
2008-8-6
Proprietary and Confidential Information
10
编辑图片
¾ 添加 ¾ 替换 ¾ 删除 ¾ 导出 ¾ 勾选
2008-8-6
Proprietary and Confidential Information
11
编辑动画和铃声
) 资源编辑器ResourceEditor ) 同步工具MobileSprite ) 下载工具DLoaderR ) 升级工具SPUpgrade ) 字库工具FontTool ) NV编辑工具NVEditor
2008-8-6
Proprietary and Confidential Information
2008-8-6
Proprietary and Confidential Information
40
FontTool简介
¾ 用于生成MMI平台需要的字库文件 ¾ 编辑字型
2008-8-6
Proprietary and Confidential Information
41
运行工具
2008-8-6
Proprietary and Confidential Information
2008-8-6
Proprietary and Confidential Information
18
主要内容
) 资源编辑器ResourceEditor ) 同步工具MobileSprite ) 下载工具DLoaderR ) 升级工具SPUpgrade ) 字库工具FontTool ) NV编辑工具NVEditor
22
编辑电话簿
¾ 新建 ¾ 编辑 ¾ 删除 ¾ 复制移动 ¾ 划分群组 ¾ 同步电话 ¾ 导入/导出VCARD
展讯平台音频调试教程(自编版)
2. 按“Call”按钮,进入工程模式。
3. 选择“Para Set”项,进入 Para Set 界面。 4. 选择“Debug Param”项,进入 Debug Param 界面。
1:20dB boost on
备注
bit1=1时,bit8~11 无效 参数范围:0~F 参数范围:0~F
默认使用P1
Bit 位 bit15 bit14 bit13 bit12
名称 air air aien hpmic
说明 右路路 ai 开关 左边路 ai 开关 Ai 使能开关 耳机 Mic 开关
功能 0:关
1: 选 择 辅 路 MIC
(AUXMIC)
ADC电源控制位
0:off
通常设为1
1:on
0x1:选择主路 MIC,用于手持模式和免提模式 0x11:选择辅路 MIC,用于耳机模式
3. dl PGA gain 说明
Bit位 Other bit8~11
名称 P1 gain
bit4~7
bit2~3 bit1
bit9
MUX_PA_ON
辅路(BTL)外接 PA 0:关
打开
1:开
bit8
M_PA_ON
主路(LINE OUT)
外接 PA 打开
bit7
SB_DAC
DAC 电源关闭
1:关
备注
通常耳机通路无需 外接 PA,有外接 PA 时需设为 1 通常免提通路需外 接 PA,设置为 1 通常手柄通路无需 外接 PA,有外接 PA 时需设为 1 通话时应设为 0, DAC 才有输出
App&Framework快速编译介绍(展讯6820)
App&Framework快速编译介绍
展讯通信
.前提条件 .使用MM命令编译App
.使用MM命令编译framework
.安装framework.jar
11/09/11
保密信息
.2
前提条件
•
运行如下命令进行编辑 1. 预编译处理:./mk sp6820a pb 2. 全环境编译 ./mk sp6820a n
保密信息
.前提条件 .使用MM命令编译App
.使用MM命令编译framework
.安装framework.jar
11/09/11
保密信息
. 10
安装framework.jar
步骤 运行如下命令,将编译完成的framework.jar放入手机,重启。 $adb remount $adb push framework.jar system/framework $adb shell sync $adb shell reboot
展讯平台操作简介
终测 (Final Test)
终测是用电脑软件控制无线通信测试仪、电源、手机等设备,对手机进行各种操作,测试统计手机的各 种参数是否在软件设定范围内。 测试内容有:测量电池电压、建立呼叫、最大通话电流、接收机测试、发射机测试、信道切换、频段切换等。
所需硬件:PC 1台 GP-IB卡1块 无线通信测试仪(Agilent 8960或R&S CMU200) 1台 直流稳压电源1台 模拟电池 (可从系统接口供电则可以不用该电源) 直流稳压电源1台 模拟充电器 屏蔽盒及板测工装夹具 1台 电平转换盒1个 手机通信数据线 1条 各种连接线 测试SIM卡 (可选)
手机频段: GSM 有四个频段分别是EGSM(850M), GSM(900M), DCS( 1800M), PCS(1900M) GSM 为2G,GPRS 是2.5G,EDGE(或者叫EGPRS)是2.75G, WCDMA 是3G CDMA 有两个频段分别是800M,450M。 CDMA 是2G,CDMA1X 是2.5G,CDMA2000 是3G 此站测试前,需要用金机进行校准,金机禁止进行CALIBRATION 测试.
校准操作指南
选择校准加综 测 PROJECT
选择校准频段
测试不通过即 时停止
保存记录
选择非信令测 试
保存位置
选择综测频段
保存配置文件
读SN号
检查版本
选择此项
接收质量
选择此项
串口 串口速度
选择此项
综测仪型号
综测仪地址
选择此项
线损设置
点击此项
电源型号
电源地址
电压大小
版本号
CALIBRATION 测试过程及处理方法
1.开机过程,程控电源先给手机开机电压,手机开机,如果手机没有开机,观察程控电源 的状态. 如果有电压,没有电流,说明供电电路有问题,检查程控电源的正负极和source(反馈信号), 还有数据线的正负极,接口,更换数据线. 如果电压和电流有波动,说明PC和手机之间联系有问题,重新插拔数据线与PC接口,更 换数据线.或者软件DL错误造成. 2.READ SN是无法读取手机的SN号码,检查手机SN号码是否存在. 3.ADC(电池电量控制)是手机与数据线接口有问题. 4.AFC(自动频率控制)是手机和综测仪没有通讯,检查综测仪和RF CABLE,射频头 和主板匹配的问题. 5.PATHLOSS(接受增益控制)是射频信号不正常,检查综测仪和RF CABLE.( MTK 平 台独有) 6.APC(自动功率控制)是手机的发射功率不正常,检查综测仪和RF CABLE,射频头 和主板匹配的问题,调整CABLE LOSS,按照相应频段进行调整,正常值在-0.2 以内. 有的会测试PCL(功率控制等级),如果下线,按照相应频段的功率级调整LOSS 值,正 常值在-0.4-0.2之间. 7.AGC(自动增益控制)是射频信号不正常,检查综测仪和RF CABLE. 8.CALL是射频信号不正常,检查综测仪和RF CABLE,数据线. 9.TXP(发射功率)是手机发射信号不正常,检查综测仪和RF CABLE,调整CABLE LOSS,按照相应频段进行调整,正常值在-0.2以内. 10.RXP(接收功率)是手机接收信号不正常,检查综测仪和RF CABLE,调整CABLE LOSS,按照相应频段进行调整,正常值在-0.2以内. 11.Read Voltage 是手机关机电流不正常,检查数据线.
展讯平台模拟器使用介绍
2011-3-11
Proprietary and Confidential Information
5
主要内容
简介 运行和启动 重要功能简介
2011-3-11
Proprietary and Confidential Information
6
选择外观
第一次运行,会自动弹出配置要求: 首先是要求选择外观:
22
Skin目录下与模拟器外观对应的配置文件MSSim_***.ini:配置键盘 在模拟器上的坐标范围,如果需要增加键值,修改这个文件即可 Win_platform\bin目录下flash_sim.dat:模拟器的NV,代码中如果修 改过NV,重新运行模拟器时需要将该文件删除,这个动作等同于 download程序时的erase Flash Win_platform\bin\Disk目录下的Udisk.img和SD Card.img:模拟器 的文件系统,这两个文件属性一定要可写,否则会造成模拟器开机 报错
17
向模拟器发送短消息
短消息中心一 定要填写
2011-3-11
Proprietary and Confidential Information
18
文件系统模拟
2011-3-11
Proprietary and Confidential Information
19
重要文件
几个重要的文件: 几个重要的文件Confidential Information
11
选择SIM卡 卡 选择
第一次开机需要选择SIM卡配置文件:
2011-3-11
Proprietary and Confidential Information
12
展讯客户化配置使用指南(驱动部分)
展讯通信有限公司 ·保密·
第4页 共33页
2005-7-22
客户化配置使用指南(驱动部分)
版本 1.0.0
SW-BASE-UG-0027
7 GPIO的配置使用 ..................................................................................................................23
5 系统引脚功能配置 ................................................................................................................17
5.1 各个引脚功能与总线驱动能力的定义.............................................................................17 5.2 全局的寄存器配置 .........................................................................................................18 5.3 GPIO的配置 ..................................................................................................................18
6.2.1 主屏的高度和宽度 ..................................................................................................20 6.2.2 检查LCD的指针是否正确 .......................................................................................20 6.2.3 让主屏工作在显示模式 ...........................................................................................20 6.2.4 得到主屏LCD缓冲区的首地址 ................................................................................20 6.2.5 得到附屏LCD缓冲区的首地址 ................................................................................20 6.2.6 得到主屏的操作函数指针。....................................................................................20 6.2.7 得到附屏的操作函数指针 .......................................................................................21 6.2.8 硬件复位 ................................................................................................................21 6.2.9 设置LCD的亮度......................................................................................................21 6.2.10 LCD_OPERATIONS_T中定义的各种函数的实现。...............................................21
Spreadtrum Android 8805和8810环境搭建和源码编译V1.0.1
一.4
1.查看Java版本:
java -version
如果结果显示是“java version "1.6.xx.xx"”,则跳过以下第2步。
2.用下面的命令将java6的下载地址加入到sources.list并下载安装java6。
sudo add-apt-repository "deb / lucid partner"
二.3
1.进入u-boot:cdu-boot/
2.sp8805ga平台编译
make CROSS_COMPILE=你的android路径/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-sp8805ga_config
make CROSS_COMPILE=你的android路径/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
sudo add-apt-repository "deb-src / lucid partner"
sudo add-apt-repository "deb /ubuntu lucid partner"
mm <相应模块名字> //编译特定模块
二.4
1.进入kernel:cd kernel/
2.查看帮助信息(其中openphone,sp8805ga,sp8810ga是支持的产品列表):
./build.products.kernel.sh
3.sp8805ga平台对应的kernel编译
./build.products.kernel.sh sp8805ga
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
展讯 build环境使用手册
展讯 Build 环境使用手册
一、简介
展讯 Build 环境是为展讯公司开发团队提供的一套集成开发环境,旨在为开发人员提供便捷、高效的开发工具和平台。
本手册将详细介绍展讯 Build 环境的安装、配置和使用方法。
二、安装
1. 下载展讯 Build 环境安装包
展讯 Build 环境安装包可以从展讯公司的官方网站下载。
请确保从官方渠道下载,以确保安装包的安全性和完整性。
2. 执行安装程序
双击下载的安装包,按照提示一步步进行安装。
建议选择默认安装路径,以便后续操作的顺利进行。
3. 完成安装
安装完成后,会在您选择的安装路径下生成展讯 Build 环境的文件夹。
您可以在此文件夹中找到所有的开发工具和相关资源。
三、配置
1. 环境变量设置
为了能够方便地在任意路径下调用展讯 Build 环境,我们需要对
环境变量进行一些配置。
- Windows 系统:右键点击“计算机”或“我的电脑”,选择“属性”-
>“高级系统设置”->“环境变量”。
在系统变量中找到“Path”,并选择“编辑”。
在弹出的窗口中,将展讯 Build 环境的安装路径添加到“Path”变
量的值中,并点击“确定”保存。
- macOS / Linux 系统:在终端中输入以下命令,并将展讯 Build
环境的安装路径替换为您的实际路径。
```shell
export PATH=/your/installation/path:$PATH
```
2. 配置开发工具
根据您的开发需求,展讯Build 环境提供了多种开发工具和插件。
您可以根据需要进行安装和配置。
- IDE:展讯 Build 环境支持多种集成开发环境,如 Eclipse、Android Studio 等。
您可以根据个人喜好进行选择和安装。
- SDK:展讯 Build 环境提供了丰富的软件开发工具包,包括Android SDK、Java SDK 等。
您可以根据项目需要进行安装和配置。
四、使用
1. 创建项目
在展讯 Build 环境中,您可以通过 IDE 或命令行工具创建新的项目。
根据项目类型和目标平台,选择相应的创建方式。
- IDE:打开您选择的集成开发环境,选择“File”->“New”-
>“Project”,按照向导创建新的项目并进行配置。
- 命令行:打开终端,进入您希望创建项目的目录,运行相应的命令进行项目创建和配置。
例如,Android 项目可以使用以下命令:
```shell
android create project --name MyProject --path ./MyProject --target android-28
```
2. 编译与调试
在项目创建完成后,您可以使用展讯 Build 环境提供的编译工具
进行项目的编译和构建。
- IDE:选择“Build”->“Make Project”或类似选项,即可开始编译项目。
系统会自动检查代码并生成可执行文件。
- 命令行:在终端中导航至项目所在路径,并运行相应的编译命令。
根据项目类型和语言的不同,编译命令也会有所不同。
3. 调试与测试
展讯 Build 环境提供了丰富的调试和测试工具,以帮助开发人员快速定位和解决问题。
- IDE:选择“Run”->“Debug”或类似选项,即可进入调试模式。
您可以设置断点、监控变量、单步执行等操作。
- 命令行:根据项目类型和语言的不同,使用相应的调试命令进行调试。
具体的调试命令请参考展讯 Build 环境的相关文档和指南。
五、更新与维护
1. 获取最新版本
展讯公司会定期发布展讯 Build 环境的更新版本。
为了获得最新的功能和修复的 bug,建议您定期检查并更新展讯 Build 环境。
- IDE 插件更新:在 IDE 的插件中心或设置中,查找并进行展讯Build 环境插件的更新。
- SDK 更新:展讯 Build 环境提供了命令行工具来更新 SDK。
您可以运行相应的命令来更新展讯 Build 环境的各个组件和库。
2. 资料与支持
若在使用展讯 Build 环境中遇到问题或需要帮助,您可以查阅展讯 Build 环境的官方文档和技术支持资源。
在官方社区中,您还可以与其他开发者交流和分享经验。
六、结语
展讯 Build 环境是展讯公司专为开发人员打造的一套全面、高效的开发工具和平台。
通过本手册,您可以了解到展讯 Build 环境的安装、配置和使用方法,并在开发过程中获得支持和帮助。
希望本手册能够对您有所帮助,祝您在展讯 Build 环境下进行开发工作顺利!。