MCBTMPM330 User's Guide: MCBTMPM330 User's Guide

Keil, An ARM® Company MCBTMPM330 User's Guide

The MCBTMPM330 User's Guide describes the MCBTMPM330 Evaluation Board and contains detailed operating instructions for the hardware.

  • Introduction gives an overview of the MCBTMPM330 Board, the features, hardware and software requirements, where to find information quickly, and where to find Technical Support.
  • Setup shows the MCBTMPM330 Board components, how to connect, configure, and use the board.
  • Theory of Operation explains the components of the MCBTMPM330 board in detail.
  • Writing Programs describes how to write programs, download to flash, and configure your project for debugging for the MCBTMPM330 board.
  • Example Programs lists the example programs available on the installation CD and on the Keil website. There are step-by-step instructions on building and running the BLINKY example programs.

Revision History

  • December 2008: Initial revision.

Copyright © Keil, An ARM Company. All rights reserved.


MCBTMPM330 User's Guide: Debugging with ULINK

Debugging with ULINK

Follow these steps to program debugging using the µVision Debugger and the ULINK USB-JTAG Adapter. Detailed information can be found in the µVision User's Guide in the Creating Applications chapter.

  1. Connect ULINK to the JTAG connector of the MCBTMPM330 Board. Note that the red tracer on the ribbon cable marks pin 1 of the JTAG-connector.

    MCBTMPM330 Board with ULINK2

  2. Power up the MCBTMPM330 Board.
  3. Configure the Debugger in the Project — Options for Target — Debug dialog.

    Options for Target Button Use the Options for Target toolbar button and click the Debug tab to display the Debug dialog.

    Use: ULINK Cortex Debugger Select Use: and ULINK Cortex Debugger in the drop-down to choose the ULINK USB-JTAG Adapter as the debugging tool.

    Debug Load & Run Options Check the Load Application aet Startup and the Run to main() options to load your application and execute code up to the beginning of your main() function when the debugger starts.

  4. Click the Settings button to open the Cortex-M Target Driver Setup dialog.

    This dialog displays the IDCODE of the Cortex-M device on the MCBTMPM330 Board.

    JTAG Interface Options Check the SWJ checkbox and select the SW option under Port to use the Single Wire mode interface. Max Clock should be set to 1MHz.

    Download Options Select the Verify Code Download option under Download Options to compare the loaded application program with the Flash ROM content. You may disable this option to speed up the debugger start.

  5. Start the Debugger.

    Start/Stop Debug Button Use the Start/Stop Debug Session toolbar button to start debugging the program.

    Or

    Use the µVision command, Debug — Start/Stop Debug Session, to start debugging the program.


MCBTMPM330 User's Guide: Debugging Programs

Debugging Programs

µVision IDE offers a very powerful and comprehensive set of debugging tools designed to make program testing easier and reduce the time it takes to produce a working application.

The required steps for configuring the debugger on the MCBTMPM330 board are described in the topic Debugging with ULINK.

You may debug your application software via the Embedded ICE, for example, by connecting the Keil ULINK USB-JTAG Adapter to the JTAG interface.

Using the µVision debugger and the embedded ICE capability of the MCBTMPM330, you may set breakpoints and step through your code, and also view the status of on-chip peripherals using the Peripheral dialogs custom-designed for the TMPM330FDFG device.


MCBTMPM330 User's Guide: BLINKY

BLINKY

The BLINKY example program toggles the LEDs on Port I and prints the converted A-to-D value to the serial port. The speed the LEDs flash depends on the voltage presented to AN4 by the on-board potentiometer.

The BLINKY example project demonstrates assembling, compiling, linking, downloading, and debugging using the µVision IDE on the MCBTMPM330 board. The on-board LEDs make it easy to visually verify that the program loads and executes properly.

Loading BLINKY

To load the BLINKY project, select Open Project from the Project menu and open BLINKY.UV2 from the following folder:

  • \KEIL\ARM\BOARDS\KEIL\MCBTMPM330\BLINKY\

Open Project dialog

Project Workspace When the BLINKY project opens, the µVision Project Workspace window displays the source files that make up the project.

  • TMPM330.s contains the CPU startup code for Toshiba TMPM330Fx devices.
  • Blinky.c contains the application modules that monitors analog input and flashes the LEDs in sequence.
  • Abstract.txt file contains documentation about the project.

Editing BLINKY

You may edit Blinky.c or review the source code. Double-click on Blinky.c in the Files page of the Project Workspace window. µVision loads and displays the contents of Blinky.c in an editor window.

Running BLINKY

Perform the following four steps to run the BLINKY Example on the MCBTMPM330 Evaluation Board:

  1. Building BLINKY
  2. Downloading BLINKY
  3. Debugging BLINKY
  4. Checking Serial Output


MCBTMPM330 User's Guide: Building BLINKY

Building BLINKY

Build the BLINKY example program following this procedure. The executable files are placed in an output folder, ready for downloading.

Build Target Button When you are ready to compile and link your project, use the Build Target command from the Project menu or the Build toolbar. On the Build toolbar, select the appropriate target for your program.

µVision translates and links the source files and creates an absolute object module that you may load into the µVision debugger for testing. The status of the build process displays in the Build page of the Output Window.

Once the BLINKY application is built, if you selected the TMPM330 Flash target, proceed with the Downloading step. If the TMPM330 RAM target is selected, go directly to the Debugging step.

Note

  • You should not encounter any errors when you use µVision with the provided sample projects.


MCBTMPM330 User's Guide: Debugging BLINKY

Debugging BLINKY

Debug the BLINKY example program following this procedure. The debugged program is ready for the serial output check.

Start/Stop Debug Button Use the Start/Stop Debug Session toolbar button or the µVision command Debug — Start/Stop Debug Session to connect the debugger to the Keil ULINK Adapter. The CPU stops and connects to the Embedded ICE of the TMPM330FDFG device. For more details on the debugging features, refer to the µVision User's Guide.

The Peripherals menu allows you to open different dialogs for Peripheral units on the TMPM330FDFG device. You may view and/or change the state and configuration of on-chip Peripherals using these dialogs.


MCBTMPM330 User's Guide: Downloading BLINKY

Downloading BLINKY

When the BLINKY build is complete, you may download the application to the on-chip Flash ROM using the Keil ULINK USB-JTAG Adapter.

Download to Flash Button Click the download button

When you use the Download command for the first time, you must configure the Flash options under Project — Options for Target — Utilities as described in Downloading to Flash.

After configuration, the Flash — Download command uses the Keil ULINK USB-JTAG Adapter for Flash programming.

The BLINKY application starts executing when you press RESET on the MCBTMPM330 board to verify the program downloaded.

Note

  • You may enable the option Update Target before Debugging to download the BLINKY project whenever you start a Debug Session.

The downloaded program is ready for debugging.


MCBTMPM330 User's Guide: Checking Program Output

Checking Program Output

To check the program output from the BLINKY program, start the program running either from the debugger via JTAG or by cycling power on the board. The LEDs will flash in sequence. Changing the potentiometer setting increases or decreases the speed of the LED flashing sequence.

Pressing the PH1 button on the MCBTMPM330 board pauses the LED flashing sequence.


MCBTMPM330 User's Guide: Example Programs

Example Programs

The Keil MDK-ARM Development Tools download includes an example program configured for the Keil MCBTMPM330 Board.

This example is configured for two µVision targets:

  • TMPM330 RAM - where the program runs from on-chip RAM.
  • TMPM330 Flash - where the program runs from internal Flash located on the microcontroller.

This example uses the following file structure:

  • Abstract.txt contains a short description of the example.
  • Example dependent source code.

Note

Example programs are stored in a separate folder in \KEIL\ARM\BOARDS\KEIL\MCBTMPM330\ along with project files that help you quickly build the project and run the program.

The following example program is installed automatically:

  • BLINKY
    The Blinky project shows the combination of configuring peripherals and initialization functions. The potentiometer position determines how fast the LEDs blink.


MCBTMPM330 User's Guide: Programming Flash

Programming Flash

The MCBTMPM330 board supports downloading programs to Flash memory using the ULINK USB-JTAG adapter through the JTAG connector.

MCBTMPM330 Board Connected to ULINK2

The ULINK USB-JTAG interface also supports emulation and debug capabilities for the MCBTMPM330 board.


MCBTMPM330 User's Guide: Downloading to Flash

Downloading to Flash

Download using the Keil ULINK JTAG-Adapter. The steps to setup ULINK for Programming Flash within µVision IDE are:

  1. Connect the ULINK to the JTAG connector of the MCBTMPM330 Board. Note that the red tracer on the cable marks pin 1 of the JTAG-connector.

    MCBTMPM330 connected to ULINK2

    Note

    • The JTAG interface could be disabled by random CPU instructions or by the power-down mode of the device. If this occurs, enable the on-chip boot loader, so the TMPM330Fx device can execute a valid program.
      For more information refer to the web-based Keil Support Knowledgebase, for example to the article ULINK: RECOVER STR71X WHEN JTAG DISABLE.
  2. Power up the MCBTMPM330 Board.
  3. Configure Flash Programming in the Project — Options for Target — Utilities dialog.

    Use Target Driver Option Set the Use Target Driver for Flash Programming option, then select the ULINK Cortex Debugger as the Flash programming tool.

    Update Target Option Check the Update Target before Debugging option to ensure that the Flash ROM gets programmed whenever the debugger starts.

    Settings Button Click the Settings button to open the Flash Download Setup dialog for the next step.

  4. Configure the Flash Download Setup dialog as follows:

    Flash Download Function Set the Download Function options by first selecting Erase Sectors used by the application, then check Program and Verify to verify the Flash contains the downloaded application.

    RAM for Algorithm Setting Set the Start location for for the flash programming algorithm to 0x2000000 in RAM and set the Size to 0x0800.

    Programming Algorithm Click the Add button and find the TMPM330Fx 512kB Flash programming algorithm in the list of available algorithms. Select it, then click the Add button to add it to your target.

    Finally, click the OK button to save the Target Driver settings, then click the OK button to save the Options for Target dialog settings.

  5. Download to Flash

    Download To Flash Button Click the Download to Flash toolbar button. This executes the Flash download program (Target Driver or External) selected in Project — Options for Target — Utilities and downloads the application program into the TMPM330FDFG device.

    Or

    Use the µVision command Flash — Download to download the application program into the TMPM330FDFG device.

ULINK can be also used for application code debugging in Flash ROM or RAM of the TMPM330FDFG microcontroller.


MCBTMPM330 User's Guide: Kit Contents

Kit Contents

The MCBTMPM330 kit includes:

  • The MCBTMPM330 Evaluation Board.
  • A µVision IDE Quick Start Guide.
  • Example Programs for the MCBTMPM330 Evaluation Board are located in the folder KEIL\ARM\BOARDS\KEIL\MCBTMPM330. All examples can be compiled and debugged using the Lite Edition.


MCBTMPM330 User's Guide: Features

Features

The connectors on the MCBTMPM330 evaluation board provide easy access to some of the TMPM330FDFG's on-chip peripherals. The MCU pinout area provides access to all the MCU's peripherals.

  • Analog Voltage Control for ADC Input
    An adjustable analog voltage source for testing the Analog to Digital converter built into the TMPM330FDFG.
  • ETM Trace Debug
    An ETM connector for on-chip debugging via the Embedded Trace Macrocell capabilities of the TMPM330FDFG device.
  • JTAG Download and Debug
    A JTAG on-chip debug interface, coupled with the ULINK USB-JTAG adapter, provides flash programming and real-time in-circuit emulation of the TMPM330FDFG device.


MCBTMPM330 User's Guide: Hardware Requirements

Hardware Requirements

To use the MCBTMPM330 Evaluation Kit, you need:

  • The MCBTMPM330 Evaluation Board.
  • A PC with:
    • One USB port for downloading and debugging.
    • Another USB port to provide power to the board.
  • To download and debug, one of the following:
    • A Keil ULINK2 USB-JTAG Adapter with USB A-B cable.
    • A Keil ULINK-ME USB-JTAG Adapter with mini-USB cable.
  • 1 USB A-B cable for power.


MCBTMPM330 User's Guide: Quick Start

Quick Start

Use the following table to locate important information about the MCBTMPM330 board and get started quickly.

To… | See…
Connect power to the MCBTMPM330 board. | Setup
Connect the MCBTMPM330 via ULINK/JTAG to your PC. | Connecting the MCBTMPM330
Configure the tool options for the MCBTMPM330 board. | Writing Programs
Learn more about µVision IDE. | µVision User's Guide
Review the MCBTMPM330 schematics. | MCBTMPM330 Schematics


MCBTMPM330 User's Guide: MCBTMPM330 Starter Kit

MCBTMPM330 Starter Kit

The MCBTMPM330 starter kit is the ideal way to begin working with the TMPM330Fx devices from Toshiba.

MCBTMPM330 Board with ULINK-ME

The starter kit includes:

  • MCBTMPM330 Evaluation board
  • ULINK-ME USB-JTAG adapter
  • MDK-ARM (evaluation software)

These tools help you get started writing programs and testing the microcontroller and its capabilities. Example applications which run on the MCBTMPM330 are included.

Note:

  • All references to ULINK in this document apply to the ULINK-ME USB-JTAG adapter.


MCBTMPM330 User's Guide: Software Requirements

Software Requirements

You must install the following required software to use the MCBTMPM330 Evaluation Board:

Windows Operating System

The Keil µVision tool chain runs in these Windows Operating Systems:

  • Microsoft Windows 2000
  • Microsoft Windows XP
  • Microsoft Windows Vista

Tools and Examples

To compile, link and run applications on the MCBTMPM330 Evaluation Board, you must install the ARM Microcontroller Developement Kit which includes the µVision Debugger and provides several example programs for the MCBTMPM330 Board.

Optional

  • The ARM Real-Time Library which includes the RTX Real-Time Kernel, TCP/IP Protocol Suite, Flash File system, CAN Driver, and USB Driver. You may use this package to implement applications that connect by CAN, or USB.


MCBTMPM330 User's Guide: Introduction

Introduction

You may use the Cortex-M3 based MCBTMPM330 Evaluation Board to generate and test application programs for the Toshiba TMPM330Fxxx microcontroller family. With this hands-on process, you can determine the hardware and software requirements for current and future product development.

The MCBTMPM330 Evaluation Board ships with the TMPM330FDFG device that is a superset of several other device variants of the TMPM330 microcontroller series. The MCBTMPM330 Board contains all the hardware components required in a single-chip TMPM system.


MCBTMPM330 User's Guide: Theory of Operation

Theory of Operation

The Theory of Operation explains the MCBTMPM330 board hardware. The descriptions help you to understand the MCBTMPM330 board components and how to use the available I/O interfaces.

The MCBTMPM330 is designed to be a very flexible evaluation board for the Toshiba TMPM330Fx series. The MCBTMPM330 evaluation board can be expanded to build hardware prototypes.


MCBTMPM330 User's Guide: Keil MDK-ARM

Keil MDK-ARM

To use the MCBTMPM330 Board download the Lite Edition of the Keil Microcontroller Development Kit (MDK-ARM). The MDK-ARM Lite Edition includes:

  • Powerful and easy-to-use µVision IDE that includes editor, project management, and make capability.
  • µVision Debugger with complete CPU, peripheral simulation, and driver for the Keil ULINK USB-JTAG Adapter.
  • ARM Compilation Tools that include ANSI C/C++ Compiler and related utilities.
  • RTX RTOS Kernel for building real-time applications with the ARM Compiler.
  • Extensive tutorials and documentation.

The restrictions for the MDK-ARM Lite Edition are:

  • Programs that generate more than 32 Kbytes of code and data will not compile, assemble, or link.
  • The debugger supports programs that are 32 Kbytes or smaller.
  • The compiler does not generate a disassembly listing of the machine code generated. The -S, --asm, and --interleave compiler command-line options are disabled.
  • The linker does not accept scatter-loading description files for sophisticated memory layouts.
  • The base address for code/constants is restricted to 0xXX000000, 0xXX800000, or 0x00080000 whereby XX stands for 00, 01, ..., FF. This allows memory start address like 0x00000000, 0x12800000 and so on.
  • The vector table, reset handler, and library initialization code are linked at the base address. The remaining user code and constants are offset from the base address by 0x4000 (16 KBytes). Programs generated with the Lite Edition of the tools may not be programmed into single-chip devices with less than 16 KBytes of on-chip ROM/Flash.
  • It is not possible to generate position independent code or data.
  • The compiler does not generate a listing file.


MCBTMPM330 User's Guide: Application Notes

Application Notes

Keil Software provides numerous Application Notes that discuss solutions to special problems. These are available on the Keil web site at: http://www.keil.com/appnotes/

Application Notes are available for topics like I2C and ADC Programming, Complex Device Simulation, and many more.


MCBTMPM330 User's Guide: Writing Programs

Writing Programs

The Writing Programs topics introduce you to the Keil development tools and show you, step-by-step, the process of using them with the MCBTMPM330 board. You will learn how to use µVision to create, compile, download, debug, and run a program on the MCBTMPM330 board.

Writing programs for the MCBTMPM330 board is easy.

  1. Create the Application Program using µVision IDE and the ARM C/C++ Compiler.
  2. Download the program to the on-chip Flash of the MCBTMPM330 Board.
  3. Debug the program using the µVision Debugger and ULINK.

Note

  • Use the Keil MDK-ARM Lite Edition if no other version is installed on the computer.


MCBTMPM330 User's Guide: Setup

Setup

Setting up the MCBTMPM330 evaluation board is easy. Explanations for the board setup and its components are presented here. Details about the connecting and configuring procedures for the MCBTMPM330 board are also presented, with a separate topic for the jumper descriptions. Setup includes using the MCBTMPM330 board with ULINK.

The MCBTMPM330 board requires a power connection and a ULINK-USB adapter between your development PC and the JTAG connector.

Before you start, make sure you have satisfied the hardware and software requirements.


MCBTMPM330 User's Guide: Board Setup

Board Setup

The MCBTMPM330 Evaluation Board is a USB-powered device.

MCBTMPM330 Board Connected to ULINK2

The MCBTMPM330 Evaluation Board connects directly to the Keil µVision Debugger using the Keil ULINK USB-JTAG Adapter, so no additional software is required on the board.

The MCBTMPM330 Evaluation Board connects to a PC via a standard USB cable that provides power to the board.


MCBTMPM330 User's Guide: Board Components

Board Components

The following illustration shows the important interface and hardware components of the MCBTMPM330 board.

MCBTMPM330 Board Components


MCBTMPM330 User's Guide: Connecting the MCBTMPM330

Connecting the MCBTMPM330

To use the MCBTMPM330 Evaluation Board with ULINK, you must:

  • Connect the ULINK adapter to the JTAG connector of the MCBTMPM330 board.
  • Connect the ULINK adapter to the PC via a standard USB cable.
  • Connect power from your PC to the board using a standard USB A-B cable.

The following picture shows how to connect ULINK to the MCBTMPM330 board.

MCBTMPM330 Board Connected to the ULINK2 JTAG Adapter


MCBTMPM330 User's Guide: Block Diagram

Block Diagram

The hardware block diagram displays the input, configuration, power system, and User I/O on the board. This visual presentation helps you to understand the MCBTMPM330 board components.

MCBTMPM330 Block Diagram


MCBTMPM330 User's Guide: Push Buttons

Push Buttons

The three push buttons on the MCBTMPM330 board are:

  • The Reset (S1) push button connects to the voltage monitor and the power-up reset circuit. This resets the microcontroller.
  • The NMI (S2) push button connects to pin N80 of the microcontroller controlling the non-maskable interrupt (NMI) of the TMPM330FDFG device.
  • The PH1 (S3) push button connects to pin N31 (Port H, bit 1) of the microcontroller.

MCBTMPM330 Board Buttons


MCBTMPM330 User's Guide: Microcontroller

Microcontroller

The Toshiba TMPM330 microcontroller (IC2) provided with the MCBTMPM330 board is a high-end TMPM330FDFG device with on-chip JTAG and ETM support.

A 10.0 MHz oscillator (Q1) provides the clock signal for the MCU.

MCBTMPM330 Board MCU


MCBTMPM330 User's Guide: ETM Interface

ETM Interface

The ETM Interface connector provides low-level trace debugging support for the TMPM330FDFG device.

MCBTMPM330 Board ETM Connector

A 20-pin header (Samtec FTSH-120) is included at location P4 for connecting to ETM Trace hardware.

20-pin ETM Trace Connector Pin Identification


MCBTMPM330 User's Guide: JTAG Interface

JTAG Interface

The JTAG Interface connector provides debugging and emulator support for the TMPM330FDFG device. The JTAG Interface allows application debugging and programming of on-chip and off-chip Flash devices.

MCBTMPM330 Board JTAG Connector

The standard JTAG 20-pin connector works with the Keil ULINK and many third party tool vendors.

20-pin JTAG Pin Identification

Serial Wire Mode Interface

The MCBTMPM330 board also supports the Serial Wire Mode of Cortex-M3 based devices. In Serial Wire mode, only the pins TCLK and TMS are used. TDO is an optional trace data output pin.


MCBTMPM330 User's Guide: LEDs

LEDs

The MCBTMPM330 board has the following LED indicators:

  • The POWER LED indicates that power is present on the board and shows the status of the USB DC voltage of 5 Volts.
  • The Red (N38) LED indicates Port I, bit 0 status.
  • The Yellow (N40) LED indicates Port I, bit 1 status.
  • The Green (N42) LED indicates Port I, bit 2 status.


MCBTMPM330 User's Guide: Potentiometer

Potentiometer

The potentiometer on the MCBTMPM330 board connects to port pin PD0 (AN4). The voltage range is 0.0-3.3 Volts.

MCBTMPM330 Board Potentiometer


MCBTMPM330 User's Guide: Power Supply

Power Supply

Power is supplied to the MCBTMPM330 Board on your PC using a standard USB connector. You may also power the board from a bench supply using the VIN connections on the board.

The Power LED illuminates when 5 VDC is applied to either power input.

The voltage regulator (IC3) generates 3.3 Volts DC.

MCBTMPM330 Board Power Connector


MCBTMPM330 User's Guide: Prototyping

Prototyping

The MCBTMPM330 board provides locations for connecting all 100 pins of the TMPM330FDFG device, 3.3VDC and ground.

MCBTMPM330 Board Prototyping Area

Note

  • All microcontroller signals are brought out to pins and are driven directly by the microcontroller. Exercise caution to avoid overloading these signal lines.


MCBTMPM330 User's Guide: Schematics

Schematics

Detailed schematics are available in large format on the MCBTMPM330 Evaluation Board information section of the Keil web site.

MCBTMPM330 Board Schematics
MCBTMPM330 Board Schematics


MCBTMPM330 User's Guide: Technical Data

Technical Data

Parameter | Description
Supply Voltage | 5 Volts DC (provided by the USB bus of a PC)
Supply Current | 15mA typical, 25mA maximum
XTAL Frequency | 10 MHz
Microcontroller | Toshiba TMPM330FDFG
Peripherals | 1 × JTAG Interface, 1 × ETM Interface, 3 × Push buttons (Reset, NMI, PH1), 1 × Analog Input (connected to potentiometer)
Board Size | 100mm x 70mm (4.00" x 2.75").


MCBTMPM330 User's Guide: USB Connector

USB Connector

The standard USB B-connector supplies 5 VDC power to the MCBTMPM330 board.

MCBTMPM330 USB Connector


MCBTMPM330 User's Guide: Building a Program

Building a Program

When the building a program function starts, you may watch the progress in µVision's Output window. The created executable files are placed in an output folder, ready for downloading. The steps and progress are:

  1. Start the build

    Build All Button Click the Build Target toolbar button to generate your application program. µVision translates all your source files and links the project.

  2. Monitor progress

    The build activity progress (assembling, compiling and linking) displays in the Build tab of µVision's Output window. Any errors or warnings detected during the build process also display in this window.

    Target Build Output Window

  3. Program Files

    The build creates an Executable File in ELF Format which is placed in the Output folder that you designated earlier. When you use the ULINK USB-JTAG adapter, the ELF file is required to download to the MCBTMPM330 board using the JTAG.

    The build creates an Intel HEX executable file which is placed in the same output folder for external program downloading through the serial port.

The program is now built and ready for test.


MCBTMPM330 User's Guide: Creating a Project

Creating a Project

Follow the steps below to create a new project file and to specify and organize your source (and debug) files that are a part of this project.

  1. Select the ARM Toolset that you want to use for your project.
    The default configuration is the MDK-ARM Toolset and the information below is based on selecting the ARM Compiler.
  2. Create a New Project File with the µVision menu command Project — New — µVision Project.
    Select a microcontroller from the Device Database®. The MCBTMPM330 Board comes with the Toshiba TMPM330FDFG, however, you may also use it to develop code for other TMPM330 device variants, since the TMPM330FDFG represents a superset of several other TMPM330 devices.
  3. Add Startup Code from the folder ..\ARM\STARTUP\TOSHIBA to your project. After selecting, µVision prompts with the following dialog:

    'Copy TMPM330.s Startup Code' Dialog

    Answer Yes since this startup code works with most TMPM330Fx projects.

  4. Add your own Source Code to the project using the µVision editor (or any editor of your choice) by either:
    • Right clicking the mouse in the Project Window on a group and select Add Files to Group from the context menu.

    • Or

    • Opening the Project — Components, Environment and Books — Project Components dialog.
      Within this dialog, you may create and organize files into groups, or create other project targets with different tool configurations.

      Components, Environments and Books Dialog


MCBTMPM330 User's Guide: Configuring Output Files

Configuring Output Files

Configure the Output Files in the Project — Options for Target — Output dialog. The steps for configuring these files are:

  1. Select Folder for Objects... this allows you to specify sub-folders for the output files.

    Options for Target — Output — Select Folder

  2. Enable Debug Information to store symbolic debug information within the executable file for source level program testing with the µVision debugger.

    Options for Target — Output — Debug Information Selection

  3. Enable Create HEX File to generate an Intel HEX file for Flash programming with external utilities.

    Options for Target — Create HEX File


MCBTMPM330 User's Guide: Setting Target Options

Setting Target Options

You must select the speed and memory configurations for your target hardware. Since these features of the MCBTMPM330 are fixed, copy the settings as shown below. The steps for setting the target options are:

  1. Open the Target Tab of the Project — Options for Target dialog.

    Options for Target - XTAL Type in the XTAL (MHz) of 10.0 for the oscillator frequency.

  2. Enter the memory ROM area for your target system in IROM1.

    Options for Target - IROM1 Enter the starting address of 0x0 in Start and the size of 0x80000 in Size.

    The MCBTMPM330 has on-chip ROM from 0x0 to 0x7FFFF for a total of 0x80000 bytes.

    Clicking the Startup radio button assigns your startup code to this area of memory.

  3. Enter the RAM memory area for your target system in IRAM1.

    Options for Target - IRAM1 Enter the starting address of 0x2000000 in Start and the size of 0x8000 in Size.

    The MCBTMPM330 has on-chip RAM from 0x20000000 to 0x20007FFF for a total of 0x8000 bytes.

Note

  • In the licensed (non-evaluation) version of MDK-ARM, the Memory Areas parameters automatically configure the scatter file for the ARM Linker/Locator.


MCBTMPM330 User's Guide: Creating Application Programs

Creating Application Programs

The required steps for creating application programs are outlined here.

µVision includes a Project Manager that makes it easy for you to design applications quickly. The topics below show you how to create a project, set the target options, configure the output files, and build an application program that is ready to download to the MCBTMPM330 board.

  1. Creating a Project
  2. Setting Target Options
  3. Configuring Output Files
  4. Building a Program

Detailed information can be found in the µVision User's Guide in the Creating Applications chapter.