First Step Guide(Rev1.02)
Total Page:16
File Type:pdf, Size:1020Kb
FR FAMILY F2MC FAMILY 32/16/8-BIT MICROCONTROLLER SOFTUNE FIRST STEP GUIDE Preface Purpose of Manual This manual provides a general description of Softune, the procedure for software development using Softune, and the functions of Softune. This manual is intended to give a quick understanding of how to operate Softune efficiently. Readers This manual is intended for engineers to actually develop software using Softune. Features of Manual This manual introduces the procedure for software development using Softune through the use of simple samples. This manual also describes the useful functions and technical knowledge of Softune. Versions of Tools The versions of the tools used in this manual are as follows: FFMC-16 Family Softune Professional Pack REV: 300010 • Softune Workbench V30L26 • Softune C Compiler V30L06 • Softune Assembler Pack REV:300009 • Softune C Checker V30L07 • Softune C Analyzer V30L09 FFMC-16 Family Softune REALOS/907 Basic Version REV: 300004 • Softune REALOS/907 Kernel V30L05 • Softune REALOS Configurator V30L08 • Softune REALOS/907 Analyzer V30L21 - 2 - Contents Chapter 1 General 4 -7 page This chapter describes the functions and features of Softune. Chapter 2 Installing 8 - 10 page This chapter explains how to install Softune. Chapter 3 Development Procedure 11 page This chapter covers the procedure for software development using Softune. Chapter 4 Tutorial 12 - 110 page This chapter gives examples of software development using the FFMC-16 family Softune V3, including Project creation and Debugger operation through the use of simple samples. Chapter 5 Useful Functions 111 - 124 page This chapter describes the useful functions of Softune Workbench. Chapter 6 Operating C Checker 125 - 131 page This chapter explains how to operate the C Checker. Chapter 7 Operating C Analyzer 132 - 140 page This chapter explains how to operate the C Analyzer. Chapter 8 Program Development using Softune REALOS 141 - 171 page This chapter explains how to operate the Project using REALOS. Appendix A How to Create an I/O Area Module 172 - 175 page Appendix A explains how to create an I/O area module. Appendix B Q&A 176 - 218 page Appendix B lists common questions and technical knowledge in question-and-answer form. - 3 - Chapter 1 General Outline of Softune • 1.1 Functions • 1.2 Features - 4 - 1.1 Functions Manager Function Operations, such as coding, debugging and compiling, performed in software development are supported in a comprehensive manner. This function enables the user to perform software development without paying attention to starting language tools, such as a compiler and Debugger, and creating option setting files. Debugging Function Three Debuggers (Simulator Debugger, emulator Debugger and monitor Debugger) are supported; each can be used as needed. It is also possible to easily set the environments, such as the debugging environment and operating environment of the MCU. Function for Checking and Analyzing Source Files The Softune Professional Pack has C Checker and C Analyzer tools to check and analyze source files written in C. Function for Setting Editors and Tools Although Softune has an editor, any editor can be loaded and used. Any execution file can be set and executed from the Softune Workbench desktop. This function can be used to install source management tools (Visual Source Safe, Clear Case, etc.) into the system. For details, refer to the manual for linking the corresponding tool. Function for Linking Other Tools Installation of the communication module enables linking with other tools. Link with ZIPC (CATS CO.,LTD.) enables simulation using a virtual target and debugging linked with the state transition table. For details, refer to the manual for linking the corresponding tool. - 5 - = Debugger type = • Simulator Debugger The Simulator Debugger simulates the MCU operations (instruction execution, memory space, I/O ports, interrupts, reset, low-power consumption modes, etc.) only with software and evaluates the program. The Simulator Debugger is used to evaluate the state where the evaluation system is uncompleted and a single operation check. The internal resources and registers associated with them not mentioned in the Softune Workbench 'Functional Description - Simulator Debugger' Manual are not supported. • Emulator Debugger The Emulator Debugger is software that controls the in-circuit Emulator (ICE) through a communication line (RS-232C or LAN) from the host computer and evaluates the program. The in-circuit Emulator (ICE) must be initialized before use. For the initialization, see 4.3.1 Load Monitor Program. • Monitor Debugger The monitor Debugger enables the debugging function by incorporating the debugging monitor into the target system and communicating with the host computer. The target monitor program must be ported to suit target hardware before use. The monitor Debugger is not supported in the FFMC-8L Family. - 6 - 1.2 Features Features • Fully integrated development environment • High-performance C and C++ compilers (C++ Compiler only for FR) • Development support by C and C++ Checkers, and C and C++ Analyzers (C++ Checker and Analyzer only for FR) • Development support using REALOS (Configurator and Analyzer) • Installation of user tools (source generation management tool, etc.) • Link with external editors (Hidemaru, WZ, MIFES, etc.) • Supports both Japanese and English versions (menu, help, manual) • Substantial solutions to linkage with CASE tools (ZIPC, etc.) - 7 - Chapter 2 Installing Procedure The install procedure is explained using an example of installation of FFMC-16 Family V3 Professional Pack. (1) Insert the CD-ROM into the drive. (2) Start setup.exe to open the Setup menu. (3) Specify the destination directory. - 8 - (4) Select the components to install. When a component is selected, its description appears at the right side. Mark the appropriate checkboxes. This manual gives a description of the operational method by installing the following tools. (5) Execute the wizard to check the components to install, and then start installation. - 9 - Cautions • Refer to the installation manual before installation. • When installing more than one Softune V3 product (for FFMC-8L, FFMC-16, and FR Families) on one personal computer, specify the same destination folder. • When installing Softune V3 and Softune V5 on one personal computer, always specify different destination folders. Installation in the same folder is prohibited. • When installing Softune V5 in a directory where Softune V3 has been installed, uninstall Softune V3 and then install Softune V5. The same operation should be done when changing from Softune V5 to Softune V3. - 10 - Chapter 3 Development Procedure The software development procedure using Softune is given as a flowchart. - 11 - Chapter 4 Tutorial Outline This chapter gives a concrete example of the software development procedure using Softune by using simple examples. This chapter also briefly explains Project creation using Softune for the FFMC-16 Family, debugging using the Simulator and Emulator, and an example of using the object-type converter. • 4.1 Design Project • 4.2 Debugging by Simulator • 4.3 Debugging by Emulator • 4.4 Using Object-type Converter - 12 - 4.1 Design Project Design Project This section explains the procedures from Project creation to target file creation. The sample creates Project that the target MCU is the FMC-16LX(MB90F598), and it does not use OS. The explanation assumes that Softune Workbench, C Compiler and Assembler pack are installed in C:¥Softune. • 4.1.1 Setup Development Environment • 4.1.2 Create Project • 4.1.3 Setup • 4.1.4 Create Source File • 4.1.5 Add Member Files to Project • 4.1.6 Setup Tool Option • 4.1.7 Set Linkage Order • 4.1.8 Create Target File - 13 - 4.1.1 Setup Development Environment Setup Development Environment Set the contents of the [Environment Variable] and [Project] tabs in the [Setup Development Environment] dialog. (1) Start Softune Workbench to select [Development...] in the [Setup] menu. • Environment Variable tab At installation, the recommended configurations are set in the [Setup Development Environment] dialog. - 14 - • Project tab Make the basic settings required to operate Softune Workbench. Mark the appropriate checkboxes. In this tutorial, mark the checkboxes given in the following dialog. - 15 - = How to change message display color = The display color of the termination messages displayed in the Output window can be changed at Make/Build execution. Color-coding provides easy-to-read messages. To set the color of termination messages, mark the checkbox for 'Termination messages are highlighted at make/build' in the [Project] tab and click the [Detail optimize...] button. - 16 - - 17 - 4.1.2 Create Project Create Project Create a Project to generate an absolute-type target file. (1) Select [Project file] from [New] in the [File] menu. (2) In the [Create New Project] dialog, set the following items and click the OK button. • Project type ==> Absolute type (ABS) • Project name ==> mb2k_sample • Target file name ==> mb2k_sample.abs • Project directory ==> C:¥Softune¥sample¥fsg¥16lx_sample • Chip classification ==> FMC16LX • Target MCU ==> MB90F598 - 18 - (3) The Project to generate a target file is created. = Open Project = To open the Project file after Project creation (second and later creations), proceed as follows: The Project file in this sample is mb2k_sample.prj. (1) Select [Open Project...] from the [File] menu. (2) Select the Project file opened in [Open Project...]. =