MCB9B500 User's Guide: MCB9B500 User's Guide

Keil, An ARM® Company MCB9B500 User's Guide

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

  • Introduction gives an overview of the MCB9B500 Board, the features, hardware and software requirements, where to find information quickly, and where to find Technical Support.
  • Setup shows the MCB9B500 Board components, how to connect, configure, and use the board.
  • Theory of Operation explains the components of the MCB9B500 board in detail.
  • Writing Programs describes how to write programs, download to flash, and configure your project for debugging for the MCB9B500 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

  • June 2010: Initial revision.

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


MCB9B500 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 MCB9B500 Board. Note that the red tracer on the ribbon cable marks pin 1 of the JTAG-connector.

    MCB9B500 Board with ULINK2

  2. Power up the MCB9B500 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 at 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 MCB9B500 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.

    Reset & Connect Options Select the Normal option in the Connect drop-down box, the HW RESET option in the Reset drop-down box, and make sure the Reset After Connect check box is checked.

    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.


MCB9B500 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 MCB9B500 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 MCB9B500, 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 MB9B500R device.


MCB9B500 User's Guide: BLINKY

BLINKY

The BLINKY example program toggles the LEDs on I/O Port Pins P38-P3F 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 MCB9B500 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\MCB9B500\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.

  • startup_MB9BF50x.s contains the CPU startup code for the Nuvoton NUC1xx devices.
  • system_MB9BF50x.c contains the CMSIS-compliant code for setting up the system clocks.
  • Blinky.c contains the application modules that monitors analog input and flashes the LEDs in sequence.
  • IRQ.c contains the target-dependent interrupt functions for the Timer and A/D converter.
  • Serial.c contains the serial I/O routines for the UART interface.
  • Retarget.c configures the target-dependent low level functions for character I/O.
  • 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 MCB9B500 Evaluation Board:

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


MCB9B500 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 MB9BF500 Flash target, proceed with the Downloading step. If the MB9BF500 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.


MCB9B500 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 MB9BF500R 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 MB9BF500R device. You may view and/or change the state and configuration of on-chip Peripherals using these dialogs.


MCB9B500 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 MCB9B500 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.


MCB9B500 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.


MCB9B500 User's Guide: Example Programs

Example Programs

The Keil MDK-ARM Development Tools download includes 2 example programs configured for the Keil MCB9B500 Board.

This example is configured for two µVision targets:

  • MB9BF50x RAM - where the program runs from on-chip RAM.
  • MB9BF50x 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\MCB9B500\ along with project files that help you quickly build the project and run the program.

The following example programs are installed automatically:

  • BLINKY
    The Blinky project shows the combination of configuring peripherals and initialization functions. The potentiometer position determines how fast the LEDs blink.
  • RTX_BLINKY
    This project uses the RTX kernel to simulate the activation of the four output stages of a step motor driver.


MCB9B500 User's Guide: Programming Flash

Programming Flash

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

MCB9B500 Board Connected to ULINK2

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


MCB9B500 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 MCB9B500 Board. Note that the red tracer on the cable marks pin 1 of the JTAG-connector.

    MCB9B500 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 MB9B50x device can execute a valid program.
  2. Power up the MCB9B500 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 MB9BF50x 256kB 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 MB9B500R device.

    Or

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

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


MCB9B500 User's Guide: Kit Contents

Kit Contents

The MCB9B500 kit includes:

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


MCB9B500 User's Guide: Features

Features

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

  • USB 2.0 Full Speed Interface
    A standard USB "A" connector for applications requiring USB Host capabilities.
  • Analog Voltage Control for ADC Input
    An adjustable analog voltage source for testing the Analog to Digital converter built into the MB9BF500R.
  • Cortex/ETM Download and Debug
    The MCB9B500 board incorporates both a JTAG interface and a Cortex Debug + ETM interface. When coupled with the ULINK2 USB-JTAG adapter, the 10-pin Serial Wire JTAG interface allows flash programming and debugging. With the ULINKPro adapter, the 20-pin Cortex Debug/ETM interface allows flash programming and instruction trace debugging.


MCB9B500 User's Guide: Hardware Requirements

Hardware Requirements

To use the MCB9B500 Evaluation Kit, you need:

  • The MCB9B500 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 USB A mini-B cable.
  • 1 USB A-B cable for power.


MCB9B500 User's Guide: Quick Start

Quick Start

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

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


MCB9B500 User's Guide: MCB9B500 Starter Kit

MCB9B500 Starter Kit

The MCB9B500 starter kit is the ideal way to begin working with the MB9B500Fx devices from Fujitsu.

MCB9B500 Board with ULINK-ME

The starter kit includes:

  • MCB9B500 Evaluation board
  • ULINK-ME USB-JTAG adapter and cables
  • 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 MCB9B500 are included.

Note:

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


MCB9B500 User's Guide: Software Requirements

Software Requirements

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

Windows Operating System

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

  • Microsoft Windows XP
  • Microsoft Windows Vista
  • Microsoft Windows 7

Tools and Examples

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

Optional

  • The RL-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.


MCB9B500 User's Guide: Introduction

Introduction

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

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


MCB9B500 User's Guide: Theory of Operation

Theory of Operation

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

The MCB9B500 is designed to be a very flexible evaluation board for the Fujitsu MB9BF500 series. The MCB9B500 evaluation board can be expanded to build hardware prototypes.


MCB9B500 User's Guide: ARM Microcontroller Development Kit

ARM Microcontroller Development Kit

To use the MCB9B500 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 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.


MCB9B500 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.


MCB9B500 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 MCB9B500 board. You will learn how to use µVision to create, compile, download, debug, and run a program on the MCB9B500 board.

Writing programs for the MCB9B500 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 MCB9B500 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.


MCB9B500 User's Guide: Setup

Setup

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

The MCB9B500 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.


MCB9B500 User's Guide: Board Setup

Board Setup

The MCB9B500 Evaluation Board is a USB-powered device.

MCB9B500 Board Connected to ULINK2

The MCB9B500 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 MCB9B500 Evaluation Board connects to a PC via a standard USB cable that provides power to the board.


MCB9B500 User's Guide: Board Components

Board Components

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

MCB9B500 Board Components


MCB9B500 User's Guide: Configuring the MCB9B500

Configuring the MCB9B500

The MCB9B500 Evaluation Board has a jumper block at J3 which configures the USB connectors and sets the MCU's Operating Mode pin (MD0).

Jumper | State | Description
HOST/DEV | DEV | Configures the USB B connector for Device mode.
 | HOST | Configures the USB A connector for Host mode.
MD0 | MD0L | Sets MD0 pin to 0. Code starts in internal ROM (Flash) at startup.
 | MD0H | Sets MD0 pin to 1. Enables Flash serial write.


MCB9B500 User's Guide: Connecting the MCB9B500

Connecting the MCB9B500

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

  • Connect the ULINK adapter to the Cortex Debug connector of the MCB9B500 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 MCB9B500 board.

MCB9B500 Board Connected to the ULINK2 JTAG Adapter


MCB9B500 User's Guide: Jumper Description

Jumper Description

The MCB9B500 has two sets of jumpers.

  • HOST/DEV: Moving the 2 jumpers to the HOST position configures the USB A connector for USB Host applications. Moving the 2 jumpers to the DEV position configures the USB B connector for USB Device applications.
  • MD0L/MD0H: Sets the Operating Mode for the MCU. The MD0L position sets the MCU in User Mode. In this position, the MCU executes code in Flash after a Reset. The MD0H position sets the MCU in Flash enable (serial write mode).


MCB9B500 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 MCB9B500 board components.

MCB9B500 Block Diagram


MCB9B500 User's Guide: Push Buttons

Push Buttons

The five push buttons on the MCB9B500 board are:

  • The RESET push button connects to the voltage monitor and the power-up reset circuit. This resets the microcontroller.
  • The P68 and P71-P73 push buttons connect to pins P68 and P71-P73 of the microcontroller, respectively.

MCB9B500 Board Buttons


MCB9B500 User's Guide: Microcontroller

Microcontroller

The Fujitsu MB9B500R microcontroller (IC1) provided with the MCB9B500 board is a high-end Cortex-M3 device with on-chip JTAG and ETM support.

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

MCB9B500 Board MCU


MCB9B500 User's Guide: ETM Interface

ETM Interface

The ETM Interface connector provides Serial Wire JTAG and low-level trace debugging support for the MB9B500R device.

MCB9B500 Board Cortex + ETM Connector

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

20-pin ETM Trace Connector Pin Identification


MCB9B500 User's Guide: JTAG Interface

JTAG Interface

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

MCB9B500 Board JTAG Connector

The 10-pin Cortex Debug connector provides access to the JTAG interface for use with the Keil ULINK2, ULINK-ME and many third party tool vendors.

10-pin JTAG Pin Identification

Serial Wire Mode Interface

The MCB9B500 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.


MCB9B500 User's Guide: LEDs

LEDs

The MCB9B500 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 8 Port LEDs marked P38 - P3F connect to the respective pins on the I/O port. These LEDs are useful for indicating program status while testing your applications.


MCB9B500 User's Guide: Potentiometer

Potentiometer

The potentiometer on the MCB9B500 board connects to port pin P10 (AN00). The voltage range is 0.0-3.3 Volts.

MCB9B500 Board Potentiometer


MCB9B500 User's Guide: Power Supply

Power Supply

Power is supplied to the MCB9B500 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.

MCB9B500 Board Power Connector


MCB9B500 User's Guide: Prototyping

Prototyping

The MCB9B500 board provides locations for connecting all 120 pins of the MB9BF500R device, 3.3VDC and ground.

MCB9B500 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.


MCB9B500 User's Guide: Schematics

Schematics

The MCB9B500 Evaluation Board consists of a Display Board mounted to the Base Board. Detailed schematics are available in large format on the MCB9B500 Evaluation Board information section of the Keil web site.

MCB9B500 Board Schematics
MCB9B500 Board Schematics
MCB9B500 Board Schematics


MCB9B500 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 | 4 MHz
Microcontroller | Fujitsu MB9B500R
Peripherals | 1 × Cortex Serial Wire JTAG Interface, 1 × Cortex JTAG + ETM Interface, 1 × USB Interface, 5 × Push buttons (Reset, 4 user-configurable), 1 × Analog Input (connected to potentiometer)
Board Size | 120mm x 60mm (4.625" x 2.375").


MCB9B500 User's Guide: USB Interface

USB Interface

The standard USB B connector supplies 5 VDC power to the MCB9B500 board. The USB B connector is used when the board is configured as a USB Device. The USB A connector is used when the board is configured as a USB Host. See the Jumper Description chapter for more information about configuring for USB Device and Host modes.

MCB9B500 USB Connector

The MCB9B500 board USB A connector is supplied with an LM3526-L power switch/over-current protector (IC2) for USB hosting applications.


MCB9B500 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 MCB9B500 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.


MCB9B500 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 RealView Compiler.
  2. Create a New Project File with the µVision menu command Project — New — µVision Project.
    Select a microcontroller from the Device Database®. The MCB9B500 Board comes with the Fujitsu MB9B500R, however, you may also use it to develop code for other MB9B50x device variants, since the MB9B500R represents a superset of several other MB9B50x devices.
  3. Add Startup Code from the folder ..\ARM\STARTUP\FUJITSU to your project. After selecting, µVision prompts with the following dialog:

    'Copy MB9BF500 Startup Code' Dialog

    Answer Yes since this startup code works with most MB9B500 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


MCB9B500 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


MCB9B500 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 MCB9B500 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 4.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 0x40000 in Size.

    The MCB9B500 has on-chip ROM from 0x0 to 0x3FFFF for a total of 0x40000 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 0x20000000 in Start and the size of 0x4000 in Size.

    The MCB9B500 has on-chip RAM from 0x20000000 to 0x20003FFF for a total of 0x4000 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.


MCB9B500 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 MCB9B500 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.