Tina方案开发一探

1.编译,打包

 2.烧录:

选择量产卡:

烧录成功:

 3.将卡插入平台,BROM卡启动程序将加载SD卡中的固件,至于最终是卡量产,开始卡启动,则取决于固件本身的定义。

使用phonix suit的烧录步骤:

插着USB线,按住左上角的UBOOT键,再按复位,之后松开复位,之后再松开UBOOT键,系统自动进入烧录模式。


4.关于内核调试:

默认情况下,内核打开了CONFIG_CC_OPTIMIZE_FOR_SIZE 和关闭了CONFIG_DEBUG_INFO,造成在DS5调试内核的时候,无法获取到足够的调试信息,表现之一便是无法看到完整的调用堆栈.

 将这两个选项进行正确配置后,重新编译内核即可:

 之后,便可以看到完整的堆栈信息了:

我们追踪一下卡驱动的处理流程:

 插上TF卡,内核probe到之后会读取分区信息生成设备节点,可以看到generic_make_request将make_request_fn打印出来,地址为0xc01d5260;

根据符号表,查找到此函数为:

继续顺藤摸瓜,根据blk_queue_bio的调用链条追踪到下面的函数,我们打印request_fn,看能否找到和sunxi sdmmc的联系:

测试如下:

根据符号表找到入口的地址为:

好了,终于看到和MMC的联系了!

具体位置在下图,它是Linux内核的框架层代码,挂接在mmc_blk_probe的调用路径当中,做法符合Linux一贯的套路,将卡驱动公共的部分抽取出来做成公共框架,而客制化部分的卡控制器则通过框架接口注册进系统,公共部分由框架处理,卡差异化部分则调用具体的驱动实现。


打开valgrind调试:


5:CDR启动脚本:

应用代码和启动配置在eyseempp目录下,配置脚本也在这里。

6:NNA配置使能

可见,受到CONFIG_SUNXI_NNA控制的源文件只有nna_sunxi.o.

运行后,会出现字符设备节点/dev/nna,主设备号246, 次设备号0,NNA应用一般依赖两个设备,nna和g2d,g2d存在的目的是为了将大图进行缩放,因为做NNA网络处理,一般用比较小的图就够了,不但快,而且节省资源,其它需要的节点还有/dev/ion, /dev/mem, /dev/cedar_dev等。

7:Tina带EMMC和不带EMMC的差异

常见的编译错误以及处理方式:

 出现这种错误一般是因为linux内核目录的user_headers/头文件目录被误删除导致的,这种误操作没有被构建系统察觉,所以也不会再次生成,导致所有依赖内核头文件的应用包都编译不过,这个时候,只要进入内核目录,执行

make ARCH=arm INSTALL_HDR_PATH=./user_headers headers_install

重新生成头文件目录即可.这种做法符合Linux一贯的做法,在Linux Kernel环境下的做法可参考下面博客:

ubuntu18.04内核编译升级_papaofdoudou的博客-优快云博客

 至于这个关联是如何建立起来的,参看下图

在构建系统中,产生这个配置是在:

关于方案的编译选项配置

默认的编译选项来自于这里:

编译OpenCV:

OpenCV是一套开源的计算机视觉算法库,里面包含图像处理与计算机视觉的通用算法,Tina构建系统支持对OpenCV的配置和编译。

文件系统:

 /usr目录是一个独立的文件系统,类型为squashfs. 通过 crootfs可以切换到构建系统的rootfs目录下:

cout,可以看到usr.fex,file查看其类型,可以看到其是squashfs文件系统镜像文件。

包括rootfs文件系统也是一样

添加自启动:

cdevice进入:

重新编译,进入到crootfs,发现生效。

Tina按键输入输出的获取:

demo开发板上的常用按键事件如何获取呢?可以通过tina /dev/input/eventX设备节点:

用cat 命令尝试一下,用event0,试过event1不管用,可能是映射到其它设备,并非按键.

cat /dev/input/event1

可以看到,随着每次按键被按下,控制台有字符打印出来,打印乱码是由于控制台无法解析对应的二进制案件值的原因,无他原因.

几个和输入相关设备文件系统节点:

查看tina加载模块:

执行lsmod

查看显示图层信息:

cat /sys/class/disp/disp/attr/sys

初始化系统环境的一个绝佳地点:

比如挂载磁盘,导出环境变量等,都可以写在这里。

添加模块加载检查,没有的化编译出错。

添加环境变量的另外一个地方 /etc/profile


结束!

TINA 9.0使用教程COPYRIGHTS C Copyright 1990-2010 Design Soft, Inc. All rights reserved All programs recorded on the original release CD of TINA and the accompanying documentation are copyrighted. TINA is provided under a license Agreement and may be used or copied only in accordance with its terms and conditions LIMITED LIABILITY TINA, together with all accompanying materials, is provided on an “asis” basis, without warranty of any kind DesignSoft, Inc, its distributors, and dealers make no warranty, either expressed, implied, or statutory, including but not limited to any implied warranties of merchantability or fitness for any purpose In no event will Design Soft Inc, its distributor or dealer be liable to anyone for direct, indirect, incidental or consequential damages or losses arising from the purchase of tina or from use or inability to use tina TRADEMARKS IBM PC/AT, PS/2 are registered trademarks of international Business machines corporation Windows, Windows 9x/ME/NT/2000/ XP/Vista/Windows are trademarks of Microsoft Corporation PSpice is a registered trademark of Micro im Corporation Corel Draw is a registered trademark of corelinc TINA is a registered trademark of Design Soft, Inc English version TABLE OF CONTENTS 1。| NTRODUCTION 1.1 What is tiNa and tiNa Design Suite?.....9 1.2 Available Program Versions .15 1.3 Optional supplementary hardware 16 1.3.1 TINALab lI High Speed Multifunction pc instrument 1.4 LoqiXplorer 18 2. NEW FEATURES IN TINA 19 2.1 List of new features in tina v9 19 2.1 List of new features in tina v8 21 2.2 List of new features in tina 7.0 22 3. INSTALLATION AND START-UP 25 3.1 Installation Procedure 25 3.1.1 Minimum hardware and software requirements 25 TINA Quick Start Contents 3.1.2 Installation from CD-ROM 26 3.1.3 Following the Installation steps 3.1.4 Welcome and software license Agreement… 27 3.1.5 Entering User Information 28 3.1.6 Networking Options 28 3.1.6.1 Single user license 28 3.1.62 Network license(installed on local Pcs 29 3.1.6.3 Network license installed on file server 29 3.1.7 Choose destinatⅰ on locatⅰon∴ 3.1.8 Selecting a setup Type 31 3.1.8.1 Typical… 3.182 Compact 3.1.8.3 Custom 32 3.1. 9 Selecting the Program Folder 3.1.10 Select Environment Options 3.1.11 Selecting the Symbol Set 34 3.1.12 Final check and copying the files 3.1.13 Completing the Setup 3.2 Uninstalling TINA 36 3.3 Maintaining or Repairing an Installation 37 3. 4 Network Installation .37 3.5 Install for citrix Presentation server 40 3.5.1 Installing and configuring tina 40 3.5.2 Publishing the application on the server 3.5. 3 Authorizing the application and using TINA on client computers 42 3.5. 4 Installing TINA on additional servers 3.6 Copy Protection 43 3.6.1 Copy protection by Software……… 3.6.2 Copy Protection by hardware(dongle) 4 TINA Quick Start Contents 3.7 Starting Up…….…........46 3.8 Experimenting with EXample Circuits, avoiding common problems……..46 4 GETTING STARTED 47 4.1 Schematic Editing Using the Mouse 47 4.1.1 Using the right mouse button 47 4.1.2 Using the left mouse button 48 4.2 Measurement Units 50 4.3 The Basic Screen Format 50 4.4 Placing the Circuit Components……….…..57 4.4.1 e 58 4. 4.2 Input and Outpr 59 4.5 Exercises∴ 60 4.5.1 Editing an RLC Circuit Schematic 4.6 Analyses 64 4.6.1 Analyzing an RLC Circuit (DC, Ac Transient and Fourier analysis)……… 4.6.2 Creating and analyzing an oP-AMP circuit 78 4.6.2.1 Calculating DC Transfer characteristic 83 4.6.3 Analysis of SMPS circuits 84 4.6.4 Stress Analysis 4.6.5 Network Analysis 4.6.6 Analyzing a Digital Circuit with TINAS Digital Engine 97 4.6.7 Analyzing a Digital Circuit using Digital VHDL Simulation 100 4.6.8 Mixed Mode simulation 104 TINA Quick Start Contents 4.6.8.1 Waveform generation with VHDL and SpIce subcircuIts 105 4.6.8.2 MCU controlled smPs circuit 面B 109 4.6.9 esting your circuit in interactive mode 111 4.6.9.1 Digital Circuit with a Keypad……… 112 4.692 Light Switch with Thyristor.…… 112 4.693 Ladder Logic networks 113 4.69.4 VHDL Circuits∴ 114 4.69.5 Microcontroller( MCU) Circuits 116 4.69.6 Example PIC Flasher 118 4.69.7 Example PIC Interrupt handling 121 4.698 Editing the Code in the Debugger 124 4.699 Making a Breakpoint… 124 4.6. 10 Using the Flowchart Editor and debugger in TINA......125 4.6.10. Flowchart editor 125 4.6.10.2 Flowchart Debugger 130 4.6.11 Testing Your Circuit with Simulated and Real Time Instruments 132 4.6. 12 Using the Design Tool in TINA 135 4.6.13 Design Tool vs Optimization in tINA . ......................139 4.6.14 Live 3D Breadboard 140 4.7 Creating a Printed Circuit Board(PCB) 146 4.7.1 Setting and checking footprint names 147 4.7.2 Invoking TINA PCB 151 4.7.3 Multiple logic gates in the Same package and their Power Supply 156 4.7.4 Creating a Flexible PCB Layout( Flex PCB)…………160 TINA Quick Start Contents 5. USING SUBCIRCUITS SPICE MACROS AND S-PARAMETERS 167 5.1 Making a Macro from a schematIc 167 5.2 Making a Macro from a Spice subcircuit .................................174 5. 2.1 Creating Spice Macros in TINA 174 5.2.1.1 Creating macros from downloaded files 174 52.1.2 Creating macros on-the-fly by browsing the web 178 5. 2.2 Adding Parameters to Spice Macros 184 5.3 Using and extending Manufacturers Spice model catalogs in TINA 186 5.3.1 Using the Library Manager 186 5.3.1.1 Introduction to Adding Spice macros to TINA braies 186 5.3.1.2 Problems and solutions while adding Spice macros to tiNA 192 5.3.1.3 Adding Spice models in MODEL format to the libral 200 5.4 Adding s-parameter models 204 5.5 Making a VHDL macro from a. vhd file .206 5.5. 1 Placing a vhdl macro in the schematic editor.... 208 5.52 esting a VHDLmacro…… 209 5.5.3 Changing the pin arrangement of a vhdl macro ... 210 TINA Quick Start Contents 6. MAKING YOUR OWN SCHEMATIC SYMBOLS AND FOOTPRINTS 213 6. 1 Schematic Symbol Editor 213 6.2 IC Wizard in the Schematic Symbol Editor..216 6.3 Footprint Editor 218 6. 4 IC Wizard in the Footprint Editor 222 USING THE PARAMETER EXTRACTOR 225 8. ADVANCED TOPICS 229 8. 1 Introduction ...........................,.........................229 8.2 Table of contents 230 8 TINA Quick Start CHAPTER 1 IntrodUctIon 3 1.1 What is tINA and TINA Design Suite? TINA Design Suite is a powerful yet affordable software package for analyzing, designing and real time testing of analog, digital, VHDL, and mixed electronic circuits and their layouts. You can also analyze re, communication, and optoelectronic circuits, and test and debug microprocessor microcontroller applications. Every year electronic circuits become faster and more complex, and therefore require more and more computational power to analyze their operation To meet this requirement design Soft engineers have included the ability to utilize the increasingly popular scalable multi-thread CPUs. Computers that incorporate dual or quad core CPUs can deliver up to 20 times faster execution time for TINAs analysis engine-while maintaining the accuracy of prior single-threading computers A unique feature of Tina permits you to bring your circuit to life with the optional usB controlled TINALab II and logiXplorer hardware turns your computer into a powerful, multifunction T&M instrument. Electrical engineers will find tiNA an easy to use, high performance tool, while educators will welcome its unique features for the training environment TINA is distributed in two major versions- TINA and TINA Design Suite. TINA includes circuit simulation only, while TINA Design Suite also includes the advanced PCB designer. This fully integrated layout module has all the features you need for advanced PCB design including Multilayer flexible PCB's with split power planes, power ful autoplacement autorouting, rip-up and reroute, manual and follow-me"trace placement, DRC, forward and back annotation, pin TINA Quick Start
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

papaofdoudou

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值