0

c for embedded systems

Tài liệu C Programming for Embedded Systems docx

Tài liệu C Programming for Embedded Systems docx

Kỹ thuật lập trình

... the prescalar and starting the clock are tasks of the software developer. Knowing the processor clock frequency, and choosing correct prescalar values, you can achieve accurate timer clock periods.The ... instructions to the COPCR register. Interestingly, the COP watchdog is dependent upon the system clock; a clock monitor circuit resets the MCU if the clock stops, and thereby renders the COP watchdog ... to C necessary for targeting an embedded environment, and the common components of a successful development project. C is the language of choice for programming larger microcontrollers (MCU),...
  • 191
  • 549
  • 1
C Programming for Embedded Systems ppt

C Programming for Embedded Systems ppt

Kỹ thuật lập trình

... ensures that application source code can be recompiled for different microcontroller targets. Page 11 (c) Wait for keystroke(1) If key is pressed, wait for debounce period and check again.(d) ... 3.2 shows the COP8 vector table, as required for the COP8SAA7 device. The rank is as enforced by the VIS instruction.Table 3.2 COP8 vectored interruptsRank Source Description Vector Address ... recorded in main (or data) memory: the Microchip PIC and Scenix SX architectures use a stack space outside of user RAM.It is important to check the depth of return information stored by function...
  • 191
  • 390
  • 1
Free Software tools for embedded systems

Free Software tools for embedded systems

Kỹ thuật lập trình

... Support servicesUseful if you don't have your own support resourcesLong term support commitment, even for versions considered as obsolete by the community, but not by your users!44Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Commercial toolsetsCaution: commercial doesn't mean proprietary!Vendors play fair with the GPL and do make their source code available to their users, and most of the time, to the community.As long as they distribute the sources to their users, the GPL doesn't require vendors to share their sources with any third party.No issue with all the GPL sources developed by or with the community.Graphical toolkits developed by the vendors look proprietary. Their licenses are not advertised on their websites! You have to be a customer to know or get a free preview kit to know.35Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Free Software tools for embedded systems GNU / Linux workstationVarious tools34Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Emulators ­ SummarySystem emulatorsUseful to experiment with a full system, including the kernelqemu: x86, x86_64, arm, sparc, ppc, mipsSkyEye: several arm architecturesUser emulatorsUseful to run or debug user space binaries for other CPUsqemu: x86, arm, sparc, ppc, mips20Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Platform specific toolchains (2)ColdfireCode Sourcery (supports ELF, GNU/Linux and uClinux):http://www.codesourcery.com/gnu_toolchains/coldfirePowerPCCode Sourcery (supports GNU/Linux and EABI)http://www.codesourcery.com/gnu_toolchains/power.html49Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Sysgo ­ Koan Softwarehttp://sysgo.comELinOS development toolset,in particular based on Eclipseand the Linux Trace Toolkit.Includes FreeToolBox, a freely downloadable compiling and rootfs creating toolchain.Supports i386, arm and ppc.Hard real­time support with their own microkernel (PikeOS),an approach similar to RTAI.http://koansoftware.comMakers of KaeilOS(http://koansoftware.com/kaeilos/), a GPL  embedded Linux distribution for industrial applications.KaeilOS supports i386 and popular arm platforms. Other platforms supported upon request.Includes several graphical toolkits and supports hard real­time (RTAI, Xenomai, preemption patches).Unfortunately, KaeilOS is GPL but not available for public download.16Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Standalone toolchain buildBuilding a cross­compiling toolchain by yourself is a difficult and painful task! Can take days or weeks!Lots of details to learn. Several components to build(building gcc twice: once for gcc + once for compilers that need the C library).Lots of decisions to make(such as C library version and configuration for your platform)Need kernel headers and C library sourcesNeed to be familiar with current gcc issues and patches on your platformUseful to be familiar with building and configuring toolshttp://www.aleph1.co.uk/armlinux/docs/toolchain/toolchHOWTO.pdfcan show you how fun it can be!21Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Toolchain building utilitiesBuildroot: http://buildroot.uclibc.org/Dedicated Makefile to build uClibc based toolchainsand even entire root filesystems.Downloads sources and applies patches.Crosstool:  http://www.kegel.com/crosstool/Dedicated script to build glibc based toolchainsDoesn’t support uClibc yet.Downloads sources and applies patches.26Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Toolchains ­ useful resourceseLinux.org toolchain page:http://elinux.org/Tool_Chains29Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Free Software tools for embedded systems GNU / Linux workstationEmulators8Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008glibchttp://www.gnu.org/software/libc/License: LGPL C library from the GNU projectDesigned for performance, standards compliance and portabilityFound on all GNU / Linux host systems Quite big for small embedded systems:  about 1.7 MB on Familiar Linux iPAQs (libc: 1.2 MB, libm: 500 KB)36Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008chrootAvailable in all GNU/Linux distributionsUsage:chroot <dir> [command]Runs a command or an interactive shellwith a special root directory.Standard usage: Internet serversServices executed in chroot jails: even when compromised,the service cannot gain access to the rest of the system.Usage for embedded system development:Develop and test a new root filesystem on the development host.Very easy to use when the host and target have the same CPU instruction set.Used by LFS (Linux From Scratch).Also used by Scratchbox: Qemu makes the usage of target binaries transparent./binlibetchttp/libetcbinchrootjail ... ) and can boot several operating systems (Linux, uClinux, and others)Softgun: http://softgun.sourceforge.netVirtual ARM system with many virtual on­board peripherals. Boots Linux.SWARM ­ Software ARM ­ arm7 emulatorhttp://www.cl.cam.ac.uk/~mwd24/phd/swarm.htmlCan run uClinux13Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008klibchttp://www.kernel.org/pub/linux/libs/klibc/“Kernel C library”Tiny and minimalistic C library designed for use in an initramfs at boot time (alternative to initrds).Fine for the creation of simple shell scripts.Ships with small executables for use in shells, built with klibc,and a klcc compiler to compile your own applications.Not elaborate enough to support BusyBox applications.Useful details in  http://en.wikipedia.org/wiki/Klibc19Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Platform specific toolchains (1)ARMCode Sourcery (supports GNU/Linux, EABI and uClinux):http://www.codesourcery.com/gnu_toolchains/arm/Also available for Windows workstations.MIPShttp://www.linux­mips.org/wiki/Toolchains (useful links)6Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Training contents (3)AnnexesAutomatic system generation with BitBake / OpenEmbedded33Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Other emulatorsColdFire emulatorhttp://www.slicer.ca/coldfire/Can boot uClinux37Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Minicom (1)Definition: serial communication programAvailable in all GNU / Linux distributionsCapabilities (all through a serial link):Serial console to a remote Unix systemFile transferModem control and dial­upSerial port configuration50Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Denx Software Engineeringhttp://denx.deCreated by Wolfgang Denk,the author of the U­Boot bootloader.Create and support the Embedded Linux Development Kit (ELDK),a complete and well documented development environment.This kit is not only Free Software,it can be downloaded freely by anyone.A great community member and contributor!15Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Free Software tools for embedded systems GNU / Linux workstationCross­compiling toolchains9Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008uClibchttp://www.uclibc.org/ from CodePoet ConsultingLicense: LGPLLightweight C library for small embedded systems,  with most features though.The whole Debian Woody was ported to it ... ) and can boot several operating systems (Linux, uClinux, and others)Softgun: http://softgun.sourceforge.netVirtual ARM system with many virtual on­board peripherals. Boots Linux.SWARM ­ Software ARM ­ arm7 emulatorhttp://www.cl.cam.ac.uk/~mwd24/phd/swarm.htmlCan run uClinux13Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008klibchttp://www.kernel.org/pub/linux/libs/klibc/“Kernel C library”Tiny and minimalistic C library designed for use in an initramfs at boot time (alternative to initrds).Fine for the creation of simple shell scripts.Ships with small executables for use in shells, built with klibc,and a klcc compiler to compile your own applications.Not elaborate enough to support BusyBox applications.Useful details in  http://en.wikipedia.org/wiki/Klibc19Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Platform specific toolchains (1)ARMCode Sourcery (supports GNU/Linux, EABI and uClinux):http://www.codesourcery.com/gnu_toolchains/arm/Also available for Windows workstations.MIPShttp://www.linux­mips.org/wiki/Toolchains (useful links)6Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Training contents (3)AnnexesAutomatic system generation with BitBake / OpenEmbedded33Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Other emulatorsColdFire emulatorhttp://www.slicer.ca/coldfire/Can boot uClinux37Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Minicom (1)Definition: serial communication programAvailable in all GNU / Linux distributionsCapabilities (all through a serial link):Serial console to a remote Unix systemFile transferModem control and dial­upSerial port configuration50Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Denx Software Engineeringhttp://denx.deCreated by Wolfgang Denk,the author of the U­Boot bootloader.Create and support the Embedded Linux Development Kit (ELDK),a complete and well documented development environment.This kit is not only Free Software,it can be downloaded freely by anyone.A great community member and contributor!15Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008Free Software tools for embedded systems GNU / Linux workstationCross­compiling toolchains9Free Software tools for embedded systems © Copyright 2004­2008, Free ElectronsCreative Commons Attribution­ShareAlike 2.5 licensehttp://free­electrons.comJan 24, 2008uClibchttp://www.uclibc.org/ from CodePoet ConsultingLicense: LGPLLightweight C library for small embedded systems,  with most features though.The whole Debian Woody was ported to it...
  • 132
  • 425
  • 0
Tài liệu Báo cáo

Tài liệu Báo cáo "Dynamically reconfiguration architecture for embedded systems using Kaffe " doc

Báo cáo khoa học

... instruction and datacaches as well as the interface controller. Instructions for execution flow through the interface andinto the instruction cache for execution.The interface controller maintains ... 32-bit architecture. Theexception is the connection between the Stack cache and the arithmetic units that is 96 bits. Thisallows for long operands to pass from the cache to the arithmetic units ... of eEmbedded Kaffe systems The target architecture for such systems consists of a microprocessor running a Kaffe virtualmachine, and a hardware processor consisting of a core from the ARM family....
  • 7
  • 411
  • 0
Model-Based Design for Embedded Systems- P1 pdf

Model-Based Design for Embedded Systems- P1 pdf

Quản trị mạng

... Design for Embedded Systems 1.1.1 Distributed Embedded Platforms Embedded systems are special-purpose computer systems that are inte-grated into products such as cars, telecommunication devices, consumerelectronics, ... CaliforniaLaura Barrachina-SaraleguiInstitut de Microelectrònica deBarcelonaCentre Nacional de MicroelectrònicaBarcelona, SpainOlivier BennySTMicroelectronics, Inc.Ottawa, Ontario, CanadaAlbertBenvenisteInstitut ... the direct application of the proposedapproach for optical link synthesis and technology performance characteri-zation by analyzing optical link performance for two sets of photonic com-ponent...
  • 30
  • 491
  • 0
Model-Based Design for Embedded Systems- P2 doc

Model-Based Design for Embedded Systems- P2 doc

Quản trị mạng

... an abstract and a concrete GPC.Abstract components transform input VCCs into output VCCs, that is,they are characterized by a transfer function that relates input VCCs to out-put VCCs. We say ... Systems UT/LTUntimed/timedstructural communicationCDMATiming approximatecommunicationCANUTUntimed/timedp-2-p communicationATCycle-accuratecommunicationCANRefinement flowFIGURE 2.1The communication refinement ... SystemC code. Thiscode can be compiled for any host machine to be used for a target platform-independent simulation.Communication calls in the automatically created SystemC models areencapsulated...
  • 30
  • 434
  • 0
Model-Based Design for Embedded Systems- P3 pptx

Model-Based Design for Embedded Systems- P3 pptx

Quản trị mạng

... number of cycles caused by mispredictedbranch and cache behaviors. At the end of each basic block, the generationof previously calculated cycles (static cycles plus correction cycles) can occur(Figure ... the processor.Annotation of C code for a basic blockArchitecturalmodel C code corresponding to the cacheanalysis blocks of the basic blockCachemodelBranch pre-diction model C code corresponding ... a basic blockFunction call of consume functionif necessary (e.g. before I/O access)consume(getTaskTime());delay(cycleCalculationICache(tag, iStart, iEnd));delay(cycleCalculationForConditionalBranch());delay(statically...
  • 30
  • 559
  • 0
Model-Based Design for Embedded Systems- P4 ppt

Model-Based Design for Embedded Systems- P4 ppt

Quản trị mạng

... DDR for two consideredsystem properties subject to maximization.Shared memoryHWIP1 IP2SigOutECU1eval1ctrl1eval2ctrl2calcctrl3exec2exec1mon2mon3mon1Multicore ECUECU4CAN Bus C5 C4 C3 C2 C1 ECU2ECU3Sens3Sens2Sens1Act2Act1ESPParking ... in which both scenarios can impress load artifacts on thesystem.Each scenario is characterized by a specific behavior and is associatedwith a specific set of tasks. A scenario change (SC) from ... consequence of the echo effect, for the worst-case response time calcu-lation across the SC of the low-priority unchanged communication task C5 ,it is not sufficient to consider only its activations...
  • 30
  • 416
  • 0
Model-Based Design for Embedded Systems- P6 pps

Model-Based Design for Embedded Systems- P6 pps

Quản trị mạng

... thateach τjis characterized by “best-case” and “worst-case” execution times,bcetj∈ N and wcetj∈ N, respectively. At the start of each new period,there is a nondeterministic choice concerning ... a collectionofcommunicating sequentialtasks. Each task is characterized by four timing properties, describedlater. The dependencies between tasks are captured by an acyclicdirected graph (called ... larger capacity than strictly necessary cannotbe justified.Feedback control is a common application type in embedded systems, and many wireless embedded systems are networked control systems, ...
  • 30
  • 389
  • 0
Model-Based Design for Embedded Systems- P7 pot

Model-Based Design for Embedded Systems- P7 pot

Quản trị mạng

... Finally,customer-specific developments and controlled access to the domain-specific parallel subsystems will usually occur via this general-purposeprocessor and OS pair.• Domain-specific subsystems composed ... improve-ment, wireless communications, and 3D graphics).• Tightly coupled hardware PEs for domain-specific data processingfunctions.• Domain-specific I/O blocks, which are becoming increasingly flexible.7.2 ... Pallottino. A component-based approach to localization and collisionavoidance for mobile multi-agent systems. In Proceedings of the EuropeanControl Conference (ECC), Kos, Greece, 2007.3. T.R....
  • 30
  • 373
  • 0
Model-Based Design for Embedded Systems- P8 pps

Model-Based Design for Embedded Systems- P8 pps

Quản trị mạng

... processor p C commis the communication cost required for the communication of task twith the preceding tasks C succrepresents a look-ahead cost concerning the successor tasks, the min-imal cost ... and receiver (rx). The blockstx_crc_0(70)rx_crc_0(70)rx_crc_1(70)rx_vtd_1(205)rx_vtd_0(205)tx_crc_1(70)aaaaabbcbbbbccddccaabatx_vtc_0(75)tx_vtc_1(75)tx_rm(40)tx_fi(80)rx_fi(80)tx_rfs(30)rx_rfa(30)rx_rm(40)tx_si(80)rx_rake(175)tx_si(80)tx_sm(170)MA C Radiointerfa c eFIGURE ... inputs:Application specificationClient/server StreamingAbstractplatformspecificationPerformanceanalysisComponent assemblyVisualizationApplicationconstraints,profilingApplicationcore C functionsStreamingStatictoolsStreamingDynamictoolsIntermediate...
  • 30
  • 548
  • 0
Model-Based Design for Embedded Systems- P9 ppt

Model-Based Design for Embedded Systems- P9 ppt

Quản trị mạng

... by SkillicornAbstraction Level Typical Languages Explicit ConceptsImplicit concurrency PPP, crystal NoneParallel level Concurrent Prolog ConcurrencyThread level SDL Concurrency, decompositionAgent ... Emerald, CORBA Concurrency, decomposition,mappingProcess network Kahn process network Concurrency, decomposition,mapping, communicationMessage passing MPI, OCCAM Concurrency, decomposition,mapping, ... linksVirtualarchitectureData exchange, e.g.,send–receive(data)Implicit tasks control,e.g., threads inSystemCSpecific I/Oprotocolsrelated toarchitectureTransactionaccuratearchitectureData access...
  • 30
  • 347
  • 0
Model-Based Design for Embedded Systems- P10 pot

Model-Based Design for Embedded Systems- P10 pot

Quản trị mạng

... spaceApplication spacePlatform instanceMappedFunctionspacePlatforminstanceMappedPlatform(architectural space)Platform(architectural space)FunctionspacePlatformmappingPlatformdesign-spaceexportFunction ... architecture, virtual architecture, transaction accu-rate architecture, and virtual prototype levels are described, respectively.9.6.1 Application and Architecture SpecificationThe H.264 encoder ... upon a complex MPSoC architecture toexecute efficiently the H.264 video encoder application and to explore differ-ent communication schemes.Nicolescu/Model-Based Design for Embedded Systems...
  • 30
  • 420
  • 0

Xem thêm