Petersen_FlashCCompiler

合集下载

flash存储器自编程(c语言)

flash存储器自编程(c语言)

自编程就是用户进行的flash存储器写操作。

Block号,是进行擦写和非空检查操作的单元。

入口ram,是flash存储器自编程样例库所使用的RAM区域。

用户程序需要保留着块区域,当调用库时,需要指定这片区域的起始地址。

内部验证,再写入到flash存储器后,信号电平会内部检查,确认读到正确的数据。

内部验证错误时,对应的设备被认为有错。

第一章自编程样例库是78K0/KX2提供的固件以及用来给flash存储器重写数据的软件。

用户程序通过调用自编程样例库,可以改写flash存储器的内容,从而,加快软件开发。

注意:1 自编程样例库重写flash存储器,需要使用KX2的CPU,寄存器和RAM,在运行自编程样例库时用户程序无法执行。

2 自编程样例库使用CPU(寄存器bank3)和工作区域(入口RAM区100字节)。

于是,用户调用自编程样例库之前必须自行保存此区域内的用户程序数据。

C和汇编中都可以调用自编程样例库。

如果C文件编译时使用-SM参数(把目标作为静态模式),用静态模式连接库。

如果不用-SM,库调用采用正常模式。

如果源文件是汇编格式,只能用静态模式连接库。

自编程的流程1 FLMD0引脚拉高。

2 Flashstart3 设置操作环境4 Flashenv(入口RAM初始化)5 检查FLMD电平6 正常结束--〉Flash block非空检查—〉字写入(1~64个字长)—〉block校验—〉Flash结束—〉FLMD0拉低。

Bank编号和block编号Kx2的flash存储器高达60KB,Block以1K为单位。

Boot cluster 0000h~0FFFh,1000h~1ffffh。

防止写入时掉电或者reset。

第四章详细讲述引导交换功能。

60KB的flash和96KB以上的flash不同。

60KB中0000h~F000h分为60个block区,F000h以上到F800h是内部扩展RAM区域。

0000h~003Fh存放64字节的向量表,003Fh~007Fh存放64字节的callt表,0080h~0081h参数位,0081h~07FFh是1919字节的程序区域,0800h~0FFFh是2048字节的callf的entry。

飞思卡尔s12单片机-用C语言开发应用程序共20页文档

飞思卡尔s12单片机-用C语言开发应用程序共20页文档
飞思卡尔s12单片机-用C语言开发应 用程序
46、法律有权打破平静。——马·格林 47、在一千磅法律里,没有一盎司仁 爱。— —英国
48、法律一多,公正就少。——托·富 勒 49、犯罪总是以惩罚相补偿;只有处 罚才能 使犯罪 得到偿 还。— —达雷 尔
50、弱者比强者更能得到法律的保护 。—— 意义,不要越轨。——华盛顿 17、一个人即使已登上顶峰,也仍要自强不息。——罗素·贝克 18、最大的挑战和突破在于用人,而用人最大的突破在于信任人。——马云 19、自己活着,就是为了使别人过得更美好。——雷锋 20、要掌握书,莫被书掌握;要为生而读,莫为读而生。——布尔沃

机器人程序设计(C语言)(第2版)章节练习题及参考答案

机器人程序设计(C语言)(第2版)章节练习题及参考答案

第一章一种新的C语言学习方式1.一台能够工作的计算机包括?CPU (Central Processing Unit,中央处理单元,进行运算和控制,包括运算器和控制器等)、存储器(如RAM、ROM等)、输入设备、输出设备(包括串行/并行接口、USB等)。

其中,RAM (RandomAccess Memory,随机存储器)主要用于存储数据,ROM (RcadOnlyMemory, 只读存储器)主要用于存储程序。

2.单片机工作时需要什么?需要稳定的电源、晶振、外部存储器和编程调试接口,就像计算机工作时需要电源、晶振、硬盘或其他大容量外部存储器和操作系统一样。

微控制器是将单片机独立工作所需的电源适配器、晶振、外部存储器和串口转换电路等封装到一个模块上,这样就能直接与计算机连接并进行编程开发,不需任何其他芯片和电路。

3. AT89S52是一种什么样的单片机?是一种高性能、低功耗的8位单片机,内含8 KBISPdn-System Programmable系统在线编程)可反复擦写IOOO次的Flash只读程存器,采用ATMEL公司的高密度非易失性存储技术制造,兼容标准MCS51指令系统及其引脚结构。

在实际工程应用中,功能强大的AT89S52 已成为许多高性价比嵌入式控制应用系统的解决方案。

4. Progisp是一款什么样的软件?是一款免费下载的ISP软件,不需要专门的安装即可使用,非常方便。

使用该软件,读者可以将C语言程序生成的可执行文件下载到机器人单片机上。

使用时需要1根USBA转B 信号线。

5.简述串口调试工具的特点。

串口调试工具就是串行通信接口调试软件,集数据发送、数据接收、数据监控、数据分析等功能于一身,具有小巧精致、操作简捷、功能强大的特点,可以在串口通信监控、设备通信测试工作中有效提高效率。

6. pr i ntf ()函数称为?称为格式输出函数,其功能是按用户指定的格式,把指定的数据输出显示。

Print ()函数是C语言提供的标准输出函数,定义在C语言的标准函数库中,要使用它,必须包括定义标准函数库的头文件stdio. h o第二章最简单的C程序设计——机器人做算数1. C语言用什么整型变量?C语言用关键字imt定义整型变量。

关于fpga编程flash芯片和配置数据技巧

关于fpga编程flash芯片和配置数据技巧

关于fpga编程flash芯片和配置数据技巧在FPGA中实现在应用编程(In Application Pro—gramming,IAP)有两种方法:一种是,在电路板上加外电路。

例如用MCU或CPLD来接收配置数据,在被动串行(PS)模式下由外电路编程FPGA或是编程Flash器件(包括EPCS和Flash),然后控制FPGA的配置复位引脚来复位整个FPGA,最后FPGA采用主串方式进行自我配置。

另一种是,通过FPGA中的Nios CPU或是专用IP来接收编程数据,并编程Flash芯片,然后通过外部简单电路将FPGA复位启动,以主动串行(AS)模式进行配置。

为了减小电路板面积,节约成本,提高可靠性,本设计采用第二种方法。

本设计的要求是:硬件电路须配置为主动串行模式,即选择MSEL[1:O]为l:O;具备EPCS,或同时具备EPCS和Flash;具有与PC机通信的功能。

FPGA接收更新数据,并将其存入Flash器件,然后复位Nios或FPGA对软硬件进行更新。

1 系统的硬件设计系统主要由Cyclone FPGA、EPCS、Flash和串行通信等组成,硬件结构如图1所示。

点击看原图EPCS采用Altera公司的EPCS4,容量达到4 Mb,引脚较少,成本低,支持3.3 V低电压操作。

Flash芯片采用AMD公司的Am29LV640MH/L,支持3.O V低电压操作,具有低功耗特性,芯片容量为64 Mb,满足大容量数据的存储;并口操作,与Cyclone FPGA 完全兼容,而且在SOPC中有与之对应的CFI_FLASH核,便于硬件电路的设计。

2 工作原理2.1 几个概念FPGA配置数据:是sof文件,将sof文件编程到Flash中,上电后FPGA可以从Flash中配置。

sof文件是其他配置文件的基础,其他文件均可由sof文件转换得到。

软件数据:通过NiosII IDE创建elf文件,将用户程序编程到Flash中,允许复位后从F1ash。

Flash Programmer

Flash Programmer

Flash Programmer User ManualRev. 1.5Table of contents1INTRODUCTION (3)2ABOUT THIS MANUAL (3)3DEFINITIONS (3)4PROGRAMMING USING THE GUI VERSION (4)4.1S YSTEM ON C HIP (5)4.1.1Device list: (5)4.1.2Actions: (5)4.1.3Flash lock: (6)4.1.4IEEE address / general change field: (6)4.1.5View Info Page (9)4.1.6Updating SmartRF04EB/SmartRF05EB USB MCU firmware (10)4.1.7Updating CC2430DB USB MCU firmware (10)4.2EB BOOTLOADER (11)4.2.1SmartRF04EB (11)4.2.2SmartRF05EB (12)4.3MSP430P ROGRAMMING (13)5COMMAND LINE INTERFACE (14)5.1O PTIONS (14)5.2P LUG-IN TO IAR W ORKBENCH (14)5.2.1Setup (14)5.2.2Use (15)6INSTALLED HEX FILES (18)7DOCUMENT HISTORY (18)1 IntroductionThis is the user manual for the SmartRF Flash Programmer.The Flash Programmer can be used to program the flash memory in Texas Instruments system on chip MCU’s and and for upgrading of the firmware in the USB MCU found on the SmartRF04EB, SmartRF05EB and CC2430DB. In addition the Flash Programmer can be used for programming the flash memory of MSP430 via the MSP-FET430UIF and the eZ430 dongle.When connecting a CC2430EM on SmartRF04EB or a CCMSP2618 on SmartRF05EB, the Flash Programmer also support reading/writing the IEEE address.2 About this manualThis manual covers the use of the Flash programmer, both the GUI version and the command line interface.The intended use of the Flash Programmer is to provide a quick and easy way to download.hex files into Texas Instruments system on chip products. It can also be used to update the firmware on evaluation boards through the USB cable.The manual describes the most common functions and options available. How to access the flash programmer from IAR workbench is also described. Only programming through the USB cable is described. The Flash Programmer also has functionality to program the USB MCU found on SmartRF04EB and CC2430DB through the Silicon Laboratories serial adapter EC2, however this is not covered in this manual.3 DefinitionsSmartRF®04DK A collective term used for all development kits for theSmartRF®04 platform, i.e. CC2510DK and CC2430ZDK SmartRF®05DK A collective term used for all development kits for theSmartRF05 platform, i.e. CC2520DKUSB MCU The Silicon Labs C8051F320 MCU used to provide a USBinterface on the SmartRF®04EB and CC2430DB.The CC2511 MCU used to provide a USB interface on theSmartRF05EB.Factory firmware The firmware that is supplied programmed into the USB MCUfrom the factory. This firmware supports SmartRF® Studiooperation as well as a stand-alone PER tester.GUI Graphical User InterfaceCC Debugger The CC Debugger can be used as interface to program SoC’smounted on Battery Boards and to update the USB MCU onSmartRF05EB.4 Programming using the GUI versionFigure 1: GUI interfaceFigure 1 show the GUI interface of the Flash Programmer. There is five different tab’s to choose from.“System on Chip” is used to program Texas Instruments SOC’s e.g. CC1110, CC2430, CC2510, CC2530. The use of this tab is described in chapter 4.1.“EB application (USB)” is used when updating the USB MCU found on SmartRF04EB, SmartRF05EB, CC Debugger and CC2430DB. The use of this tab is described in chapter Error! Reference source not found..“EB bootlaoder” is used to update the bootlader on SmartRF04EB and SmartRF05EB. Further details are described in chapter 4.3.“MSP430” is used to program the MSP430 MCU used in various RF development kits. Further details are described in chapter 4.4.4.1 System on Chip.list:4.1.1 DeviceThe device list is a list over all currently connected System on Chip devices. Note that when the System on Chip tab is selected, a SmartRF0xEB’s without a System on Chip EM connected will not be displayed.If more than one chip is connected the one selected (marked blue) in this window is the one that will be programmed.4.1.2 Actions:There are five different actions that can be performed on the Texas Instruments SoC’s. To perform an action, select one and then press the “Perform actions” button.The progress bar and output window at the bottom will output the progress and result of the action.The five actions are:Erase and programWill erase the flash memory of the selected SoC and then program it with the .hex file selected in the “Flash image” field.Erase, program and verifySame as “Erase and program”, but after the programming the content of the flash will be read back and compared with the .hex file. This will detect errors during programming or errors caused by damaged flash. It is therefore recommended to always verify afterprogramming.Append and verifyThis action will write the contents of the hex file given in the “Flash image” field, to the selected SoC without erasing the Flash first. Note that all the Flash written to must read 0xFF (be erased) before programming starts. Feature is useful when a program isdivided into more that one hex file.This action uses debug commands to read from the Flash, which means that if thedebug commands are blocked on the chip, it is impossible to perform this action.Verify against hex-fileThis action will compare the contents of the Flash with a .hex file given in the “Flashimage” field.Note that the function only verifies that the contents of the .hex file is present in theFlash, it does not check if there is anything additional written in the Flash.This action uses debug commands to read from the Flash, which means that if thedebug commands are blocked on the chip, it is impossible to perform this action.Read into hex-fileThis action will read the entire content of the Flash and then write it to the hex-file given in the “Flash image” field.Note that the hex-file given in the “Flash image” field will be overwritten.This action uses debug commands to read from the Flash, which means that if thedebug commands are blocked on the chip, it is impossible to perform this action.lock:4.1.3 FlashWhen programming a chip it is possible to apply the different Flash lock and debug command lock that is supported by the chip. These fields will change depending on the chip type selected in the Device list. Please refer to the datasheet for the different chip types for a description of these locks.Note that if the debug command lock is set, it is impossible to use most of the debug commands on the chip. E.g. the Flash may no longer be read out.CC2530:For CC2530 it is possible to write protect each page of the flash image. The input field “Write protect” should be given as shown in Figure 3, Write protect CC2530. The pages to be write protected can be given separated by a comma. It is also possible to specify a range of pages.Figure 3, Write protect CC25304.1.4 IEEE address / general change field:Depending of the chip connected these fields will change.Figure 4: IEEE address for Zigbee SoC (CC2430/31)Figure 5: IEEE address for ZigBee SoC (CC2530/31)Figure 6: Change field for non Zigbee SoCIEEE address on ZigBee devices like CC2430/31On a CC243x the IEEE address is stored in the last 8 bytes of the flash. E.g. the placement is different depending on the size of the Flash. See Table 1 below.Chip type IEEE addressstart IEEE addressendCC243x F-128 0x1FFF8 0x1FFFFCC243x F-64 0xFFF8 0xFFFFCC243x F-32 0x7FF8 0x7FFFTable 1: Placement of IEEE addressTo read the IEEE address from a chip select the appropriate Chip type (e.g. F-128) and push the “Read IEEE” button.To write the IEEE address to a chip, manually write the address into the IEEE field(hexadecimal, with a space between each byte) and then push the “Write IEEEaddress” button.Writing the IEEE address will fail if the flash is write-protected, or the debug command lock is set.If the “Retain IEEE address when reprogramming the chip” is checked the IEEEaddress is preserved when a new program is written to the chip with the “Erase andprogram” or “Erase, program and verify” action. This is however not possible if thedebug command lock is set on the chip before the programming starts.IEEE address on ZigBee devices like CC2530/31For CC253x it is possible to have two IEEE addresses programmed in flash. ThePrimary address is programmed in the Information Page and can only be read. Theaddress is preprogrammed in factory.The secondary IEEE address, which is optional (used when the address in theinformation page is not used), is stored at the end of the flash. The last 16 bytes is used for lock bits and the IEEE address is stored in the last 8 bytes before the lock bits.Chip type IEEE addressstart IEEE addressendCC253x F-256 0x3FFE8 0x3FFEF CC253x F-128 0x1FFE8 0x1FFEF CC253x F-64 0xFFE8 0xFFEF CC253x F-32 0x7FE8 0x7FEFTo read the IEEE address select either Primary or Secondary and push the “ReadIEEE” button.Only the secondary IEEE address can be written. All the other rules are the same as described above for CC243x.Change Field on non ZigBee devicesThe intention of this field is to provide an easy and quick way to give a unique address to the chip when programming it. It gives the user the possibility to change any number of bytes at any location in the program read from the hex file, before it is written to the chip.When “Change” is checked, input the start address, e.g. the first byte that should be changed into the first field.Then the new values are written into the rightmost field (hexadecimal, with a spacebetween each byte)When “Erase and program” or “Erase, program and verify” action is performed, thebytes at the given address from the hex file are replaced with those written by the user before the chip is programmed. The hex file itself is not changed.4.1.5 View Info PageTo view the information page click on the “View Info Page” button shown at the left side (Only applicable for CC253x).The Information Page is a 2 KB read-only region that stores various device information.USB MCU firmware updateFirmwarerevisionnumberFigure 7: USB MCU updateFigure 7 show the “EB application (USB)” tab. It provides the possibility to update the firmware on an Evaluation Board using only a USB cable. No additional programmer is necessary. When a SmartRF04EB, SmartRF05EB, CC Debugger or CC2430DB is connected it will appear in the device list. In the rightmost column the revision number of the current firmware can be read.Note that the update procedure is different for SmartRF04EB and CC2430DB. However the hex file used, (fw400.hex), is identical for the two products.SmartRF05EB uses a different hex file specially build for the USB MCU (CC2511)4.1.6 Updating SmartRF04EB/SmartRF05EB USB MCU firmware1. Remove any CCxxxxEM module and all external equipment connected to theEvaluation Board.2. Connect the USB cable to the Evaluation Board and turn it on, it should appear in theDevice list with “Chip type” N/A.3. Browse to the correct flash image (e.g. srf04eb_fwid0400.hex for SmartRF04EB)4. Choose the “Erase, program and verify”5. Push “Perform actions”.6. The status indicator at the bottom will show the progress and when completed thetext “EB firmware update OK” will appear.4.1.7 Updating CC2430DB USB MCU firmware1. Remove all jumpers on P5.2. Connect pin 9 and 10 on P4 (USB deb) together.3. Connect the USB cable to the CC2430DB and turn it on, it should appear in theDevice list with “Chip type”, “EB type” and “EB firmware ID” set to N/A.4. Browse to the correct flash image (fw400_xx.hex)5. Choose the “Erase, program and verify”6. Push “Perform actions”.7. The status indicator at the bottom will show the progress and when completed thetext “EB firmware update OK” will appear.8. Remove jumper on pin 9-10 on P4, and mount jumpers on P5.Note: After the programming is finished it takes a few seconds before the device appear in the device list. This is due to timing constrains on the USB bus after programming and reset of the device.bootloader4.2 EB4.2.1 SmartRF04EBTo program the bootloader on SmartRF04EB it is required to use the Serial Adapter (EC2) from Silabs.Select Serial port and flash image. The flash image can be selected from a drop down list with a history of the last 10 images that has been programmed. It is also possible to use the button on the right side to browse for the required flash imageSpecify the board identification (ID Number) and select the actions “Erase and program” or “Erase, program and verify”.Click the “Perform actions” button to start programming. Status will be displayed in the field below the button.The action “Verify against hex-file” can be used to check current image on the USB MCU with the given hex file.4.2.2 SmartRF05EBFigure 8, SmartRF05EB bootloaderFor programming of the bootloader on SmartRF05EB, it is possible to use the CC Debugger as illustrated on the image shown when Device SmartRF05EB is selected.It is also possible to use a SmartRF04EB or SmartRF05EB board instead of the CC Debugger. The 10 pin flat ribbon cable should then be connected on the “SoC Debug” header on the SmartRF0xEB.Programmer Device to be programmedFigure 9, Programming of bootloader with SmartRF04EBThe interface speed can be set to either Fast or Slow. This determines the clock speed on the debug interface of the USB MCU. Normally there shouldn’t be any problem to use the fast speed.The flash image can be selected from a drop down list with a history of the last 10 images that has been programmed. It is also possible to use the button on the right side to browse for the required flash image.The connected CC Debugger or SmartRF04EB board should be visible in the list of connected devices. The “Chip type” should be CC2511. Select the required device.Specify the board identification (ID Number) and select the actions “Erase and program” or“Erase, program and verify”.Click the “Perform actions” button to start programming. Status will be displayed in the field below the button.Programming4.3 MSP430Figure 10: MSP430 Programming.Figure 6 show the tab used for programming of the MSP430 MCU. The device can be connected via the USB-Debug-Interface (MSP-FET430UIF) or via the eZ430 USB dongle. Figure 6 show both cases. Devices connected with the MSP-FET430UIF will appear as a COM port. In this case it is COM26. For eZ430 connected devices it will be seen as a HID port. Shown as HID0 in figure 6.When the device is connected via the USB interface, it could take a few seconds before the device appear in the device list.The status of all actions will be given in the Status field at the bottom of the window. An attempt to program a hex file build for another MCU family will be detected and reported in the Status field.The Firmware version of the USB MCU will be checked automatically when a device is connected. If the FW version does not match the MSP430.dll version a message will be given and the user must choose whether or not to update the FW. The update will be performed automatically if the user chooses to update the FW.5 Command Line Interface5.1 OptionsTo get all available options in the command line interface, run the SmartRFProgConsole.exe in a command window or in the IAR workbench without any parameters/arguments. A list of all available options will then be printed out. These options are the same as the ones available in the GUI version of the Flash programmer, please refer to chapter 4 for a description of these.5.2 Plug-in to IAR WorkbenchThe command line interface can be integrated in the IAR Workbench. To setup IAR with this feature follow the instructions below.5.2.1 SetupStart IAR Workbench and choose “Configure Tools…”, from the Tools menu, Figure 11.Figure 11: Tools MenuPress “New”, and add the information present in Table 2, see Figure 12.Field ValueFlashProgramMenuText:Command: C:\Program Files\TexasInstruments\FlashProg\SmartRFProgConsole.exe1Argument: S() EPV F=$TARGET_PATH$ K(0)Table 2: Flash Programmer Setup1 Insert the complete path to the Command Line Flash ProgrammerFigure 12: Configure Tools5.2.2 UseAfter setup, a new target is placed on the Tools menu.Figure 13: Using Flash Programmer from IAR WorkbenchSetup your project to generate hex file as primary output (Figure 15), compile and link, and choose “Flash Program” from the Tools menu. A command line window will be displayed, Figure 14. After the “S” option an empty parenthesize is present. If this parenthesize is empty, the first available development card is used. If more than one development card is connected, fill in the ID number for the card you want to use in the empty parenthesize.The “K(0)” option will retain the IEEE address while programming.Use K(0) on CC2430 F-128, K(1) on CC2430 F-64 and K(2) on CC2430 F-32If the K option is removed the IEEE address is not retained.The “EPV” option is for “Erase, program and verify”Figure 14: Command Line WindowPress OK and the hex file will be downloaded.Figure 15: Generate HEX file as primary outputNote:If the output format is hex file the debugger can not be used.To produce a hex file for banked code, please see the manual named “swru038 IAR User Manual” available from .To have both the hex file and the debug file output, select “Debug information for C-SPY” and “Allow C-SPY-specific extra output file”. Then select the “Extra Output” tab.Select “Generate extra output file” and specify name of the .hex file.6 Installed hex filesAfter installation of the Flash Programmer, a few hex files has also been installed. These can be found on the following directories: C:\Program Files\Texas Instruments\Extras\Srf04Eb and C:\Program Files\Texas Instruments\Extras\Srf05Eb• cc2430db_bootloader.hex Latest version of the CC2430DB bootloader.•srf04eb_fwid0400.hex Latest version of the SmartRF04EB application.•srf04eb_bootloader.hex Latest version of the SmartRF04EB bootloader.•srf05eb_fwid0500.hex Latest version of the SmartRF05EB application.• Srf05eb_bootloader.hex Latest version of the SmartRF05EB bootloader.•Srf05dbg_fwid05CC.hex Latest version of the CC Debugger application.•Srf05dbg_bootloader.hex Latest version of the CC Debugger bootloader.7 Document historyRevision Date Description/Changes1.5 2009-02-11 New version with support for CC2530 andthe CC Debugger.1.4 2007-12-27 New version with support forSmartRF05EB and MSP4301.3 2007-09-19 Update of images and description of hexfiles added.changesMinor1.2 2006-05-16Changedlayout 1.1 2006-02-16release 1.0 2005-12-21InitialIMPORTANT NOTICETexas Instruments Incorporated and its subsidiaries(TI)reserve the right to make corrections,modifications,enhancements,improvements, and other changes to its products and services at any time and to discontinue any product or service without notice.Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment.TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty.Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty.Except where mandated by government requirements,testing of all parameters of each product is not necessarily performed.TI assumes no liability for applications assistance or customer product design.Customers are responsible for their products and applications using TI components.To minimize the risks associated with customer products and applications,customers should provide adequate design and operating safeguards.TI does not warrant or represent that any license,either express or implied,is granted under any TI patent right,copyright,mask work right, or other TI intellectual property right relating to any combination,machine,or process in which TI products or services are rmation published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement e of such information may require a license from a third party under the patents or other intellectual property of the third party,or a license from TI under the patents or other intellectual property of TI.Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties,conditions,limitations,and notices.Reproduction of this information with alteration is an unfair and deceptive business practice.TI is not responsible or liable for such altered rmation of third parties may be subject to additional restrictions.Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice.TI is not responsible or liable for any such statements.TI products are not authorized for use in safety-critical applications(such as life support)where a failure of the TI product would reasonably be expected to cause severe personal injury or death,unless officers of the parties have executed an agreement specifically governing such use.Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications,and acknowledge and agree that they are solely responsible for all legal,regulatory and safety-related requirements concerning their products and any use of TI products in such safety-critical applications,notwithstanding any applications-related information or support that may be provided by TI.Further,Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in such safety-critical applications.TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are specifically designated by TI as military-grade or"enhanced plastic."Only products designated by TI as military-grade meet military specifications.Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at the Buyer's risk,and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are designated by TI as compliant with ISO/TS16949requirements.Buyers acknowledge and agree that,if they use any non-designated products in automotive applications,TI will not be responsible for any failure to meet such requirements.Following are URLs where you can obtain information on other Texas Instruments products and application solutions:Products ApplicationsAmplifiers AudioData Converters AutomotiveDLP®Products BroadbandDSP Digital ControlClocks and Timers MedicalInterface MilitaryLogic Optical NetworkingPower Mgmt SecurityMicrocontrollers TelephonyRFID Video&ImagingRF/IF and ZigBee®Solutions WirelessMailing Address:Texas Instruments,Post Office Box655303,Dallas,Texas75265Copyright©2009,Texas Instruments Incorporated。

FLASH在系统编程和DSP并行引导的C语言实现

FLASH在系统编程和DSP并行引导的C语言实现

FLA SH 在系统编程和D SP 并行引导的C 语言实现刘 兵,徐家恺,刘 阳(南京大学电子科学与工程系,南京210093) 摘 要:本文介绍了一种在D SP 仿真环境下,采用C 语言对FLA SH 进行在系统编程(ISP )的方法,同时介绍了TM S 320V C 5402的Boo tloader 原理,给出了D SP 的并行FLA SH 引导功能实现方案,并且给出了一个简单的测试实例。

关键词:C 语言;数字信号处理器;FLA SH ;在系统编程;Boo tloader中图分类号:TN 4 文献标识码:A 文章编号:1002-2279(2004)04-0029-04In S ys tem P rog ramm ing of F la s h a nd DS P B oo tloa de r inP a ra lle lM ode W ith C La ngua geL I U B ing ,XU J ia -kai ,L I U Yang(D ep art m ent of E lectronics S cience and E ng ineering ,N anj ing U niversity ,N anj ing 210093,Ch ina ) Abstract :T h is article in troduces the m ethod of FLA SH In System P rogramm ing (ISP )w ithC language under the environm en t ofD SP em u lati on .It recomm ends the p rinci p le of TM S 320V C 5402Boo tloader and gives the schem e of D SP boo tloading from FLA SH in parallel boo t m ode at the sam e ti m e ,and has given ou t a si m p le test in stance .Key words :C language ;D SP ;FLA SH ;In System P rogramm ing ;Boo tloader1 引 言嵌入式系统设计中,常选择RAM 或FLA SH 作为片外存储器,两者相比,FLA SH 具有断电情况下不丢失数据的特点,适合数据的长期保存。

【设计经验】3、ISE中烧录QSPIFlash以及配置mcs文件的加载速度与传输位宽

【设计经验】3、ISE中烧录QSPIFlash以及配置mcs文件的加载速度与传输位宽

【设计经验】3、ISE中烧录QSPIFlash以及配置mcs⽂件的加载速度与传输位宽⼀、软件与硬件平台软件平台:操作系统:Windows 7 64-bit开发套件:ISE14.7硬件平台:FPGA型号:XC6SLX45-CSG324QSPI Flash型号:W25Q128BV⼆、背景介绍 在FPGA开发过程中,如果我们把bit⽂件下载到FPGA中,那么当FPGA掉电以后,bit⽂件就丢失,再次上电的时候,代码就不会运⾏了。

如果想掉电以后,代码还可以运⾏,那么必须把编译好的⽂件下载到外部的QSPI Flash中。

当⽂件下载到外部的QSPI Flash中以后,由于QSPI Flash是⼀种⾮易失性存储器,掉电以后⾥⾯的数据并不会丢失,待重新上电以后,FPGA会⾃动读取QSPI Flash中的数据把代码加载到FPGA内部的RAM中运⾏。

由于bit不能直接下载到QSPI Flash中,所以必须先把bit⽂件转化为.mcs⽂件或者.bin⽂件,然后才能下载到QSPI Flash中。

本⽂主要教⼤家如何把bit⽂件转化为.bin⽂件和.mcs⽂件,然后下载到外部的QSPI Flash中。

同时为了加快上电以后FPGA加载QSPI Flash中mcs⽂件的速度,我们可以把bit⽂件配置为4线模式(前提是你的硬件必须⽀持四线模式),并修改加载的时钟频率,从⽽⼤⼤加快FPGA的启动速度。

三、⽬标任务1、把编译好的bit⽂件转化为.bin⽂件2、把编译好的bit⽂件转化为.mcs⽂件3、把.bin⽂件或者.mcs⽂件烧录到外部的QSPI Flash中4、修改.bit⽂件的模式以及⽀持的时钟频率四、待测代码module led_top(input I_clk ,input I_rst_n ,output [3:0] O_led_out);reg [31:0] R_cnt_ls ;wire W_clk_ls ;reg R_clk_ls_reg ;reg [3:0] R_led_out_reg ;//////////////////////////////////////////////////////////////////// 功能:产⽣1s的时钟//////////////////////////////////////////////////////////////////always @(posedge I_clk or negedge I_rst_n)beginif(!I_rst_n)beginR_cnt_ls <= 32'd0 ;R_clk_ls_reg <= 1'b1 ;endelse if(R_cnt_ls == 32'd24_999_999)beginR_cnt_ls <= 32'd0 ;R_clk_ls_reg <= ~R_clk_ls_reg ;endelseR_cnt_ls <= R_cnt_ls + 1'b1 ;endassign W_clk_ls = R_clk_ls_reg ;//////////////////////////////////////////////////////////////////// 功能:对输出寄存器进⾏移位产⽣流⽔效果//////////////////////////////////////////////////////////////////always @(posedge W_clk_ls or negedge I_rst_n)beginif(!I_rst_n)R_led_out_reg <= 4'b0001 ;else if(R_led_out_reg == 4'b1000)R_led_out_reg <= 4'b0001 ;elseR_led_out_reg <= R_led_out_reg << 1 ;endassign O_led_out = ~R_led_out_reg ;endmodule 写好待测代码,并添加物理约束⽂件绑定好管脚,我的开发板上的约束⽂件如下NET I_clk LOC = V10 | TNM_NET = sys_clk_pin | IOSTANDARD = "LVCMOS33";TIMESPEC TS_sys_clk_pin = PERIOD sys_clk_pin 50000 kHz;NET I_rst_n LOC = N4 | IOSTANDARD = "LVCMOS15"; ## SW2 pushbuttonNET O_led_out<0> LOC = V5 | IOSTANDARD = "LVCMOS33"; ## LED1NET O_led_out<1> LOC = R3 | IOSTANDARD = "LVCMOS33"; ## LED2NET O_led_out<2> LOC = T3 | IOSTANDARD = "LVCMOS33"; ## LED3NET O_led_out<3> LOC = T4 | IOSTANDARD = "LVCMOS33"; ## LED4五、任务⼀、把.bit⽂件转化为.bin⽂件。

CC26xx之FlashProgrammer2使用

CC26xx之FlashProgrammer2使用

CC26xx之FlashProgrammer2使用Flash Programmer 2软件安装及介绍我们用IAR进行编译之后,生成的文件是“.hex”文件(默认情况下只生成hex文件,当然如果配置OAD空中升级,还会生成“.bin”文件,“.bin”文件的升级烧录方法请看CC2640 OAD的相关博文,如下连接:点击打开链接),这个文件是十六进制文件,编译的时候我们可以直接用IAR的仿真方式烧录,但是如果不需要编译的情况下烧录或者烧录多个文件的时候,用IAR去操作就相对麻烦一些。

下面,我们一起来看看如何用TI的工具“Flash Programmer 2”来下载。

该工具可以从TI官网上进行下载,如果觉得打开TI官网太卡的话,可以从下面的链接进行下载:/detail/zzfenglin/9626337安装过程比较简单,没有什么需要设置的,所以我们跳过安装过程。

该工具安装完成之后,通过xds100v3仿真器将电脑与开发板连接起来。

该软件具有发现目标、下载固件、读取固件、读取MAC地址,写第二MAC地址等功能,并且可以将Flash中特定地址区间的数据读出来或者修改特定地址的数据,还有锁定芯片的功能。

Flash Programmer 2的使用及功能介绍搜索连接设备双击“Flash Programmer 2”快捷方式,打开该软件,界面显示截图如下:点击“Refresh”刷新设备,在XDS下的设备类型上点击鼠标右键,然后点击弹出的“Connect”,操作显示如下:点击“Connect”之后,会在下方的“Status”显示执行过程,并显示连接的进度条,成功连接之后,显示绿色的“Success”,截图如下:连接过程:连接成功:连接成功之后,我们就可以进行程序烧录,MAC地址读取,Flash数据读取及修改等等操作了。

Main--程序烧录该工具烧录分为单个文件烧录和多个文件烧录。

1.单个文件烧录,配置截图如下:成功烧录的时候会在“Status”下显示相应说明及“Success”:2.多个文件烧录,配置如下:大家一定要注意第二步中两个文件的先后顺序,一定是“Stack”文件在前,“App”文件在后。

使用flash programmer软件操作easyarm2200外部flash

使用flash programmer软件操作easyarm2200外部flash

R0, =BCFG0 R1, =0x1000ffef R1, [R0]
LDR LDR STR …
R0, =BCFG1 R1, =0x1000ffef R1, [R0]
然后再选择 Flash 标签页进行设置,如图 9 所示。
5
广州周立功单片机发展有限公司 Tel:(020)38730977 38730977 Fax:38730925 设置起始地址 选择小 端模式
广州周立功单片机发展有限公司 Tel:(020)38730977 38730977 Fax:38730925
1.4 结束语
FlashProgrammer 软件还可以对 Flash 器件进行其它的操作,方法类似,在此就不作更 多的描述。用户可以查看软件的帮助文档和以下链接了解更多的信息。
按钮可以读取 Flash 器件的 ID,对话框如图 13 所示。
7
提取 Flash 数据
填充
广州周立功单片机发展有限公司 Tel:(020)38730977 38730977 Fax:38730925
点击
图 13 读取 Flash 器件 ID
按钮可以下载程序至目标板的 Flash 中,编程对话框如图 14 所示。
选择用于下载 的 HEX 文件
选择“编程前 擦空 Flash”
编程按钮在选定 HEX 文件后变实
这些参数不影响 程序下载
图 14 下载程序对话框
在选择 HEX 文件后,灰色的 Program 按钮将变为可用。点击 Program 按钮就可以执行 下载操作,下载结束后的对话框如图 15 所示。
图 15 下载结束对话框 8
选 择 Flash 器件类型 图 9 选择 Flash 标签页进行设置
最后再选择 Program 标签页进行设置,并将设置保存为 EasyARM2200.ocd 文件。

GP32单片机Flash在线编程C语言实例.

GP32单片机Flash在线编程C语言实例.
/*-----------------------------------------------------*
*工程名:Flash.prj *
*硬件连接:无*
*功能:*
* 1.等待接收N+1个数,并放入N和data数组中*
* 2.擦除以addr为首地址的Flash一页,将N个数据写入*
* 3.从以addr为首址的Flash区读取N个数据,串口发送*
void delay2(void);
void DoWriteFlash(void)
{
unsigned char i;
unsigned char j;
FLCR=0b00000001;//①1->PGM
i=FLBPR; //②读FLBPR
//③任意数->faddr,选中flash行
*((volatile unsigned char *)faddr)=56;
* 3.调用擦/写子程序之前先将待擦/写页后一页开始的*
*所有区域写保护*
*------------------------------------------------------*
/*[头文件]*/
#include "SCI.h" //串行通信子程序头文件
#include "GP32C.h" //包含头文件
//调用WriteFlash()程序之前要保护后一页之后的区域
//如:WriteFlash(0x8000),则要保护的为$8100后的区域
FLBPR=0b00000010; //保护$8100~$FFFF的FLASH区域
WriteFlash(0x8000);//将数据写入flash
//读出flash中的数据发给pc机比较

飞思卡尔 使用监控程序经行程序烧写、调试的方法说明—C语言编程版

飞思卡尔 使用监控程序经行程序烧写、调试的方法说明—C语言编程版

设置好以后就可以用了。
四、程序的下载 连接好串口线,打开设置好的超级终端,然后对单片机商店或者复位时,超级
终端就会出现以下文字: D-BUG V1.1 Tsinghua MAC All Right Reserved Type H for Help Type Any Key into Debug, Type H for Help 在刚刚上电或复位的 3 秒内,超级终端会检测串口,等待 PC 机端是否发送过来
使用监控程序经行程序烧写、调试的方法说明 C 语言编程版
对 MC9S12DG128 进行调试、程序烧写可以有两种方式:用 BDM 工具通过专门接 口进行和利用监控程序通过串口进行。BDM 方式是芯片厂商提供的调试、烧写方式, 在 DG128 芯片上留有管脚,通过仿真器将目标板和 PC 机相连,PC 机通过 Hiwave 程 序将程序通过仿真器烧写至单片机中。BDM 的一大特点是需要专门的仿真器和开发 环境,在没有仿真器或者 Hiwave 程序时就无法进行程序的烧写。
已有监控程序的单片机在运行时,首先运行的程序就是监控程序,监控程序首 先会等待 3 秒,同时查询串口是否接收到任何数据,若接收到数据,就进入调试状 态,通过指令进行程序烧写、调试;若 3 秒之内没有从串口上接收到数据,就去执 行用户烧写到单片机内的程序。
二、使用 Code Warrior 进行程序编写时的注意事项
改为
其他中断也是如此。
三、PC 机串口界面——超级终端
PC 机上使用的与单片机监控程序通信的软件是 Windows 自带的一个通信界面软 件——超级终端。超级终端的位置在 开始 -> 所有程序 -> 附件 -> 通讯 下,如 图。
打开超级终端后先要给此链接起名称,这个名称可以随意起。

飞思卡尔s12单片机-用C语言开发应用程序

飞思卡尔s12单片机-用C语言开发应用程序

交叉编译:是指在一台大一些、 交叉编译:是指在一台大一些、
生目标系统的机器码。 生目标系统的机器码。目标系统 计算机的CPU类型完全不同。 类型完全不同。 计算机的 类型完全不同
第七章 用C语言开发应用程序 语言开发应用程序 —编辑、编译、链接、定位 编辑、编译、链接、
*.h *.c *.c++ C源文件 源文件 汇编源文件
2、避免使用浮点数和双精度 、 3、C语言数据类型的位宽取决于单片机的类型和具体的 语言数据类型的位宽取决于单片机的类型和具体的IDE中的约定; 中的约定; 、 语言数据类型的位宽取决于单片机的类型和具体的 中的约定 中工程窗口中的“ 标签下“ 如codewarrior中工程窗口中的“target”标签下“standard”对话框中 中工程窗口中的 标签下 对话框中 “complier for”中 “Type sizes”按钮对应的对话框 中 按钮对应的对话框 Page 6
Page 8
第七章 用C语言开发应用程序 语言开发应用程序 ———运行环境 运行环境
7.3 建立 语言程序运行环境 建立C语言程序运行环境
C语言的主程序从main()开始的,必须为main() 建立一个程序运行环境, 主要完成四件事情: 1、设置栈指针初值 2、相关硬件的系统初始化 3、调用函数main() 使之执行 4、给出main() 完成后的出口,即执行exit()。
*.asm *.inc
链接配 置文件
*.prm
C编译器 汇编编译器
列表文件
目标文件
*.obj
库文件
*.lst 反 编 译 器
链接器 *.sx 执行文件 *.abs
汇编 反编译文件
映射文件
*.map

c flash中代码的执行流程

c flash中代码的执行流程

c flash中代码的执行流程下载温馨提示:该文档是我店铺精心编制而成,希望大家下载以后,能够帮助大家解决实际的问题。

文档下载后可定制随意修改,请根据实际需要进行相应的调整和使用,谢谢!并且,本店铺为大家提供各种各样类型的实用资料,如教育随笔、日记赏析、句子摘抄、古诗大全、经典美文、话题作文、工作总结、词语解析、文案摘录、其他资料等等,如想了解不同资料格式和写法,敬请关注!Download tips: This document is carefully compiled by theeditor. I hope that after you download them,they can help yousolve practical problems. The document can be customized andmodified after downloading,please adjust and use it according toactual needs, thank you!In addition, our shop provides you with various types ofpractical materials,such as educational essays, diaryappreciation,sentence excerpts,ancient poems,classic articles,topic composition,work summary,word parsing,copy excerpts,other materials and so on,want to know different data formats andwriting methods,please pay attention!C 语言在 Flash 中的执行流程主要包括以下几个步骤:1. 编译:使用 C 语言编译器将源代码编译成目标代码。

C语言编译错误总结

C语言编译错误总结

非常实用的,吸收前辈的经验,我们才能少走弯路。

和C 编译器错误信息中文翻译(1)L15 重复调用***WARNING L15: MULTIPLE CALL TO SEGMENTSEGMENT: ?PR?SPI_RECEIVE_WORD?D_SPICALLER1: ?PR?VSYNC_INTERRUPT?MAINCALLER2: ?C_C51STARTUP该警告表示连接器发现有一个函数可能会被主函数和一个中断服务程序(或者调用中断服务程序的函数)同时调用,或者同时被多个中断服务程序调用。

出现这种问题的原因之一是这个函数是不可重入性函数,当该函数运行时它可能会被一个中断打断,从而使得结果发生变化并可能会引起一些变量形式的冲突(即引起函数内一些数据的丢失,可重入性函数在任何时候都可以被ISR 打断,一段时间后又可以运行,但是相应数据不会丢失)。

原因之二是用于局部变量和变量(暂且这样翻译,arguments,[自变量,变元一数值,用于确定程序或子程序的值])的内存区被其他函数的内存区所覆盖,如果该函数被中断,则它的内存区就会被使用,这将导致其他函数的内存冲突。

例如,第一个警告中函数WRITE_GMVLX1_REG 在D_GMVLX1.C 或者D_GMVLX1.A51 被定义,它被一个中断服务程序或者一个调用了中断服务程序的函数调用了,调用它的函数是VSYNC_INTERRUPT,在MAIN.C 中。

解决方法:如果你确定两个函数决不会在同一时间执行(该函数被主程序调用并且中断被禁止),并且该函数不占用内存(假设只使用寄存器),则你可以完全忽略这种警告。

如果该函数占用了内存,则应该使用连接器(linker)OVERLAY 指令将函数从覆盖分析(overlayanalysis)中除去,例如:OVERLAY (?PR?_WRITE_GMVLX1_REG?D_GMVLX1 ! *)上面的指令防止了该函数使用的内存区被其他函数覆盖。

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

2
Background

Flash Player – Adobe’s ubiquitous graphicacentric

AIR – Adobe’s desktop development platform based on Flash technology

C is typically synchronous

Drawing, event handling, etc. is often done from within a synchronous event loop

AS3 in Flash/AIR should be asynchronous

Player/AIR will “freeze” if script code executes continuously

x86-32 param passing via virtual stack x86-32 return values via virtual eax, eax+edx, st0 “ram” is a monolithic ByteArray

New AVM2 Ops make this fast
7
Example generated AS3
__asm(lbl("___vfprintf_state0")) __asm(lbl("___vfprintf__XprivateX__BB79_0_F")) mstate.esp -= 4; __asm(push(mstate.ebp), push(mstate.esp), op(0x3c), stack(-2)) mstate.ebp = mstate.esp mstate.esp -= 2640 i0 = (0) i1 = ((__xasm<int>(push((mstate.ebp+16)), op(0x37)))) __asm(push(i1), push((mstate.ebp+-84)), op(0x3c), stack(-2)) __asm(push(i0), push((mstate.ebp+-86)), op(0x3a), stack(-2)) i0 = ((__xasm<int>(push((mstate.ebp+8)), op(0x37)))) i1 = ((__xasm<int>(push((mstate.ebp+12)), op(0x37)))) __asm(push(i1), push((mstate.ebp+-2295)), op(0x3c), stack(-2)) i1 = ((__xasm<int>(push(___mlocale_changed_2E_b), op(0x35)))) i2 = ((mstate.ebp+-1504)) i3 = ((mstate.ebp+-1808)) __asm(push(i3), push((mstate.ebp+-2259)), op(0x3c), stack(-2)) i3 = ((mstate.ebp+-1664)) __asm(push(i3), push((mstate.ebp+-2097)), op(0x3c), stack(-2)) i3 = ((mstate.ebp+-304)) __asm(push(i3), push((mstate.ebp+-2115)), op(0x3c), stack(-2)) i3 = ((mstate.ebp+-104)) __asm(push(i3), push((mstate.ebp+-2277)), op(0x3c), stack(-2)) __asm(push(i1!=0), iftrue, target("___vfprintf__XprivateX__BB79_2_F")) __asm(lbl("___vfprintf__XprivateX__BB79_1_F")) i1 = (1) __asm(push(i1), push(___mlocale_changed_2E_b), op(0x3a), stack(-2)) __asm(lbl("___vfprintf__XprivateX__BB79_2_F")) i1 = ((__xasm<int>(push(___nlocale_changed_2E_b), op(0x35)))) __asm(push(i1!=0), iftrue, target("___vfprintf__XprivateX__BB79_4_F")) __asm(lbl("___vfprintf__XprivateX__BB79_3_F")) i1 = (1) __asm(push(i1), push(_ret_2E_993_2E_0_2E_b), op(0x3a), stack(2)) __asm(push(i1), push(_ret_2E_993_2E_2_2E_b), op(0x3a), stack(2)) __asm(push(i1), push(___nlocale_changed_2E_b), op(0x3a), stack(-2)) __asm(lbl("___vfprintf__XprivateX__BB79_4_F")) i1 = (__2E_str1881) i3 = ((__xasm<int>(push(_ret_2E_993_2E_0_2E_b), op(0x35)))) i4 = ((__xasm<int>(push((i0+12)), op(0x36)))) i1 = ((i3!=0) ? i1 : 0) __asm(push(i1), push((mstate.ebp+-2124)), op(0x3c), stack(-2)) i1 = (i0 + 12) __asm(push(i1), push((mstate.ebp+-2025)), op(0x3c), stack(-2)) i1 = (i4 & 8) __asm(push(i1==0), iftrue, target("___vfprintf__XprivateX__BB79_7_F")) __asm(lbl("___vfprintf__XprivateX__BB79_5_F")) i1 = ((__xasm<int>(push((i0+16)), op(0x37)))) __asm(push(i1!=0), iftrue, target("___vfprintf__XprivateX__BB79_9_F")) __asm(lbl("___vfprintf__XprivateX__BB79_6_F")) i1 = (i4 & 512) __asm(push(i1!=0), iftrue, target("___vfprintf__XprivateX__BB79_9_F")) __asm(lbl("___vfprintf__XprivateX__BB79_7_F")) mstate.esp -= 4

Why not Adobe’s platform too?
4
Brief evolutionary overview

Prototype 1: C => C via IR

MSILWriter based C FSM emitter Linked to live C libs

Prototype 2: C => AS3 via IR

MSILWriter based ActionScript FSM emitter Handwritten subset of C standard libs, SDL

Current: C => AS3 via ‘real’ codegen

Sparc backend derived ActionScript backend C standard lib ported using tools Low level system services hand-written in AS3

Similar to JS plus classes (or ES 3 minus eval) Optionally strongly typed, compiles to bytecode

AVM2/AVMPlus/Tamarin Central – Runs ABC

ActionScript Virtual Machine Interpreter + JIT compiler executes ActionScript ByteCode
5
Implementation


“march=avm2”
~3700 lines of CPP ~1025 lines of TableDesc
6
Machine Model

Partial x86 semantics Registers

x86 subset: ebp, esp, eax, edx, cf(eflags), st0 (global) 32 gp regs (int32) (local/member) 32 fp regs (double) (local/member) 32 fake single fp regs (double) (local/member)
8
Usage


./configure
make
相关文档
最新文档