TechOnline India Header
Most Popular
Top 5 Courses
  • Fundamentals of MOSFETs for Switching
  • Fundamentals of DSP
  • Fundamentals of Microcontrollers
  • Fundamentals of LTE Physical Layer and Test Requirements
  • Maximize effectiveness by combining Android and TI OMAP35x
    Most Popular
    Top 5 Technical Papers
  • Phase-Locked Loops Demystified
  • Digital Signal Processing: A Practical Guide (Part 1)
  • Digital Signal Processing: A Practical Guide (Part 2)
  • Analog Circuits: World Class Design, Part 1
  • Synthesizing Algorithms from MATLAB and Model-based Descriptions
    Most Popular
    Top 5 Virtual Labs
  • MC9S12NE64
  • Texas Instruments eZ430-RF2500 Wireless Development Tool
    Most Popular
    Top 5 Webinars
  • Introduction to Op Amps
  • Mutexes vs. Semaphores: How to Use Each Properly
  • Learn how to run the uC/OS-III real-time kernel on an ARM Cortex M3
  • Challenges and Solutions for GPS Receiver Test
    All Articles Products Courses Papers VirtuaLabs Webinars
    Top Search Items
    microcontroller
    dsp
    FPGA
    control
    fundamentals


    Techpaper Spotlight

    Wind River
    Accelerating the Development of Embedded Linux Devices with JTAG On-Chip Debugging
        Login | Register | Welcome, Guest

    Topics
    POLL
    How much code have you produced in your career?
    A few KLOC
        38%
    100s of KLOC
        45%
    Millions of LOC
        11%
    A trillion
        6%
     



    Compilation strategies for the PIC32
    Unlike conventional compilation that optimizes and generates object code independently for each individual program module, omniscient compilation optimizes based on a view of all modules, across the entire program.
    Embedded.com

    The PIC32 is a major departure from Microchip's bread-and-butter offering of 8- and 16-bit microcontrollers, so developing code for the PIC32 poses a new set of challenges. The highest nonvolatile-memory (NVM) density on 8-/16-bit PIC MCUs is 128 kbytes, SRAM is limited to 4 kbytes or less, and 16 registers is the maximum. Midrange PICs have as few as one or two registers and even smaller memory densities.

    All 8-/16-bit PIC MCUs have banked memories that require assembly language or nonstandard C extensions to address efficiently, resulting in nonportable code. Thus, in spite of the common peripheral set and development environment shared by the PIC32 and its 8-/16-bit precursors, migrating nonstandard legacy code could pose serious complications.

    In contrast to previous PICs, PIC32 devices have as much as 512 kbytes of flash, up to 32 kbytes of SRAM memory, and 32 general purpose registers. Also unlike 8-bit PICs, the PIC32 memory space is linear, so no complicated addressing schemes are required.

    With fast DSP instructions for multiply and divide, a 256-byte instruction cache, 5-stage pipeline, direct memory access, and fast context switching, the PIC32 offers instruction throughput of 1.56 DMIPS (Dhrystone million instructions per second)/MHz--the highest of any microcontroller in its class. Its 80 MHz maximum clock provides PIC32 users with unparalleled throughput and flexibility. So, the question is how does an engineer develop code to take full advantage of the PIC32's horsepower?

    One way to squeeze the maximum performance from a PIC32 is to choose a compilation method that exploits the benefits of the architecture while offering a seamless up/down migration path for legacy code. Basically, there are two approaches to compilation for the PIC32 architecture: conventional compilation that optimizes and generates object code independently for each individual program module and "omniscient" compilation that optimizes code based on a view of all program modules, across the entire program.

    Pitfalls of conventional compilation
    Conventional compilation technology (shown in Figure 1) shadows the modular embedded software design process, in which programs are broken up into modules--partly to accommodate their increasing complexity and partly to distribute programming tasks among teams of engineers to speed up the development process.

    View the full-size image

    Compilers generate code in the same way, individually compiling each module into an independent sequence of low-level machine instructions, without any knowledge about what is in the other modules. Once all the modules are compiled, a linker links the modules together, along with any code being used from precompiled libraries.

    1 | 2 | 3 | 4 | 5 NEXT >
     
     
    Latest Webinars
    · Spectrum Analyzer Migration Without Tears
    · PCI Express(R) 3.0 Challenges & Agilent's Test Solutions
    · Agile Model-Driven Development for Real-Time and Embedded Systems with Harmony
    · Three Forces that will help reshape your business in 2010
    · The Big Design Squeeze: How to get faster design turns in FPGA-based designs
     
    Member Company Spotlight
    VMETRO
     

    Learn more about real-time digital data recording, playback, readback and analysis. Schedule a personalized one-on-one data recording webinar today with VMETRO's Application Engineers.

    Member Companies

    Virtualab
    Freescale Semiconductor

    Freescale i.MX27