AN2345 Freescale Semiconductor / Motorola, AN2345 Datasheet - Page 20

no-image

AN2345

Manufacturer Part Number
AN2345
Description
Real-Time Memory Manager for StarCore DSPs
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Building Your Application with VSMM
4.8 Examples
20
This section introduces four examples that illustrate the configuration and use of VSMM. Three of these
examples run within a non-RTOS environment on the Motorola MSC8101 Application Development
System (MSC8101ADS), and the fourth uses the OSEck RTOS. See Section 7 for instructions on how to
build, download, and execute these examples.
The following software and tools are required in order to build and run the three non-RTOS examples:
• PC running Windows 9x, NT, or Win2000 or Solaris Platform
• Metrowerks Codewarrior v2.02 targeted for Motorola StarCore DSPs
• VSMM Examples1_3.zip, an archive containing the necessary files to build each of the three
• Motorola MSC8101ADS board and appropriate command converter and inter-connecting cable
The following software and tools are required in order to build and run the VSMM RTOS example:
• PC running Windows 9x, NT, or Win2000 or Solaris Platform
• Metrowerks Codewarrior v2.02 Targeted for Motorola StarCore DSPs
• VSMM ExampleRTOS2.zip, an archive containing the necessary files to build the RTOS example
• OSEck RTOS v3.1.0.6 or later and OSE Heap Manager v2.0.0.2 or later if you desire to compare the
• Motorola MSC8101ADS board and appropriate command converter and inter-connecting cable.
Simply download and execute the supplied RTOS example without the need for the OSEck RTOS and
heap manager libraries. The VSMM examples follow:
• Example 1 demonstrates the creation of heaps from specified memory areas as well as from an
• Example 2 demonstrates many of the same features as Example 1 but uses the system heap space
• Example 3 illustrates how to incorporate the two critical method 2 assembly files into an application
• Example RTOS shows how the VSMM operates within an RTOS environment and uses the spin-lock
If you have access to the OSE libraries required by this example, you can switch the ExampleRTOS2
between the OSE heap manager and the VSMM, as follows:
• Define the preprocessor VSMM macro within the Codewarrior project to use VSMM.
• Remove the preprocessor VSMM macro definition to use the OSE heap manager.
non-RTOS examples
OSE heap with that of the VSMM.
allocated memory block of another heap. It also demonstrates how to allocate memory blocks, write
data to these allocated blocks, free memory blocks, destroy heaps, and query heaps.
instead of creating heaps from a specified statically declared memory area.
(refer to Section 3.6, VSMM Critical Methods, on page 14). The only difference between this example
and Example 1 is that the VSMM_CRITICAL_METHOD #define constant in VSMM_cfg.h is set to
2 and the VSMMEnterCritical.asm and VSMMExitCritical.asm critical method assembly
files are added to the example 3 project sources.
critical methods. The RTOS is OSEck and the OSE heap manager targeted for the Motorola MSC8101
DSP. Because of OSE Systems licensing requirements, the OSEck and heap libraries are not supplied
as part of this example.To modify and rebuild this example, you must have the OSEck and heap
manager libraries installed on your system. Also, the Codewarrior project access paths and include file
paths that must be updated to reflect your specific OSE installation paths. In addition to the OSE
libraries, you must also use the OSE make utility to generate the appcon.c and appcon_asm.asm
files from the supplied appcon.con configuration file.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com

Related parts for AN2345