虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

all-inclusive

  • at91rm9200启动过程教程

    at91rm9200启动过程教程 系统上电,检测BMS,选择系统的启动方式,如果BMS为高电平,则系统从片内ROM启动。AT91RM9200的ROM上电后被映射到了0x0和0x100000处,在这两个地址处都可以访问到ROM。由于9200的ROM中固化了一个BOOTLOAER程序。所以PC从0X0处开始执行这个BOOTLOAER(准确的说应该是一级BOOTLOADER)。这个BOOTLOER依次完成以下步骤: 1、PLL SETUP,设置PLLB产生48M时钟频率提供给USB DEVICE。同时DEBUG USART也被初始化为48M的时钟频率; 2、相应模式下的堆栈设置; 3、检测主时钟源(Main oscillator); 4、中断控制器(AIC)的设置; 5、C 变量的初始化; 6、跳到主函数。 完成以上步骤后,我们可以认为BOOT过程结束,接下来的就是LOADER的过程,或者也可以认为是装载二级BOOTLOER。AT91RM9200按照DATAFLASH、EEPROM、连接在外部总线上的8位并行FLASH的顺序依次来找合法的BOOT程序。所谓合法的指的是在这些存储设备的开始地址处连续的存放的32个字节,也就是8条指令必须是跳转指令或者装载PC的指令,其实这样规定就是把这8条指令当作是异常向量表来处理。必须注意的是第6条指令要包含将要装载的映像的大小。关于如何计算和写这条指令可以参考用户手册。一旦合法的映像找到之后,则BOOT程序会把找到的映像搬到SRAM中去,所以映像的大小是非常有限的,不能超过16K-3K的大小。当BOOT程序完成了把合法的映像搬到SRAM的任务以后,接下来就进行存储器的REMAP,经过REMAP之后,SRAM从映设前的0X200000地址处被映设到了0X0地址并且程序从0X0处开始执行。而ROM这时只能在0X100000这个地址处看到了。至此9200就算完成了一种形式的启动过程。如果BOOT程序在以上所列的几种存储设备中找到合法的映像,则自动初始化DEBUG USART口和USB DEVICE口以准备从外部载入映像。对DEBUG口的初始化包括设置参数115200 8 N 1以及运行XMODEM协议。对USB DEVICE进行初始化以及运行DFU协议。现在用户可以从外部(假定为PC平台)载入你的映像了。在PC平台下,以WIN2000为例,你可以用超级终端来完成这个功能,但是还是要注意你的映像的大小不能超过13K。一旦正确从外部装载了映像,接下来的过程就是和前面一样重映设然后执行映像了。我们上面讲了BMS为高电平,AT91RM9200选择从片内的ROM启动的一个过程。如果BMS为低电平,则AT91RM9200会从片外的FLASH启动,这时片外的FLASH的起始地址就是0X0了,接下来的过程和片内启动的过程是一样的,只不过这时就需要自己写启动代码了,至于怎么写,大致的内容和ROM的BOOT差不多,不同的硬件设计可能有不一样的地方,但基本的都是一样的。由于片外FLASH可以设计的大,所以这里编写的BOOTLOADER可以一步到位,也就是说不用像片内启动可能需要BOOT好几级了,目前AT91RM9200上使用较多的bootloer是u-boot,这是一个开放源代码的软件,用户可以自由下载并根据自己的应用配置。总的说来,笔者以为AT91RM9200的启动过程比较简单,ATMEL的服务也不错,不但提供了片内启动的功能,还提供了UBOOT可供下载。笔者写了一个BOOTLODER从片外的FLASHA启动,效果还可以。 uboot结构与使用uboot是一个庞大的公开源码的软件。他支持一些系列的arm体系,包含常见的外设的驱动,是一个功能强大的板极支持包。其代码可以 http://sourceforge.net/projects/u-boot下载 在9200上,为了启动uboot,还有两个boot软件包,分别是loader和boot。分别完成从sram和flash中的一级boot。其源码可以从atmel的官方网站下载。 我们知道,当9200系统上电后,如果bms为高电平,则系统从片内rom启动,这时rom中固化的boot程序初始化了debug口并向其发送'c',这时我们打开超级终端会看到ccccc...。这说明系统已经启动,同时xmodem协议已经启动,用户可以通过超级终端下载用户的bootloader。作为第一步,我们下载loader.bin.loader.bin将被下载到片内的sram中。这个loder完成的功能主要是初始化时钟,sdram和xmodem协议,为下载和启动uboot做准备。当下载了loader.bin后,超级终端会继续打印:ccccc....。这时我们就可以下在uboot了。uboot将被下载到sdram中的一个地址后并把pc指针调到此处开始执行uboot。接着我们就可以在终端上看到uboot的shell启动了,提示符uboot>,用户可以uboot>help 看到命令列表和大概的功能。uboot的命令包含了对内存、flash、网络、系统启动等一些命令。 如果系统上电时bms为低电平,则系统从片外的flash启动。为了从片外的flash启动uboot,我们必须把boot.bin放到0x0地址出,使得从flash启动后首先执行boot.bin,而要少些boot.bin,就要先完成上面我们讲的那些步骤,首先开始从片内rom启动uboot。然后再利用uboot的功能完成把boot.bin和uboot.gz烧写到flash中的目的,假如我们已经启动了uboot,可以这样操作: uboot>protect off all uboot>erase all uboot>loadb 20000000 uboot>cp.b 20000000 10000000 5fff uboot>loadb 21000000 uboot>cp.b 210000000 10010000 ffff 然后系统复位,就可以看到系统先启动boot,然后解压缩uboot.gz,然后启动uboot。注意,这里uboot必须压缩成.gz文件,否则会出错。 怎么编译这三个源码包呢,首先要建立一个arm的交叉编译环境,关于如何建立,此处不予说明。建立好了以后,分别解压源码包,然后修改Makefile中的编译器项目,正确填写你的编译器的所在路径。 对loader和boot,直接make。对uboot,第一步:make_at91rm9200dk,第二步:make。这样就会在当前目录下分别生成*.bin文件,对于uboot.bin,我们还要压缩成.gz文件。 也许有的人对loader和boot搞不清楚为什么要两个,有什么区别吗?首先有区别,boot主要完成从flash中启动uboot的功能,他要对uboot的压缩文件进行解压,除此之外,他和loader并无大的区别,你可以把boot理解为在loader的基础上加入了解压缩.gz的功能而已。所以这两个并无多大的本质不同,只是他们的使命不同而已。 特别说名的是这三个软件包都是开放源码的,所以用户可以根据自己的系统的情况修改和配置以及裁减,打造属于自己系统的bootloder。

    标签: 9200 at 91 rm

    上传时间: 2013-10-27

    上传用户:wsf950131

  • FREERTOS的官方移植文档

    FeaturesThe following standard features are provided.• Choice of RTOS scheduling policy1. Pre-emptive:Always runs the highest available task. Tasks of identical priorityshare CPU time (fully pre-emptive with round robin time slicing).2. Cooperative:Context switches only occur if a task blocks, or explicitly callstaskYIELD().• Co-routines (light weight tasks that utilise very little RAM).• Message queues• Semaphores [via macros]• Trace visualisation ability (requires more RAM)• Majority of source code common to all supported development tools• Wide range of ports and examples

    标签: FREERTOS 移植 文档

    上传时间: 2013-10-13

    上传用户:13162218709

  • 开放式汇编器系统的设计

    汇编器在微处理器的验证和应用中举足轻重,如何设计通用的汇编器一直是研究的热点之一。本文提出了一种开放式的汇编器系统设计思想,在汇编语言与机器语言间插入中间代码CMDL(code mapping description language)语言,打破汇编语言与机器语言的直接映射关系,由此建立起一套描述汇编语言与机器语言的开放式映射体系。基于此开放式映射体系开发了一套汇编器系统,具有较高层次上的通用性和可移植性。【关键词】指令集,CMDL,汇编器,开放式 Design of Retargetable Assembler System Liu Ling Feng Wen Nan Wang Ying Chun Jiang An Ping Ji Li Jiu IME of Peking University, 100871【摘要】An assembler plays a very important role in the field of microprocessor verifications and applications, thus how to build a retargetable assembler system has been a hotspot in this field for long time. This paper presents a new method about the retargetable assembler system design.It provides a kind of language CMDL, code mapping description language. During the process of assembling, assembler languages are firstly translated to CMDL, and then mapped to the machine codes. In an other word, CMDL is inserted between assembler languages and machine codes during the translation procedure. As a medium code, CMDL has a lot of features, such as high extraction, strong descript capabilities. It can describe almost all attributes of assembler languages. By breaking the direct mapping relationship between assembler languages and machine codes, the complexities of machine codes are hided to the users, therefore, the new retargetable assembler system has higher retargetable level by converting the mapping from assembler languages and machine codes to assembler languages and CMDL, and implementationof it becomes easier. Based on the new mapping system structure, a retargetable assemblersystem is developed. It proved the whole system has good retargetability and implantability.【关键词】instruction set, symbol table, assembler, lexical analysis, retargetability

    标签: 开放式 汇编器

    上传时间: 2013-10-10

    上传用户:meiguiweishi

  • TMS320C6000 Assembly Language

    Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their productsor to discontinue any product or service without notice, and advise customers to obtain the latestversion of relevant information to verify, before placing orders, that information being relied onis current and complete. All products are sold subject to the terms and conditions of sale suppliedat the time of order acknowledgement, including those pertaining to warranty, patentinfringement, and limitation of liability.

    标签: Assembly Language C6000 320C

    上传时间: 2013-11-12

    上传用户:chens000

  • PCA9516 5channel I2C hub

    The PCA9516 is a BiCMOS integrated circuit intended forapplication in I2C and SMBus systems.While retaining all the operating modes and features of the I2Csystem, it permits extension of the I2C-bus by buffering both the data(SDA) and the clock (SCL) lines, thus enabling five buses of 400 pF.The I2C-bus capacitance limit of 400 pF restricts the number ofdevices and bus length. Using the PCA9516 enables the systemdesigner to divide the bus into five segments off of a hub where anysegment to segment transition sees only one repeater delay.

    标签: 5channel 9516 PCA I2C

    上传时间: 2013-11-21

    上传用户:q123321

  • PCA9517 Level translating I2C-

    The PCA9517 is a CMOS integrated circuit that provides level shifting between lowvoltage (down to 0.9 V) and higher voltage (2.7 V to 5.5 V) I2C-bus or SMBus applications.While retaining all the operating modes and features of the I2C-bus system during thelevel shifts, it also permits extension of the I2C-bus by providing bidirectional buffering forboth the data (SDA) and the clock (SCL) lines, thus enabling two buses of 400 pF. Usingthe PCA9517 enables the system designer to isolate two halves of a bus for both voltageand capacitance. The SDA and SCL pins are over voltage tolerant and arehigh-impedance when the PCA9517 is unpowered.

    标签: translating Level 9517 PCA

    上传时间: 2013-12-25

    上传用户:wsf950131

  • PCA9518 Expandable 5channel I2

    The PCA9518 is a BiCMOS integrated circuit intended forapplication in I2C and SMBus systems.While retaining all the operating modes and features of the I2Csystem, it permits extension of the I2C-bus by buffering both thedata (SDA) and the clock (SCL) lines, thus enabling virtuallyunlimited buses of 400 pF.

    标签: Expandable 5channel 9518 PCA

    上传时间: 2013-10-23

    上传用户:dumplin9

  • PCA9519 4channel level transla

    The PCA9519 is a 4-channel level translating I2C-bus/SMBus repeater that enables theprocessor low voltage 2-wire serial bus to interface with standard I2C-bus or SMBus I/O.While retaining all the operating modes and features of the I2C-bus system during thelevel shifts, it also permits extension of the I2C-bus by providing bidirectional buffering forboth the data (SDA) and the clock (SCL) lines, thus enabling the I2C-bus or SMBusmaximum capacitance of 400 pF on the higher voltage side. The SDA and SCL pins areover-voltage tolerant and are high-impedance when the PCA9519 is unpowered.

    标签: 4channel transla level 9519

    上传时间: 2013-11-19

    上传用户:jisiwole

  • PCA9549 Octal bus switch with

    The PCA9549 provides eight bits of high speed TTL-compatible bus switching controlledby the I2C-bus. The low ON-state resistance of the switch allows connections to be madewith minimal propagation delay. Any individual A to B channel or combination of channelscan be selected via the I2C-bus, determined by the contents of the programmable Controlregister. When the I2C-bus bit is HIGH (logic 1), the switch is on and data can flow fromPort A to Port B, or vice versa. When the I2C-bus bit is LOW (logic 0), the switch is open,creating a high-impedance state between the two ports, which stops the data flow.An active LOW reset input (RESET) allows the PCA9549 to recover from a situationwhere the I2C-bus is stuck in a LOW state. Pulling the RESET pin LOW resets the I2C-busstate machine and causes all the bits to be open, as does the internal power-on resetfunction.

    标签: switch Octal 9549 with

    上传时间: 2014-11-22

    上传用户:xcy122677

  • PCA9555 16bit I2C-bus and SMBu

    The PCA9555 is a 24-pin CMOS device that provides 16 bits of General Purpose parallelInput/Output (GPIO) expansion for I2C-bus/SMBus applications and was developed toenhance the NXP Semiconductors family of I2C-bus I/O expanders. The improvementsinclude higher drive capability, 5 V I/O tolerance, lower supply current, individual I/Oconfiguration, and smaller packaging. I/O expanders provide a simple solution whenadditional I/O is needed for ACPI power switches, sensors, push buttons, LEDs, fans, etc.The PCA9555 consists of two 8-bit Configuration (Input or Output selection); Input, Outputand Polarity Inversion (active HIGH or active LOW operation) registers. The systemmaster can enable the I/Os as either inputs or outputs by writing to the I/O configurationbits. The data for each Input or Output is kept in the corresponding Input or Outputregister. The polarity of the read register can be inverted with the Polarity Inversionregister. All registers can be read by the system master. Although pin-to-pin and I2C-busaddress compatible with the PCF8575, software changes are required due to theenhancements, and are discussed in Application Note AN469.

    标签: C-bus 9555 SMBu PCA

    上传时间: 2013-11-13

    上传用户:fredguo