<<< | >>>
ApproachWe adopted an incremental approach to development composed of the following key increments:
- Compiling (and linking) the FreeRTOS� for the MCF5272 using our selected compiler,
- Running a simple FreeRTOS� task,
- Cooperative multitasking between two tasks,
- pre-emptive multitasking, and
- Running the demonstration (test) programs.
For the final increment, the test program used was the standard software test suite supplied with FreeRTOS�.
Build EnvironmentWe chose to compile FreeRTOS� using the m68k version of the GNU Compiler Collection (gcc). The gcc compiler is freely available and well suited to cross-compilation, especially for the ColdFire platform where there are many resources available for cross-compilation.
In addition to gcc, we chose to use the Newlib implementation of the standard C libraries as the Newlib libraries have been designed specifically for embedded systems and are known to work on the ColdFire platform.
To simplify the build process make was used to produce an ELF image of the real time operating system as well as an S-Record should serial download of the real time operating system be required.
For debugging, we used the GNU debugger (gdb) over a BDM connection. This decision was based on the availability of the tool and BDM setup and our experience with this configuration and it proved to be a very suitable choice. The ELF image could be quickly downloaded onto the chip using the BDM connection (rather than sending the S-Record over a slower serial connection).
The Newlib libraries also provided console output via the dBUG interface of the ColdFire development boards allowing us to perform some debugging using more conventional means.
Implementation StrategyThe first part of our investigation involved surveying the available FreeRTOS� ports and then choosing a suitable port on which to base our own. We decided to use the AVR ATMega323 port for the following reasons:
- The MegaAVR port also uses the GCC compiler (albeit a modified WinAVR build).
- The MegaAVR has somewhat similar hardware specifications to our target platform.
- The MegaAVR port is the most thoroughly documented port of FreeRTOS�.
Before writing the code we first studied the operation of the MegaAVR port, documenting our understanding and then studying the
ColdFire Programmer's Reference Manual and ColdFire MCF5272 User Manual for equivalent instructions and features.
NEXT >>> ColdFire RTOS Port - Phase 1 - Compiling