Fujitsu F2MC-16FX MB2198 Getting Started
Fujitsu F2MC-16FX MB2198 Getting Started

Fujitsu F2MC-16FX MB2198 Getting Started

Emulator system

Advertisement

Quick Links

Fujitsu Microelectronics Europe
MCU-AN-300217-E-V10
Application Note
F²MC-16FX FAMILY
SUPPORT TOOL
EMULATOR SYSTEM MB2198
GETTING STARTED
APPLICATION NOTE

Advertisement

Table of Contents
loading

Summary of Contents for Fujitsu F2MC-16FX MB2198

  • Page 1 Fujitsu Microelectronics Europe MCU-AN-300217-E-V10 Application Note F²MC-16FX FAMILY SUPPORT TOOL EMULATOR SYSTEM MB2198 GETTING STARTED APPLICATION NOTE...
  • Page 2: Revision History

    MB2198 – Getting Started Revision History Revision History Date Issue 2006-12-14 V1.0; MWi; release version This document contains 32 pages. MCU-AN-300217-E-V10 - 2 - © Fujitsu Microelectronics Europe GmbH...
  • Page 3: Warranty And Disclaimer

    Product or parts thereof, if the Product is returned to Fujitsu Microelectronics Europe GmbH in original packing and without further defects resulting from the customer´s use or the transport. However, this warranty...
  • Page 4: Table Of Contents

    Mixed Display......................20 Monitoring Variables ....................20 Monitoring the CPU Registers................. 20 Monitoring Memory ....................21 6 MISCELLANEOUS ......................22 View Mode of the Editor ..................22 Renaming the Abs-File.................... 22 MCU-AN-300217-E-V10 - 4 - © Fujitsu Microelectronics Europe GmbH...
  • Page 5 7 INSTALLING LAN ......................26 Overview ......................... 26 Configuring the LAN Adapter .................. 26 Configuring Operating System “Windows ”............27 Checking the network-connection ................30 Troubleshooting ...................... 30 Softune Workbench....................31 © Fujitsu Microelectronics Europe GmbH - 5 - MCU-AN-300217-E-V10...
  • Page 6: Introduction

    For the hardware set up please refer to the Application Note mcu-an-300209-e- 16fx_mb2198_01_install, and the MB2198-01 and MB2198-500 Hardware Manuals. To use this document, please install the corresponding MCU sample folders of your Fujitsu Micros Documentation & Software DVD to your PC. Also, please read the notes on the DVD inlet.
  • Page 7: Getting Started

    Save and close the file. Attention: If you use MS Word, please be sure to save the file as a normal text file, not as a word document! Now open the file “Led.wsp” also with a text editor. Do the following changes: © Fujitsu Microelectronics Europe GmbH - 7 - MCU-AN-300217-E-V10...
  • Page 8: Adjusting Linker Settings

    Please adjust RAM- and ROM-settings if you use a different device. 1.4 MCU change In the project settings the MCU type can be adjusted: Doing so, a dialog box will occur: MCU-AN-300217-E-V10 - 8 - © Fujitsu Microelectronics Europe GmbH...
  • Page 9: Choosing "Yes

    “by hand”. 1.4.2 Choosing “No” By choosing “no”, the linker settings will not be affected. Please check in this case the correct RAM and ROM size for the chosen MCU type. © Fujitsu Microelectronics Europe GmbH - 9 - MCU-AN-300217-E-V10...
  • Page 10: Creating The Project

    Open the Source File of the Main Program Main.c by double clicking it in the window shown on the left. Now a text editor window will open, which shows the contents of Main.c. It will look like this: MCU-AN-300217-E-V10 - 10 - © Fujitsu Microelectronics Europe GmbH...
  • Page 11: Entering The Code

    The following program example shows how to edit the main program source code for the proposed purpose: /* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */ /* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */ /* ELIGIBILITY FOR ANY PURPOSES.
  • Page 12: Vectors.c

    Before executing the program, the interrupt definition has to be done. For that, open the file “vectors.c” and edit the bold and italic entries of the following example: /* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */ /* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */ /* ELIGIBILITY FOR ANY PURPOSES.
  • Page 13 /* EXT4 #pragma intvect DefaultIRQHandler 22 /* EXT5 #pragma intvect DefaultIRQHandler 23 /* EXT6 #pragma intvect DefaultIRQHandler 24 /* EXT7 #pragma intvect DefaultIRQHandler 25 /* EXT8 #pragma intvect DefaultIRQHandler 26 /* EXT9 © Fujitsu Microelectronics Europe GmbH - 13 - MCU-AN-300217-E-V10...
  • Page 14 #pragma intvect DefaultIRQHandler 87 /* Main Flash memory interrupt #pragma intvect DefaultIRQHandler 88 /* Sat. Flash memory interrupt /*------------------------------------------------------------------------ DefaultIRQHandler() This function is a placeholder for all vector definitions. Either use MCU-AN-300217-E-V10 - 14 - © Fujitsu Microelectronics Europe GmbH...
  • Page 15: Compiling The Project

    Assume you have forgotten to type the last ‘;’ in the “Main.c” file. Then the message will look like the following: Now building... ------------------Configuration: Led.prj - Debug-------------------- Start.asm Main.c *** <Your path>\led\src\main.c(48) E4062C: syntax error near `}' vectors.c © Fujitsu Microelectronics Europe GmbH - 15 - MCU-AN-300217-E-V10...
  • Page 16 To move quickly to the place where the error was found, simply double click the line with the red error code. The error containing line will then be highlighted red in the code window. MCU-AN-300217-E-V10 - 16 - © Fujitsu Microelectronics Europe GmbH...
  • Page 17: Starting Debugging

    After a successful connection the Softune Workbench will look like this: Note, that the interface has to be determined only once. Later you can choose the menu Debug > Start debug to enter this mode. © Fujitsu Microelectronics Europe GmbH - 17 - MCU-AN-300217-E-V10...
  • Page 18: Executing The Program

    The emulator system now is being halted. The execution can be continued by entering the “Go”-Mode again. 3.3 Ending the Debugging To end the debugging just choose the menu Debug > End debug. MCU-AN-300217-E-V10 - 18 - © Fujitsu Microelectronics Europe GmbH...
  • Page 19: Closing The Project

    Note, that in the next start of the Workbench, your new LED-Project will occur in the menu list File > Recent Workspace File. By simply clicking to “Led.wsp”, the whole project will open again. © Fujitsu Microelectronics Europe GmbH - 19 - MCU-AN-300217-E-V10...
  • Page 20: Debugging

    The menu content Radix offers now display in Binary, Octal, Decimal, and Hexadecimal formats. 5.4 Monitoring the CPU Registers To monitor the CPU registers, choose View > Register. A small window with all CPU registers and their contents will open then. MCU-AN-300217-E-V10 - 20 - © Fujitsu Microelectronics Europe GmbH...
  • Page 21: Monitoring Memory

    You can enter the start address of the memory to be displayed. Then a new Hex-List-Window will open. With the scroll bar you can change the view to any other address. © Fujitsu Microelectronics Europe GmbH - 21 - MCU-AN-300217-E-V10...
  • Page 22: Miscellaneous

    The first three entries in the item list are for selecting and deselecting the view of these non- printing characters. 6.2 Renaming the Abs-File To change the name of the Abs-File, choose Project > Setup Project. The following window will be displayed: MCU-AN-300217-E-V10 - 22 - © Fujitsu Microelectronics Europe GmbH...
  • Page 23: Reference Settings For The Led-Project

    Listfile Directory: LST\ MCU: Chip Classification: FMC16FX Target MCU: MB96F348HSA C Compiler: Category: General Outputs debug information Warning Level: Level 3 Creates an assembly list file Control of default option file © Fujitsu Microelectronics Europe GmbH - 23 - MCU-AN-300217-E-V10...
  • Page 24 Category: Optimize Speed Optimize Category: Language In-line expansion of the function which qualified by ‘__interrupt’ Treat as ‘&volatile’ the variable which qualified by ‘__io’ Language specification level: ANSI + FUJITSU extension Category: Target Depend Memory Model: Medium Assembler: Category: General...
  • Page 25 Converter: Absolute module converter is started Control of default option file Output Data Format: Motorola S Format Debug: Category: Setup Setup Name List: MB2198-01_COMn (n=1, 2, 3, 4) MB2198-01_LAN MB2198-01_USB Simulator © Fujitsu Microelectronics Europe GmbH - 25 - MCU-AN-300217-E-V10...
  • Page 26: Installing Lan

    No additional hardware connection except the LAN connection itself is required for this purpose Using the Fujitsu LAN-remote controlled debug facility, • You can control the emulator from different locations without having to move your hardware installation from one place to another.
  • Page 27: Configuring Operating System "Windows

    (Note: The files may not have a file-extension!) Make a copy of all three files, like for an example: services to services.old , etc. Edit file services and add the following line: fjicesv 5001/tcp # fujitsu emulator © Fujitsu Microelectronics Europe GmbH - 27 - MCU-AN-300217-E-V10...
  • Page 28 Server. Of course, you can define different names for the same IP-Address, as shown below. Edit file hosts and add the following line: „The unique IP address (as set by LAN-Address, see above)“ „Nickname of emulator“ e.g. 141.187.6.82 Emulator MCU-AN-300217-E-V10 - 28 - © Fujitsu Microelectronics Europe GmbH...
  • Page 29 IP-number with a simple name within your local network. Of course, you can define different names for the same IP-Address, as shown below. Edit file lmhosts and add the following line: © Fujitsu Microelectronics Europe GmbH - 29 - MCU-AN-300217-E-V10...
  • Page 30: Checking The Network-Connection

    100Mbits/10Mbit - HUB is needed. When using a HUB for 10Base-T then a standard (1:1) network cable has to be used. If the emulator is connected directly to the PC a „crossed network cable“ is necessary. MCU-AN-300217-E-V10 - 30 - © Fujitsu Microelectronics Europe GmbH...
  • Page 31: Softune Workbench

    Within the Softune Workbench the LAN interface can be used instead of a serial RS232C communication. Detail-Host: can be the „nickname“ as defined in the files hosts and lmhosts or the IP-address of the emulator, set by the program „LAN- Address“, can be used. © Fujitsu Microelectronics Europe GmbH - 31 - MCU-AN-300217-E-V10...
  • Page 32 MB2198 – Getting Started Chapter 7 Installing LAN Nickname or IP address MCU-AN-300217-E-V10 - 32 - © Fujitsu Microelectronics Europe GmbH...

Table of Contents