TechOnline India Header
Most Popular
Top 5 Courses
  • Fundamentals of PCB Design
  • Fundamentals of Multicore Programming
  • Eliminating Audible Transients in Audio Systems
  • DC-DC Converter Theory
  • Fundamentals of Wireless
    Most Popular
    Top 5 Technical Papers
  • Digital Signal Processing: A Practical Guide (Part 1)
  • SDRAM Memory Systems: Architecture Overview and Design Verification
  • ARM Platform Technical Overview
  • Reference Design for a SEPIC LED Driver
  • Solving the System-Level Thermal Management Challenges of LEDs
    Most Popular
    Top 5 Webinars
  • Designing embedded HMIs and connecting them to hardware
  • Is Android the Right Foundation for Your Next Device?
  • 2009 Embedded Market Study
  • Maximizing OpenGL(R) ES 2.0 on GPUs for Embedded Applications
    All Articles Products Courses Papers VirtuaLabs Webinars
    Top Search Items
    scsi


    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
        44%
    Millions of LOC
        11%
    A trillion
        7%
     



    FLIRTing with 8-bit MCU OSes
    FLIRT is for developers who want a small, easy to use and simple to port operating system for a truly tiny multithreaded system on an 8-bit MCU, without sacrificing the ability to multithread and share CPU time effectively.
    Embedded.com

    I come from the 8080/8085 era. I used to hand write the code on paper then type the opcodes into an EPROM programmer. If that didn't work, I figured it out and did it again. I developed some pretty complex code that way. Since then, I've never lost sight of the fact that small is beautiful.

    After reading Jack Ganssle's article "Small is Beautiful" (March 9, 2009, www.embedded.com/21580130), I felt like we were brothers from a different mother. In this world, the constant drumbeat of "more, more, more" is pounded into our heads so much that the concept of "simple is best" is lost. Everyone gets "creeping featuritis," and soon the whole place is infected with features no one wants or even needs. I'm here to tell you that it doesn't have to be that way.

    The first time our hardware engineer brought a proposal to me and said it has an 8-bit processor, I said "are you nuts?" Yet, when all was said and done, I have to say I was impressed. The processor our hardware guy proposed was the Freescale MC9S08. Originally he wanted a simple super loop that he could write himself and not get the firmware guys involved. He was concerned about us catching creeping featuritis and turning the super loop into a huge 32-bit machine with way too many bells and whistles. I convinced him that that would not be the case and that I would write the firmware for it myself. My first concern was that the super loop starved other parts of the system, so I started researching what was out there that I could use.

    I read Miro Samek and Robert Ward's great article in the July 2006 Embedded Systems Design magazine (www.embedded.com/190302110) on the simple task switcher because I have always preached that "good developers write good code, great developers steal." I didn't use this task switcher because I was also concerned with starvation. Their system had higher priority tasks run to completion and was based on state machines that are amazingly useful but limited when dealing with time constraints. Events get backed up waiting for other events to run to completion.

    I then looked at Helium (http://helium.sourceforge.net). A great little tasker but too much overhead for what I was looking for and it was based on priorities as well. I needed something where every task has the same priority, gets its share of the CPU, and yet can have a different "weight" in the system. When I say weight, I mean a little bit more of the task's share of the CPU is going to that task. This is not to be confused with priority over the other tasks; instead, it's just that one task needs another tick or two, while all the other tasks are still geting their share. More on this later.

    So after not finding anything I could (ahem) borrow, I set out to create a small multithreaded tasker that can run on an 8-bit MCU and lets every task have access to the CPU more or less when they needed it. Enter FLIRT (Friendly Little Interrupt Tasker). In the end my implementation consumed a whopping 144 bytes of flash.

    1 | 2 | 3 | 4 | 5 NEXT >
     
     
    Latest Webinars
    · The Next Generation of Ethernet: How the New IEEE Standards Enable Energy Efficiency and Quality-of-Service
    · Simplified Physical Layer Receiver Test of Re-timed Architectures Such as USB 3.0, SATA, SAS, PCIe 2
    · How to solve the most common high-speed bus issues in embedded design on a budget
    · Early access to ARM Core Technology with Fast Models from ARM
    · Latest MIPI Standards: PHY and Protocol Testing Guidance
     
    Member Company Spotlight
    ARM
     

    In this on-demand webinar, you will learn about the ARM PrimeCell infrastructure and how the DesignWare Verification IP enables the development of a more thorough and reusable verification environment. View "Rapid Verification of ARM11 processor-based platforms" here.


    Member Companies