background image

S5U1C17001C ManUal

 

EPSOn 

5-33

(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)

5  gnU17 iDE

5

IDE

5.3.13  [Tasks] View

Shows the tasks registered in the editor, letting you jump to or delete a task. A task is a "To-Do" item. The square 

n

 

at the beginning of each line is the icon checked up on the completion of a task. The icon indicating priority (High 
=  , Normal = blank, or Low =  ) is displayed in the column next to the square. This view in the initial 

IDE

 con-

figuration is not displayed. To open it, you must select it from [Show View] on the [Window] menu.

View menu

Show

 

Selects a filter to be applied.

group By

 

Selects a target for grouping of tasks.

Sort By

 

Select the items in the list you wish to prioritize over other items when sorting the 
list. Selecting [Ascending] sorts and arranges items in ascending order. Deselect-
ing [Ascending] sorts and arranges items in descending order.

new Tasks View

 

Creates a new tasks view.

Configure Contents...

 

Creates and edits filter settings.

 

The conditions set here restrict the tasks to be displayed and the maximum allowable number. For filter set-
tings, refer to Section 5.10.5, “Filters.”

Columns...

 

Sets the sequence of items (rows) to be displayed.

Preferences...

 

Sets the maximum number of tasks to be displayed and the display/hide setting for items (rows).

Context menu

 

Right-click in the view to display the context menu shown below.

add Task...

 = [Edit] > [Add Task...]

go To

 

Jumps to the position in the editor at which a task is set.

Show in

 

Highlights the resource in which a selected task is defined in the view selected 
from the submenu.

Copy

  = [Edit] > [Copy]

Paste

  = [Edit] > [Paste]

Delete

 = [Edit] > [Delete]

Select all

 = [Edit] > [Select All]

Mark Completed

 

Adds a completion mark to a selected task.

Summary of Contents for S5U1C17001C

Page 1: ...CMOS 16 BIT SINGLE CHIP MICROCOMPUTER C Compiler Package for S1C17 Family Ver 1 5 0 S5U1C17001C Manual ...

Page 2: ... and there is no representation or warranty that anything made in accordance with this mate rial will be free from any patent or copyright infringement of a third party This material or portions thereof may contain technology or the subject relating to strategic products under the control of the Foreign Exchange and Foreign Trade Law of Japan and may require an export license from the Ministry of ...

Page 3: ...recautions for Creation of Sources Explanation added 10 Due to C language specifications substitution will not proceed correctly 5 47 5 4 5 Importing an Existing Project Section deleted If execution of a build fails after importing a project using Windows Vista 5 112 5 7 3 Setting Compiler Options Explanation modified Use Japanese Kanji filter When the checkbox is unselected the mno sjis filt opti...

Page 4: ...d Descriptions pertaining to dummy functions have been deleted 10 26 10 4 5 Memory Window Explanation modified Memory Preferences dialog box 10 26 10 4 5 Memory Window Explanation added Default Start Dump Address 10 63 10 7 1 List of Commands Table 10 7 1 1 List of commands revised 10 112 10 7 8 Break Setup Commands Section added commands setting a command to execute after a break 11 3 11 1 4 Make...

Page 5: ... SrcFiles IDE Compiler Library Assemblr Linker Debugger Tools Reference 1 general 2 installation 3 Software Development Procedures 4 Source files 5 gnU17 iDE 6 C Compiler 7 library 8 assembler 9 linker 10 Debugger 11 Other Tools Quick reference ...

Page 6: ......

Page 7: ...er 1 Chapter 1 describes the composition of this package and provides a general outline of each tool installation Install the tools following the installation procedure described in Chapter 2 To understand the flow of program development and the operating procedure See the Tutorial described in Chapter 3 This will give you an overview of program development using the C compiler to the debugger and...

Page 8: ...n once with the cursor pointer placed in the intended location is expressed as to click The clicking operation of the right mouse button is expressed as to right click To double click Operations of pressing the left mouse button twice in a row with the cursor pointer placed in the intended location are all expressed as to double click To drag The operation of clicking on a file icon with the left ...

Page 9: ...iles 3 47 3 4 3 Disabling the GNU17 File Builder 3 49 3 4 4 Setting and Correcting the Makefile 3 50 3 4 5 Building a Project 3 51 3 4 6 Starting the Debugger 3 51 3 5 Tutorial 3 Importing an IDE Project 3 53 3 6 Tutorial 4 How to Use ES Sim17 3 56 3 6 1 Settings Required for Launching ES Sim17 3 56 3 6 2 How to Launch ES Sim17 in the Existing Project 3 59 3 7 Debugging Environment 3 66 3 8 Sectio...

Page 10: ... Resource Manipulation in a Project 5 50 5 4 9 File Filter 5 68 5 4 10 Working Set 5 69 5 4 11 Project Properties 5 73 5 5 The Editor and Editing Source Files 5 75 5 5 1 Starting the Editor 5 75 5 5 2 Basic Editing Facilities 5 77 5 5 3 Editing Functions for C Source Files 5 78 5 5 4 Outline View 5 85 5 5 5 Navigation History 5 86 5 5 6 Bookmarks 5 87 5 5 7 Tasks 5 92 5 5 8 Customizing the Editor ...

Page 11: ...ut 6 8 6 4 1 Output Contents 6 8 6 4 2 Data Representation 6 9 6 4 3 Method of Using Registers 6 11 6 4 4 Function Call 6 12 6 4 5 Stack Frame 6 12 6 4 6 Grammar of C Source 6 13 6 4 7 Compiler Implementation Definition 6 13 6 5 Filter Function for Shift JIS Code 6 14 6 6 Functions of xgcc and Usage Precautions 6 15 6 7 Known Issues 6 16 7 library 7 1 7 1 Library Overview 7 1 7 1 1 Library Files 7...

Page 12: ...d Register 8 17 8 6 5 Data Transfer Instructions between Memory and Register 8 18 8 6 6 Immediate Data Load Instructions 8 19 8 6 7 Branch Instructions 8 21 8 6 8 Coprocessor Instructions 8 24 8 6 9 Xext Instructions 8 25 8 7 Optimization of Extended Instructions 8 26 8 8 Error Warning Messages 8 30 8 9 Precautions 8 31 9 linker 9 1 9 1 Functions 9 1 9 2 Input Output Files 9 1 9 2 1 Input Files 9 ...

Page 13: ...ed modes 10 64 10 7 3 Memory Manipulation Commands 10 65 c17 fb fill area in bytes 10 65 c17 fh fill area in 16 bits 10 65 c17 fw fill area in 32 bits ICD Mini SIM 10 65 x memory dump ICD Mini SIM 10 67 set data input ICD Mini SIM 10 69 c17 mvb copy area in bytes 10 70 c17 mvh copy area in 16 bits 10 70 c17 mvw copy area in 32 bits ICD Mini SIM 10 70 c17 df save memory contents ICD Mini SIM 10 72 ...

Page 14: ...ICD Mini SIM 10 115 load load program ICD Mini SIM 10 116 c17 loadmd set program load mode ICD Mini 10 117 10 7 11 Map Information Commands 10 118 c17 rpf set map information SIM 10 118 c17 map display map information SIM 10 119 10 7 12 Flash Memory Manipulation Commands 10 120 c17 fls set flash memory ICD Mini 10 120 c17 fle erase flash memory ICD Mini 10 121 10 7 13 Trace Command 10 122 c17 tm s...

Page 15: ...tarting and Terminating ES Sim17 10 167 10 11 3 Menus 10 168 10 11 4 Simulating I O Ports 10 169 10 11 5 Simulating SVD 10 171 10 11 6 Simulating an LCD Panel 10 172 10 11 7 ES Sim17 Error Massages 10 173 10 11 8 Restrictions 10 173 11 Other Tools 11 1 11 1 make exe 11 1 11 1 1 Functional Outline 11 1 11 1 2 Input File 11 1 11 1 3 Starting Method 11 2 11 1 4 make Files 11 3 11 1 5 Macro Definition...

Page 16: ... 3 Starting Up 11 33 11 9 4 Window 11 35 11 9 5 Menus and Toolbar Buttons 11 36 11 9 6 Operation Procedure 11 37 11 9 7 Error Warning Messages 11 40 11 9 8 Sample Output File 11 41 11 10 winmdc17 exe 11 42 11 10 1 Outline of winmdc17 11 42 11 10 2 Input Output Files 11 42 11 10 3 Starting Up 11 44 11 10 4 Menus and Toolbar Buttons 11 45 11 10 5 Operation Procedure 11 46 11 10 6 Error Messages 11 4...

Page 17: ...1 General S5U1C17001C Manual 1 General ...

Page 18: ......

Page 19: ...re provided The extended instructions allow the programmer to describe assembly source simply without the need of knowing the data size The immediate data extension using the ext instruction and some useful functions that need multiple basic instructions are described with an extended instruction C and assembly source level debugger with a simulator function The debugger supports C source level de...

Page 20: ... file 4 Debugger gdb exe This debugger serves to perform source level debugging by controlling an ICD It also comes with a simulator function that allows debugging on a personal computer The gdb exe supports Windows GUI Commands that are used frequently such as break and step are registered on the tool bar minimizing the necessary keyboard operations Moreover various data can be displayed in multi...

Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...

Page 22: ......

Page 23: ...higher Hard drive The hard drive must have at least 500MB of empty space to install the S1C17 Family C Compiler Package Mouse A mouse is necessary to operate the tools Debugging tool To debug the program and the target system an optional ICD is needed in addition to this software package System software The tools support Microsoft Windows 2000 Professional Windows XP or Windows Vista English or Ja...

Page 24: ...next step Read the end user software license agreement displayed on the following screen 5 If you agree to the terms of the license select I accept the terms of the license agreement and click the Next button If you do not agree click the Cancel button to close the installer The screen displayed allows you to select the directory into which the gnu17 tools are to be installed 6 Check the destinati...

Page 25: ...tart screen 8 Click the Install button to begin installing When installation is completed a complete screen is displayed 9 Click the Finish button to quit the installer This completes installation of the tools Assuming installation finished successfully an EPSON MCU GNU17vx x menu will be added to the Windows startup menu ...

Page 26: ...eset button userdefine gdb Command file executable by User button savebreak gdb Command file for commands related to saving breakpoints loadbreak gdb Command file for commands related to resetting breakpoints make exe Make execution ar exe Library file creation update cp exe File copying rm exe File deletion sed exe Stream editor sh exe Bourne shell ccap exe Console capture moto2ff exe Tool for fi...

Page 27: ...prompt as described below C EPSON gnu17 eclipse eclipse exe clean Precautions on setting the OS Select to regular font size in Display Properties When using a drive on the network as the tool and or work drive be sure to assign a drive name to it The network name cannot be used Do not use the USB port for the ICD in other drivers and applications Furthermore make sure that the port has been enable...

Page 28: ...s in this package is made based on the GNU C Compiler designed by Free Software Foundation Inc Please read the Copying GNU text file for the license before using EPl GNU17 IDE complies with the Open Source Initiative EPL Eclipse Public License 1 0 For more information on the EPL refer to epl v10 html in the gnu17 eclipse directory ...

Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...

Page 30: ......

Page 31: ...y SEIKO EPSON C source files Assembly source files file s Assembly source files Library files Make file Parameter file file cmd Command file Target Board Executable object file Map file 2nd pass ROM data HEX file Data dump utility objdump file dump Dump file ROM area data utility moto2ff file saf ROM area data file Motorola S converter sconv32 file psa Motorola S2 ROM data file file ini Device inf...

Page 32: ...sembler source files are assembled by the as assembler to generate the object files o to be input to the ld linker If the source files include preprocessor instructions use xgcc to perform preprocessing and assembly When the necessary options are specified xgcc will execute the cpp preprocessor and the as assembler Link The compilation and assembly operations described above will prepare one or mu...

Page 33: ...nv32 After creating the ROM data file according to the above procedure be sure to perform the final verification of program operation on the actual target board using that file Finally pack the verified ROM data file psa file and the mask option data file generated by winfog17 into a mask data file using winmdc17 and present it to Seiko Epson Note that winfog17 and winmdc17 can be started by the I...

Page 34: ...s already been created in the IDE it is possible to migrate projects from another environment or to upgrade program versions by importing that project folder Creating a new project When generating makefiles etc automatically by the IDE Ordinary program development Building and debugging requires the creation of source files When using the makefiles etc prepared by the user Reuse revision etc of pr...

Page 35: ...so import source files created in other editors IDE Debugger Select C compiler assembler and linker options From second time yes yes no no From second time Set section information and location Linker script files are generated automatically by the IDE Run make exe to execute the makefile generated automatically by the IDE You can jump from an error message to the editor line containing the error S...

Page 36: ...inker script files parameter files and debugger command files may be imported for use in this operation From second time yes yes no no From second time Not required when using the user s linker script files This setting is required to use the user s build debug files Run make exe to execute a build process You can jump from an error message to the editor line containing the error Not required when...

Page 37: ...rce files Specify build options Set a linker script link map Build compile link Set debugger startup Start the debugger Close the debugger Debug Error OK Create and edit source files in the IDE IDE Debugger Only when changes are needed Only when changes are needed Only when changes are needed Select and import a project file From second time yes yes no no From second time Run make exe to execute a...

Page 38: ...sion assumes that you are using the IDE for the first time af ter installing the tools If you have taken any actions in the IDE the example screens may not match the ones you see on your PC 3 3 1 Starting the iDE Step 1 Double click the eclipse exe icon in the c EPSON gnu17 eclipse directory to start the IDE You also can start the IDE by selecting EPSON MCU GNU17 GNU17 IDE from the Windows Start m...

Page 39: ...SOfTWarE DEVElOPMEnT PrOCEDUrES 3 SoftDev View To quit before completing the tutorial select Exit from the File menu of the IDE Or use the window s close button When the following dialog box appears click the OK button to quit or the Cancel button to cancel quitting Editor area ...

Page 40: ...ct basis In a sense the project is the application program you want to develop but the project actually created is a directory with a speci fied project name wherein files containing project information cproject gnu17project and proj ect are generated To create a new project Step 3 Select New GNU17 Project from the New pulldown menu in the toolbar You can also select New GNU17 Project from the Fil...

Page 41: ... text box Leave the Use default location check box selected A project folder named sample will be generated in the workspace directory you specified when the IDE started The executable object file elf generated when building a project is assigned the name you specify here Step 5 Click the Next button The system will go to the next screen where you select a target CPU memory model and vector table ...

Page 42: ...to link the ordinary emulation library libgcc a when creating a project Specifying a vector table file The IDE requires the definition of a vector table section labeled vector in a linker script to ensure that the trap vectors located in memory always begin with the trap table base address In the Use vector section as a vector table container field of this screen specify whether to locate a specif...

Page 43: ...arE DEVElOPMEnT PrOCEDUrES 3 SoftDev Step 10 Click the Finish button The New GNU17 Project wizard will be closed creating a project with the specified name Note that the target CPU cannot be changed later The memory model coprocessor library and vector table file can be revised later ...

Page 44: ...e the IDE editor or a general purpose editor to create a source file You can also use an existing source file in the application you created for the S1C17 Family In this tutorial we will use the source files prepared as examples For detailed information on creating a new source file with the IDE refer to Section 5 5 The Editor and Edit ing Source Files adding a source file Load the source files pr...

Page 45: ... SOfTWarE DEVElOPMEnT PrOCEDUrES 3 SoftDev Step 13 Click the Browse button for From directory The Import from directory dialog box will be dis played so select the EPSON gnu17 sample S1C17common simulator tst directory from the drive C in which you installed the IDE and click OK ...

Page 46: ...t box while the files contained in the directory are listed in the right side list box Step 14 Select boot s and main c from the file list Click to select the check box shown before the file name flagged by a check mark when selected Step 15 Click the Browse button for the Into folder This displays the Import into Folder dialog box Select the sample folder and click OK ...

Page 47: ...hown above click the Finish button This procedure adds boot s and main c to the project Step 17 Double click sample in the C C Projects view or click shown before sample The added source files are displayed in the sample folder in the C C Projects view Step 18 Click for main c in the C C Projects view The global variables and functions defined in the file are displayed for C sources ...

Page 48: ... main c in the C C Projects view The contents of main c are displayed in the editor Here you can correct the source as with a general purpose editor Furthermore you can set up the editor so that selected files will be opened in a general purpose editor you normally use For detailed information refer to Section 5 5 The Editor and Editing Source Files If C sources are displayed reserved words commen...

Page 49: ...bar on the left side of the editor window This way the editor allows you to inspect functions etc easily Step 21 Double click boot s in the C C Projects view Multiple sources can be opened at the same time Click the tab at the top of the editor window where a file name is displayed and select the source you want to display or edit When assembler sources are displayed the labels directives and regi...

Page 50: ...C Projects view The Properties dialog box will be displayed Step 24 From the properties list on the left side of the dialog box select GNU17 Build Options by clicking on it to display the Build Options tab page You can set command line options here for the compiler assembler linker and vector checker Click to select one of the tool names shown in tree form Compiler Assembler Linker or Vector Check...

Page 51: ... set the C compiler s I option to specify an include path will be displayed If user header files are prepared in another directory they should be added to this list following the procedure described below Step 26 Click the Add button A directory select dialog box will be displayed so enter a path or se lect one from the folder select dialog box that appears when you click the Browse button When th...

Page 52: ...th the previous settings will be deleted and rebuild or not Click the Cancel button The directory setting specified here provides the includes file paths for the C compiler to search from Macro and environment variable to specify a path The Include Paths I column lists TOOL_DIR include that is set by default environment variable is a macro defined in the makefile that is generated when you build a...

Page 53: ...text box Then click the OK button to close the dialog box The environment variables defined here may be used for specifying include file and library file paths in the build options The environment variable should be used as a environment variable macro format when specifying a path option adding a library file Steps 29 to 31 below are shown for reference only No operation is required Step 29 Selec...

Page 54: ... IDE A linker script file is used to indicate the section location and configuration to the linker For example one object file generated by the assembler consists of sets of codes classified by data attributes such as a program code part static data part and a variable part A set of codes like these comprises a single section To the linker these represent an input section The linker combines multi...

Page 55: ...rt address indicated in the VMA column it means that the section is to be lo cated following the immediately preceding section The LMA Load Memory Address is the position start address in ROM at which the actual data is placed If this column is marked with it means that this address is the same as the VMA i e the section will be executed or accessed at the position at which the actual data is plac...

Page 56: ...will be displayed The upper part of the dialog box is used to set the sections listed in the preceding screen The list box on the lower right side shows the objects to be located in the vector section You can see boot o is set in the vector section as you have previously specified in the New Project Wizard The list box on the left side lists the remaining other object files and library files withi...

Page 57: ... in the assembler sources the constants in the scope of the rodata sec tion If the vector table is written in another section with a different attribute e g text section select the attribute from File Attributes so that the section will be located in the vector section Furthermore Virtual map address contains the boot vector address specified when the project is newly created If the processor has ...

Page 58: ...roject name sample from the C C Projects view Step 38 Select Build Project from the Project menu You also can select Build Project from the context menu that appears when you right click on the project name sample in the C C Projects view When the build command is selected this way makefiles are generated with the current settings and then make exe is executed to generate an executable format obje...

Page 59: ...ff 16M bytes be used as a RAM area Note that 00 word here means this device is accessed in 32 bit size for read with no wait states 0 cycles and for write with no wait states 0 cycles The access conditions set here are effective in only simulator mode Other area information for the stack area in RAM is also defined Shown here is the basic configuration of the S1C17 microcomputer that incorporates ...

Page 60: ...ess to 7fff Step 43 Click the OK button The displayed address range of the RAM area has been changed to 000000 007FFF Step 44 Click the Add button The Add Parameter dialog box will be displayed Step 45 Enter 8000 in the Start Address text box and 17fff in the End Address text box Select halfword 16 bits from Access Size Step 46 Click the OK button ...

Page 61: ...d passed to the de bugger via a command file when the debugger starts Setting the debugger s startup options Step 48 Select GNU17 GDB Commands from the properties list by clicking on it This page displays the contents of the debugger startup command file that will be generated by the IDE The debugger must be set to the appropriate mode that suits the ICD used etc before it can be operated For deta...

Page 62: ...owing procedure Step 49 Click the Create commands from template button to display the Create a simple startup command dialog box Step 50 Select Simulator from the Debugger combo box Step 51 Click the Overwrite button then click the OK button in the Overwrite commands dialog box displayed next The displayed contents are altered for simulator mode The commands may be added and edited directly in thi...

Page 63: ...ations from the Run menu The External Tools Configurations dialog box will be displayed Step 54 Select GDB17 Launch for sample from the list in the dialog box This dialog box may be used to edit the command line of the gdb debugger No particular changes are required for executing the sample so start the debugger directly with this setting Step 55 Click the Run button The gdb debugger will start ...

Page 64: ...s loaded into the debugger by the command file and the debugger is reset The PC program counter is set to the program execution start position letting the debugger ready to start debugging To run a program Step 56 Click the Continue button in the toolbar The sample program here endlessly increments the int variable counter i addresses 0x0 0x3 Use a forcible break to stop such an endless loop To fo...

Page 65: ... that the program has stopped im mediately before executing the instruction at this address Although boot s was displayed in the Source window when the program has started the source of main c is displayed in it because the program has stopped and remains idle in main c now The Source window can display a program in other than the source mode To change the display mode of the Source window There i...

Page 66: ...ne numbers added You can see the entire source file in one window aSSEMBly In ASSEMBLY mode the loaded object code is displayed in disassembled form Even when the source files corresponding to the loaded object file cannot be found the object code is displayed in this mode The C sourc es are displayed in function units Only the currently halted function can be displayed at a time and no other func...

Page 67: ...ws you to know not only the source line at which the program has stopped but also the address and the instruction code at that address all in the Source window In this case too the C sources are displayed in function units SrC aSM In SRC ASM mode the window is split into the upper and lower parts for simultaneous display in SOURCE and ASSEMBLY modes Step 59 Select SOURCE to reverse the display mod...

Page 68: ...ntering cont here and pressing the Enter key This is the Registers window It shows the contents of the S1C17 Core registers The register data can be re written here This is the Memory window It shows the contents of the target memory The memory data here can be rewrit ten When run in the above step the sample program increments the int variable i addresses 0x0 0x3 Examine value of the variable i i...

Page 69: ...three windows are available Step 61 Click the Breakpoints button This is the Breakpoints window This window is used to manage software PC breakpoints that halt the pro gram at specified positions Step 62 Click the Watch Expressions button This is the Watch Expressions window This window is used to monitor the values of global variables This window may be used to monitor the variable i i global var...

Page 70: ...ows We ll now return to program execution In the preceding steps we ran a program stopping it using forced breaks This time we ll run a program after specifying in advance a position at which to stop it To specify a breakpoint Step 65 The source line numbers are displayed in the Source window Move the mouse cursor to a position preceding numeral 16 Click when the cursor changes to a l white circle...

Page 71: ...un Discussions of these break facilities are omitted here For detailed information on break facilities refer to Section 10 6 6 Break Functions If any problem in program behavior is detected the program operation should be verified with greater care As the last step of the tutorial we will proceed through the program by executing one source line at a time To proceed through the program step by step...

Page 72: ...the procedure described below to quit the debugger To quit the debugger Step 71 Select Exit from the debugger s File menu All of the debugger windows will be closed and the IDE window is displayed once again In addition to the simulator mode described above a program can be debugged in another mode after connect ing an ICD to the target board For detailed information on how to debug in this mode r...

Page 73: ...created as follows 1 Motorola S3 format HEX file is created by objcopy exe objcopy I elf32 little O srec srec forceS3 InputFile elf OutputFile sa 2 Empty addresses in the HEX file are filled with 0xff data by moto2ff exe moto2ff StartAddress BlockSize InputFile sa output file name input file name saf 3 File is converted to the Motorola S2 format by sconv32 exe sconv32 S2 InputFile saf OutputFile p...

Page 74: ...refer to the section describing other tools Lastly pack the verified Motorola S2 ROM data HEX file and the function option document file created by winfog17 into a single mask data file packed file using winmdc17 exe Step 77 Select a project and click the toolbar Pack with WinMdc17 button The Pack successfully completed dialog box appears and a packed file sample pa file is created in the project ...

Page 75: ...ample files listed below that exist in the c EPSON gnu17 sample S1C17common simulator simulatedIO directory vector c Vector table file main c C source file mymakefile mak Makefile myldsfile lds Linker script file mycmdfile cmd Debugger command file for simulator mode myparfile par Parameter file 3 4 1 Creating a Project First create a new project with the IDE Step 1 Launch the IDE Step 2 Select Ne...

Page 76: ...ep 4 Click the Next button This tutorial does not use the makefiles and linker script files generated by the IDE so there is no need to select the target CPU memory model and vector section Step 5 Deselect the check box Allocate a specific file to vector section Step 6 Click the Finish button to create a project ...

Page 77: ...enience we ll also import the makefiles stored in the same directory Step 7 Select mymake_sample in Navigator view and Import from the File menu This launches the Import wizard Step 8 Select General File System from the list displayed and click the Next button Step 9 Using the Browse button in From directory select the C EPSON gnu17 sample S1C17common simulator simulatedIO directory that contains ...

Page 78: ...ght sides of the win dow respectively Step 10 Select the check boxes for the following files shown in the right side list box vector c Vector table file main c C source file mymakefile mak Makefile myldsfile lds Linker script file mycmdfile cmd Debugger command file myparfile par Parameter file Step 11 Click the Finish button You can inspect the files that have been added to the project from the N...

Page 79: ...of these files Step 12 After selecting the mymake_sample project from the Navigator or the C C Projects view se lect Properties from the Project menu or context menu to display the Properties dialog box Step 13 Select Builders from the properties list and deselect the GNU17 File Builder check box A dialog box below appears for confirmation Click OK Step 14 Click the OK button You can use your own ...

Page 80: ...dialog box Step 16 Select C C Make Project from the properties list to display the page for the Make Builder tab Step 17 Change the makefile name mymake_sample_gnu17IDE mak set in Build command to mymakefile mak No change is required if the makefile is mymakefile mak However unless the target name in the user created makefile is all build or clean clean the following settings must also be changed ...

Page 81: ... or to edit the linker script file Step 19 Select the project mymake_sample name from the Navigator or the C C Projects view Step 20 Select Build Project from the Project menu When the build command is selected this way make exe is executed with a specified makefile to generate the ex ecutable format object file stdio elf Since we are using a makefile that is not automatically generated the object...

Page 82: ... a command file as shown below Before change x project_name _gnu17IDE cmd After change x mycmdfile cmd Step 24 Click the Apply button to confirm what you ve altered here Starting the debugger will now execute mycmdfile cmd Step 25 Click the Close button if you want to finish here To actually start the debugger click the Run button See Tutorial 1 for basic debugger operations ...

Page 83: ...PC Or you can develop another application based on that project The procedure for importing a project is explained here For other procedures refer to Tutori als 1 and 2 Sample project directory used C EPSON gnu17 sample S1C17common simulator simulatedIO To import a project We ll assume that the project to be imported is copied to the HDD of your PC Step 1 Launch the IDE Step 2 Select Import from t...

Page 84: ...opy projects into workspace check box This will make a copy of the project into the workspace directory and the original project files will not be modified Do not specify the project directory directory containing project file as a workspace directory Doing so may result in failures with project imports when Copy projects into workspace is selected The current workspace directory can be checked by...

Page 85: ...ces are stored together in a project directory the project can be copied to any location without caus ing problems The project can then be built at the copied destination with no further revisions Even if your project references certain external files or folders outside the project you will not need to correct them as long as those files and folders are managed in the same directory structure Howe...

Page 86: ...or ES Sim17 3 6 1 Settings required for launching ES Sim17 To launch ES Sim17 at the start of the debugger the following two settings are required 1 Specifying the target CPU parameter file 2 Starting the debugger in simulator mode debugger command file This section explains the operations on the IDE to set the above conditions when a new project begins Specifying the target model To simulate mode...

Page 87: ...ed deleted by the configuration file that will be modified when a new model is released or an existing model is discontinued Step 3 Configure the memory model and vector section as necessary then terminate the wizard by clicking the Finish button After that edit source files and build them as usual The target CPU can also be specified on the GNU17 General page of the Preferences dialog box similar...

Page 88: ...ox by clicking the Create commands from template button and select Simulator from the Debugger combo box Step 6 Click the Overwrite button Step 7 Click the OK button Following the above steps the settings for launching ES Sim17 at the same time the debugger starts up are fin ished Other operations are not necessary in the source edit and build stages to launch ES Sim17 ...

Page 89: ... Core as the target to launching the debugger and ES Sim17 after changing the target model Sample project directory used C EPSON gnu17 sample S1C17701 simulator application importing the project This tutorial assumes that the project to be imported is copied to the HDD of your PC Step 1 Launch the IDE Step 2 Select Import from the File menu This launches the Import wizard Step 3 Select Existing Pr...

Page 90: ...py projects into workspace check box This will make a copy of the project into the workspace directory and the original project files will not be modified Do not specify the project directory directory containing project file as a workspace directory Doing so may result in failures with project imports when Copy projects into workspace is selected The current workspace directory can be checked by ...

Page 91: ...be simulated by ES Sim17 Step 7 Display the Properties dialog box by selecting Properties from the Project menu and open the GNU17 General page Step 8 Make sure S1C17701 is selected in the Target CPU Device combo box Step 9 Click the OK button The name of the target model used by the debugger to start ES Sim17 is described below in the parameter file to be passed on to the debugger ESSIM S1C17701 ...

Page 92: ...file in the sample project is made to set the debugger to ICD Mini mode therefore it must be changed to simulator mode Step 10 Display the Properties dialog box by selecting Properties from the Project menu and open the GNU17 GDB Commands page Step 11 Display the Create a simple startup command dialog box by clicking the Create commands from template button and select Simulator from the Debugger c...

Page 93: ... the OK button Following the above steps the command for setting the debugger to simulator mode for launching ES Sim17 is written to the command file that will be passed to the debugger as shown below target sim When the user provides the original command file that contains the target icd usb command rewrite the command to target sim ...

Page 94: ...for S1C17 Family Ver 1 5 0 3 SOfTWarE DEVElOPMEnT PrOCEDUrES launching the debugger Step 14 Select External Tools GDB17 Launch for application from the Run menu The debugger starts up and enters simulator mode At the same time the ES Sim window opens ...

Page 95: ...le lcd compatible with the model selected in the project For instructions on creating LCD files see Section 11 11 LCDUtil17 LCD Panel Customizing Tool Step 15 Select Load lcd file from the File menu After the file selection dialog box is displayed open the LCD file for the S1C17701 as created in LCDUtil17 at C EPSON gnu17 tool LcdUtil17 sample SVT17701 lcd For the functions and how to operate ES S...

Page 96: ...r combo box in the Create a simple startup command dia log box to generate a startup command file To start in ICD Mini mode make sure an ICD and target board are connected correctly and that the power for these units is turned on For details on how to use the ICD refer to the manual for the ICD used Note that the trace function is not available in ICD Mini mode Simulator SiM mode In simulator mode...

Page 97: ...evices such as internal ROM and external ROM Four broad categories attributes of sections are set in the xgcc C compiler and data is located in the appropriate sections according to the contents of the source files 1 text section Program code is located here All code is eventually written to ROM 2 data section Read writable data with initial values are located here The data is written to ROM from ...

Page 98: ... section global BOOT align 2 long BOOT 0x00 reset long UNALIGN 0x01 unalign long EXCEPTION 0x02 nmi text text section BOOT xld a sp 0x3f00 set SP file2 s data data section rodata rodata section file3 c include string h int i_bss bss section int i_data 1 data section const int i_rodata 0x12345678 rodata section const char sz_rodata ABCDEFGH rodata section int main text section char sz_buf 10 int i ...

Page 99: ...ata file3 o data C EPSON gnu17 lib 24bit libc a data C EPSON gnu17 lib 24bit libgcc a data C EPSON gnu17 lib 24bit libc a data __END_data vector 0x008000 7 __START_vector file1 o rodata __END_vector text __END_vector 8 __START_text file1 o text file2 o text file3 o text C EPSON gnu17 lib 24bit libc a text C EPSON gnu17 lib 24bit libgcc a text C EPSON gnu17 lib 24bit libc a text __END_text rodata _...

Page 100: ...c a is specified twice to resolve refer ences to unknown symbols some functions in libgcc a call a function in libc a This specification does not locate the actual code twice 5 The symbol __END_bss is defined to indicate the bss output section end address similar to 3 above The location counter value specified by is __START_bss total size of all bss sections located 6 Define the data output sectio...

Page 101: ...sing data section VMA bss section VMA 0x000000 rodata 4 text 4 libc a library bss 4 rodata 5 text 5 data 5 libgcc a library bss 5 __END_data __START_data __END_bss __START_bss Unused text 3 text 4 text 5 text 1 rodata 2 rodata 3 rodata 4 rodata 5 ROM data 3 data 4 data 5 data 2 data section LMA rodata section LMA VMA text section LMA VMA vector section LMA VMA 0x008000 __END_data_lma __START_data_...

Page 102: ...3 72 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 3 SOfTWarE DEVElOPMEnT PrOCEDUrES THIS PAGE IS BLANK ...

Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...

Page 104: ......

Page 105: ...es not including arrays and variables up to 20 000 lines can be accepted However the number of acceptable lines varies depending on the source density Consider these two conditions above as reference for sources in which variables constants arrays and executable codes are mixed The number of lines shown above varies depending on compile environment conditions Moreover the compiler may be forcibly ...

Page 106: ... int 2 32768 to 32767 unsigned int 2 0 to 65535 long 4 2147483648 to 2147483647 unsigned long 4 0 to 4294967295 pointer 4 0 to 16777215 float 4 1 175e 38 to 3 403e 38 normalized number double 8 2 225e 308 to 1 798e 308 normalized number long long 8 9223372036854775808 to 9223372036854775807 unsigned long long 8 0 to 18446744073709551615 wchar_t 2 0 to 65535 The float and double types conform to th...

Page 107: ...me time h acos asin atan atan2 ceil cos cosh exp fabs floor fmod frexp ldexp log log10 modf pow sin sinh sqrt tan tanh math h errno h float h limits h memchr memmove strchr strcspn strncat strpbrk strstr memcmp memset strcmp strerror strncmp strrchr strtok memcpy strcat strcpy strlen strncpy strspn string h isalnum iscntrl isgraph isprint isspace isxdigit toupper isalpha isdigit islower ispunct is...

Page 108: ...long ADDR_ERR n long NMI n space 4 n long EINT0 n long EINT1 Example 3 BOOT asm xld a sp 0x3f00 set SP For details on how to write an assembly source refer to Section 4 3 Grammar of Assembly Source 4 2 4 Prototype Declarations Declaring interrupt handler functions Interrupt handler functions should be declared in the following format type function name __attribute__ interrupt_handler Example void ...

Page 109: ... is an ordinary source description method For increased visibility the elements composing each statement are aligned with tabs and spaces restrictions Only one statement can be described in one line A description containing more than two instructions in one line will result in an error However comments may be described in the same line with an instruction or label Example OK BOOT ld r1 r2 ld r0 r1...

Page 110: ...elements of operands will be described further below Types of mnemonics The following S1C17 Core instructions can be used in the S1C17 Family ld b ld ub ld ld a add add c add nc add a add a c add a nc adc adc c adc nc sub sub c sub nc sub a sub a c sub a nc sbc sbc c sbc nc cmp cmp c cmp nc cmp a cmp a c cmp a nc cmc cmc c cmc nc and and c and nc or or c or nc xor xor c xor nc not not c not nc sr ...

Page 111: ...lank 0x0 space align value Alignment to a specified boundary address global symbol Defines a global symbol set symbol address Defines a symbol with an absolute address 3 labels A label is an identifier designed to refer to an arbitrary address in the program You can refer to a branch destination of a program or an address in the text data section by using a symbol defined as a label Definition of ...

Page 112: ... with a label or instruction in one line Examples This line is a comment line LABEL Comment for LABEL ld a b Comment for the instruction on the left This type of comment can include newline characters restrictions When a comment extends to several lines each line must begin with a semicolon or use and Examples These are comment lines The second line will not be regarded as a comment An error will ...

Page 113: ...ry notations of values To specify a binary number place 0b before the value Examples 0b1001 0b01001100 0b cannot be followed by characters other than 0 or 1 Specified ranges of values The size specified range of immediate data varies with each instruction The specifiable ranges of different immediate data are given below Table 4 3 2 1 Types of immediate data and their specifiable ranges Symbol Typ...

Page 114: ...ted to the following A Z a z _ 0 9 Note that a symbol cannot begin with a numeral Uppercase and lowercase characters are discriminated local and global symbols Defined symbols are normally local symbols that can only be referenced in the file where they are defined Therefore you can define symbols with the same name in multiple files To reference a symbol defined in some other file you must declar...

Page 115: ...xjrult xjrult d xjrule xjrule d xcall xcall d xcalla xcalla d sjpr sjpr d sjpa sjpa d sjreq sjreq d sjrne sjrne d sjrgt sjrgt d sjrge sjrge d sjrlt sjrlt d sjrle sjrle d sjrugt sjrugt d sjruge sjruge d sjrult sjrult d sjrule sjrule d scall scall d scalla scalla d xld cw xld ca xld cf sld cw sld ca sld cf Method for using extended instructions The value or symbol for the expanded immediate size can...

Page 116: ... of character strings and numbers if else endif Conditional assembly Examples include define h define NULL 0 ifdef TYPE1 ld r0 0 else ld r0 1 endif Refer to the gnu C preprocessor manual for details of the preprocessor directives Note The sources that contain preprocessor directives need to be processed by the preprocessor use the xgcc options c and xassembler with cpp and cannot be entered direct...

Page 117: ...specified avoid using unsigned int unsigned short type variables or add the suffix L to the constant as shown below so that it will be handled as a long type constant ip_Pt 1L i 5 In C sources function names can be used as the pointer to the function note however that the pointer values cannot be assigned to real type float double variables and arrays using the function names They can be assigned ...

Page 118: ...of global local variable or global local array In 24 bit address space default condition or 20 bit address space when mshort offset only is specified A warning occurs if a function pointer is assigned to a variable array other than long unsigned long data types In 16 bit address space when mpointer16 is specified A warning occurs if a function pointer is assigned to a variable array other than sho...

Page 119: ...he int type the correct value will not be returned if the return value has a data type larger than int Example long l_Val 0x12345678 l_Val_2 int main l_Val_2 sub l_Val_2 is substituted with 0x5678 return 0 long sub long l_wk l_wk l_Val return l_wk 8 Do not use a pointer other than char to perform a read write operations to an odd number memory Failure to observe this warning will result in an addr...

Page 120: ... in the following warning message if the Wall option is specified In this case access to the variable via a pointer or substitution will not proceed correctly Example When the O3 option is specified int sub int p1 0 short p2 short p1 Because p2 and p1 are incompatible pointers a warning message will appear In this case access to variable p1 via pointer p2 or substitution will not proceed correctly...

Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...

Page 122: ......

Page 123: ...ing the linker script file needed to build a project and the parameter and command files needed to launch the debugger Launcher for calling the gdb debugger After a build process the user can call the gdb debugger to debug a built application 5 1 2 Some notes on Use of the iDE about the guaranteed operation of the iDE The IDE is designed to run on the Eclipse development platform and uses Eclipse ...

Page 124: ...ctory or create a new directory and set it as the workspace Enter a directory name in the Workspace combo box or select one from the directory select dialog box displayed by clicking the Browse button The Workspace Launcher dialog box is displayed each time you start the IDE If you plan to perform your work in the same workspace from this point you can choose not to display the Workspace Launcher ...

Page 125: ...xit from the File menu to close the IDE If any open files in the editor have not been saved you will be prompted to save or discard your changes Select Yes or No before quitting the IDE You also can use the close button to quit the IDE Click the OK button at the following dialog prompt to quit or Cancel to continue working Select the Always exit without prompt check box to skip this prompt ...

Page 126: ...iler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 3 iDE Window The IDE window consists of an editor surrounded by several views and a menu bar and a toolbar Menu bar Window toolbar Editor Perspective bar Status bar Views View toolbar ...

Page 127: ... since you created or last saved the file Close All Ctrl Shift W Closes all files open in the editor You will be prompted to save or discard any changes made since you cre ated or last saved the files Save Ctrl S Saves changes made in the current file If the content you last edited has already been saved selecting menu command has no effect Save As Saves the current active file under another name ...

Page 128: ...lay or edit properties of the project file or directory currently selected in the C C Projects or Navigator view Exit Closes the IDE Edit menu Undo Typing Ctrl Z Undoes the most recent operation performed in the editor Redo Typing Ctrl Y Repeats the last operation canceled by Undo Typing Cut Ctrl X Cuts the selected string or file directory and copies it to the clipboard Copy Ctrl C Copies a selec...

Page 129: ...t the current cursor position in an active document in the editor as a task memorandum The registered task can be managed in the Tasks view Smart Insert Mode Ctrl Shift Insert Changes the editor Smart Insert Mode Show Tooltip Description F2 Pressing the F2 key while a tooltip is displayed focuses on the tooltip Word Completion Alt Inserts a word beginning with the character being entered in the ed...

Page 130: ... Open Declaration F3 Opens the declaration or definition of a selected object Effective when the indexer is ON Open Type Hierarchy F4 Opens the type hierarchy of a selected variable Effective when the indexer is ON Open Call Hierarchy Ctrl Alt H Opens the call hierarchy of a selected function Effective when the indexer is ON Open Include Browser Ctrl Alt I Opens the include hierarchy of a selected...

Page 131: ... Project Opens the closed project currently selected in the C C Projects or Navi gator view Close Project Closes the project currently selected in the C C Projects or Navigator view Build All Ctrl B Executes a build process on all projects open in the C C Projects or Navigator view Build Project Executes a build process on the project currently selected in the C C Projects or Navigator view Build ...

Page 132: ...k file project name pa Refer to Section 11 10 winmdc17 exe for detailed information on packing and unpacking Unpack with WinMdc17 Launches winmdc17 exe and unpacks a pack file project name pa Refer to Section 11 10 winmdc17 exe for detailed information on packing and unpacking Start LcdUtility Launches the LCD utility application LcdUtil17 exe run menu External Tools Tool list Lists the external t...

Page 133: ...pective Save Perspective As Saves settings for the current perspective under another name Reset Perspective Restores the perspective view layout etc to the default state Close Perspective Closes the currently active perspective Close All Perspectives Closes all loaded perspectives Navigation Show System Menu Alt Displays the currently active view or system menus usable in the editor e g fast view ...

Page 134: ...lects the view to be activated by default the one opened just before the current view in usage his tory Next Perspective Ctrl F8 Selects the perspective to be activated by default the one opened just after the currently active perspec tive in usage history Previous Perspective Ctrl Shift F8 Selects the perspective to be activated by default the one opened just before the currently active per spect...

Page 135: ...with WinMdc17 GNU17 Actions Pack with WinMdc17 Unpack with WinMdc17 GNU17 Actions Unpack with WinMdc17 Start LcdUtility GNU17 Actions Start LcdUtility New C C Project File New New GNU17 Project New C C Source Folder File New Source Folder New C C Source File File New Source File New C Class Unused External Tools Run GDB17 Launch for xxxxx Run External Tools Open Type Unused Search Search Search Se...

Page 136: ...ine in which a task is set etc Hover the mouse pointer over a marker to display the contents of an error the name of a bookmark or a task explanation As for the marker bar the overview ruler on the right edge of the area shows the position in error and the position at which a bookmark or task is set by a square symbol The positions displayed on this side do not correspond to the current display po...

Page 137: ...opy Edit Copy Paste Edit Paste Quick Fix Edit Quick Fix Source Displays the submenu for editing the line at which the cursor is cur rently positioned Comment Uncomment Changes the line at which the cursor is currently positioned to a comment line or ordinary source line added to or deleted from the beginning of the line C editor only Add Block Comment Changes the currently selected string or line ...

Page 138: ...t references the string e g function name or variable name selected in the editing area within the range selected in the submenu workspace current project specified working set C editor only Search Text Searches for the string selected in the editing area within the range selected in the submenu workspace current project current file specified working set C editor only Preferences Displays the Pre...

Page 139: ...e menu To redo click the Up button in the toolbar shown below Navigation operations are saved to a history file and the operations can be restored to a previous state or advanced forward using the Back or For ward menu command or toolbar button Note The tree view display of the C C Projects view does not support the display of symbols and labels in assembler sources Tree list icons Indicated below...

Page 140: ...et to an unselected state Edit Active Working Set Edits the content of the currently selected working set Filters Specifies the type of file to be displayed Link With Editor Updates the editor view to reflect the selection in the view Context menu Right click in the view to display the context menu shown below for information on menu commands not de scribed below refer to the section that discusse...

Page 141: ...ith the content saved immediately before Object file conversion Effective when a file is selected Generate an S record file Effective when an elf file is selected Converts a selected elf format object file to Motorola S3 format and generates a HEX file This calls a command that executes objcopy I elf32 little O srec srec forceS3 file name elf filename sa Generate a raw binary file Effective when a...

Page 142: ...to the immediately preceding state based on history Forward Advances display in the view to the immediately following state based on history Up Expands the display in the view to the hierarchy one level up Collapse All Folds all of the hierarchy expanded display up into the uppermost hierarchy Link with Editor While this button is toggled the editor view changes to reflect the selected content in ...

Page 143: ...ffective when a project is selected Close Unrelated Project Closes projects unrelated to the one currently selected Effective when a project is selected Compare With Compares the contents of two or three selected files Restore from Local History Restores files e g those that have been deleted to a project Effective when a project is selected Replace With Effective when a file is selected Local His...

Page 144: ...selected elf format object file and generates a binary file This calls a command that executes objcopy I elf32 little O binary file name elf filename bin Properties Displays a Properties dialog box that shows and allows changes in the properties of the current project Build Configuration Defines the target to be selected by Make Target Make Target Selects a target and performs a build using make e...

Page 145: ...Members While this button is toggled members other than public are not displayed Menu Filters Specifies the items to be displayed in the view Group includes Selects whether the included files are displayed in grouped structure or individually Context menu Right click in the view to display the context menu shown below Refactor Rename Changes the selected type function or member name all instances ...

Page 146: ...ion where the function name or variable name selected in the view is declared within the range selected in the submenu workspace current project specified working set References Searches the location where the function name or variable name selected in the view is referenced within the range selected in the submenu workspace current project specified working set Create Make Target Defines the targ...

Page 147: ...debugger startup console etc If you click this button the tool corresponding to the console e g the debugger aborts the process underway and is closed The console is not closed Nor is the console closed when processing is terminated by an operation on the tool side Remove Launch This button is displayed in a debugger startup console etc It closes the active console Remove All Terminated Launches T...

Page 148: ...ates and edits filter settings The conditions set here restrict the errors to be displayed and the maximum allowable number For filter settings refer to Section 5 10 5 Filters Columns Sets the sequence of items rows to be displayed Preferences Sets the maximum number of errors to be displayed and the display hide setting for items rows Context menu Right click in the view to display the context me...

Page 149: ...l EPSON 5 27 C Compiler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE 5 3 9 Properties View Displays information on the resource or member currently selected in the C C Projects the Navigator or the Outline view ...

Page 150: ...d Make Target Executes a make process on a selected target Hide Empty Folders Hides the folders and displays registered targets only Context menu Right click in the view to display the context menu shown below Build Make Target Executes a make process on a selected target Add Make Target Defines a make target Delete Make Target Deletes the selected target Edit Make Target Edits a selected target G...

Page 151: ...es Expand All Expands all of the hierarchical display in the view Collapse All Folds all of the expanded hierarchical display up into the uppermost hierarchy Run the Current Search Again Repeats the search previously performed Cancel Current Search Cancels the search operation currently in progress Show Previous Searches Shows the result of the previously performed search that you selected Pin the...

Page 152: ...he view selected from the submenu Next Match Jumps to the next instance of search string immediately following the found occurrence Previous Match Jumps to the previous instance of search string immediately preceding the found occurrence Remove Selected Matches Deletes the found occurrences of search string from the view that you selected Remove All Matches Deletes all of the found occurrences of ...

Page 153: ...verts the selected elf format object file into Motorola S3 format to generates a HEX file This command executes objcopy I elf32 little O srec srec forceS3 file name elf filename sa Note S record files named project name psa are created when a project is built Normally there is no need to create S record files using this operation Generate a raw binary file Effective when an elf file is selected Re...

Page 154: ...marks view Configure Contents Creates and edits filter settings The conditions set here restrict the bookmarks to be displayed and the maximum allowable number For filter settings refer to Section 5 10 5 Filters Columns Sets the sequence of items rows to be displayed Preferences Sets the maximum number of bookmarks to be displayed and the display hide set ting for items rows Context menu Right cli...

Page 155: ...ting Ascending sorts and arranges items in ascending order Deselect ing Ascending sorts and arranges items in descending order New Tasks View Creates a new tasks view Configure Contents Creates and edits filter settings The conditions set here restrict the tasks to be displayed and the maximum allowable number For filter set tings refer to Section 5 10 5 Filters Columns Sets the sequence of items ...

Page 156: ...ge for S1C17 Family Ver 1 5 0 5 gnU17 iDE Delete Completed Tasks Deletes all of the completed tasks Properties Displays information on the tasks selected For the menu commands not specifically discussed here refer to the description of the menu bar ...

Page 157: ...mple when you drag the tab of a view to a position in another pane and a frame in size of that pane and directory icons are displayed the view is moved to that pane Even when a frame in size of the tab is displayed at the tab position the view is moved to that pane in which case you can select a position in the stack of tabs at which you want to insert If an arrow icon and a different size frame a...

Page 158: ... can click the icon to enlarge the view Other views will not be hidden To turn a view into a fast view right click on the corresponding tab and select Fast View from the subsequent context menu Or drag and drop the tab corresponding to a view into a fast view area to turn it into a fast view For example select Fast View from the context menus of the C C Projects and the Navigator tabs The correspo...

Page 159: ...he fast view Click the icon to open or close a fast view By default a fast view will be displayed vertically at the left edge of the window For a different orientation select Orientation Hori zontal from the context menu for the fast view icon The fast view will open horizontally at the bottom of the window To restore a fast view to normal view select Fast View from the context menu for the fast v...

Page 160: ... you quit the IDE When you next start the IDE it will start with the layout last saved The IDE will not revert to the default settings when you restart it 5 3 15 Perspectives Perspectives represent the definitions of the configuration of displayed views the view layout including the editor area and the configuration of menus and toolbars The version of Eclipse adopted for the IDE permits switching...

Page 161: ...n the project directory must not be edited moved or deleted except when you manipulate them in the IDE Attempting to do so will prevent you from restarting the project 5 4 2 Creating a new Project Application development by the IDE starts with creating a new project 1 Launch the New GNU17 Project wizard by one of the following methods Select New New GNU17 Project from the File menu Select New GNU1...

Page 162: ... The path is limited to a maximum of 200 characters 4 Click the Next button The IDE goes to the target CPU select screen shown below 5 From the Target CPU Device combo box select the target processor The models displayed in the list may be added deleted by the configuration file that will be modified when a new model is released or an existing model is discontinued Note that the CPU cannot be chan...

Page 163: ... by selecting from the combo box vector o or boot o selectable or entering one in the box If no objects are to be located in the vector section deselect the check box entitled Allocate a specific file to vector section You can modify settings for the vector section later Refer to Section 5 7 8 Editing a Linker Script 9 Specify a boot vector address The setting address ex 00800 020000 etc varies de...

Page 164: ...from the Project menu Select Close Project from the context menu for the C C Projects or Navigator view This closes the project At this time any source files open in the editor are closed If the contents edited in the editor have not been saved the Save Resources dialog box see Section 5 10 2 is displayed letting you choose to save or not save the files file by file Opening a project A project pre...

Page 165: ...pace previously used select it from the list displayed by clicking the button in the Workspace combo box Do not specify the project directory directory containing project file as a workspace directory Doing so may result in failures with project imports when Copy projects into workspace is selected 4 Click the OK button The IDE window is temporarily closed After the specified directory is set to t...

Page 166: ...the import procedure given below to continue developing a project created in the IDE of an older version V1 2 1 or later The import procedure is described below 1 Perform one of the operations described below Select Import from the File menu Select Import from the context menu for the C C Projects or Navigator view The Import wizard will start 2 Select Existing Projects into Workspace from the lis...

Page 167: ...r S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE 3 When the project is not archived select the Select root directory radio button Then select the project direc tory you want to import in the directory select dialog box displayed by clicking the Browse button ...

Page 168: ... Copy projects into workspace check box The project will not be copied into the workspace and editing operations will be applied to the files located in the original project directory Be aware that the original project folder is deleted by the operation to delete the project When copying the project Select the Copy projects into workspace check box The specified project directory will be copied in...

Page 169: ...placed by cproject files A cproject file is generated during a project import and the contents of the cdtproject file will be transferred automatically to the newly generated cproject file Directory structure and resource location If all resources are stored together in a project folder the project can be copied to any location The project can then be built at the copied destination with no furthe...

Page 170: ...ll files associated with the project are deleted from the disk and the project can no longer be recovered 4 Click the OK button to delete To cancel click the Cancel button Note If you created a project with a project name exceeding the permissible maximum number of char acters the project directory may not be deleted In such cases quit the IDE and rename the di rectory name of the project from the...

Page 171: ...me and are newly generated the next time you build The elf file already generated is not deleted and remains intact with its previous name Debugger startup settings The contents set in the External Tools Configurations dialog box are changed according to a new project name Notes Only single byte alphanumeric characters and underscores can be used in a project name Keep in mind that including any o...

Page 172: ...e of the following operations Select New Source Folder from the File menu Select New Source Folder from the context menu for the C C Projects or Navigator view Select Source Folder from the New shortcut in the toolbar Click the New C C Source Folder button in the toolbar The New Source Folder dialog box is displayed 2 The current project name is entered in Project name When creating a source direc...

Page 173: ...iles located in the source directory will be included to the make process Creating a new directory for general purpose use You can create a new directory in a project or in the internal directory of a project 1 Perform one of the following operations Select New Other from the File menu Select New Other from the context menu for the C C Projects or Navigator view Select Other from the New shortcut ...

Page 174: ...y clicking on it in the directory list in tree form 5 Enter the name of the directory you want to create in the Folder name text box 6 Click the Finish button To cancel click the Cancel button The directory you created is displayed Note The source files located in this folder will not be included in a make process Place the source files into a source folder to include them in a make process ...

Page 175: ...le from the New C C Source File shortcut in the toolbar Click the New C C Source File button in the toolbar to create a source file The New Source File or New Header File dialog box is displayed 2 Enter the name of the file you want to create in the Source File or Header File text box Enter the file extension as c to create a C source file or s to create an assembler source file The message shown ...

Page 176: ... Creating a new general purpose text file You can create a new text file in a project or in the internal directory of a project 1 Perform one of the following operations Select New File from the File menu Select New File from the context menu for the C C Projects or Navigator view Select File from the New shortcut in the toolbar Select File from the New C C Source File shortcut in the toolbar The ...

Page 177: ...rocedure for importing an existing file or directory into a project In the import pro cedure described here files directories are also copied to a project directory in the file system This approach allows you to retain the original unchanged files when for example creating a new source by correcting an existing source The import procedure is given below 1 From within the C C Projects or Navigator ...

Page 178: ...t This populates the From directory combo box with the path to the selected directory If you imported from this project previously you can select the project from the history displayed by clicking the button in the From di rectory combo box Note Always be sure to select the parent directory of the file directory you want to import The files di rectories to be imported are located in the directory ...

Page 179: ...es the source files located directly below the project directory and the source files located in the source folder of the project to a makefile thereby specifying those files as targets to be assembled compiled In their initial default status source files located in the internal directory of a project other than the source folder are not written in a makefile However you can register that director...

Page 180: ...Ver 1 5 0 5 gnU17 iDE By default project directories are already registered 4 Click the Add Folder button This displays the Source Folder Selection dialog box 5 Select the directory you want to register indicated by a check mark when selected and click the OK but ton ...

Page 181: ...de from a makefile 6 Click the OK button to close the Properties dialog box A source folder in the C C Projects or Navigator view is indicated by the letter C superimposed on its icon as shown below Copying pasting a file or directory You can copy and paste resources from within the C C Projects or Navigator view Copying 1 Select the file or directory you want to copy in the C C Projects or Naviga...

Page 182: ...or view 1 In the C C Projects or Navigator view select the file or directory you want to move 2 Do one of the following Select Move from the File menu Select Move from the context menu in the C C Projects or Navigator view 3 A directory select dialog box is displayed Select the directory into which you want to move the file or directory and click OK Move operations performed in the C C Projects or...

Page 183: ...S5U1C17001C Manual EPSON 5 61 C Compiler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE 3 Expand General 4 Select File System from the wizard list and click Next ...

Page 184: ...ew will be placed in edit mode Enter a new name and press the Enter key This operation is reflected in the file system Deleting a file or directory Do the following to delete a file directory in the C C Projects or Navigator view Note Be careful when deleting a file directory from the C C Projects or Navigator view since doing so will also delete the actual file directory from the file system 1 In...

Page 185: ... box is displayed 2 In the tree view of folders select the project or parent folder in which a new file is to be created 3 In File name enter a name for the file to be created 4 Click the Advanced button 5 Select the Link to file in the file system checkbox 6 Click the Browse button and select a file to reference ...

Page 186: ...nation file name Link to file in the file system Be sure to select a source folder as the destination folder The project folder is a source folder by default If the file is not created in a source folder it cannot be used in a build process Use of the Variables button for path designation is not supported Do not use the Variables button about object files generated from a link source The object fi...

Page 187: ... in a folder located outside the project folder and include them in the build process A link to a file located outside the project folder can be established as follows 1 Do one of the following Select New Other from the File menu Select New Other from the context menu for the C C Projects or Navigator view Select Other from the New shortcut in the toolbar The New dialog box is displayed 2 Select F...

Page 188: ...e enter a name for the folder to be created 6 Click the Advanced button 7 Select the Link to folder in the file system checkbox 8 Click the Browse button and select a folder to reference 9 Click the Finish button Click the Cancel button to abort the process The newly created folder will appear in tree view 10 Register the folder as a source folder After registration as a source folder a C mark wil...

Page 189: ... the Variables button for path designation is not supported Do not use the Variables button In order to build the source files that are in the linked folder please specify the folder as a source folder For detailed information refer to Specifying a source folder about object files generated from a link source The object files for linked source files located outside the project folder will be gener...

Page 190: ...whose names match the character string You can use string and one character wildcards The files listed below are not displayed in the initial set tings for the C C Projects view Files other than below corresponding to Executable files elf files Object files o files Text files not associated with C file filter in the navigator view Select Filters from the toolbar menu t in the Navigator view to dis...

Page 191: ...build process Selecting a working set Note Working sets must be created in advance 1 Select Select Working Set from the toolbar menu t in the C C Projects view This displays the Select Working Set dialog box which shows a list of the working sets created 2 Select a working set from the list and click OK Only the resources defined in the selected working set will be displayed in the C C Projects vi...

Page 192: ... of a working set in the Working set name text box 5 To select all resources in a project select the check box corresponding to the project directory To select for display one or more specific resources in the project directory click the icon of the project to list the resources contained in the directory and select the desired resource 6 Click the Finish button ...

Page 193: ...x shown above 2 Select the working set you want to edit from the list and click Edit This will display the Edit Working Set dialog box 3 Change the selected resources for the working set just as you did when creating a new working set Click Finish 4 Click OK to apply the settings to the view Clicking Cancel here will discard these settings To edit the working set currently selected in the view sel...

Page 194: ...ect Select Working Set from the toolbar menu t in the C C Projects view to display the Select Working Set dialog box showing a list of the working sets created 2 Select a working set to delete from the list and click Remove No working sets are selected in the display in this view 3 Click the OK button To use another working set select one from the list before clicking OK ...

Page 195: ...ft of the dialog box to display the content set for the selected item Make changes if necessary The following properties are listed 1 resource Shows the location of the project directory You can also set the encoding format for text files such as source files and the line delimiter 2 Builders Register or select the builder to build projects 3 C C general General settings for C C Since the followin...

Page 196: ...ch the source directory and generated files are to be output 7 gnU17 Build Options Set the command line options for the compiler assembler and linker 8 gnU17 gDB Commands Edit a debugger startup command file 9 gnU17 general Shows the target processor Used to select the memory model and whether to link libraries for coprocessors 10 gnU17 linker Script Settings Edit the linker script 11 gnU17 Parame...

Page 197: ...not support the display of symbols and labels in assembler sources 3 Text editor Used to create and edit text files in formats file name extensions other than the above The documents opened in this editor are represented in the C C Projects or Navigator view by the icons shown below The file types associated with the C editor or assembler editor i e launch the C or assembler editor by default when...

Page 198: ...lbar Select Source File from the New C C Source File shortcut in the toolbar Click the New C C Source File button in the toolbar This displays the New Source File dialog box 2 Enter the name of the file you want to create in the Source File text box To create a C source or assem bler source be sure to add the file name extension appropriate for the source to be created 3 Click the Finish button A ...

Page 199: ...n Open With C C Projects Navigator Double click on a file name in C C Projects Navigator view Close a file File Close Ctrl W Click on the button in the editor tab Close all files File Close All Ctrl Shift W Save a file File Save Ctrl S Save Editor Save under another name File Save As Save all File Save All Ctrl Shift S Revert to previously saved version File Revert Revert File Editor Print File Pr...

Page 200: ...isplays the Go to Line dialog box 2 Enter a line number in the text box and click OK Control will jump to the specified line With its default settings the C editor will not display line numbers in the editor area Refer to Section 5 5 8 for information on enabling display of line numbers Jump to a line with an error When an error occurs during a build process a list of errors and their locations ar...

Page 201: ...an error If you do either of the following control jumps back to the line containing the error closest to the current cursor position Select Next Annotation from the Navigate menu Click the Next Annotation button in the toolbar Jump forward to line containing the error If you do either of the following control jumps forward to the line containing the error closest to the cur rent cursor position S...

Page 202: ...h result changes each time you enter one character If you enter a character inadver tently simply use the Backspace key to delete it The search string you entered appears in the status bar Example Entered as main main c C main program m key entered main c C main program a i n key entered main c C main program Note The arrow keys and and the Enter and Esc keys terminate incremental search mode Be c...

Page 203: ...ace equal to the currently set tab size with initial settings four characters is removed For example if a line is indented by a blank space equal to six characters when the tab stop is set to four characters the line will have a space equal to two characters left at the beginning when shifted left If indented by a blank of space less than four characters shifting the line s to the left will have n...

Page 204: ...d or template for inser tion at the text cursor position from a list as the user begins typing it This feature is described below 1 Place the text cursor at the position where you want to insert a new statement 2 If you know the code you want to enter enter the first one or two characters This narrows the list of sug gestions Example To write a for statement enter the letter f 3 Select Content Ass...

Page 205: ...in the Rename to text box 4 Select the scope of renaming using a radio button in the Scope of refactoring field all projects All the opened projects will be in the scope of renaming related projects All the projects related to the project being currently edited will be in the scope of re naming project The project being currently edited only will be in the scope of renaming working set Projects or...

Page 206: ... check mark Use the arrow buttons to check the locations of the elements that will be renamed 7 Click the OK button to change or click the Cancel button to cancel To undo the change after completing this operation select Undo from the Refactor menu or select Refactor Undo from the context menu of the selected element After performing an Undo Redo in the menu will be effective allowing you to repea...

Page 207: ...ly Ver 1 5 0 5 gnU17 iDE 5 IDE 5 5 4 Outline View The Outline view shows the variables and functions defined in the C source currently in front of all other files in the editor area Click on a variable or function name to jump to its defined position in the source ...

Page 208: ...rd Do one of the following Select Forward from the Navigate menu Click the Forward button in the toolbar These operations will move you forward to the point immediately following in a history Click t to the right of the Forward button in the toolbar to display a list of files in a history If you wish you can select a file from this list Jumping to a location just edited This feature allows you to ...

Page 209: ...to attach a bookmark 2 Do one of the following Select Add Bookmark from the Edit menu Right click on the editor s marker bar the left edge of the editor area to display the context menu then select Add Bookmark This displays the Add Bookmark dialog box 3 Set a bookmark name Use the name displayed in the Enter Bookmark name text box unchanged or enter another name and click OK A bookmark marker app...

Page 210: ...mark becomes unnecessary you can remove it in the editor or from the Bookmarks view Performing deletions in the editor Right click on a bookmark marker you want to remove to display the context menu then select Remove Bookmark removing in the Bookmarks view 1 Click a bookmark marker to select it for removal 2 Do one of the following Click the Delete button in the toolbar of the view Display the co...

Page 211: ...desired bookmarks and to hide other bookmarks Furthermore two or more filters can be configured and used as necessary A new filter can be configured as in the procedure below 1 Activate Bookmarks view 2 Select Configure Contents from the View menu This displays the Configure Contents dialog box 3 Click the New button Enter the name of the filter to be configured and click OK 4 If other filters are...

Page 212: ... to select the working set Description contains In addition to the condition above this option limits the book marks to be displayed to those whose Description contain the string entered in the text box Leave the text box empty when this condition is not used Description doesn t contain In addition to the condition above this option limits the book marks to be displayed to those whose Description ...

Page 213: ...e displayed bookmarks in order of prioritized items 1 Activate the Bookmarks view 2 Select Sort by from the View menu and select the items in the list you wish to prioritize over oth ers when sorting the list Selecting Ascending sorts and arranges items in ascending order Deselecting Ascending sorts and arranges items in descending order ...

Page 214: ...on the editor s marker bar the left edge of the editor area to display the context menu then select Add Task This displays the New Task dialog box 3 Enter a task description in the Description text box 4 Select priority High Normal or Low from the Priority combo box 5 If you want the task to be created as a completed task select the Completed check box 6 Click the OK button A task marker is displa...

Page 215: ...ow View Tasks from the Window menu 2 Do one of the following Double click in the line of the desired task Right click in the line of the desired task to display the context menu then select Go To The editor will jump to the position at which the task is set removing a task If a task does no longer need to be displayed you can remove it in the editor or from the Tasks view Deleting in the editor Ri...

Page 216: ...ation in addition to the information shown in the view You also can alter the task description here filtering and sorting the task list If the number of tasks makes the list in Tasks view unwieldy you can choose to hide certain tasks or sort tasks by item filters Use filters to display only the necessary tasks and to hide others Furthermore two or more filters can be configured and used as necessa...

Page 217: ... shown in Configurations deselect the checkboxes for those filters and select the checkbox for the newly created filter 5 Select conditions to display tasks On any element The tasks set in all the opened projects will be dis played On any element in same project The tasks attached in the project being currently se lected will be displayed On selected element only The tasks set in the file that has...

Page 218: ...tasks with a specific priority setting High Normal Low Description contains In addition to the condition above this option limits the tasks to be displayed to those whose Description contain the string entered in the text box Leave the text box empty when this condition is not used Description doesn t contain In addition to the condition above this option limits the tasks to be displayed to those ...

Page 219: ...nu Refer to Section 5 10 5 for information on settings made in the Configure Contents dialog box Sorting You can prioritize items and sort the displayed tasks in order of prioritized items 1 Activate the Tasks view 2 Select Sort by from the View menu and select the items in the list you wish to prioritize over other times when sorting the list Selecting Ascending sorts and arranges items in ascend...

Page 220: ... IDE Preferences for more information on the Preferences dialog box Text fonts and colors general appearance Colors and fonts Here you can change the default text fonts used by the C editor and assembler editor 1 To change fonts for the C editor select C C Editor C C Editor Text Font from tree view Select Basic Text Font from tree view to change assembler editor text fonts C editor fonts Assembler...

Page 221: ...itor tab size and displaying line numbers general Editors Text Editors To change the tab size set the number of characters for the tab width in the Displayed tab width text box Select the Show line numbers check box to enable display of line numbers You can also set highlighting and other options on this page ...

Page 222: ...Preferences from the Window menu This displays the Preferences dialog box 2 Select General Editors File Associations from the setup items listed in tree view on the left side of the dialog box 3 From File types select the file type file name extension you want to edit with the editor being registered If the file type does not appear in the list display the dialog box below by clicking the Add butt...

Page 223: ...ection dialog box 8 Click the OK button to close the Preferences dialog box The file name extension you selected and the external editor have been correlated to each other by the above opera tion Do this setting for all file types you want to edit The following describes how to open a file with the registered editor 1 Select a file in the C C Projects or Navigator view 2 Right click on the file to...

Page 224: ... a resource in the workspace current project or the specified working set You can also search for text data included in the file being currently edited To perform a File Search do one of the following to display the File Search page of the Search dialog box Select File from the Search menu Select Search from the Search menu then the File Search tab in the ensuing Search dialog box Click the Search...

Page 225: ...st The following are valid wildcards in the search string Any string Any character Scope Use the radio buttons listed below to narrow the search domain Workspace Entire workspace Selected Resources Resource selected in the C C Projects or Navigator view Enclosing Projects Project including the resource selected in the C C Projects or Navigator view Working Set Resource in a selected working set Us...

Page 226: ... If a previous search was made for same string you can reselect it from the pull down list Click to display the pull down list The following are valid wildcards in the search string Any string Any character Case sensitive Select this check box to make searches case sensitive Search For Selecting one of the check boxes in this section to specify the target element to look for Class Struct Structure...

Page 227: ...h or C C Search to display in the Search dialog box Search Performs a search using the parameters specified above Cancel Cancels a search 5 6 4 C Search from Context Menu You can also search for places where the selected element is declared or referenced from the context menu on the editor or Outline view 1 Select an element such as a variable or function from the source in the editor or from the ...

Page 228: ...ition immediately preceding the current search position in the list equivalent to Previous Annotation in the Navigate menu Each occurrence of the search string is shown highlighted in the editor and indicated by an arrow marker in the marker bar for that line If you left the file name blank for the search the search begins from the beginning of the file To find and re view a file in the Navigator ...

Page 229: ... al low you to select the previous searches to be displayed You can also delete previous searches individually from the history Remove Deletes the previous searches selected from the list Open Displays the results of the previous search selected from the list in the active Search view Open in New Opens a new Search view and displays the results of the previous search selected from the list Cancel ...

Page 230: ...ing the application You must select the correct processor type and memory model before attempting a build process In most cases you will not need to select a memory model since this would pre sumably have been done when you created the project If necessary you can reset the CPU type and memory model as follows 1 In the C C Projects or Navigator view select a project for which you want to change th...

Page 231: ... link the coprocessor library libgccMD a for multiplication and division or libgccM a for multiplication when creating a project If you select this option select the library type from the Select the Co processor library type combo box Certain models offer just one selection option OFF Adds the setting to link the ordinary emulation library libgcc a when creating a project For models for which this...

Page 232: ...ut Some program data can be placed in RAM for debugging If this option is selected a psa file will not be generated Build Mask file psa is selected by default However if S1C17 is selected as the CPU Build Executable file elf becomes the fixed setting and cannot be changed A build goal can be set as follows 1 Select the project to build from the C C Projects or Navigator view 2 Select Properties fr...

Page 233: ...tions field lists currently set compiler options 5 Select a category from the Compiler tree list and set the necessary options 6 Click the Apply button to change other properties or the OK button to complete property settings If settings in a GNU17 Build Options page have been changed a dialog box appears for selecting clean build see Section 5 7 8 to delete the files created with the previous set...

Page 234: ...Dis abling the option is equivalent to specifying the mno sjis filt option when calling a compiler in which case the above processing is not performed The default status of the checkbox depends on the language of the OS used to run the IDE The checkbox is selected by default if the IDE is launched in a Japanese language OS environment in other language ver sions the checkbox is unselected by defau...

Page 235: ... Select compiler optimization options from this page Optimization Level default O1 Select the optimization level O0 No optimization performed O1 Optimizes code by prioritizing speed and size O3 Optimizes code execution speed Refer to Section 6 3 2 Command line Options for detailed information on optimization ...

Page 236: ...in the list one position down About TOOL_DIR The Include Paths I column lists TOOL_DIR include that is set by default environment variable is a macro defined in the makefile that is generated when you build a project TOOL_DIR is the environment variable in which the path to the gnu17 tool directory is defined The de fined contents can be verified in the Environments tab page Example If the gnu17 t...

Page 237: ...cro definition A dialog box for entering a macro definition is displayed Make the entry in the form shown below macro name or macro name replacement string Delete Deletes the selected macro definition from the list Edit Edits the macro definition selected in the list A dialog box is displayed to allow you to edit the macro definition Move Up Moves the macro definition selected in the list one posi...

Page 238: ...generation Select compiler code generation option from this page Do not expand built in functions inline fno builtin default ON If this option is specified built in functions are ignored and the functions are always called For the functions in question refer to Section 6 3 2 Command line Options ...

Page 239: ... each option with one or more spaces Refer to Section 6 3 2 Command line Options for detailed information on each option Note When the S option is specified the IDE compiles the C source and outputs an assembly file extension ext0 then assembles this file using an assembler It is not necessary to specify the S option or c option for Other Flags The C source assembly image can be confirmed by viewi...

Page 240: ...ed the IDE assembles the assembler source using the specified C compiler It is not necessary to specify the compiler c option or xassembler with cpp option to All Options 5 Select General from the Assembler tree list and set the necessary options 6 Click the Apply button to change other properties or the OK button to complete property settings If settings in a GNU17 Build Options page have been ch...

Page 241: ...cpp and Wa gstabs options and mpointer16 option depending on the memory model selected are always added Set other assembler options from this page Other flags default none Enter the options to be passed to the assembler Insert one or more spaces between each option The options entered are passed to the assembler as Wa option ...

Page 242: ...e All Options field lists the currently set options 5 Select a category from the Linker tree list and set the necessary options 6 Click the Apply button to change other properties or the OK button to complete property settings If settings in a GNU17 Build Options page have been changed a dialog box appears for selecting clean build see Section 5 7 8 to delete the files created with the previous se...

Page 243: ...amily Ver 1 5 0 5 gnU17 iDE 5 IDE general The Map and N options are always added Set other linker options from this page Linker flags default T project name _gnu17IDE lds Enter other linker options in this text field Insert one or more spaces between each option ...

Page 244: ... to enter a path or select one using the Browse button Delete Deletes the library selected in the list Edit Edits the library selected in the list A dialog box is displayed to allow you to edit the path Move Up Moves the library selected in the list one position up in the list Libraries are linked in order of listed paths beginning with the uppermost path Move Down Moves the library selected in th...

Page 245: ... verified in the Environments tab page Example If the gnu17 tools have been installed in the c EPSON gnu17 directory TOOL_DIR c EPSON gnu17 Since the macro is replaced with the contents of the environment variable described in during execution of make exe I TOOL_DIR lib 24bit libxxx a will be resolved to Ic EPSON gnu17 lib 24bit libxxx a The Environments tab page allows the user to define environm...

Page 246: ... list of Build Options Command indicates the program name of the vector checker while All Options indicates the options cur rently set 5 Select the category from the tree list of Vector Checker for Copro and set the required options 6 Click the Apply button to change other properties or the OK button to end property settings After you change the settings a dialog box appears inquiring whether to e...

Page 247: ... to the vector table If you select ON the vector checker starts during the build and checks whether the emu_copro_process inter rupt function is allocated to Vector No 3 The Vector No 3 data is searched as the start address for the vector section in the elf executable file If the elf file lacks a vector section this check is not performed The t and s options of the vector checker are always specif...

Page 248: ...c_filt OBJDUMP TOOL_DIR objdump OBJCOPY TOOL_DIR objcopy MOTO2FF TOOL_DIR moto2ff SCONV TOOL_DIR sconv32 VECCHECKER TOOL_DIR vecChecker macro definitions for tool flags 3 CFLAGS B TOOL_DIR gstabs S O1 I TOOL_DIR include fno builtin Wall ASFLAGS B TOOL_DIR c xassembler with cpp Wa gstabs ASFLAGS_CC LDFLAGS Map sample map N T sample_gnu17IDE lds EXTFLAGS Wa mc17_ext Wa TARGET dump Wa TARGET map EXTF...

Page 249: ... file from elf OBJCOPY OBJCOPYFLAGS TARGET sa MOTO2FF MOTOSTART MOTOSIZE TARGET sa SCONV SCONVFLAGS TARGET saf TARGET psa cmd c echo Finished building target TARGET elf OBJS sample_gnu17IDE mak sample_gnu17IDE lds ifeq PASS 1pass 1pass linking LD LDFLAGS o OBJS OBJLDS else 1pass linking LD LDFLAGS o OBJS OBJLDS 2 lderr if s lderr then cmd c type lderr RM f TARGET elf exit 1 else RM f lderr fi OBJD...

Page 250: ...target boot s 12 boot o boot s AS ASFLAGS o DEPCMD_AS lib c lib o lib c lib ext0 CC CFLAGS o o ext0 AS_CC ASFLAGS_CC o o ext0 DEPCMD_CC main c main o main c main ext0 CC CFLAGS o o ext0 AS_CC ASFLAGS_CC o o ext0 DEPCMD_CC sys c sys o sys c sys ext0 CC CFLAGS o o ext0 AS_CC ASFLAGS_CC o o ext0 DEPCMD_CC dependecies for assembled c source files lib ext0 lib c main ext0 main c sys ext0 sys c include ...

Page 251: ... OBJS 6 The assembler source files are written here for a two pass make that optimizes extended instructions Note that the assembler source files created from C source files have a file extension ext0 7 Defines the macros needed to create dependency files Dependency files are generated for each source The sources and include files needed to generate object files are defined here Example Dependency...

Page 252: ...formation on sections and linker scripts refer to Section 3 8 Sections and Linkage and Chapter 9 Linker linker script setup page Use the GNU17 Linker Script Settings page of project properties to set a linker script Do the following to display the setup page 1 Select a project to build in the C C Projects or Navigator view 2 Select Properties from the Project menu or from the context menu in the a...

Page 253: ...lack is used to display other user defined sections To edit the section name standard section attribute address to locate and objects to be located a user section should be created The standard section allows the user to specify the location address only and objects are automati cally located except those are located in the user sections with the same attribute The VMA Virtual Memory Address is th...

Page 254: ...wizard refer to Section 5 4 2 Creating a New Project Select the object you want to locate in the vector section from the combo box list vector o and boot o selectable or by entering it in the combo box text field Use the Set boot vector address text box to specify the address to locate the vector section The setting address depends on the model of the Target CPU Device e g 008000 020000 etc The va...

Page 255: ...red method from the following options Method 1 Editing the source file 1 Insert a rodata directive similar to the one shown above before the vector table in the source file If a program is written after the vector table insert a text directive in front of it and declare a text section 2 In the new project wizard select the Allocate a specific file to vector section check box then boot o in the com...

Page 256: ...on information on a section in an executable file Section name Set a user section name output section Note Keep in mind the following conditions when entering a section name A section name must begin with Only single byte alphanumeric characters and symbols the _ character and are valid for section names Virtual map address Set a location start address in which the section should be located when e...

Page 257: ...ank or the objects that have been located in user sections with the same attribute are listed in unselectable status Selected file list right Lists the object files and libraries located in this section In a standard section all object files of the project and the libraries already set in build options locatable in this section except those are located in user sections with the same attribute are ...

Page 258: ...ttribute rodata text Object vector o boot o 1 In the GNU17 Linker Script Settings page for project properties select the vector section and click the Edit button This displays the Edit Section dialog box 2 Select text from the File Attributes pull down list 3 Select vector o from the selected file list and click the button Since no source files are available for vector o it is removed without bein...

Page 259: ... work Since the text section of boot o has been located in the vector section boot o in the text section information is moved to the unselected file list You cannot locate one file in multiple sections with the same attribute 6 Simply closing the Edit Section dialog box with the OK button will not automatically reflect the edits made here in the linker script You must click the Apply or the OK but...

Page 260: ... same attribute can also be added by selecting from the unselected file list When a file is relocated from one section to another it is removed from the section in which it was located up to that point The following limitations apply to standard sections in which automatic updating is enabled 1 The section attribute File Attributes cannot be changed 2 The file list can only be referenced it cannot...

Page 261: ...ced instead Section1 Virtual map address 000000 Section3 Virtual map address Section1 Section4 Virtual map address Section3 If Section1 is removed the location address of Section2 changes to 0x 000000 If this results in problems reedit the section information Section2 Virtual map address 000000 Section3 Virtual map address Section2 Section4 Virtual map address Section3 Precautions No more than 255...

Page 262: ...M Subsequent areas are used for variables with initial values The initial values of variables are stored in the ROM and copied from the ROM into the RAM by the application program Program Vector table Constants and other static data Variables with initial values Unused area Stack area 0x008000 ROM data section LMA rodata section LMA VMA text section LMA VMA vector section LMA VMA Variables without...

Page 263: ...ir stored addresses no LMAs load addresses are set Since data is copied from ROM to RAM before use a LMA is set following the rodata section The memory map configuration in Figure 5 7 6 2 can be realized directly without modifying this section configuration Linker script and section location The linker script is generated as shown below Linker Script file generated by Gnu17 Plug in for Eclipse OUT...

Page 264: ...__END_text __START_rodata boot o rodata main o rodata C EPSON gnu17 lib 24bit libstdio a rodata C EPSON gnu17 lib 24bit libc a rodata C EPSON gnu17 lib 24bit libgcc a rodata C EPSON gnu17 lib 24bit libc a rodata __END_rodata load address symbols __START_data_lma LOADADDR data __END_data_lma __START_data_lma SIZEOF data The section location including a file configuration is shown below boot o text ...

Page 265: ...nd work area Variables with initial values RAM data section VMA bss section VMA Data copied Constants and other static data Unused area ROM 2 rodata section LMA VMA 0x008000 0x000fbf 0x000000 0x080000 Figure 5 7 6 4 Example of a memory configuration 2 Example of a source file configuration boot s vector table and stack initialization etc main c main and other functions Editing of sections contents...

Page 266: ...C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE 2 Correcting the data section Correct Load map address to text Section configuration contents set in the GNU17 Linker Script Settings dialog box ...

Page 267: ... libc a bss __END_bss data __END_bss AT __END_text __START_data boot o data main o data C EPSON gnu17 lib 24bit libstdio a data C EPSON gnu17 lib 24bit libc a data C EPSON gnu17 lib 24bit libgcc a data C EPSON gnu17 lib 24bit libc a data __END_data vector 0x008000 __START_vector boot o rodata __END_vector text __END_vector __START_text boot o text main o text C EPSON gnu17 lib 24bit libstdio a tex...

Page 268: ...nged for another when used This permits efficient use of memory However only sections having the bss attribute can share data areas The area set aside for variables with initial values data section cannot be shared Program Constants and other static data Variables with initial values Unused area Vector table Stack area 0x008000 ROM data section LMA rodata section LMA VMA text section LMA VMA vecto...

Page 269: ...te and are located immediately after the data section VMA As files for the respective sections select only bss1 o for the bssS1 section and only bss2 o for the bssS2 section Note that automatic updating is enabled for bss section information and that bss1 o and bss2 o are not included in the list of files to be located This is because they have been specified for the respective sections above ...

Page 270: ... elf32 c17 OUTPUT_ARCH c17 SEARCH_DIR SECTIONS location counter 0x0 section information bss 0x000000 __START_bss boot o bss main o bss C EPSON gnu17 lib 24bit libstdio a bss C EPSON gnu17 lib 24bit libc a bss C EPSON gnu17 lib 24bit libgcc a bss C EPSON gnu17 lib 24bit libc a bss __END_bss data __END_bss AT __END_rodata __START_data boot o data bss1 o data bss2 o data main o data C EPSON gnu17 lib...

Page 271: ... o text main o text C EPSON gnu17 lib 24bit libstdio a text C EPSON gnu17 lib 24bit libc a text C EPSON gnu17 lib 24bit libgcc a text C EPSON gnu17 lib 24bit libc a text __END_text rodata __END_text __START_rodata bss1 o rodata bss2 o rodata main o rodata C EPSON gnu17 lib 24bit libstdio a rodata C EPSON gnu17 lib 24bit libc a rodata C EPSON gnu17 lib 24bit libgcc a rodata C EPSON gnu17 lib 24bit ...

Page 272: ...r only the VMA of the text section is specified and the program is executed in ROM However the program can be executed in RAM by first specifying the VMA and LMA as for the data section then copying the program to RAM before execution Additionally multiple sections may be allocated to the same area as in Example 3 and the program may be executed by ex changing sections as necessary Program storage...

Page 273: ...ackage for S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE Editing sections content set in the Add Section dialog box Create new sections textu1 and textu2 as shown below Section configuration content set in the GNU17 Linker Script Settings dialog box ...

Page 274: ...ON gnu17 lib 24bit libc a bss C EPSON gnu17 lib 24bit libgcc a bss C EPSON gnu17 lib 24bit libc a bss __END_bss data __END_bss AT __END_rodata __START_data boot o data func1 o data func2 o data main o data C EPSON gnu17 lib 24bit libstdio a data C EPSON gnu17 lib 24bit libc a data C EPSON gnu17 lib 24bit libgcc a data C EPSON gnu17 lib 24bit libc a data __END_data textu1 __END_data AT __START_data...

Page 275: ... main o text boot o rodata main o rodata func1 o rodata func2 o rodata boot o data main o data func1 o data func2 o data __START_textu2_lma __START_textu1_lma __START_data_lma __START_rodata __START_text 0x008000 0x000000 LMA textu2 section textu1 section data section rodata section text section vector section No sections files located here func1 o text func2 o text boot o bss main o bss boot o da...

Page 276: ...er file project name _gnu17IDE par Command file project name _gnu17IDE cmd These files are needed for debugging and do not affect the build process Normally no command file is generated in a build process A build process generates a command file that includes a minimum com mand set required for starting up the debugger only when project name _gnu17IDE cmd does not exist 3 Execute make exe The foll...

Page 277: ...ocess they will be overwritten when a build process starts To ensure that these files are not regenerated dur ing a build process deselect the GNU17 File Builder currently selected check box in the Builders page of the Properties dialog box about object files generated from a link source The object files for linked source files located outside the project folder will be generated directly under th...

Page 278: ...to proceed to a build process directly without doing anything else after executing the clean command Select Build the entire workspace to build all projects in the workspace Select Build only the selected projects to build only the projects selected in the above step 4 Click the OK button This deletes all generated object files in the selected project then executes a build process If the Start a b...

Page 279: ... is deleted Do not delete the dependency file When the included header file does not exist in the project You must rebuild if you ve altered a header file not existing in the project file i e external to the project When a build fails due to file privileges when a build is executed immediately after importing a project ...

Page 280: ... a corrected version of the IDE generated makefile steps 4 and 5 described below are required If you are using a makefile with a different name and use the IDE generated files for the linker script file lds parameter file par and command file cmd skip steps 4 and 5 and go to 6 4 Select Builders from the properties list 5 Deselect the GNU17 File Builder check box The following files will no longer ...

Page 281: ...g target names to the ones you created Leave the check boxes selected Build Incremental Build Specify the target in the makefile called when you execute a build process By default all is called Clean Specify the target in the makefile called when you execute a clean process By default clean is called There is no need to change if the same target names are used in the user makefile Leave the Build ...

Page 282: ... storage in PC memory for all memory areas written in the file For more information on the parameter file refer to Section 10 9 Parameter Files The IDE generates a parameter file with the name project name _gnu17IDE par during a build process based on the project properties set If the project properties are changed thereafter the parameter file will be up dated and passed just before you start the...

Page 283: ...Wait states r W access size area comment RAM 0x000000 0xFFFFFF 0 0 word All Area STACK 0x000000 0x000FBF Stack area When S1C17701 is selected for the target CPU device area Start end address Wait states r W access size area comment RAM 0x000000 0x000FBF 0 0 word Internal RAM IO 0x004000 0x0043FF 0 0 byte Peripheral Area1 IO 0x005000 0x005FFF 2 2 byte Peripheral Area2 ROM 0x008000 0x017FFF 0 0 half...

Page 284: ...xFFFC00 0xFFFFFF 0 0 Byte Reserved for Core I O STACK 0x000040 0x001FFF Stack area When S1C17003 is selected as the target CPU device area Start end address Wait states r W access size area comment RAM 0x000000 0x000FBF 0 0 Word Internal RAM IO 0x004000 0x0043FF 0 0 Byte Peripheral Area1 IO 0x005000 0x0053BF 0 0 Byte Peripheral Area2 ROM 0x008000 0x017FFF 1 0 Halfword Mask ROM RAM 0x080000 0x09FFF...

Page 285: ...8055F 11B SRAM LCD Display IO FFFC00 FFFFFF 00B Reserved for Core I O STACK 000000 000FBF Stack area When S1C17702 is selected as the target CPU device Parameter file generated by Gnu17 Plug in for Eclipse ESSIM S1C17702 RAM 000000 001FBF 00W Internal RAM IO 004000 0043FF 00B Peripheral Area1 IO 005000 005FFF 00B Peripheral Area2 ROM 008000 027FFF 10H ROM Flash RAM 080000 08055F 11B SRAM LCD Displ...

Page 286: ...FFF 11B CE0 reserved IO FFFC00 FFFFFF 00B Reserved for Core I O STACK 000000 000FBF Stack area When S1C17501 is selected as the target CPU device Parameter file generated by Gnu17 Plug in for Eclipse RAM 000040 000FFF 10W Internal RAM IO 004000 0043FF 00B Peripheral Area1 IO 004400 005FFF 33B Peripheral Area2 RAM 006000 0067FF 33H IVRAM ROM 020000 03FFFF 10H ROM Flash RAM 100000 FEFFFF 66B SRAM IO...

Page 287: ...set internal or external RAM areas IO Select to map an internal I O area or external device to memory STACK Select to set a stack area ROM RAM and IO settings are used in the debugger to de termine whether software PC breakpoints are valid addresses During simulator mode debugging all simulated memory areas will be allocated in the PC memory These areas cannot have overlapping addresses STACK sett...

Page 288: ...r correct another area after temporarily quitting by selecting Cancel Cancel Discards all modifications and closes the dialog box The area list in the GNU17 Parameter Settings page is not updated adding an area Do the following to add a new area 1 Click the Add button This displays the Add Parameter dialog box 2 Make the necessary settings based on the explanations given in Editing an area above C...

Page 289: ...ds as be low according to the settings in the project file 4 Click the Apply button to change other sections or properties or the OK button to end property settings If you haven t clicked Apply you can use the Revert Settings button to restore modified content to the state in which this page was opened The command file project name _gnu17IDE cmd is generated with the contents set here when the OK ...

Page 290: ...Loads a parameter file set ttbr for simulator c17 ttbr 0x008000 Sets TTBR connect to the debugger with specified mode and port target icd usb sim target sim Sets connect mode load program to memory load sample psa Loads an S record file reset c17 rst Reset This command file is executed when the debugger starts up making the following initial settings 1 Import debug information and parameter map in...

Page 291: ...te increments The IDE generates a command file for simulator mode that includes a command for setting this value to the boot vector address The value ap peared here by default is the address that was specified when the project was created Ports Selecting ICD Mini or Simulator in Debugger sets the port to USB or NONE respectively So no settings are required Overwrite Applies the above settings to t...

Page 292: ...enu Select External Tools Configurations from the External Tools shortcut in the window toolbar This displays the External Tools Configurations dialog box 2 Select GDB17 Launch for project name from the tree list gnu17_loc is resolved to the full path for gnu17 e g C EPSON gnu17 in the current user environment 3 Modify the Arguments arguments to the debugger command line as necessary If you are us...

Page 293: ...for project name from the External Tools shortcut in the window toolbar Precautions Once you start the debugger you cannot execute a build process in the IDE Quit the debugger to perform a build If you quit the IDE with the debugger open the debugger will also be terminated If you click the External Tools button on the toolbar to launch the debugger the following dialog box may appear and the debu...

Page 294: ...buttons common to each page are described below Back Returns to the preference pages previously referenced or edited Forward Reverts the display traced back by Back above to the next recent page Restore Defaults Restores the set content of each page to the state in which the dialog box was opened or the state at which the Apply button was clicked to confirm dialog box settings Apply Applies the se...

Page 295: ... the browsing history and you can select the editor view to be activated from the list Show Heap Status default OFF If this check box is selected the usage status of the Java heap will be displayed at the bottom right of the workbench window Open mode Select the action by which resources are opened in the editor from the C C Projects or Navigator view Double click default ON Single clicking a reso...

Page 296: ...cting it from the pull down list Override presentation settings default OFF Select this check box when changing the tab position displayed in the editor Editor tab positions Specify the tab position displayed in the editor Top default ON Tabs are displayed at the top of the view Bottom default OFF Tabs are displayed at the bottom of the view View tab positions Specify the tab position displayed in...

Page 297: ...ht default ON The perspective bar is displayed at the upper right part of the window on the right of the toolbar Show text on the perspective bar default ON If this check box is selected a perspective name is also displayed on the perspective bar If this check box is unselected only the icon is displayed Show traditional style tabs default OFF Selecting this check box displays the tabs in the edit...

Page 298: ...ont you selected from the list will be used Preview If available a display sample of the color or font selected from the list is displayed here The buttons described below are displayed when you select a font from the list Use System Font Changes the font you selected from the list to the system font Change Changes the font selected from the list to a font or font size selected in the Font dialog ...

Page 299: ...rs are closed automatically You can do the same by select ing Pin Editor from the context menu of the tab If any file to be closed remains unsaved a dialog box prompts you to save or discard changes or to choose to open an editor that would exceed the limited number of editors Number of opened editors before closing default eight Specify the number of resources opened in the editor at which you wa...

Page 300: ... in File types The editor indicated as the default in paren theses is used if you open a file by double clicking in the C C Projects or Navigator view You can use another editor on the list by selecting the Open With command from the context menu Add Adds a file type or editor to the list You can enter or select one in the dialog box that appears when you click this button Remove Removes a selecte...

Page 301: ...to indicate a print margin per line printable range set by Print margin column Print margin column default 80 Specify the number of characters printed per line Show line numbers default ON If this check box is selected a line number is displayed at the beginning of each line Show range indicator default ON If this check box is selected the marker bar at the left edge of the editor area will displa...

Page 302: ...change from the list then select a color from the dialog box displayed when you click the Color button Line number foreground Line number character color Current line highlight Current line highlight color Print margin Vertical line color showing a print margin Find scope Range of search area Selection foreground color Character color of a selection Selection background color Background color of a...

Page 303: ... Set keyboard shortcuts Shows the list of shortcut keys Binding A key sequence can be assigned by pressing a key combination When Selects a location state in which the command is enabled when assigning the key sequence set with Binding to the command Export Saves the contents of the list to a CSV format file ...

Page 304: ...lected the same editor is used to show search results The current file is closed if you move to a search position in another file that can be displayed in the same editor Bring Search view to front after search default ON If this check box is selected the Search view is displayed in front of other views after a search Ignore potential matches default OFF If this check box is selected only complete...

Page 305: ...tory is displayed on IDE startup Refresh workspace on startup default OFF If this check box is selected workspace information is updated to the latest file system status on IDE start up Confirm exit when closing last window default ON If this check box is selected a dialog box prompting for confirmation is displayed if you click the Close button to close the last open IDE window Plug ins activated...

Page 306: ...x is deselected select Refresh from the File menu or the context menu of the view to update the display of the view Save automatically before build default ON If this check box is selected the resources being edited in the editor but not yet saved will be automatically saved before a build process is executed Workspace save interval in minutes default five minutes Set the intervals in minutes at w...

Page 307: ...c varies with Windows language support This is the standard Windows character set default Other Select another character encoding New text file line delimiter Select a line delimiter The selection will take effect for subsequent only It does not affect the existing files Default The standard Windows line delimiter is used default Other Select another line delimiter ...

Page 308: ...will be built in the order of the list on this page Project build order Set the build order in this field when the Use default build order check box is deselected The projects will be built from the top of the list If projects not listed here are opened they will be built in alphabetical order after all projects in this list are built Up Moves the project selected one position up in the list Down ...

Page 309: ...the link resource For detailed information refer to Linking to a file located outside the project folder and Linking to a folder located outside the project folder in Section 5 4 8 Resource Manipulation in a Project Enable linked resources default ON Disables use of the resource linking function when set to OFF Do not change this setting in normal use ...

Page 310: ... of days you want the revision history to be retained Maximum entries per file default 50 Set the number of entries of revision history retained per file Maximum file size MB default 1MB Set the maximum file size for the file containing revision history entries No history entry will be saved for a file whose size exceed the value set here History entries exceeding these limits will be erased Resta...

Page 311: ...S5U1C17001C Manual EPSON 5 189 C Compiler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE C C Disregard this screen ...

Page 312: ...efault OFF Selecting this check box displays the Console view in front of other views if already open when you build a project Limit console output lines default 500 lines Specify the maximum number of lines displayed in the Console view Display tab width default four characters Specify a number of characters for the tab width displayed in the Console view Console text color settings Output text c...

Page 313: ...this checkbox selected the inactive code is highlighted Appearance color options Sets the color for characters in comments or keywords Select the statement type from the list and select the desired color using the Color button Save Actions Remove trailing whitespace Deletes blank space from the end of line when saving data to a file Ensure newline at end of file Enters a line break at the end of t...

Page 314: ...ng and Filtering Makes settings for sorting and filtering Present proposals in alphabetical order default OFF Select this checkbox to list candidates in the content assist list in alphabetical order Deselect the check box to list candidates in order of suitability determined by factors such as relative position scope and prefix Auto activation Automatically starts up content assist when a symbol i...

Page 315: ...s contained in the default content assist list Select the functions to be included in the content assist as standard functions Content assist cycling Select the proposal kinds that are cycled through when repeatedly invoking content assist Select the functions to be added when the content assist is called repeatedly Select an item and click the Up or Down button to set the priority order of that i...

Page 316: ...cessor branches if endif default OFF Select this checkbox to fold preprocessor branches Enable folding of control flow statements if else do while for switch default OFF Select this checkbox to fold flow control declaration statements Initially fold these region types Select initially fold types when opening an editor Macros default ON Macros Functions default OFF Functions Methods default OFF Met...

Page 317: ...s settings for a dialog balloon Enable editor problem annotation default ON Select this checkbox to highlight discovered problems Text Hover key modifier preferences Select a hot key to activate text hover For example positioning the mouse cursor while pressing the Ctrl key links the target to the original declaration ...

Page 318: ...rk Occurrences Mark occurrences of the selected element in the current file default ON Select this checkbox to display variables functions methods types macros or other component marks Keep marks when the selection changes default ON Select this checkbox to retain marks even if the selection is changed ...

Page 319: ...or performance when a file source with 5 000 lines or more is opened with an editor Scalability mode settings Enable all scalability mode options Enables option for restricting editor functions when a large file is opened Disable editor live parsing Disables the editor live syntax analysis function also disables outline highlight and fold display functions Disable semantic highlighting in editor D...

Page 320: ... ON Select this checkbox to enable color settings Element Sets colors for characters in comments or keywords Select the statement type from the list and select the desired color using the Color button The following checkboxes will modify character style attributes Bold Bold Italic Italic Strikethough Strikethrough Underline Underline Preview Displays a sample to confirm the settings above ...

Page 321: ...hether the template is enabled or disabled The checked templates are enabled and displayed in the content assist list Context Shows a location at which the template can be written C means that the template can be written in a C source Description Gives an overview of the template Auto Insert On means that the template will be automatically inserted if there is only one candidate Preview Displays t...

Page 322: ... description Pattern Write a template here Insert Variable Shows a list of variables allowing you to insert variables indicating filename date time etc into the template OK Cancel Click OK to confirm the entered or edited content Click Cancel to cancel the production or editing of the template Remove Removes the template selected in the list Restore Removed Restores the removed template Revert to ...

Page 323: ...is checkbox to close angle brackets automatically Braces default ON Select this checkbox to close braces automatically Tabulators Sets the operation of the Tab key Tab key indents the current line default ON Select this checkbox to indent lines on which the Tab key is pressed When pasting Sets the process to be performed by pasting Adjust indentation default ON Select this checkbox to adjust inden...

Page 324: ... escape characters automati cally Automatically indent Sets automatic indentation New lines and braces default ON Select this checkbox to indent new lines and braces automatically Other setting items In normal use disregard the following items These items are not discussed in this manual Environment File Types Indexer Language Mappings Make New CDT Project Wizard Property Page Settings Task Tags T...

Page 325: ...by clicking from a list The dialog boxes corresponding to each category page are described below Also described below are buttons appearing on every page Restore Defaults Restores the content of each page to the state in which the dialog box was opened or the state in which the dia log box settings were confirmed with the Apply button Apply Applies the changes and content set on the page Click App...

Page 326: ...ncoding format Inherit from container 1 1 Cp1252 MS932 etc varies with Windows language support This is the standard Windows character set default Other Select another character encoding New text file line delimiter Select a line delimiter The selection will take effect for files to be created subsequently It does not affect the existing files Inherited from container The standard Windows line del...

Page 327: ...Select the builder for a project GNU17 File Builder Deselect this check box if you do not wish to automatically generate the makefiles and other files needed for a build when executing a build process Refer to Section 5 7 11 Using an Original Makefile Other wise avoid making any other changes on this page ...

Page 328: ...5 206 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE C C Documentation Used to select the help documents for the project No document is used in the IDE ...

Page 329: ...nges if you use only files created in the IDE Use workspace settings Uses settings for file formats shown on the C C File Types page of the Preferences dialog box Use project settings Select this radio button to use a set of file formats specific to a project Click the New button to add new file extensions You can remove unnecessary extensions and file names by selecting from the list and click in...

Page 330: ...s Define the path by which to search for an include file or the symbol for a preprocessor Once a build is executed the include directory searched during that process and the macro definitions passed to the preprocessor are added to Discovered Paths in the tree list Note For normal use leave this setting unchanged ...

Page 331: ...1C Manual EPSON 5 209 C Compiler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE C C indexer Make settings for the indexer used by C search and content assist Do not change any of the settings on this page ...

Page 332: ...lding upon the occurrence of an error This check box is enabled when Use default is selected Workbench Build Behavior Build on resource save Auto Build Specify the target in the makefile to be called during an auto build By default all is called This option is not used with the default IDE settings Build Incremental Build Specify the target in the makefile to be called during a build process By de...

Page 333: ...the directory set here are written in the makefile used for a build Source folders on build path This is a list of current source folders The project directory is listed here by default Add Folder Adds a source folder to the list The Source Folder Selection dialog box is displayed Select a source folder from the tree list or click the Create New Folder button to create a new source folder or link ...

Page 334: ...o exclude certain C resources to be rendered as source files files you do not want to include in the makefile Add Adds a file name pattern You can use as a single character wildcard and as a string wildcard Example src c The can represent any character e g src1 c or src2 c test The extension can be any string e g test c or test s Add Multiple From the list of files in the source directory displaye...

Page 335: ...in debugging during the development process is output Some program data can be placed in RAM for debugging If this option is selected a psa file will not be generated Build Mask file psa is selected by default However if S1C17 is selected as the CPU Build Executable file elf becomes the fixed setting and cannot be changed If you click the Apply or OK button after settings in a GNU17 Build Options ...

Page 336: ...mpiler option Use Japanese Kanji filter When this option is specified the IDE converts Shift JIS codes in the source into ASCII escape characters before calling the compiler The default check box status depends on the OS under which the IDE starts up the check box is set to on under an OS with Japanese environment or is set to off under other language versions ...

Page 337: ...EPSON 5 215 C Compiler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE Build Options tab Compiler Optimization Use this page to select compiler optimization option Optimization Level Select the optimization level O1 ...

Page 338: ...ow Add Adds a directory Displays a dialog box for entering a path or selecting a path with the Browse button Delete Deletes the path selected in the list Edit Edits the path selected in the list Displays a dialog box for editing the path Move Up Moves the path selected one position up in the list The include files are searched by or der of paths in the list beginning with the uppermost path Move D...

Page 339: ...Adds a macro definition In the dialog box displayed for macro definition entry enter a macro definition in the following format macro name or macro name replacement string Delete Deletes the macro definition selected in the list Edit Edits the macro definition selected in the list Displays a dialog box for editing the macro definition Move Up Moves the macro definition selected one position up in ...

Page 340: ...Code generation Use this page to select compiler code generation option Do not expand built in functions inline fno builtin When this option is specified built in functions are ignored for inline expansion and are always called For the functions to which this option applies refer to Section 6 3 2 Command line Options ...

Page 341: ...ackage for S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE Build Options tab Compiler Miscellaneous Use this page to set other compiler options Other flags Enter other options directly into this text field Insert one or more spaces between each option ...

Page 342: ...E Build Options tab assembler Shows the current settings for the assembler options Command Shows the program name of the compiler All Options Shows the currently set options In the IDE the assembler sources are assembled by the C compiler for which xassembler with cpp option is specified ...

Page 343: ...he c xassembler with cpp and Wa gstabs options and mpointer16 option depending on the memory model selected are always added Set other assembler options from this page Other flags Enter the options to be passed to the assembler Insert one or more spaces between each option The options entered are passed to the assembler as Wa option ...

Page 344: ...anual C Compiler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE Build Options tab linker Shows the current settings for the linker options Command Shows the program name of the linker All Options Shows the currently set options ...

Page 345: ...1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE Build Options tab linker general The Map and N options are always added Set other linker options from this page Linker flags Enter other linker options in this text field Insert one or more spaces between each option ...

Page 346: ...ected library in the list Displays a dialog box for editing the path Move Up Moves the selected library one position up in the list Libraries are linked in order of the paths in the list beginning with the uppermost path Move Down Moves the selected library one position down in the list The libraries set here are written in a makefile to link to the objects generated from the sources However they ...

Page 347: ...Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE 5 IDE Build Options tab Vector Checker for Copro Displays settings for vector checker options Command Displays the name of the vector checker program All Options Displays the currently set options ...

Page 348: ... gnU17 iDE Build Options tab Vector Checker for Copro general Confirm if emu_copro_process is allocated to vector No 3 When using the coprocessor library select or unselect the checker that verifies whether the emu_copro_process interrupt function is allocated to the vector table ...

Page 349: ...box on the New Environment Setting dialog box that appears by clicking this button then click OK The path may be se lected in the dialog box that appears by clicking the Browse button Edit Displays a dialog box similar to that appeared by the New button to edit the name and path definition of the environment variable that has been selected in the list Remove Removes the environment variable select...

Page 350: ...y written to the command file Create commands from template Displays the Create a simple startup command dialog box shown below to set the connect mode The command file contents shown in this page reflects the settings in the Create a simple startup command dialog box Create a simple startup command Debugger Select the debugger connect mode to connect to ICD Mini When using an ICD to debug Simulat...

Page 351: ... is the address that was specified when the project was created Ports Selecting ICD Mini or Simulator in Debugger sets the port to USB or NONE respectively So no settings are required Overwrite Applies the above settings to the command file shown in the GNU17 GDB Commands page and closes the dialog box A dialog box appears prompting overwrite so execution may be canceled even after the but ton is ...

Page 352: ...r library libgccMD a for multiplication and division or lib gccM a for multiplication when creating a project If you select this option select the library type from the Select the Co processor library type com bo box Certain models offer just one selection option OFF Adds the setting to link the ordinary emulation library libgcc a when creating a project For models for which this checkbox cannot b...

Page 353: ...ion whose ad dress is not written in the VMA will be located at an address following the immediately preceding sec tion LMA Shows the position in a ROM start address at which the actual data is placed means the same as the VMA i e a section will be executed or accessed from the position at which its actual data is placed A description after section name means that the actual data for a section wil...

Page 354: ...y Ver 1 5 0 5 gnU17 iDE Add Adds section information Edit Edits the section information selected in the list Delete Deletes the section information selected in the list For more information on how to edit a linker script refer to Section 5 7 8 Editing a Linker Script ...

Page 355: ...imal notation Wait R W The first two digit value shows the number of wait states during a read cycle first digit and the number of wait states during a write cycle second digit respectively The words byte 8 bits halfword 16 bits and word 32 bits indicate the access size by which the area is accessed If the rest is blank the area is accessed in little endian mode The areas set for big endian are ma...

Page 356: ...001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 5 gnU17 iDE Project references Select the project to be referenced Project references for sample Select the other projects to be referenced by the current project ...

Page 357: ... before saving the document being edited in the editor File check boxes Select the check box corresponding to the file you want to save Select All Selects check boxes for all files Deselect All Deselects check boxes for all files OK Closes the documents in the editor after saving the selected files Cancel Cancels the action invoking the dialog box The documents are neither saved nor closed ...

Page 358: ...o the directory selected in From directory To import a directory select one from this list To import a file select the parent directory containing it File list box to the right Lists the files present in the directory selected in the directory list Use this list to select the file you want to im port Filter Types Allows you to restrict the import to a subset of the files selected in the file list ...

Page 359: ...box is selected any files or directories at the import destination having the same name are over written without warning If this check box is unselected default you will be prompted to confirm that you want to overwrite the files in question Create complete folder structure Selecting this radio button imports the entire directory including the directory structure of the file system a tree structur...

Page 360: ...y list Use this list to select the file you want to export Select Types Allows you to export a subset of the files selected in the file list by specifying a file format file name exten sion Select a file name extension from the dialog box by clicking this button All files of a different file format are deselected Select All Selects all directories and files displayed in the list box Deselect All D...

Page 361: ...les Selecting this radio button exports the entire file or directory including the directory structure of the file system a tree structure from the project directory Create only selected directories If this radio button is selected only the directory you selected is exported The directory structure of the project is not exported ...

Page 362: ...select the corresponding conditions If two or more filters are selected all filter conditions will be ORed New Creates a new filter Enter the filter name in the Add New Filter dialog box displayed to add it to the User fil ters list Select the filter in the list and set conditions Remove Removes the filters selected in the User filters list On any element All resources in the opened projects are d...

Page 363: ...e displayed by select ing the desired checkbox High Normal or Low Description contains Only items containing the string entered in the text box will be displayed in Description doesn t contain Only items that do not contain the string entered in the text box will be displayed in De scription To disable this restriction leave this text box blank Where severity is Problems view only Select to restri...

Page 364: ...nu17IDE mak Makefile project name _gnu17IDE lds Linker script file project name _gnu17IDE par Parameter file project name elf Executable file project name map Map file project name dump Symbol file for two pass make source filename d Dependency file for makefile source filename o Object file source filename ext0 Assembler source file for two pass make project name sa S3 file generated based on the...

Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...

Page 366: ......

Page 367: ...bedded applications This C compiler consists of three files xgcc exe cpp exe and cc1 exe The xgcc is based on the C compiler of Free Software Foundation Inc Details about the license of this compiler are written in the text file Copying GNU therefore be sure to read this file before using the compiler This C compiler has passed the compiler evaluation provided as a service by Japan Novel Corporati...

Page 368: ...n simultaneously when this option is used Default The xgcc C compiler generates the elf executable object file S Function Output assembly code Description This option is used to output an assembly source file input file name s When this option is specified the xgcc C compiler stops processing after the stage of compilation has finished and does not assemble the compiled code Do not specify the c o...

Page 369: ...names can be referenced from any source file Note however that the same macro names cannot be used for macro definitions in the user program Macro name Contents __c17 Indicates that the source was compiled for S1C17 processors __INT__ Indicates the data size of int type variables 16 __POINTER24 Indicates that the source was compiled without the mpointer16 compile option specified __POINTER16 Indic...

Page 370: ...f a simple code copies the code of the function itself rather than calling a function eliminating the overhead associated with a function call Depending on the source code the O3 option may not result in the fastest execution speed in certain cases Avoid using the O2 or Os options which are not supported Default Code optimization is performed gstabs Function Add debugging information with relative...

Page 371: ...t Specify Specify 3 1 Use the ANSI C and emulation libraries for 24 bit memory model located in lib 24bit 2 Use the ANSI C and emulation libraries for 16 bit memory model located in lib 16bit 3 Use the mpointer16 option in conjunction with the mshort offset option Wall Function Enables warning options Description This function enables all of the following warning options These warning options can ...

Page 372: ...all enum values when the switch statement uses a variable of the enum type for the index If a default label exists this warning is not output Also outputs a warning when a case statement specifies a value outside the range of enum type Wunused function Outputs a warning when a static function is declared but not defined Also outputs a warning when a static function that is not inline is defined bu...

Page 373: ...c Notes Be aware that the compile processing will be unsteady if the same compiler option is specified twice or more with different settings Be sure to specify one of the S E or c options when invoking xgcc If none are specified xgcc continues processing until the linkage stage Note however that necessary linker options cannot be specified in this case Generate all the objects to be linked using t...

Page 374: ...Assembler directives are output for section and data definitions The following describes the sections where instructions and data are set instructions All instructions are located in the text section Constants Constants are located in the rodata section Example const int i 1 global i section rodata align 2 type i object size i 4 i long 1 global and static variables with initial values These variab...

Page 375: ... to recognize long long type constants as such Example long long ll_val ll_val 0x1234567812345678 warning integer constant is too large for long type ll_val 0x1234567812345678LL OK Type wchar_t is the data type needed to handle wide characters This data type is defined in stdlib h std def h as the type unsigned short Store positions in memory The positions in the memory where data is stored depend...

Page 376: ...cessing even if the bit field is defined as an unsigned short type Take this into consideration when accessing a device or I O memory that needs to be accessed in 16 bit size Program struct IFtag volatile union volatile struct unsigned short DATA 1 1bit unsigned short Dummy 15 bCTL unsigned short usCTL rOUT struct g_GAtag volatile struct IFtag g_IF volatile struct g_GAtag pg_GAtag main pg_GAtag st...

Page 377: ...as scratch registers before storing arguments r0 First argument r1 Second argument r2 Third argument r3 Fourth argument A pair of the registers is used to store a 32 bit long argument r1 high order 16 bits and r0 low order 16 bits r3 high order 16 bits and r2 low order 16 bits Examples First argument long second argument long foo long lData1 long lData2 r0 lData1 low order 16 bits r1 lData1 high o...

Page 378: ...argument r0 to r3 while larger arguments are stored in the stack frame of the calling function explained in the next section before they are passed Handling of structure arguments When an argument is a 64 bit or smaller structure the values of the structure members are stored in the registers r0 to r3 to pass through the function if the registers can be used If the registers for passing argument r...

Page 379: ...Data short sData long lData Low memory 0 1 2 3 cData Local start Unused lData 4 0 sData Figure 6 4 5 2 Example of local variables saved to stack Depending on the source codes the variables may not be located in the order of declarations due to optimization This area is not allocated if there is no local variable that needs to be saved in the stack 6 4 6 grammar of C Source Refer to Section 4 2 Gra...

Page 380: ... connector This function is compatible with the following files C source files Header files included from C files Assembly source files Header files included from assembly source files Specify the mno sjis filt option to disable this filter option notes The traditional cpp option is not supported but is available in the preprocessor The filter function will not operate properly if this option is s...

Page 381: ...etc The xgcc C compiler does not support declaration of user sections using __attribute__ Type Function name __attribute__ section Section name To locate a function at a specific address generate and link the object file that includes the function only The pragma preprocessor directive is not guaranteed to work properly Use it at your own risk For information on bugs in the gcc core refer to gnu17...

Page 382: ... char type variable and addition subtraction are carried out at once by optimization This bug occurs when all the following conditions are filled First the value which is more than 128 0x80 is set to the variable which is bigger than char type Second substitute the result which addition subtraction are carried out to this variable for char type variable Last substitute the result which addition su...

Page 383: ...hen compiling from IDE invalidate the item of Kanji filter use in project property This bug has been resolved in Ver 1 5 0 or after reappearance code include string h define str a a macro of stringification operator int main void if strcmp str The result of compare should be equal but is not equal cause Kanji filter which changes a Kanji string sequence into ASCII sequence at the time of compile i...

Page 384: ...l registers for passing arguments at 6 4 3 Method of Using Registers about the allocation of registers for passing arguments correspondence method Don t pass the pointer argument which is cause of the error by r3 register So change the order of parameters or add the dummy argument reappearance code void sub int arg1 int arg2 int arg3 long arg4 static long long int num num arg4 In this case the poi...

Page 385: ...7 Library S5U1C17001C Manual 7 library ...

Page 386: ......

Page 387: ...ion coprocessor instructions internally In a model supporting coprocessor multiplication instructions this library can be linked in place of libgcc a libgccMD a Emulation library supports coprocessor multiplication division and remainder instructions This provides the same functions as libgcc a but uses multiplication division and remainder coprocessor instructions internally In a model supporting...

Page 388: ...t be used always make sure the added library is located before the emulation and ANSI libraries Example 1 NG ld exe T withmylib lds o withmylib elf boot o libc a libgcc a libc a mylib a If mylib a is using the emulation and ANSI libraries an error should always occur during linking 2 OK ld exe T withmylib lds o withmylib elf boot o mylib a libc a libgcc a libc a No errors should occur during linki...

Page 389: ...ibrary uses multiplication coprocessor instructions the libgccMD a library uses multiplication division and remainder coprocessor instructions These libraries provide the same functions The xgcc C compiler calls up functions from this library when a floating point number long long data or integer calculation is performed Since library functions exchange data via a designated general purpose regist...

Page 390: ...PSR change a b __eqdf2 Comparison of double type a b PSR change a b x 0 1 __nedf2 Comparison of double type a b PSR change a b x 1 0 __gtdf2 Comparison of double type a b PSR change a b x 1 0 __gedf2 Comparison of double type a b PSR change a b x 0 1 __ltdf2 Comparison of double type a b PSR change a b x 1 0 __ledf2 Comparison of double type a b PSR change a b x 0 1 Single precision floating point...

Page 391: ...Negative infinity 0xfff00000 00000000 Values 0x7ff00000 00000001 to 0x7fffffff ffffffff and 0xfff00000 00000001 to 0xffffffff ffffffff are not recognized as numeric values format of single precision floating point number The real number of the float type consists of 32 bits as shown below 31 30 23 22 0 S Exponent part Fixed point part Bit 31 Sign bit 1 bit Bits 30 23 Exponent part 8 bits Bits 22 0...

Page 392: ... format is signed or 0x0 if unsigned If the original value is too large 0xffffffff ffffffff If the original value is too small 0x1 if the intended format is signed or 0x0 if unsigned Conversion from one floating point type to another floating point type If the original value cannot be expressed in the intended format in the conversion from one floating point type to another floating point type the...

Page 393: ...long long Type Calculation functions Table 7 2 5 1 below lists the long long type calculation functions Table 7 2 5 1 long long type calculation functions Classification function name functionality long long type calculation __muldi3 Signed 64 bit multiplication x a b __divdi3 Signed 64 bit division x a b __udivdi3 Unsigned 64 bit division x a b __moddi3 Signed 64 bit remainder calculation x a b _...

Page 394: ...ibgccM a library is compatible with multiplication coprocessor instructions The libgccMD a library is compatible with multiplication division and remainder coprocessor instructions Table 7 2 5 1 lists functions using coprocessor instructions in libgccM a Table 7 2 6 1 Functions using coprocessor instructions in libgccM a function functionality interrupt disable segment __mulhi3 16 bit multiplicati...

Page 395: ...unction 7 3 2 anSi library function list The contents of the Reentrant column in the tables are as follows Reentrant Reentrant function Nonreentrant Non reentrant function Conditional Non reentrant function This function refers to a global variable It can be used as a reentrant function if there is no change in the global variable and your created read and write are reentrant functions input outpu...

Page 396: ... change errno and call read function int scanf char format Input from stdin with format specified Nonreentrant Refer to global variables stdout and _iob change errno and call read function int sscanf const char s const char format Input from character string with format specified Nonreentrant Change global variable errno int fprintf FILE stream char format Output to stdout with format specified Co...

Page 397: ...ong int x Return absolute value long type Reentrant div_t div int n int d Divide int type Nonreentrant Change global variable errno ldiv_t ldiv int n int d Divide long type Nonreentrant Change global variable errno int rand Return pseudo random number Nonreentrant Change global variable errno void srand unsigned int seed Set seed of pseudo random number Nonreentrant Change global variable errno lo...

Page 398: ...nreentrant Change global variable errno destruct ALR and AHR double frexp double x int nptr Return mantissa and exponent of floating point number Nonreentrant Change global variable errno destruct ALR and AHR double ldexp double x int n Return floating point number from mantissa and exponent Nonreentrant Change global variable errno destruct ALR and AHR double modf double x double nptr Return inte...

Page 399: ... strpbrk char s1 char s2 Return specified character position multiple choices found first in the character string Reentrant char strrchr char s int c Return specified character position found last in the character string Reentrant size_t strspn char s1 char s2 Return number of characters from the beginning of the character string until the non specified character appears multiple choices Reentrant...

Page 400: ...the variable argument macros defined in stdarg h Table 7 3 2 8 Variable argument macros Header file stdarg h Macro functionality void va_start va_list ap type lastarg Initialize the variable argument group type va_arg va_list ap type Return the actual argument void va_end va_list ap Return normally from the variable argument function ...

Page 401: ...loc realloc str tod strtol strtoul acos asin atan2 ceil cos cosh exp fabs floor fmod frexp ldexp log log10 modf pow sin sinh sqrt tan unsigned int seed Variable to store seed of random number seed 1 stdlib h rand srand time_t gm_sec Elapsed time of timer function in seconds from 0 00 00 on January 1 1970 gm_sec 1 time h time Among the global variables referenced by the ANSI library functions those...

Page 402: ...er If the input buffer is empty EOF or nbytes 0 0 is returned If an error occurs 1 is returned Library functions that call the read function Direct call fread getc _doscan _doscan is a scanf series internal function Indirect call fgetc fgets getchar gets calls getc scanf fscanf sscanf calls _doscan Definition of input buffer Format unsigned char READ_BUF 65 Variable name is arbitrary size is fixed...

Page 403: ...calls _doprint perror calls fprintf Definition of output buffer Format unsigned char WRITE_BUF 65 Variable name is arbitrary size is fixed to 65 bytes Buffer content The size of the output data 1 to max 64 is stored at the beginning of the buffer WRITE_BUF 0 0 denotes EOF The output data is stored in WRITE_BUF 1 and the following locations Precautions on using simulated i O When using the debugger...

Page 404: ...7 18 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 7 liBrary THIS PAGE IS BLANK ...

Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...

Page 406: ......

Page 407: ...with cpp options mc17_ext C compiler xgcc Preprocessor cpp Assembler as file s file o Assembly sources including preprocessor instructions Object files ld linker Object files ld linker Link map and dump files Assembly sources file dump file map Figure 8 2 1 Flowchart 8 2 1 input files assembly source file File format Text file File name filename s Other extenders than s can be used A path can also...

Page 408: ...file objdump t filename elf filename dump Specify the file name extension as dump This file is used to optimize the code for referencing local symbols when the mc17_ext option is specified 8 2 2 Output file Object file File format Binary file in elf format File name filename o The filename is the same as that of the input file Description File in which symbol information and debugging information ...

Page 409: ...tion information is output as a relative path Default No debugging information is output In addition to the standard options the following S1C17 option is available mpointer16 Function Specify 16 bit pointer mode Description This option is used to generate object files for the 16 bit pointer mode 64KB memory model This option just sets a flag to indicate that the 16 bit pointer mode is specified a...

Page 410: ...bols Symbols that are declared to be global are called global symbols Local symbols even when symbols of the same name are specified in two or more different files are handled as different symbols Global symbols if defined as overlapping in multiple files cause a warning to be generated in the ld linker Example file1 file in which global symbol is defined global SYMBOL Global declaration of symbol...

Page 411: ...e the directives in lowercase unless otherwise specified Parameters are discriminated between uppercase and lowercase The as assembler supports all the gnu assembler directives Refer to the gnu assembler manual for details of the assembler directives The following explains the often utilized directives 8 5 1 Text Section Defining Directive text instruction format text Description Declares the star...

Page 412: ...tion until another section is declared Usually this section will be mapped into a read only memory at the stage of linkage Example section rodata Defines a rodata section 2 section data Declares the start of a data section with an initial value Statements following this instruction are assembled as those to be mapped in the data section until another section is declared Usually this section will b...

Page 413: ...ction are assembled as those to be mapped in the bss section until another section is declared Example section bss Defines a bss section note The labels described in the bss section will be defined as local symbols by default To define a global symbol use the global directive Example section bss align 2 VAR1 skip 4 Defines the 4 byte local variable VAR1 section bss global VAR2 align 2 VAR2 skip 4 ...

Page 414: ...diately preceded by the align directive If the current position is not a boundary address 0x00 is set in the interval from that position to the nearest boundary address Example long 0x0 0x1 0x2 byte 0xff In addition to these directives the directives listed below can also be used hword same as short word same as short int same as short 2 ascii Defines one or more string literals Enclose a characte...

Page 415: ...ion format zero length length Area size in bytes Description This directive secures a length bytes of blank area in the current bss section The area begins from the current address unless it is immediately preceded by the align directive Example section bss global VAR1 align 2 VAR1 zero 4 Secures an space for the 4 byte global variable VAR1 ...

Page 416: ...ion The data that appears immediately after this directive is aligned to a 2n byte boundary n alignment Example align 2 Aligns the following data to a 4 byte boundary note The align directive is valid for only the immediately following data definition or area securing directive Therefore when defining data that requires alignment you need to use the align directive for each data definition directi...

Page 417: ...obal symbol symbol Symbol to be defined in the current file Description Makes global declaration of a symbol The declaration made in a file with a symbol defined converts that symbol to a global symbol which can be referred to from other modules Example global SUB1 note The symbols are always defined as a local symbol unless it is declared using this directive ...

Page 418: ...s symbol Symbol for memory access address reference address Absolute address Description Defines a symbol with an absolute address 24 bit Example set DATA1 0x80000 Defines the symbol DATA1 that represents absolute address 0x80000 note The symbol is defined as a local symbol To use it as a global symbol global declaration using the global directive is necessary ...

Page 419: ...unction Expansion sadd rd imm16 rd rd imm16 1 sadc rd imm16 rd rd imm16 C 1 sadd a rd imm20 rd rd imm20 2 sadd a sp imm20 sp sp imm20 2 ssub rd imm16 rd rd imm16 1 ssbc rd imm16 rd rd imm16 C 1 ssub a rd imm20 rd rd imm20 2 ssub a sp imm20 sp sp imm20 2 xadd rd imm16 rd rd imm16 1 xadc rd imm16 rd rd imm16 C 1 xadd a rd imm24 rd rd imm24 3 xadd a sp imm24 sp sp imm24 3 xsub rd imm16 rd rd imm16 1 ...

Page 420: ... rd imm16 6 0 ext imm16 15 7 add rd imm16 6 0 2 sOP a rd imm20 sOP a sp imm20 OP add sub Example sadd a rd imm20 imm20 0x7f 0x7f imm20 add a rd imm20 6 0 ext imm20 19 7 add a rd imm20 6 0 3 xOP a rd imm24 xOP a sp imm24 OP add sub Example xadd a rd imm24 imm24 0x7f 0x7f imm24 0xfffff 0xfffff imm24 add a rd imm24 6 0 ext imm24 19 7 add a rd imm24 6 0 ext imm24 23 20 ext imm24 19 7 add a rd imm24 6 ...

Page 421: ...in PSR 3 These extended instructions allow you to compare a general purpose register and a 16 bit 20 bit 24 bit immediate A conditional operation option c nc cannot be specified in the extended instructions Basic instructions after expansion scmp xcmp Expanded into the cmp instruction scmc xcmc Expanded into the cmc instruction scmp a xcmp a Expanded into the cmp a instruction Expansion formats 1 ...

Page 422: ...d rd imm16 1 xnot rd imm16 rd imm16 1 These extended instructions allow a 16 bit immediate to be specified directly in a logical operation A conditional operation option c nc cannot be specified in the extended instructions Basic instructions after expansion sand xand Expanded into the and instruction soor xoor Expanded into the or instruction sxor xxor Expanded into the xor instruction snot xnot ...

Page 423: ...rs 7 0 2 xld sp imm24 rs W sp imm24 rs 15 0 2 xld a sp imm24 rs A sp imm24 23 0 rs 23 0 A sp imm20 31 24 0 2 These extended instructions allow you to directly specify a displacement of up to 20 bits 24 bits Specification of imm20 imm24 can be omitted Basic instructions after expansion sld b xld b Expanded into the ld b instruction sld ub xld ub Expanded into the ld ub instruction sld xld Expanded ...

Page 424: ...mm24 rs B imm24 rs 7 0 2 xld imm24 rs W imm24 rs 15 0 2 xld a imm24 rs A imm24 23 0 rs 23 0 A imm24 31 24 0 2 These extended instructions allow memory locations to be accessed by specifying the address with a 20 bit 24 bit immediate However the postincrement function cannot be used Basic instructions after expansion sld b xld b Expanded into the ld b instruction sld ub xld ub Expanded into the ld ...

Page 425: ...o a general purpose register A symbol also can be used for immediate specification Basic instructions after expansion sld xld Expanded into the ld instruction sld a xld a Expanded into the ld a instruction Expansion formats 1 sld rd imm16 xld rd imm16 Example xld rd imm16 imm16 0x7f 0x7f imm16 ld rd imm16 6 0 ext imm16 15 7 ld rd imm16 6 0 2 sld a rd imm20 sld a sp imm20 Example sld a rd imm20 imm...

Page 426: ...Manual C Compiler Package for S1C17 Family Ver 1 5 0 8 aSSEMBlEr 6 xld a rd symbol imm24 xld a sp symbol imm24 Example xld a rd symbol imm24 Unconditional ext symbol imm24 23 20 ext symbol imm24 19 7 ld a rd symbol imm24 6 0 ...

Page 427: ...ve conditional jump 5 sjrult sign20 PC relative conditional jump 5 sjrule sign20 PC relative conditional jump 5 scalla imm20 PC absolute subroutine call 6 sjpa imm20 PC absolute unconditional jump 6 xcall label imm24 PC relative subroutine call 7 xjpr label imm24 PC relative unconditional jump 7 xjreq label imm24 PC relative conditional jump 8 xjrne label imm24 PC relative conditional jump 8 xjrgt...

Page 428: ... d Expanded into the jrge jrge d instruction sjrlt sjrlt d xjrlt xjrlt d Expanded into the jrlt jrlt d instruction sjrle sjrle d xjrle xjrle d Expanded into the jrle jrle d instruction sjrugt sjrugt d xjrugt xjrugt d Expanded into the jrugt jrugt d instruction sjruge sjruge d xjruge xjruge d Expanded into the jruge jruge d instruction sjrult sjrult d xjrult xjrult d Expanded into the jrult jrult d...

Page 429: ...lla calla d jpa jpa d Example xcalla label imm24 Unconditional ext label imm24 23 20 ext label imm24 19 7 calla label imm24 6 0 10 xOP sign24 OP call call d jpr jpr d Example xcall sign24 1024 sign24 1023 sign24 1024 or 1023 sign24 call sign24 11 1 ext sign24 23 12 call sign24 11 1 11 xOP sign24 OP jr jr d Example xjreq sign24 128 sign24 127 1048576 sign24 128 or 127 sign24 1048575 sign24 1048576 ...

Page 430: ...atuses 4 xld cf rd symbol imm24 Coprocessor rd symbol imm24 get flag statuses 4 These extended instructions allow a 20 bit 24 bit immediate to be transferred to the coprocessor A symbol also can be used for immediate specification Basic instructions after expansion sld cw xld cw Expanded into the ld cw instruction sld ca xld ca Expanded into the ld ca instruction sld cf xld cf Expanded into the ld...

Page 431: ...m24 Expanded into the ext instruction 1 Combined with the instructions below this instruction functions as the offset Xext imm24 OP rd rs rd imm24 Functions as rs Xext imm24 OP rd rs rd Functions as rs imm24 OP ld b ld ub ld ld a Basic instructions after expansion Xext Expanded into the ext instruction Expansion formats 1 Xext imm24 imm24 0x1fff 0x1fff imm24 0xffffff ext imm20 12 0 ext imm24 23 13...

Page 432: ... is used for the optimization to remove unnecessary ext instructions mc17_ext option mc17_ext filename dump filename map filename dump File in which global and local symbol information is described Use objdump to create this file The file name extension must be dump objdump t filename elf filename dump filename map File in which object mapping information is described This file is delivered by the...

Page 433: ...mine the number of ext instructions to be used Symbol address 0 to 0x7f The extended instruction xadd is expanded with no ext used Symbol address 0x80 to 0xfffff The extended instruction xadd is expanded with one ext used Optimization 3 for relative branch instructions scall xcall sjpr xjpr sjrxx xjrxx instructions Example sub ret main xsub a sp 0x4 xcall sub ADDR1 add a sp 0x4 ret The assembler o...

Page 434: ...n7 Optimization 4 for absolute branch instructions scalla xcalla sjpa xjpa instructions Example sub ret main xsub a sp 0x4 xcalla sub add a sp 0x4 ret The assembler obtains the destination address sub from the dump and map files and determines the number of ext instructions to be used directly from the destination address Destination address 0 to 0x7f The extended instruction is expanded with no e...

Page 435: ...sub_1 o text sub_2 o text sub_3 o text sub_4 o text __END_ text_A text_B 0x00C00000 __START_text_B main o text __END_ text_B In this example the extended instructions for referencing or branching to a symbol between main o and sub_X o will not be optimized Therefore new sections should not be added in the linker script file lds if they are not necessary When a file name is described twice or more ...

Page 436: ...rror The format of the map file is invalid The contents of the map file specified with the mc17_ext option are invalid Error Cannot close the map file The map file specified with the mc17_ext option cannot be closed after it has been read Error There are too many characters of one line in dump file The number of characters except for a new line character in a line of the dump file specified with t...

Page 437: ...d with the o option must be the same as that of the input source file name except for the file name extension When the ext instructions are written directly to an assembler source to extend basic instructions they will not be optimized even if the mc17_ext option is specified When creating an assembler source use s or x extended instructions for data transfer arithmetic operation and branch if a s...

Page 438: ...8 32 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 8 aSSEMBlEr THIS PAGE IS BLANK ...

Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...

Page 440: ......

Page 441: ...U mirror sites located in various places around the world through Internet etc 9 2 input Output files file lds Linker script file Link map file gdb debugger as assembler Linker ld file o file elf file a file map User Library Library files Object files Executable object file libstdio a libc a ANSI library Emulation library Simulated I O library libgcc a libgccM a libgccMD a Figure 9 2 1 Flowchart 9...

Page 442: ...bc a lib 24bit libgcc a 9 3 2 Command line Options The ld linker accepts the gnu linker standard options The following lists the principal options only Refer to the gnu linker manual for more information o filename Function Specify output file name Explanation This option is used to specify the name of the object file output by the ld linker Default The default output file name is a out T linker s...

Page 443: ... AT __END_rodata __START_data data __END_data text 0x8000 __START_vector vector __END_vector 0x80 __START_text text __END_text rodata __END_text __START_rodata rodata __END_rodata load address symbols __START_data_lma LOADADDR data In this script data will be located from address 0 in order of bss and data sections the vector table program codes and constant data will be located from address 0x800...

Page 444: ...AT __END_text __START_data data __END_data __START_data_lma LOADADDR data text_foo1 __END_data AT __START_data_lma SIZEOF data __START_text_foo1 foo1 o text __END_text_foo1 __START_text_foo1_lma LOADADDR text_foo1 text_foo2 __END_data AT __START_text_foo1_lma SIZEOF text_foo1 __START_text_foo2 foo2 o text __END_text_foo2 __START_text_foo2_lma LOADADDR text_foo2 text_foo3 __END_data AT __START_text...

Page 445: ... must be copied to the VMA in the RAM immediately following the bss section before it can be used The data section VMA in the RAM is a virtual section that does not exist when the program starts executing This method should be used for handling variables that have an initial value In this example the data sections in all the files are combined into one section text_foo1 is the text section in the ...

Page 446: ...e 24 bit address space Error section XXX is not within 16bit address The address of the XXX section exceeds the 16 bit address space Error section XXX is not within 24bit address The address of the XXX section exceeds the 24 bit address space Error Input bject file objectfile included from archivefile is not for C17 The object file is not compatible with the C17 Error Input object file objectfile ...

Page 447: ...DD o AAA Duplicate function name BBB CCC Size of function DDD File name to be linked If file sizes match this message is not displayed When linking files be careful to avoid specifying the same function name Take particular care to avoid assigning a function name already included in the library file a If and individual object file specification coexist in a linker script file as in the example bel...

Page 448: ...9 8 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 9 linkEr THIS PAGE IS BLANK ...

Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...

Page 450: ......

Page 451: ... function of the ICD Mini S5U1C17001H Allows storing and re registering the symbols registered in the Watch Window 10 2 input Output files Debugger gdb Embedded system simulator ES Sim17 file elf file par file cmd elf object file Command file Stdin file INI file file log Command log file file log Trace log file file log Stdout file break gdb Breakpoint storage file from Linker ICD Parameter file f...

Page 452: ...ommands to be executed successively By writing a series of frequently used commands in a file you can save the time and labor required for entering commands from the keyboard each time This file is loaded in the debugger and executed by the startup option x or the source command rOM data HEX file File format Motorola S3 format HEX file File name filename sa Description This file cannot be used for...

Page 453: ... Text file Filename c17_profile_path gdb Description This is the path in which profile coverage data files c17_profile prf are stored It is referenced by the profile window and coverage window 10 2 2 Output files Trace information file File format Text file File name Any file name Description This file contains trace results output by the debugger The c17 tm command is used to specify a file name ...

Page 454: ...age data file File format Binary file Filename c17_profile prf Description This is a measurement result data file created by the execution of the c17 profile or c17 coverage command Profile coverage data path file File format Text file Filename c17_profile_path gdb Description This is the path in which the profile coverage data files c17_profile prf are stored It is referenced by the profile windo...

Page 455: ...ing Function Changes the current directory Explanation When this option is specified the debugger sets the specified path for the current directory at startup If this option is omitted the directory written in the gdbtk ini file or directory containing gdb exe if gdbtk ini not found is assumed directory directory path string Function Changes the source file directory Explanation This option can be...

Page 456: ...ositions and colors settings for break points and the list of symbols registered in the Watch Window Select Yes Y to store the gdb debugger settings When you restart the gdb debugger you can restore the previous status Select No N to choose not to store the gdb debugger settings If you try to quit the gdb debugger without executing the Detach command the following dialog appears Select Yes Y to qu...

Page 457: ...s opening by default If the gdbtk ini file does not exist the debugger creates a gdbtk ini file with the default settings at startup and opens these four windows To modify the startup window configuration correct the window section in the gdbtk ini file To revert to its original factory settings after modifying the window configuration copy the original gdbtk ini from the gnu17 utility share direc...

Page 458: ... for selecting an elf format object file When a file is selected the debugger executes the file command to load debug information Close Closes the currently open elf format object file The debug information and contents displayed in the window are cleared Source Displays a dialog box for selecting a command file When a file is selected the debugger executes the source command using the selected fi...

Page 459: ...the Local Variables window If already open the window moves to the front of the screen Breakpoints Opens the Breakpoints window If already open the window moves to the front of the screen Console Opens the Console window If already open the window moves to the front of the screen SimI O Opens the Simulated I O window If already open the window moves to the front of the screen Trace Opens the Trace...

Page 460: ...ialog box used to select the fonts For details about the content set in this dialog box see Changing the basic settings later in this section Source Displays the Source Preferences dialog box used to select the source display color tab width or the like For details about the content set in this dialog box see Changing the basic settings later in this section Help menu About GDB Shows the debugger ...

Page 461: ...serdefine gif Reset button Executes the command file gnu17 reset gdb that can be edited by the user Save Break Watch button Executes a command file gnu17 savebreak gdb that can be edited by the user Load break Watch button Executes a command file gnu17 loadbreak gdb that can be edited by the user Profiler button Opens the Profiler Window and displays measurement data if any Coverage button Opens t...

Page 462: ...tiple instances of the Source window can be opened with separate source files displayed in each One of four display forms can be selected from the pull down list Source display with SOURCE selected from pull down list The window shows source line numbers and source codes This is the default display format selected at debugger startup Assembler display with ASSEMBLY selected from pull down list The...

Page 463: ...ixed display with MIXED selected from pull down list The window provides a mixed display of source and assembler with the corresponding assembler display inserted every source line Split display with SRC ASM selected from pull down list The window is split into upper and lower halves with the upper area showing source lines and the lower area showing assembler display The relative sizes of upper a...

Page 464: ...ed n Orange The breakpoint set here is a temporary software PC breakpoint cleared upon a program break and enabled n Blue The breakpoint set here is a hardware PC breakpoint and enabled n Black The breakpoint set here is a PC breakpoint and currently disabled The color of mark n indicating that the PC breakpoint is enabled by default red orange or blue can be changed in the Source Preferences dial...

Page 465: ...select a different display format the contents displayed in the window change immediately However you cannot change the display format of a source file whose current PC or browse function label search is not highlighted to ASSEMBLY Selecting between source files Select the source file name you wish to display from the list in the source file select combo box or enter the source file name from the ...

Page 466: ...ve no matter how many times the program is made to break there by a hit Conversely clicking n returns the mark indicating that the breakpoint you have set is cleared This method can only be used to set normal software PC breakpoints To clear breakpoints this method can be used for temporary software PC breakpoints orange n and hardware PC breakpoints blue n as well as set PC breakpoints that are c...

Page 467: ...on setting software PC breakpoints described above also apply in this case Note that this function is valid even if software PC breakpoints have already been set at 200 locations maximum Copying symbols Variable names and function names can be copied to the clipboard using a popup menu To use this function change the display format to SOURCE Place the cursor over a variable name function name or l...

Page 468: ...m Apply button Changes the settings made in the dialog box without closing with the dialog box OK button Changes settings made in the dialog box and closes the dialog box Cancel button Closes the dialog box without changing the settings you made there Note that settings already changed by Apply cannot be undone Clicking Apply or closing this dialog box updates the contents displayed in the Source ...

Page 469: ...om menus or toolbar buttons c17 rst command Reset on Reset menu Reset button 1 step command Step on Control menu Step button 3 stepi command Step Asm Inst on Control menu Step Asm Inst button 3 next command Next on Control menu Next button 3 nexti command Next Asm Inst on Control menu Next Asm Inst button 3 finish command Finish on Control menu Finish button continue command Continue on Control me...

Page 470: ...e instance of the Console window can be open at one time Any attempt to open the Console window while already open activates a new Console window which moves to the front of the screen Command input In the Console window you can enter and execute any debugging command The Console window has prompt gdb displayed at the last line ready to accept command input from the keyboard When any other window ...

Page 471: ...Decimal Signed decimal Unsigned Unsigned decimal Natural Common representation for the data type e g decimal for int type values hexadecimal for pointers Binary Binary Octal Octal Raw 8 digit hexadecimal Floating Point Floating point Remove from Display Deletes the register selected in the window from the window Add to Watch Adds the register selected in the window to the Watch Expressions window ...

Page 472: ...digit hexadecimal Floating Point Floating point Choose the register whose display format you wish to change by clicking it Clicking once more deselects the register The name of a selected register is highlighted in blue Selected register Next choose the desired display format from the Format submenu of the Register menu Otherwise you can choose from the popup menu shown below that appears by right...

Page 473: ...rom the Register menu or the popup menu that appears by right clinking All registers are then displayed Note that Display All Registers is disabled and you cannot choose unless there is a hidden register adding registers to the Watch Expressions window You can add a selected register to the watch list in the Watch Expressions window so that you can monitor it while executing a program Choose the r...

Page 474: ...ine The default data size and display format can be changed in the Memory Preferences dialog box For details see Changing the basic settings later in this section Note that 32 bit data are displayed in little endian format In simulator mode the memory content of any area is displayed in endian format i e big or little endian as specified in a parameter file set for that area Operation Opening and ...

Page 475: ...bytes in the Memory Preferences dialog box If you specified a number of bytes and all data cannot be displayed within the current window size a vertical scroll bar will appear In this case however the displayed data cannot be scrolled exceeding the specified number of bytes To display an area following or preceding the current area click the Scroll down or Scroll up button provided at the side of ...

Page 476: ...displayed When you use the Scroll down or Scroll up button the displayed data is scrolled the specified number of bytes each time you click For display in the horizontal direction of the window the number of bytes displayed on one line is the same in either case Note that exceeding the window size displays a horizontal scroll bar Miscellaneous Bytes Per Row Set the number of bytes to be displayed ...

Page 477: ... breakpoints currently set Enable All Enables all PC breakpoints currently set Remove All Deletes all PC breakpoints currently set Contents displayed The following explains the contents displayed on each line of the breakpoint list Check box Shows whether the breakpoint is enabled or disabled When flagged by a check mark the breakpoint is enabled otherwise the breakpoint is disabled Moreover the c...

Page 478: ...ed during program execution Moreover you can select a breakpoint highlighted with a blue background by clicking it in the breakpoint list then choose Enabled to enable the breakpoint or Disabled to disable the breakpoint from the Breakpoint menu or the popup menu that appears by right clicking To enable or disable all breakpoints choose Disable All or Enable All from the Global menu or the Global ...

Page 479: ...e values hexadecimal for pointers default Remove Deletes a symbol selected in the window from the watch list Note When the GDB is closed the display format set with the set output radix command is saved On the subsequent GDB startup the display will retrieve the saved display format in place of the default format Contents displayed The names and values of symbols registered in the watch list are d...

Page 480: ...xpressions window then click the Add Watch button 2 Symbol registration in Source window To use this function choose display format SOURCE Place the cursor over a global variable name and right click Then choose Add symbol to Watch from the ensuing popup menu See Section 10 4 2 Source Window 3 Register registration in Registers window Select a register you wish to add by clicking it in the Registe...

Page 481: ...w value in decimal or hexadecimal to replace the existing value or change the necessary digits of the existing value You can use the arrow backspace and delete keys Note that entering a value exceeding the data size of the symbol only applies the low order effective bits and ignores the bits outside the valid range limitations The symbol values displayed in the Watch Expressions window are not upd...

Page 482: ...e values hexadecimal for pointers default Note When the GDB is closed the display format set with the set output radix command is saved On the subsequent GDB startup the display will retrieve the saved display format in place of the default format Contents displayed The local variable names and values defined in a function that includes the current PC address are displayed The variable values are ...

Page 483: ...format from the Format submenu of the Variable menu Otherwise you can choose a display format from the popup menu shown below that appears by right clicking rewriting variable values Variable values can be changed directly in the window Select a variable whose content you wish to change by clicking it in the window Next choose Edit from the Variable menu or the popup menu that appears by right cli...

Page 484: ... window opens automatically When the data input source is set in the window by the c17 stdin command and the program is made to break at a specified breakpoint When the data output destination is set in the window by the c17 stdout command and the program is made to break at a specified breakpoint Click the Close button to close the window The window can also be minimized Only one instance of the ...

Page 485: ... Content of memory access address R W and data Source code Register content Operation Opening closing the window The Trace window does not open automatically at debugger startup unless the gdbtk ini file is changed To open the window choose Trace from the View menu in the Source window Click the Close button to close the window The window can also be minimized Only one instance of the Trace window...

Page 486: ...ut format gdb command parameter parameter parameter A space is required between the command and a parameter and between parameters If you have entered an incorrect command by mistake use the arrow Backspace or Delete keys to correct it When you have finished entering a command press the Enter key to execute the command Example gdb continue entry of command only gdb target icd usb entry of command ...

Page 487: ...oint by source line number However this is limited to only when debugging an elf format object file that includes information on source line numbers To specify a line number use the format shown below Filename LineNo Filename Source file name Filename can be omitted when specifying a line number existing in the current file one that includes code for the current PC LineNo Line number Line numbers ...

Page 488: ...urce Control Save breakpoints Watch Symbols delete c17 loadbreak c17 loadwatch Source Control Load breakpoints Watch Symbols C17 profile Source View Profile C17 coverage Source View Coverage break Source Popup menu Mouse button tbreak Source Popup menu disable Breakpoints Breakpoint Disabled Popup menu enable Breakpoints Breakpoint Enabled Popup menu delete Breakpoints Breakpoint Remove Popup menu...

Page 489: ...nd c17 rst No command executed The debugger uses the image file shown below to display this button This button can be customized by replacing the contents in this file with a user created 24 24 dot button image gnu17 utility share gdbtcl images2 userdefine gif Reset Reset Executes the command file gnu17 reset gdb that can be edited by the user Contents of reset gdb at shipment c17 rst Resets the C...

Page 490: ... option in the debugger startup command you can execute one command file at debugger startup Example c EPSON gnu17 gdb x startup cmd 2 Execution by a command A command named source is available to execute a command file The source command loads a specified file and executes the commands in it in the order written Example gdb source startup cmd The commands written in a command file are displayed i...

Page 491: ...ng procedure and contents at a later time Example command gdb c17 log test log Starts logging Log mode gdb c17 log Finishes logging After logging is started by the c17 log command the debugger saves a log until the next time you execute this command Saved contents of a log All commands executed and execution results are saved This includes commands that have been executed from menus or toolbar but...

Page 492: ...thod Command gdb target icd usb Specification in IDE Select ICD Mini from the Debugger combo box in the Create a simple startup command dialog box to generate a startup command file To start in ICD Mini mode make sure an ICD and target board are connected correctly and that the power for these units is turned on For details on how to use the ICD refer to the manual for the ICD used Note that the t...

Page 493: ... basic procedure to execute a series of operations from loading a file to debugging gdb c17 rpf sample par Sets map information gdb file sample elf Loads debugging information gdb target icd usb Connects the target gdb load Loads the program gdb c17 rst Resets the CPU To debug a program written in target ROM there is no need to execute the load command In this case the file command can also be use...

Page 494: ... Family Ver 1 5 0 10 DEBUggEr 10 6 3 Source level Debugging function When gdb is up and running you can debug a program while displaying the C source and assembly source in the Source window For details about the source display see Section 10 4 2 Source Window ...

Page 495: ...ry window For display in the Memory window and how to operate in it see Section 10 4 5 Memory Window Entering data set char set short set long commands Writes specified data to a specified address Data can also be entered or changed in the Memory window Example Setting int i to 0x5555 gdb set short i 0x5555 rewriting a specified area c17 fb c17 fh c17 fw commands Rewrites all of a specified area w...

Page 496: ...g the info var command You also can display the contents of variables by using the x or print command Example Displaying a list of global symbols gdb info var All defined variables File main c int i Non debugging symbols 0x00000000 __START_bss 0x00000004 __END_bss 0x00000004 __END_data 0x00000004 __START_data Moreover when the Watch Expressions window has global variables registered in it you can ...

Page 497: ...xd20 3360 r1 0xaaaaaa 11184810 r2 0xaaaaaa 11184810 r3 0xaaaaaa 11184810 r4 0x690 1680 r5 0xaaaaaa 11184810 r6 0x0 0 r7 0xaaaaaa 11184810 sp 0x7f8 2040 pc 0x4090 16528 psr 0x0 0 The Registers window also displays register values For display in the Registers window and how to operate in it see Section 10 4 4 Registers Window altering register values set command You can set the contents of CPU regis...

Page 498: ...ausing the program to break immediately before executing 10th line in main c gdb until main c 10 main at main c 10 The commands above can also be executed in the Source window To execute the continue command Choose Continue from the Control menu Click the Continue button Continue button You cannot specify the number of times that a break should be disabled To execute the until command Choose Jump ...

Page 499: ...at a time Example Single stepping the program by one source line indicated by the current PC with any and all lines in a called function executed successively as one step gdb next nexti command The program is single stepped one assembler instruction at a time Example Single stepping the program by ten instructions from the address indicated by the current PC with any and all lines in a called subr...

Page 500: ...n Other causes of break than those set by the user During single stepping the program does not stop at PC breakpoints Stop button If the program does not stop it can be forcibly made to break by using this button When the program stops the cause of break and halted position are displayed in the Console window Calling a user function callmd and call commands The call command can be used to call a u...

Page 501: ...is reset in the following cases When the mode of the execution counter is changed from integrating mode to reset mode or vice versa by the c17 clockmd command When the program is started while the counter is set to reset mode When the CPU is reset When the c17 timebrk step stepi next nexti or finish command is executed in ICD Mini mode resetting the CPU The CPU is reset by the c17 rst command This...

Page 502: ...line 7 tbreak command This command sets a temporary software PC breakpoint Example To set a temporary software PC breakpoint at address 0xc0001e gdb tbreak 0xc0001e Breakpoint 2 at 0xc0001e file main c line 10 When a software PC break occurs the debugger waits for command input after displaying the following message gdb continue Continuing Breakpoint 1 main at main c 7 Breakpoints can be set by sp...

Page 503: ...et The debugger refers to the memory map information set by loading a parameter file using the c17 rpf command as it checks each address to determine whether a software PC breakpoint can be set Unless the c17 rpf command has been executed the debugger does not perform error processing that pertains to the target system Hardware PC breaks hbreak and thbreak commands The on chip debugger of the S1C1...

Page 504: ...db disable 1 enable command This command enables a breakpoint Example To enable breakpoint 1 gdb enable 1 delete or clear command These commands delete a breakpoint Example 1 To delete breakpoints 1 and 2 gdb delete 1 2 Example 2 To delete a breakpoint at line 10 in main c gdb clear main c 10 ignore command This command specifies the number of times that a break is disabled Example To specify that...

Page 505: ... following message is output Break by writing ROM area access to an undefined area The program is made to break when accessing an undefined area other than those mapped by a parameter file Break by accessing no map Stack overflow The program is made to break after writing to a stack exceeding the stack area set by a parameter file thus causing it to overflow Break by stack overflow Execution of an...

Page 506: ...mal Number of instructions executed since the CPU was reset clk Number of execution clocks in decimal Number of execution clocks since the CPU was reset pc Address of executed instructions in hexadecimal code Instruction codes in hexadecimal bus_addr Accessed memory addresses in hexadecimal type Type of bus operation r8 Byte data read r16 16 bit data read r32 32 bit data read w8 Byte data write w1...

Page 507: ...be entered from the keyboard When you enter data and press the Enter key gdb writes the data entered to the buffer and resumes executing the program from the address where it left off Example To set a data input function using the Simulated I O window gdb c17 stdin 1 READ_FLASH READ_BUF Output by stdout c17 stdout command Set the following conditions in the c17 stdout command Break address Output ...

Page 508: ... the input buffer and at the position where gdb outputs data from the output buffer Input position global READ_FLASH READ_FLASH Output position global WRITE_FLASH WRITE_FLASH Any name can be used for the labels Use this symbol name to specify the break address when executing the c17 stdin and c17 stdout commands In the C source define these labels in the lower level write and read functions among ...

Page 509: ...th target ID_OK done ICD Initializing ID_INITIALIZE done Read ICD Version ID_VER_READ done ICD hardware version 1 0 ICD software version 1 0 Debug base address ID_DATA_READ 0x000FC0 Boot address ID_DATA_READ 0x008080 Hardware break MAX 4 Target file is pointer24 gdb load Load flash routines Use the routines loaded here to erase data from or write data to flash memory 2 Setting flash memory c17 fls...

Page 510: ...ash writer function Erasing programs data c17 fwe command The c17 fwe command erases the data erase write program or write data and address information loaded in the S5U1C17001H Example 1 To erase write data gdb c17 fwe 0 Example 2 To erase the data erase write program gdb c17 fwe 1 loading a program c17 fwlp command The c17 fwlp command loads the data erase write program from the host in the ICD ...

Page 511: ...ded in the ICD Mini S5U1C17001H and information about the erase write program gdb c17 fwd CPU data address xxxxxxxx Data size xxxxxxxx Erase start block xxxxxxxx Erase end block xxxxxxxx Erase parameter xxxxxxxx Comment xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx CPU program address xxxxxxxx Program size xxxxxxxx Erase routine entry address xxxxxxxx Write routine entry address xxxxxxxx Comment xxxxxxxxxxxxxxxx...

Page 512: ...arameter Without this statement areas are assumed to be little endian However the S1C17 chip for which you are developing software must be a type that supports big endian Also note that internal ROM RAM and I O cannot be set to big endian For details about parameter files see Section 10 9 Parameter Files Operation of debugger commands Memory manipulating commands x set c17 fg fh fw c17 mvb mvh mvw...

Page 513: ...CPU reset c17 rst Reset execute reset gdb 10 89 c17 rstt Reset target 10 90 Interrupt c17 int Interrupt 10 91 c17 intclear Clear interrupt 10 92 c17 int_load Load interrupt event file 10 93 Break break Set software PC break 10 94 tbreak Set temporary software PC break 10 94 hbreak Set hardware PC break 10 97 thbreak Set temporary hardware PC break 10 97 delete Clear break by break number 10 100 cl...

Page 514: ...age will not be displayed 10 7 2 Detailed Description of Commands This chapter describes in detail each debugger command using the format shown below Command name operation of command Supported modes A detailed description of each command begins with the command name in this format Supported modes shows such modes as ICD Mini and SIM in which the command can be used You cannot use the command in m...

Page 515: ... 0xffff c17 fh 0 Data 0xffffffff c17 fw Usage example n Example 1 gdb c17 fb 0x0 0xf 0x1 Start address 0x0 End address 0xf Fill data 0x1 done gdb x 16b 0x0 memory dump command 0x0 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x8 0x01 0x01 0x01 0x01 0x01 0x01 0x01 0x01 The entire memory area from address 0x0 to address 0xf is rewritten with byte data 0x01 n Example 2 gdb c17 fh 0x0 0xf 0x1 Start address...

Page 516: ... boundary addresses by setting the 2 low order bits to 00 LSB 0 for 16 bits The following shows the actually executed command where 32 bit data addresses 0x0 to 0x8 byte data addresses 0x0 to 0xb are rewritten with data 0x00000000 gdb c17 fw 0x0 0x8 0x0 If the specified address exceeds the 24 bit range an error is assumed Data parameters are only effective for the 8 low order bits for c17 fb 16 lo...

Page 517: ...g of a line has a symbol or label defined for it the name of that symbol or label is displayed When an intermediate address of a function or variable is specified the specified symbol and a decimal offset Symbol n are also displayed Data Up to 16 bytes of data starting from Address are displayed on one line Usage example n Example 1 gdb x 0x0 0x00000000 When all parameters are omitted after startu...

Page 518: ...ing a symbol note that its data value is used as the address In such case need not be added because labels in program code indicate assigned addresses GUI The contents of memory can be confirmed in the Memory window See 10 4 5 Memory Window Notes Memory contents are displayed in little endian format However when debugging a program in simulator mode you can set a specified area to big endian forma...

Page 519: ...w i 0x0 i 0x55555555 32 bit data 0x55555555 is written to long variable i GUI Memory contents can be changed in the Memory window See 10 4 5 Memory Window Notes Writing in units of 16 bits or 32 bits is performed in little endian format However when debugging a program in simulator mode you can set a specified area to big endian format in a parameter file Even when an unused area of memory is spec...

Page 520: ...ess 0x8 done gdb x 16b 0 0x0 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x8 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 The content of a memory area specified by addresses 0x0 to 0x7 is copied to an area beginning with address 0x8 n Example 2 gdb x 4w 0 0x0 i 0x00000000 0x11111111 0x22222222 0x33333333 gdb c17 mvw i i i 4 Start address 0x0 End address 0x0 Destination address 0x4 done gdb x 4w 0 0x0 i 0x0...

Page 521: ...ginning with the end address Therefore data is always copied even when the specified destination address exists within the source area If the end address at the destination exceeds 0xffffff data is only copied only up to 0xffffff Even when memory contents are modified by this command the contents displayed in the Memory and Source windows are not updated Therefore perform the appropriate operation...

Page 522: ...ed Conditions 0 StartAddr EndAddr 0xffffff Usage example n Example 1 gdb c17 df 0x0 0xf 2 dump txt Start address 0x0 End address 0xf File type Text Processing 00000000 0000000F address Contents at addresses 0x0 0xf are written to file dump txt in text format Contents of dump txt addr 0 1 2 3 4 5 6 7 8 9 A B C D E F 00000000 00 01 02 03 04 05 06 07 00 01 02 03 04 0D 0E 0F n Example 2 gdb c17 df 0x8...

Page 523: ...s not output gdb c17 df 0x7000 0x7fff 3 dump mot f Footer is output Last The contents of addresses 0x1000 0x7fff every 0x1000 addresses are written out in Motorola S3 format to the file dump mot If no Append parameters exist or the parameter f is specified a footer record is output to a Motorola S3 format file Notes If the specified address exceeds the 24 bit range an error is assumed If the end a...

Page 524: ...ss aligned with access size The ld b instruction is used to access memory in 8 bit units The ld instruction is used to access memory in 16 bit or 32 bit units Use boundary exact mode if reading data in units of bytes every time becomes inconvenient Format c17 readmd Mode Mode Selects memory read mode 0 Normal mode default 1 Boundary exact mode Usage example gdb c17 readmd 1 Selects boundary exact ...

Page 525: ...the register value in hexadecimal Decimal Shows the register value in decimal Usage example n Example 1 gdb info reg r1 r1 0xaaaaaa 1184810 gdb info reg pc pc 0x4090 16528 When a register name is specified only the content of that register is displayed n Example 2 gdb info reg r0 0xd20 3360 r1 0xaaaaaa 1184810 r2 0xaaaaaa 1184810 r3 0xaaaaaa 1184810 r4 0x690 1680 r5 0xaaaaaa 1184810 r6 0x0 0 r7 0x...

Page 526: ...c main In addition to numerals symbols can also be used to set values GUI Register contents can also be modified in the Registers window See 10 4 4 Registers Window Notes If the specified value exceeds the 24 bit range the 24 low order bits only will be effective The contents of the set values are not checked internally No errors are assumed even when values other than 16 bit or 32 bit boundary ad...

Page 527: ...st time break conditions are met n Example 2 gdb cont 5 Will ignore next 4 crossings of breakpoint 1 Continuing Breakpoint 1 main at main c 13 Because value 5 is specified for IgnoreCount break conditions that have been met four times 5 1 since the program started running are ignored and the program breaks when break conditions are met the fifth time In this example the target program is restarted...

Page 528: ...nditions are met If IgnoreCount is specified while the target program has never been made to break once the specification is ignored If the target program has been halted by one cause of a break and the continue command is executed with IgnoreCount specified after clearing that break setting an error is assumed The same applies when other break conditions have been set If break conditions other th...

Page 529: ...specified by a function name The program breaks before executing the first C instruction in main that is expanded to mnemonic The PC on which the program has stopped displays the start address of that instruction i e address of first mnemonic expanded n Example 2 gdb until main c 10 main at main c 10 The target program is run with a temporary break specified by line number Although the breakpoint ...

Page 530: ...beginning execute c17 rst reset before the until command If the location set as a temporary breakpoint is a C source line that does not expand to mnemonic the program does not break at that line The program breaks at the address of the first mnemonic executed thereafter No temporary breakpoints can be set on the following lines because an error is assumed Extended instruction lines except for the ...

Page 531: ...t Number of steps to execute decimal or hexadecimal One step is assumed if omitted Conditions 1 Count 0x7fffffff Usage example n Example 1 gdb step The source line displayed on the current PC is executed n Example 2 gdb stepi The instruction in mnemonic units is executed at the address displayed on the current PC n Example 3 gdb step 10 sub k 5 at main c 20 Ten lines are executed from the source l...

Page 532: ...time one step is executed The Memory window is not updated Notes The program cannot be single stepped from an address that does not have source information i e debugging information included in the object The program can be run continuously however by using the continue command To run the program from the beginning execute c17 rst reset before step or stepi Even with stepi ext based extended instr...

Page 533: ...a number of steps to execute can also be specified However even before all specified steps are completed the program may be halted by one of the following causes Already set break conditions are met The Stop button is clicked Format next Count nexti Count Count Number of steps to execute decimal or hexadecimal One step is assumed if omitted Conditions 1 Count 0x7fffffff Usage example n Example 1 g...

Page 534: ...is single stepped using the method above information about the line executed appears in the Console window and is also output to a log file at log output While the next or nexti command executes the target program the contents displayed in the Source and Registers windows are updated each time one step is executed The Memory window is not updated Notes The program cannot be single stepped from an ...

Page 535: ...finish The target program is executed from the current PC address and halted after a return GUI The finish command can also be executed using one of the methods below Click the Finish button in the Source window Finish button Choose Finish from the Control menu in the Source window Enter f F while the Source window is open While the finish command is executing the target program the contents displ...

Page 536: ...sole window default 2 Write to a file 3 Display in the Console window and write to a file Filename Output file name not effective when Mode 1 Usage example gdb c17 callmd 2 call txt The execution results of the c17 call command to be executed are written to file call txt Notes When mode 2 file is selected as the output destination a file is created in the current directory during c17 call command ...

Page 537: ... passed from the function and displays internal data of the packet in the Console window or directly writes it to a file in its original form The c17 callmd command specifies the output destination The default output destination is the Console window The following shows the configuration of the packet returned by a user function data size 4 bytes data A packet must always start from a 4 byte bound...

Page 538: ...x0 r5 ld sp 0x2 r4 Xcall iprint_data enter C program return r0 message buffer address add a sp 4 ld a r6 r0 ld a r0 sp restore debug ram start address ld a r0 r6 set r0 message address to WBUF data1 ld a r1 sp restore return address ld a r7 sp restore SP ld a sp r7 jpa r1 back to mini monitor User function include stdio h void iprint_data long arg1 long arg2 long arg3 struct long size char buf 0x1...

Page 539: ... the Source window redisplays the program beginning with that address The Registers window reappears with the same settings as 1 Format c17 rst Usage example gdb c17 rst The CPU is reset GUI The c17 rst command can also be executed using one of the methods below Click the Reset button in the Source window Reset button Choose Reset from the Reset menu in the Source window The above menu command but...

Page 540: ... reset target ICD Mini Operation Outputs the reset signal to the reset input pin on the target board Format c17 rstt Usage example gdb c17 rstt The target is reset Notes The c17 rstt command can only be used in ICD Mini mode To execute this command a reset input pin is required on the target board ...

Page 541: ...rrupt priority level decimal hexadecimal or symbol Conditions 0 No 0x1f 0 Level 7 Usage example n Example 1 gdb c17 int If no parameters are specified an NMI is generated n Example 2 gdb c17 int 3 6 Any maskable interrupt number and its priority level can be set Notes The c17 int command can only be used in simulator mode Make sure the interrupt number is specified from 0 to 31 If this range is ex...

Page 542: ...interrupt number is cleared Format c17 intclear No No Interrupt number decimal hexadecimal or symbol Conditions 0 No 0x1f Usage example gdb c17 int 3 6 gdb continue gdb c17 intclear 3 Cancels the interrupt of interrupt number 3 Notes The c17 intclear command can only be used in simulator mode Make sure the interrupt number is specified from 0 to 31 If this range is exceeded an error is assumed ...

Page 543: ... be written on the right of each event line Format c17 int_load Filename Filename Interrupt event file name Usage example gdb c17 int_load event txt Loads the interrupt event file event txt Example of event file 009002_0_1_10_3_0 An interrupt of which the interrupt vector number 0x10 and interrupt level 3 occurs when PC 0x9002 009f02_0_0_00_0_1 A reset exception occurs when PC 0x9f02 004030_1_1_1c...

Page 544: ...Breakpoint 1 main at main c 10 A software PC breakpoint is set at the position specified using a function name When the target program is run it breaks before executing the first C instruction expanded to mnemonic in main The PC on which the program has stopped displays the start address of that instruction i e address of first mnemonic expanded n Example 2 gdb tbreak main c 10 Breakpoint 1 at 0xc...

Page 545: ...reakpoint at an address display the file in ASSEMBLY or MIX mode 2 The lines at which breakpoints can be set are marked by a bar at the beginning of the line Move the cursor near the beginning of a line at which you wish to set a breakpoint The cursor will change shape to a circle white Click the mouse button there The mark at the beginning of the line will change to n in red by default indicating...

Page 546: ...oftware PC breakpoints are specified using a nonexistent function name or line number an error is assumed When specifying a software PC breakpoint by an address value the specified address will be adjusted to the 16 bit boundary by assuming LSB 0 if it is an odd value Furthermore an error occurs if the specified address exceeds the 24 bit range Software PC breaks are implemented by an embedded brk...

Page 547: ...er of the hardware PC breakpoints is determined by whether 1 write and 1 read are permitted for each IBEx bit You cannot write 1 for an unimplemented break number 1 write 0 read 0xffffa0 D0 DM D1 SE D2 IBE0 D3 IBE1 D4 DR D5 IBE2 Add D6 IBE3 Add D7 IBE4 Add 0xffffb0 IBAR0 0xffffb4 IBAR1 0xffffb8 IBAR2 Add 0xffffbc IBAR3 Add 0xffffd0 IBAR4 Add Format hbreak Breakpoint thbreak Breakpoint Breakpoint B...

Page 548: ...o be used as shown below gdb thbreak main Hardware assisted breakpoint 3 at 0xc0001c file main c line 7 Note that adding an asterisk causes even a function name to be regarded as an address Breakpoint management The breakpoints you set are sequentially assigned break numbers beginning with 1 regardless of which types of breaks you set and are displayed as a message in the Console window when you e...

Page 549: ... line sets a hardware PC breakpoint at the address of the first instruction to be executed next If a function name or the beginning C source line in a function is specified as the position at which to set a hardware PC breakpoint the program execution will break at the start address of the first C source i e instruction to be expanded to mnemonic in the function Although a ld instruction to save r...

Page 550: ...re PC breakpoints and hardware PC breakpoints can be deleted using one of the methods below Temporary hardware PC breakpoints cannot be deleted Deletion method 1 Display the source containing the set breakpoint you wish to delete in the Source window The source lines with set breakpoints are marked by n at the beginning red for normal software PC breakpoints orange for temporary software PC breakp...

Page 551: ...l menu to delete all breakpoints For details see Section 10 4 6 Breakpoints Window Notes Break numbers are sequentially assigned to each breakpoint you set beginning with 1 If you do not know the break number of a breakpoint you wish to delete use the info breakpoints command to confirm as in the example above The delete command clears all break settings To disable a breakpoint temporarily use the...

Page 552: ...bers 3 and 4 are at different addresses the breakpoints are set on one line in terms of the C source This applies when breakpoints are set at addresses displayed in ASSEMBLY mode n Example 1 gdb clear main c 22 Deleted breakpoints 4 3 gdb info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 0x00c0001e in main at main c 10 2 breakpoint keep y 0x00c00038 in sub at main c 20 When you s...

Page 553: ...e Even if you click on n at the beginning of the source line while the Source window is displayed in SOURCE mode the mark does not change to To delete all breakpoints set on a given source line you must click as many times as the number of breakpoints there At this time the breakpoints are deleted in order of ascending addresses For display in ASSEMBLY or MIX mode you can confirm each breakpoint i...

Page 554: ...e in main at main c 10 3 breakpoint keep y 0x00c00028 in main at main c 13 4 breakpoint keep y 0x00c00038 in sub at main c 20 Let s assume that breakpoints have been set as shown above The effective breakpoints are marked by y in the Enb column n Example 1 gdb disable 1 3 gdb info breakpoints Num Type Disp Enb Address What 1 breakpoint keep n 0x00c0001c in main at main c 7 2 breakpoint keep y 0x00...

Page 555: ...ne will be disabled when effective or enabled when ineffective For display in ASSEMBLY or MIX mode you can confirm each breakpoint individually as you disable or enable the breakpoint The color of mark n representing a breakpoint red orange or blue by default can be changed to any desired color in the Source Preferences dialog box that appears by choosing Source from the Preferences menu in the So...

Page 556: ...k 1 at main c 22 gdb continue Continuing Breakpoint 2 main at main c 14 Although the target program passes through the breakpoint twice as it is run twice by continue above no break occurs A break occurs when running the program a third time because the breakpoint is reenabled Notes Break numbers are sequentially assigned to each breakpoint when set beginning with 1 If you do not know the break nu...

Page 557: ...kpoint will not be deleted del The breakpoint will be deleted This means that the breakpoint is a temporary break Enb Indicates whether the breakpoint is effective or ineffective y Effective n Ineffective Address Indicates the address at which a breakpoint is set in hexadecimal What Indicates the location where a breakpoint is set This information is displayed in in function name at source file na...

Page 558: ...ified Default setting at starting up of the debugger Usage example n Example 1 gdb c17 timebrk 1000 timer break on 1000 ms gdb cont Continuing A forcible break will occur after 1 second from starting the program execution n Example 2 gdb c17 timebrk 0 timer break off The lapse of time break is disabled Notes This command cannot be used in simulator mode When a break time has been set once the laps...

Page 559: ...ak Format c17 hbreakmd Mode Mode on Hardware breakpoint is set by left clicking off Software breakpoint is set by left clicking default Usage example Left click is set for software break immediately after debugger startup gdb c17 hbreakmd on Hereafter left click results in a hardware break gdb c17 hbreakmd off Hereafter right click results in a software break Note Even if this command is executed ...

Page 560: ...le break main c 50 break 0x80a2 break sub5 c17 savebreak When an address or symbol name is specified it is converted into a source file name and line number before the data is stored main c 50 Source file name main c Line number 50 0x80a2 Source file name sub c Line number 20 sub5 Source file name sub5 c Line number 15 Saved breakpoints Software break Temporary software break Hardware break Tempor...

Page 561: ...is already set at the same location 6 If the number of software breaks exceeds 200 7 If the number of set valid hardware breaks exceeds the maximum number varies from 1 to 4 depending on the model 8 If a software break is set in the ROM in ICD mode 9 If the setting is made at a location other than a parameter file in the SIM mode If the setting is made in a C source line that is not expanded to mn...

Page 562: ...4b 0x100 break main continue x 4b sub end gdb continue Continuing Breakpoint 1 boot at boot s 16 0x100 0xaa 0xaa 0xaa 0xaa Breakpoint 2 at 0x632 file main c line 18 Breakpoint 2 main at main c 18 Current language auto currentry c 0x658 sub 0x00 0x40 0x25 0x18 gdb Notes An error will be generated if a nonexistent numeric value is specified as a break number If the break number is omitted the number...

Page 563: ...yed along with symbol content n Example 2 gdb info var All defined variables File main c int i Non debugging symbols 0x00000000 __START_bss 0x00000004 __END_bss 0x00000004 __END_data 0x00000004 __START_data All defined global and static variables are displayed in list form separately for each source file Displayed under the heading Non debugging symbols are such global symbols as section symbols d...

Page 564: ...b info local j 5 Note that specifying a value changes the variable value to that specified GUI The values of local symbols can be altered in the Local Variables window 1 Choose a symbol whose value you wish to alter from the symbol list in the Local Variables window then choose Edit from the Variable menu or double click the symbol value displayed 2 The symbol value is placed in edit mode so enter...

Page 565: ...except when the program is written to target ROM you cannot start debugging by simply executing the file command The file command must be executed before the target and load commands The following shows the basic sequence of command execution gdb c17 rpf sample par sets map information gdb file sample elf this command gdb target sim connects the target gdb load loads the program gdb c17 rst resets...

Page 566: ...by the file command into target memory computer memory in this example because the debugger operates in simulator mode Notes The load command must be executed after the file and target commands The following shows the basic sequence of command execution gdb c17 rpf sample par sets map information gdb file sample elf loads debugging information gdb target sim connects the target gdb load this comma...

Page 567: ...en the load command is executed Format c17 loadmd Mode Mode Transfer mode 0 High speed byte transfer mode default 1 Low speed byte transfer mode Usage example gdb file sample elf gdb target icd usb gdb c17 loadmd 0 gdb load The program and data are loaded from sample elf located in the current directory specified by the file command into the target memory using high speed 8 bit instructions Notes ...

Page 568: ...command gdb file sample elf loads debugging information gdb target sim connects the target gdb load loads the program gdb c17 rst resets the CPU To reset memory map information quit the debugger temporary then restart it and execute the c17 rpf command The debugger allocates a PC memory area according to the memory map information in the parameter file loaded If a required area cannot be allocated...

Page 569: ...the range of memory addresses to which the device is allocated start address end address of the area in hexadecimal Type Indicates the type of memory or device Wait r w Indicates the number of wait cycles inserted during read write operation Size Indicates the data width of the device in bits Endian Indicates the endian format little or big endian of the area When memory map information has yet to...

Page 570: ...r symbol WritePrg Start address of write program decimal hexadecimal or symbol Conditions 0 StartAddr EndAddr 0xffffff 0 ErasePrg 0xffffff 0 WritePrg 0xffffff Usage example gdb c17 fls 0x200000 0x2fffff FLASH_ERASE FLASH_LOAD Flash start address 0x200000 Flash end address 0x2fffff Flash erase routine address 0x100 Flash write routine address 0x200 done The flash memory area in the target system 0x...

Page 571: ...0000 0 0 Control Register 0x200000 Start block 0x0 End block 0x0 Finish with 0x00000000 The entire area of flash memory is erased Notes This command cannot be used in simulator mode Before you can erase flash memory of the target system you must have written the data write and erase programs to the target system memory and executed the c17 fls command If you execute the c17 fle command with no era...

Page 572: ...r Bit 1 Clock number Bit 2 PC value and instruction code Bit 3 Bus information address R W and access size data Bit 4 Register values R0 R7 SP Bit 5 PSR value IE IL CVZN Bit 6 Disassembled contents and source code Bit 7 Cumulative number of clocks number of clocks spent by each instruction when set to 0 Filename Name of file to which trace information is output When a file name is specified sample...

Page 573: ... 000000 000000 000000 000000 653 1446 0040de 4000 000094 000000 000000 00ffff 000000 000000 000000 000000 654 1447 0040e0 4000 000094 000000 000000 00ffff 000000 000000 000000 000000 655 1449 0040e2 d900 000000 w16 00000000 000094 000000 000000 00ffff 000000 000000 000000 000000 656 1450 0040e4 2a12 000094 000000 000000 00ffff 000000 000000 000000 000000 657 1451 0040e6 2814 000000 000000 000000 0...

Page 574: ...splayed in a window is calculated using the wait cycles information set in a parameter file The information displayed may not be correct if the parameter file was set erroneously For details see Section 10 9 Parameter Files To change trace mode with contents of trace information displayed temporarily turn off trace mode by executing c17 tm off then set a new trace mode ...

Page 575: ...e program continuously after making this setting the debugger aborts processing at the position of the READ_FLASH label in the program Here the debugger takes one line of data from the input txt file and places it in the input buffer READ_BUF then resumes program execution n Example 2 gdb c17 stdin 1 READ_FLASH READ_BUF Data entered via the Simulated I O window is set When you run the program cont...

Page 576: ...s set When you run the program continuously after making this setting the debugger aborts processing at the position of the label WRITE_FLASH in the program Here the debugger outputs data from a specified buffer WRITE_BUF to a specified file then resumes program execution n Example 2 gdb c17 stdout 1 WRITE_FLASH WRITE_BUF Data output to the Simulated I O window is set When you run the program cont...

Page 577: ...and the address information in the S5U1C17001H are erased n Example 2 gdb c17 fwe 1 The storage area for the flash erase write program and the entry information in the S5U1C17001H are erased Notes This command cannot be used in simulator mode This command can be used with the ICD Mini S5U1C17001H It cannot be executed normally with the ICD board an error message will not be displayed Some models d...

Page 578: ...in decimal or hexadecimal Comment Comments to identify data address information may be omitted Conditions 0 EraseEntryAddr 0xfffffe A0 0 0 WriteEntryAddr 0xfffffe A0 0 0 comment size 128 bytes Usage example gdb c17 fwlp writer sa 0x90 0xb4 The data erase write program for the flash writer prepared in file writer sa is loaded in the S5U1C17001H and start addresses of the erase and write routines ar...

Page 579: ...on may be omitted Conditions 0 EraseStartBlock 0xffffffff 0 EraseEndBlock 0xffffffff If EraseStartBlock EraseEndBlock 0 all blocks in flash memory are assumed to be erased 0 comment size 128 bytes Usage example gdb c17 fwld sample sa 0 0 0x200000 The range of flash memory to be erased all blocks in flash memory is set and the flash write data prepared in file sample sa is loaded in the S5U1C17001H...

Page 580: ...erasing flash on the CPU side in decimal or hexadecimal EraseParam Erase parameter A parameter passed to the erase routine in an external routine call Comment Comments to identify data address information may be omitted Conditions 0 SourceAddr 0xfffffe A0 0 0 Size 0xfffffe D0 0 0 EraseStartBlock 0xffffffff 0 EraseEndBlock 0xffffffff When EraseStartBlock EraseEndBlock 0 all blocks in flash memory a...

Page 581: ...m address xxxxxxxx Program size xxxxxxxx Erase routine entry address xxxxxxxx Write routine entry address xxxxxxxx Comment xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Information about the address and size of flash write data and range of flash memory to be erased are displayed in the first half as set by the c17 fwld or c17 fwdc command Information about the start address and size of the flash erase write pro...

Page 582: ...this is disabled Profiler mode is disabled is displayed If this is enabled Profiler mode is enabled is displayed For two or more parameters C17 command error number of parameters is displayed If a parameter other than 0 or 1 is added C17 command error invalid parameter is displayed Usage example gdb c17 profilemd 0 Profiler mode is disabled gdb c17 profilemd 1 Profiler mode is enabled gdb c17 prof...

Page 583: ...nt Measurement starts Break Measurement ends gdb c17 profile Profiler window opens Notes In SIM mode this command opens a profiler window If the execution cycle count is 0 measurement results are not displayed Measurement results are displayed if the execution cycle count is larger than 0 This command generates an error in ICD mode If a profiler window is already open executing this command will n...

Page 584: ... gdb cont Measurement starts Break Measurement ends gdb c17 coverage Coverage window opens Notes In SIM mode this command opens a coverage window If the execution cycle count is 0 measurement results are not displayed Measurement results are displayed if the execution cycle count is larger than 0 This command generates an error in ICD mode If a coverage window is already open executing this comman...

Page 585: ... octal and binary Once the format is changed the setting will be stored in memory output radix key in global section of gdbtk ini When the GDB is started up the next time variables will be displayed in the previously set format Note that the display format will not change if the variable has a floating decimal point or pointer Format set output radix Type Type Display format 16 Hexadecimal 10 Deci...

Page 586: ...tput to log txt in text format Log output remains on until the c17 log command is subsequently executed n Example 2 gdb c17 log log off The log file is closed and log output terminated Notes If an existing file name is specified the c17 log command overwrites the file To change the destination of log output to another file terminate log output temporarily and specify a new file name before restart...

Page 587: ...gdb load cygdrive c EPSON gnu17 sample tst sample elf Loading section text size 0xbc lma 0xc00000 Start address 0xc00000 Transfer rate 1504 bits in 1 sec gdb gdb c17 rst CPU resetting done A specified command file is loaded and the commands contained in it are executed successively The commands are displayed in the Console window as shown in the example above GUI Choose Source from the File menu i...

Page 588: ...ure a short execution time e g when instructions are executed for three microseconds or less In simulator mode the counter value is displayed as the number of cycles For details about the execution counter see Measuring the execution cycles execution time in Section 10 6 5 Executing the Program Format c17 clockmd Mode sets execution counter mode c17 clock displays execution counter Mode Counter mo...

Page 589: ...n cumulating mode Notes In ICD Mini mode the continue until command must be executed before this command becomes effective In simulator mode this command is always effective The c17 clock command cannot display execution times while the lapse of time break c17 timebrk is enabled Disable the lapse of time break c17 timebrk 0 to measure execution times The execution counter is reset in the following...

Page 590: ...USB The debugger must be started up with the c17_double_starting specified and use target icd usb2 to connect the debugger This allows you to start two debuggers with a single PC sim Simulator started in simulator mode Usage example n Example 1 gdb target sim Connected to the simulator The debugger is set to simulator mode n Example 2 gdb target icd usb The debugger is set to ICD Mini mode Notes W...

Page 591: ...sed to communicate with the target and exits the current connect mode Format detach Usage example gdb target icd usb Debug gdb detach ICD Mini mode is exited Notes This command can be used to turn the ICD off to switch between simulator mode and other modes or perform operations on the target board You need not execute this command to terminate debugging ...

Page 592: ...changes the current directory Directory Character string used to specify a directory Usage example gdb pwd Working directory cygdrive c EPSON gnu17 sample tst gdb cd cygdrive c EPSON gnu17 sample ansilib Working directory cygdrive c EPSON gnu17 sample ansilib After the current directory is confirmed it is changed to c EPSON gnu17 sample ansilib Notes A drive name must be specified in cygdrive driv...

Page 593: ...ore the target command must be executed before this command can be used After the firmware has been updated close gdb and turn the ICD off and on again Format c17 firmupdate Filename Filename Name of firmware file Motorola S3 format file Usage example gdb target icd usb gdb c17 firmupdate icd17dmt sa Loads the firmware file icd17dmt sa and updates the ICD firmware with the loaded contents Notes Th...

Page 594: ...presented by TTBR is set to the PC This command has the same function as the TTBR line written in the parameter file Format c17 ttbr Address Address Address to be set to TTBR decimal hexadecimal or symbol Conditions 0 Address 0xffff00 The eight low order bits of Address must be 0x00 Usage example gdb c17 ttbr 0x8000 Sets address 0x8000 to TTBR Notes The c17 ttbr command can be used only in simulat...

Page 595: ...roup 8 map c17 rpf c17 map c17 memwait c17 ttbr group 9 flash memory c17 fls c17 fle group 10 trace c17 tm group 11 simulated I O c17 stdin c17 stdout group 12 flash writer c17 fwe c17 fwlp c17 fwld c17 fwdc c17 fwd group 13 others c17 log source c17 clockmd c17 clock c17 firmupdate ta rget detach set output radix pwd cd c17 help quit Please type c17 help 1 to show group 1 or type c17 help c17 fb ...

Page 596: ...name including c17 Notes Executing the help command that comes standard with gnu instead of the c17 help command displays help for the command classes and commands set in the gnu debuggers This debugger does not support all of these command classes or commands Note that device operation cannot be guaranteed for commands not described in this manual A mode list e g ICD SIM appears in the usage disp...

Page 597: ...Watch Window Name Value main int 0x12c main Function name i 0x1234 int type variable szBuf unsigned long 10 Array Then the symbol names below are stored main i szBuf Each time this command is executed the contents stored by the gdb debugger are updated This command will generate errors unless the target command is executed Error message C17 command error command is not supported at present mode Th...

Page 598: ...ssage C17 command error command is not supported at present mode The symbols are not registered in the following cases 1 The Watch Window is closed 2 There are no symbols 3 The symbols are local and not included in the functions for the current PC 4 The same symbols are already registered 5 The file command has not been executed 6 The current path does not include watch gcb If the c17 savewatch co...

Page 599: ...ugger ICD Mini SIM Operation Terminates the debugger Any ports or files used by the debugger that remain open are closed Format quit q abbreviated form Usage example gdb q GUI You also can choose Exit from the File menu in the Source window or click the Close box in the Source window to quit the debugger ...

Page 600: ...t data described in 1 and for comparing data and showing comparison results To execute this tool run the gdb c17 profile command click the profile button or select Profile from the View menu Executable filename gnuProf exe Input file Profiler measurement data file prf Storage file for profiler measurement data file paths c17_profile_path gdb Output file Profiler measurement data file prf Display r...

Page 601: ...ler window Displays the number of cycles excluding those corresponding to functions and their child functions Displays the number of cycles including those corresponding to functions and their child functions Compares two measurement results and displays the differences in cycle count and code size for each function Sorts and displays specified items Reads out a profiler measurement data file Save...

Page 602: ...pen a profiler window The profiler window displays measurement data if any If no measurement data is found the error message No profiling data is displayed In this case you can open a profile window no data display by clicking the OK button The profiler window closes when GDB ends Comparison result state When the list shows comparison results this section indicates COMPARISON RESULT Otherwise this...

Page 603: ...ycles excluding those corresponding to child functions default load Profile button Opens the file dialog box and loads a profiler measurement data file Save Profile button Opens the file dialog box and saves profile information to a profiler measurement data file Even if the information after comparison is displayed this will save the data originally loaded Save result button Opens the file dialog...

Page 604: ...ave result button 1 Example of output generated when text is selected Profile result Total cycle Ratio Call Average cycle Size Name 17 10 43 1 17 00 40 boot 51 31 29 1 51 00 44 main 23 14 11 1 23 00 40 sub main c 27 16 56 1 27 00 38 sub2 main c 45 27 61 3 15 00 30 sub3 main c 0 0 00 0 0 00 30 sub4 main c 163 100 00 7 222 TOTAL 2 Example of output generated when csv is selected Total cycle Ratio Ca...

Page 605: ...ement data if any If no measurement data is found the error message No profiling data is displayed In this case you can open a coverage window no data display by clicking the OK button The coverage window closes when the GDB ends Merging result state When the list shows merging results this section indicates MERGING RESULT Otherwise this section is blank Function coverage display section Address c...

Page 606: ...isplayed this will save the data originally loaded Save result button Opens the file dialog box and stores the displayed data Data can be stored in text file format default or csv file format reload button If the window currently displays merging results click this button to return the display to the one in place immediately after the window was launched or after data was loaded Merge button Merge...

Page 607: ...ub2 main c 30 30 100 00 0006A6 0006C4 sub3 main c 180 192 93 75 TOTAL Address Coverage result Address Count 000604 00061F 1 00062C 0006A5 1 0006A6 0006C3 3 2 When csv is selected Function Coverage result Fetched Size Ratio Start End Name 28 40 70 00 0x000604 0x00062C boot 44 44 100 00 0x00062C 0x000658 main 40 40 100 00 0x000658 0x000680 sub main c 38 38 100 00 0x000680 0x0006A6 sub2 main c 30 30 ...

Page 608: ...the PC Version mismatch The version of the profiler measurement data file is not supported The tool version differs from the version used to create the measurement data Program called too many functions The program called more than 10 000 different functions Program called too deep functions The program made more than 10 000 deep calls as viewed from the top function Cycle counter was overflowed T...

Page 609: ...ogram once more after executing the c17 profilemd 1 command in break mode The measurement range can be from RESET boot address to the address at which a break occurs It is not possible to perform measurements in a range from a specific address to the address at which a break occurs However measurement will continue until the subsequent break even if Go is executed again without changing PC after a...

Page 610: ...ommands The following shows the basic sequence of command execution gdb c17 rpf sample par sets map information gdb file sample elf loads debugging information gdb target sim connects the target gdb load loads the program gdb c17 rst resets the CPU How to create a parameter file You can create parameter files by selecting GNU17 Parameter Settings from the Properties dialog box of the IDE For detai...

Page 611: ...ive in simulator mode However internal ROM RAM and I O cannot be set to big endian format When this entry is omitted this parameter is processed as little endian In ICD Mini mode this parameter is ignored Comment A comment beginning with a can be described in each line However required parameters must be described before writing a comment Notes Items Device StartAddr and EndAddr in memory map info...

Page 612: ...tor mode If the target sim command is executed without executing the c17 rpf command the simulation memory is reserved assuming that the RAM is mapped to the area from address 0x0 to address 0xffffff 16MB In this case the initial value of memory is 0x00 The TTBR address is set to 0x100000 The following map breaks do not work 1 Break by write operation to ROM area 2 Access to an undefined area 3 St...

Page 613: ...cannot be executed in the current connect mode ICD Mini or simulator mode C17 command error command is too long The input command exceeds 256 characters in length C17 command error invalid command The command is erroneous C17 command error invalid parameter The command is specified with an invalid parameter C17 command error number of parameter The number of command parameters is incorrect C17 com...

Page 614: ...t connected with a target The ICD and target cannot be connected It is not c17 architecture ELF file The file specified with the file command is not an elf format file supported in S5U1C17001C Load end address max 0x overflow The end address of the program to be written to flash memory exceeds the upper limit 0xffffff Load max address 0x overflow The address to be loaded exceeds the maximum value ...

Page 615: ... port inputs 2 Sets supply voltage level to evaluate the SVD operation 3 Simulates LCD panel display by the LCD driver built into a target model The number of ports and whether with or without SVD will be determined by the model The ES Sim window shown below is used for all operations and display Control window select tab Control window LCD window ES Sim window sample for S1C17701 The ES Sim17 can...

Page 616: ...e name essim17 ini fixed Description This is the file created in the project folder if you selected a CPU model compatible with ES Sim17 when creating the project This file contains the hardware configuration for the target model to be simulated in the ES Sim17 Note Do not modify this file as the ES Sim17 may not run normally User setting file File format Text file File name essim17_user ini fixed...

Page 617: ... filename lcd Description This is an LCD panel setting file for ES Sim17 created by LcdUtil17 ES Sim17 can simulate dot matrix and segment LCDs Output file lCD screen capture bitmap file File format Bitmap file File name filename bmp Description This is a bitmap file that contains an LCD screen image simulated and can be generated by the ES Sim17 ...

Page 618: ... is executed When the ES Sim17 starts up the ES Sim window appears Terminating ES Sim17 The ES Sim17 terminates in the following two cases 1 When the detach command is executed in the debugger 2 When the debugger is terminated Opening closing the ES Sim window The ES Sim window can be closed by clicking the Close button This operation does not terminate the ES Sim17 To reopen the window execute es...

Page 619: ...ily Ver 1 5 0 10 DEBUggEr 10 11 3 Menus file menu Load lcd file Open an LCD file lcd created in LCDUtil17 For information on LCDUtil17 and LCD files see Section 11 11 LCDUtil17 LCD Panel Customizing Tool Help menu About EssWnd Shows ES Sim Window version information ...

Page 620: ... select check boxes for the ports configured as general purpose input becomes effective and are used to set input levels When you change the input level in the window the ES Sim17 updates the input data register in the emulation memory through the debugger The port data buttons and simultaneous input ports select check boxes for the ports configured as a general purpose output are grayed out to di...

Page 621: ... regardless of whether its tab page is displayed or not Even if multiple ports are selected with the simultaneous input ports select check boxes the port data button can be used to control each port individually Port output status When a port changes its output level by executing the program in the debugger the output status is reflected to the display of the port data button immediately The port ...

Page 622: ...an be set within 16 steps from 0 low to 15 high using the voltage level setting buttons The number of voltage levels is equivalent to the number of valid SVD compare voltages supported in the target model The number of available levels may be changed depending on the model Clicking the button changes the current voltage level and voltage indicator bar At the same time the compare voltage set in th...

Page 623: ...ted to this window Saving lCD screen The screen image being currently displayed in the LCD window can be saved to a bitmap file bmp Click the LCD capture button when the screen you want to capture is displayed When the file save dialog box appears select the directory and enter the file name you want to save The screen data is captured at the point the LCD capture button is clicked and the LCD win...

Page 624: ...h file Please confirm the file is fitting with the CPU type or the file is existing The Lcd file could not be opened 10 11 8 restrictions The ES Sim17 supports the model shown below S1C17701 S1C17702 S1C17704 S1C17602 S1C17001 The ES Slim17 supports monochrome dot matrix LCD and monochrome segment LCD panels as external devices The dot size contrast and panel color of the LCD window are different ...

Page 625: ...10 174 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 10 DEBUggEr THIS PAGE IS BLANK ...

Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...

Page 627: ......

Page 628: ... necessary tools to update the files to the latest version For example if only one source file is corrected after the make process is completed once the make executes compilation and or assembly only for that file For other modules the make skips compilation and or assembly processes for the source files and processes the object files from the linkage stage The make exe in this package is based on...

Page 629: ...file named makefile is input as the make file Target name Specify the target name a label that indicates a command location for the command to be executed If this specification is omitted the first target that appears in the make file is executed A make file created by the IDE contains a target name clean used to delete the files generated during make processing Example make f test mak clean When ...

Page 630: ..._DIR objdump OBJCOPY TOOL_DIR objcopy MOTO2FF TOOL_DIR moto2ff SCONV TOOL_DIR sconv32 VECCHECKER TOOL_DIR vecChecker macro definitions for tool flags CFLAGS B TOOL_DIR gstabs S O1 I TOOL_DIR include fno builtin Wall ASFLAGS B TOOL_DIR c xassembler with cpp Wa gstabs ASFLAGS_CC LDFLAGS Map sample map N T sample_gnu17IDE lds EXTFLAGS Wa mc17_ext Wa TARGET dump Wa TARGET map EXTFLAGS_CC mc17_ext TARG...

Page 631: ...JCOPYFLAGS TARGET sa MOTO2FF MOTOSTART MOTOSIZE TARGET sa SCONV SCONVFLAGS TARGET saf TARGET psa cmd c echo Finished building target TARGET elf OBJS sample_gnu17IDE mak sample_gnu17IDE lds ifeq PASS 1pass 1pass linking LD LDFLAGS o OBJS OBJLDS else 1pass linking LD LDFLAGS o OBJS OBJLDS 2 lderr if s lderr then cmd c type lderr RM f TARGET elf exit 1 else RM f lderr fi OBJDUMP OBJDUMPFLAGS TARGET d...

Page 632: ...g target boot s boot o boot s AS ASFLAGS o DEPCMD_AS lib c lib o lib c lib ext0 CC CFLAGS o o ext0 AS_CC ASFLAGS_CC o o ext0 DEPCMD_CC main c main o main c main ext0 CC CFLAGS o o ext0 AS_CC ASFLAGS_CC o o ext0 DEPCMD_CC sys c sys o sys c sys ext0 CC CFLAGS o o ext0 AS_CC ASFLAGS_CC o o ext0 DEPCMD_CC dependecies for assembled c source files lib ext0 lib c main ext0 main c sys ext0 sys c include d...

Page 633: ...ygdrive c EPSON gnu17 sample tst boot s as o boot o c EPSON gnu17 sample tst boot s If a drive name is written in the form drive name an error will result when make is executed However when entering a command line for Windows such as an assembler you can use the drive name format to write the path to be specified as a command line parameter 2 Space Make sure any spaces within a directory or file n...

Page 634: ...this line will be executed after the macro names are replaced as below cygdrive c EPSON gnu17 ld T sample lds Map sample map N o sample elf boot o main o cygdrive c EPSON gnu17 lib libc a cygdrive c EPSON gnu17 lib libgcc a Predefined macros used in the example above is a predefined macro The following three predefined macros are available Note however that they can be used only in the command lin...

Page 635: ... is specified as the target file and the input files are specified as the dependent files Example main o SRC1_DIR main c CC CFLAGS SRC1_DIR main c In this example the target file main o depends on main c If the target file main o does not exist or main c is newer than main o when the source is modified after it has been compiled the command CC CFLAGS SRC1_DIR main c compilation by xgcc is executed...

Page 636: ...with XXX The first make process for this make file is executed as follows 1 The make exe checks Dependency list A target elf that appears first in the make file 2 The dependent files boot o and main o are target files in other dependency lists so the make exe evaluates these dependency lists first If boot o or main o does not exist and the dependency list for generating it is not written in the ma...

Page 637: ... use the same file twice or more if possible Otherwise executing the command may set the time stamp of the file as a later time depending on the OS environment and the make sequence may not be processed normally Bad example vector2 o vector c cygdrive c EPSON gnu17 sed exe f comm place sed vector c vector2 c cygdrive c EPSON gnu17 xgcc B cygdrive c EPSON gnu17 c vector2 c o vector2 o This example ...

Page 638: ...t is executed not the command in the suffix definition Therefore the specific dependency list can execute a different command from others by describing the command in the normal form This is useful when executing a different function only for the specific source or when using a source located in a different directory from the other sources The following shows the dependency lists without a suffix ...

Page 639: ... o and the type of the first dependent file is c file1 o file1 c other files The command in this suffix rule will be executed in the dependency list for which the command line is omitted Example Dependency list main c main o SRC_DIR main c sub c sub o SRC_DIR sub c The suffix rule c o in the example above is applied to these two dependency lists as follows main c main o SRC_DIR main c CC CFLAGS o ...

Page 640: ...OOL_DIR rm OBJS boot o main o DEPS OBJS o d clean RM f OBJS TARGET elf TARGET map DEPS clean uses the file remove utility rm exe to delete the o files elf file and map file generated by a make process using this make file 11 1 9 invocation by sh exe If the command line in a makefile contains a shell metacharacter such as a semicolon a switching symbol a replacement symbol a quote mark an escape ch...

Page 641: ...arator Stop There is an illegal separator symbol at the line LINE in the XXX mak file The make process is terminated This error will occur if the command line in a dependency list or suffix rule begins with a character other than TAB such as a space XXX mak LINE commands commence before first target Stop A command was found before the first target definition in the line LINE in the xxx mak file Th...

Page 642: ... new file Default Unless this option is specified the contents are overwritten to the specified file if the file exists or if the file does not exist ccap creates a new file o Function Output only a file Explanation The messages of the executed command are output to a file only and not output to the console Default Unless this option is specified the messages are output to both console and file c ...

Page 643: ...er x xx Copyright C SEIKO EPSON CORP 199x Usage ccap options output file command line Options a append mode o disable console output c disable command echo e display error count Example ccap a o c console cap gcc sample c 11 2 4 Error Messages The following shows the error messages generated by ccap Table 11 2 4 1 Error messages Error message Description Error Cannot execute The specified executio...

Page 644: ... option input file name input file name Specify a object file name to be dumped Options The following startup options can be specified d Function Display disassembled contents Explanation Displays all the executable sections after disassembling the object code No source is displayed together h Function Display section information Explanation Displays the section configuration section size and addr...

Page 645: ...on text 00000000 main 0 3e5c ld a sp r4 ld a sp r4 00000002 LBB2 2 9900 ld r2 0x0 ld r2 0x0 main 4 4000 ext 0x0 6 4000 ext 0x0 8 d900 ld 0x0 r2 xld 0x0 r2 main h Display section information Displays the section configuration in the file section size and mapped address VMA and LMA stab stabstr and comment are the sections that contains debugging information The load command does not send these debu...

Page 646: ...signed int typedef complex float0 complex float typedef complex float0 complex double typedef complex float0 complex long double typedef void __builtin_va_list typedef enum False True _Bool int main 0x40a0 file main c line 10 addr 0x40a0 0x40a2 register int j 0x4 file main c line 12 addr 0x40a2 file main c line 14 addr 0x40aa file main c line 16 addr 0x40ac file main c line 14 addr 0x40b2 0x40b8 f...

Page 647: ...00402010 40a0 5c3e0099 00400040 00d9122a 14280040 D Disassembled display for all sections This option expands the display area by the d option into all sections The display format is the same as the d option G Display raw data of debugging information Displays the raw data of the debugging information Normally this information is not used Refer to the gnu documents or source codes for the display ...

Page 648: ...xt 0x0 40a8 d900 ld 0x0 r2 xld 0x0 r2 __START_bss 40b8 3e38 ld a r4 sp ld a r4 sp 40ba 0120 ret ret 11 3 5 Error Message The following shows the error message generated by objdump Table 11 3 5 1 Error message Error message Description cygdrive X path to objdump objdump filename File format not recognized An unrecognized file filename is specified Specify an elf format file 11 3 6 Precautions The d...

Page 649: ...many functions options and file formats this section treats only the elf to HEX file conversion function Refer to the documents for the gnu utilities for details of objcopy 11 4 2 input Output files input file Object file File format Binary file in elf format File name filename elf Description An executable object file after the linkage process by the linker has been completed Output file HEX file...

Page 650: ...ecifies the Motorola format as the output file format This option must be specified together with I elf32 little O binary Function Output in binary format Explanation Specifies binary format as the output file format This option must be specified together with I elf32 little srec forceS3 Function Specify Motorola S3 format Explanation Specifies the Motorola S3 format as the output file format This...

Page 651: ...shown below C EPSON gnu17 objcopy I elf32 little O srec R SectionName srec forceS3 InputFile OutputFile Running the above command converts sections other than those specified with the R option into S3 records and generates an output file Example Extract all section data from input elf and write the data to output sa C EPSON gnu17 objcopy I elf32 little O srec srec forceS3 input elf output sa ...

Page 652: ...linker ld Refer to the documents for the gnu utilities for details of ar 11 5 2 input Output files Object file File format Binary file in elf format File name filename o Description A relocatable object file The ar can add files in this format into an archive or extract an object from an archive to generate a file in this format archive file library file File format Archive file in binary format F...

Page 653: ...laces objects in the archive with the object files with the same name If the archive does not contain objects the objects files are added at the end of the archive By specifying with modifier a or b the location in the archive where objects are added can be specified t Displays the list of objects in the archive or the list of the specified objects x Extracts objects from the archive and creates t...

Page 654: ...nc2 o mylib a func1 o func2 o func3 o func4 o func5 o func2 o is added behind the func1 o in mylib a 4 replacing objects ar rus mylib a func1 o func2 o func3 o func4 o func5 o mylib a func1 o func2 o func3 o func4 o func5 o If there are files from among func1 o func2 o func3 o func4 o and func5 o that have been updated after they have been added into mylib a the objects in mylib a are replaced wit...

Page 655: ...rola S3 format file File name filename saf Description A data file of the specified ROM area in which the unused area is filled with 0xff 11 6 3 Startup format moto2ff data start address data block size input file name data start address Specify the data output start address in the input file using a hexadecimal number data block size Specify the output data block size in bytes using a hexadecimal...

Page 656: ...ified range SIZE bytes from STARTADDR The output file is not generated Table 11 6 4 2 Warning messages Warning message Description Invalid file format in FILENAME line NUMBER The input file FILENAME contains an invalid format data at line NUMBER FILENAME contains data outside of specified range STARTADDR SIZE Although FILENAME contains data outside the specified range from STARTADDR to SIZE an out...

Page 657: ...me that will be converted into the Motorola S2 format The file extension must be psa Usage will be displayed when no parameters are specified If the output file already exists it will be overwritten When an error occurs an error message is output to the standard error device and the output file is not generated The ESC key can be used to forcibly terminate the process while converting When sconv32...

Page 658: ...n 11 9 for details 2 Mask data checker winmdc17 exe The winmdc17 checks the data in development completed built in ROM file and option document file to create the mask data file that will be presented to Seiko Epson Refer to Section 11 10 for details 3 Device information definition file S1C17xxx ini This file is used to set information such as the configuration of options on each type of microcomp...

Page 659: ... data creation by mask data checker S1C17xxx ini file fdc Figure 11 9 2 1 Input output files of winfog17 input file Device information definition file File format Text format file File name S1C17xxx ini Description This file contains option lists for various types of microcomputers and other information Always be sure to use the files presented by Seiko Epson This file is effective for only the ty...

Page 660: ...og17 exe icon to start winfog17 which will then read the device information definition file Startup from iDE To start WinFog17 select Start WinFog17 from the IDE GNU17 Actions menu or click the Start WinFog17 toolbar button When winfog17 starts it displays the FOG window The following diagrams show a FOG window when the device information definition file has been loaded and when it has not FOG Win...

Page 661: ...11 34 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 11 OTHEr TOOlS FOG Window after reading the device information definition file ...

Page 662: ...dow is divided into three areas as shown above Option list area Lists mask options set in the device information definition file S1C17xxx ini Use the check boxes in this area to select each option A selected option has its check box marked by function option document area Displays the contents of selected options in the function option document format The contents displayed in this area are output...

Page 663: ...f the option list The Generate button has the same function Generate button Setup Sets the date of creation output file name and a comment included in the function option document file The Setup button has the same function Setup button Device INI Select Loads the device information definition file S1C17xxx ini The Device INI Select button has the same function This file must be loaded first befor...

Page 664: ... each area To stop loading the file click Cancel Once a device information definition file is selected the same file is automatically loaded the next time you start winfog17 Note When you load a device information definition file after setting up options all settings are reset to the default state 2 Setup Select Setup from the Tool menu or click the Setup button to bring up the Setup dialog box Fr...

Page 665: ...ations 1 The number of characters that can be used to specify a file name including the path is 2 048 2 The file name itself not including the extension can be up to 15 characters and the extension up to three characters 3 The file name cannot begin with a hyphen nor can the following symbols be used as part of directory names folder names file names and extensions The symbols shown below cannot b...

Page 666: ...aded If the specified file exists and there is no problem with its contents the option list and the function option document areas are updated according to the contents of the file To stop loading the file click Cancel Perform steps 2 to 4 to update the file If you select Generate without changing the file name the message shown below is displayed asking you whether or not to overwrite the file Cl...

Page 667: ...ni does not exist Dialog INI file does not include FOG information Specified device information definition file ini does not contain function option information Dialog Function Option document file is not found Specified function option document file does not exist Dialog Function Option document file does not match INI file Contents of the specified function option document file do not match devi...

Page 668: ... Option name Crystal 32 768KHz Selected Selected specification OPT0101 01 Mask data OPTION NO 2 OSC3 SYSTEM CLOCK CR 200KHz Selected OPT0201 01 OPTION NO 3 INPUT PORT PULL UP RESISTOR K00 With Resistor Selected K01 With Resistor Selected K02 With Resistor Selected K03 With Resistor Selected K04 With Resistor Selected K05 With Resistor Selected K06 With Resistor Selected K07 With Resistor Selected ...

Page 669: ...This file contains option lists for various types of microcomputers and other information Always be sure to use the files presented by Seiko Epson This file is effective for only the type of microcomputer indicated by the file name Do not modify the contents of the file or use the file in other types of microcomputers Built in rOM data HEX file File format Motorola S2 format file File name filenam...

Page 670: ...nal ROM data file for a data file section separated from a packed file The content is the same as the internal ROM data file used for packing Unpacked function option document file File format Text format file File name filename ufd Description This is a text format file for a function option document file section separated from a packed file The content is the same as the function option document...

Page 671: ...information definition file icon into the winmdc17 exe icon to start winmdc17 which will then read the device information definition file Startup from iDE To start winmdc17 select Start winmdc17 from the IDE GNU17 Actions menu or click the Start winmdc17 toolbar button When winmdc17 starts it displays the MDC window MDC Window initial screen The microcomputer model name on the title bar is the fil...

Page 672: ... button has the same function Pack button Unpack Restores files in the original format from a packed file The Unpack button has the same function Unpack button Device INI Select Loads the device information definition file S1C17xxx ini The Device INI Select button has the same function This file must be loaded first before performing any operation with winmdc17 Device INI Select button Help menu V...

Page 673: ...he dialog box shown below appears Enter a file name including the path in the text box or select a file by clicking the Ref button Click OK and the file is loaded If the specified file exists and there is no problem with its contents the set up items in winmdc17 are initialized with the loaded device information To stop loading the file click Cancel Once a device information definition file is sel...

Page 674: ...pack file name in which you want the mask data to be output The file name displayed by default can be modified You can use the Ref button to look at other folders Make sure the extension of the output file name is pa Note File name specification is subject to the following limitations 1 The number of characters that can be used to specify a file name including the path is 2 048 2 The file name its...

Page 675: ...fied in the device information definition file by their default file names Modify the file name displayed by the following procedure a Click in the list box to select the file name to be modified b Click the Ref button to select another folder and then enter a file name Modify all the listed file names The extensions cannot be changed 4 Click the Unpack button to execute unpacking When winmdc17 ha...

Page 676: ...s not begin with S Message Hex data error Data is not sequential Data is not listed in ascending order Message Hex data error Illegal data Invalid character is included Message Hex data error Too many data in one line Too many data entries exist in one line Message Hex data error Check sum error Checksum does not match Message Hex data error ROM capacity over Data is large Greater than ROM size Me...

Page 677: ...Version ROM1 Built in ROM HEX data start mark S1C17xxxyyy PROGRAM ROM Model name S224008000 xxxxxxxx psa S804000000FB END Built in ROM HEX data end mark OPTION1 Function option start mark S1C17xxx FUNCTION OPTION DOCUMENT V x xx Model name version FILE NAME zzzzzzzz FDC USER S NAME SEIKO EPSON CORPORATION INPUT DATE yyyy mm dd COMMENT SAMPLE DATA xxxxxxxx fdc OPTION NO 1 OSC1 SYSTEM CLOCK Crystal ...

Page 678: ...t files Figure 11 11 2 1 shows the LcdUtil17 input and output files file lcd LcdUtil17 ES Sim17 LCD file file bmp Icon bitmap file essim17 ini Device information definition file Figure 11 11 2 1 LcdUtil17 input output files Model information definition file essim17 ini This file contains recorded information on the simulator model Be sure to use the setting file provided by Seiko Epson Modifying t...

Page 679: ...IDE or click the button on the IDE toolbar To end the LcdUtil17 program select Exit from the File menu 11 11 4 Window Panel editing window Opening a bitmap file bmp or LCD file lcd will display the file in this window This window is used to design an LCD panel layout and assign COM SEG Two or more windows can be opened at the same time and icons and dot matrices can be dragged and dropped between ...

Page 680: ... S Saves the contents of the active panel editing window to the LCD file lcd by overwriting Save As Saves the contents of the active panel editing window to an LCD file lcd under a new name Print Ctrl P Prints the bitmap data in the active panel editing window Print Preview Displays the print image of the active panel editing window Print Setup Opens the dialog box used for selecting the paper siz...

Page 681: ...l editing window This list can also be used to allocate COM SEG Resize LCD Sets the size of the LCD panel The default size of the new panel editing window is 640 x 480 Group Icon Sets multiple icons as a group Release Group Cancels the grouping and returns the grouped icons to separate icons View menu Toolbar Displays or hides the toolbar Status Bar Displays or hides the status bar Window menu Cas...

Page 682: ...ys a list of icons appearing in the active panel editing window Cut button Cuts the part selected in the panel editing window and copies it to the clipboard Copy button Copies the part selected in the panel editing window to the clipboard Paste button Pastes the part copied in the clipboard to the upper left corner of the panel editing window Undo button Cancels up to three of the most recent oper...

Page 683: ...o permits COM SEG allocation Described below are the procedures for producing an LCD file 11 11 6 1 Producing a Dot Matrix lCD Panel 1 Select New from the File menu A blank panel editing window will open 2 Select Resize LCD from the Edit menu The Resize LCD image dialog box will open Enter the LCD panel size then click the OK button The default LCD size of a new panel editing window is 640 x 480 d...

Page 684: ...development then click the OK button The LCD Driver dialog box appears only when no LCD driver has been set When an already produced LCD file is read or when the LcdUtil17 start button of the IDE is clicked while a project is selected by the IDE an LCD driver is already set and this dialog box does not appear Note Once set an LCD driver cannot be changed Be extremely careful when setting the LCD d...

Page 685: ...the number of dots W and H in the diagram Pitch size Specify the interval between dots in the dot matrix by entering the number of dots h and v in the diagram Driver Indicates the name of the currently set LCD driver This cannot be changed The maximum COM SEG value is set by the LCD driver COM SEG Select the COM SEG port allocating direction Port numbers will be allocated in sequence based on the ...

Page 686: ...llocated with a COM SEG port are indicated in red Double click a dot matrix to display the Dot matrix dialog to change settings Note A dot matrix that is copied and pasted retains position and size information but discards port allocation information Dot matrices without allocation information are indicated in black ...

Page 687: ... several separate bitmap files to create a segment LCD panel in the LcdUtil17 window However since LcdUtil17 offers only simplified editing functions we recommend producing one bitmap file 2 Read a bitmap file Start LcdUtil17 and select Open Bitmap File from the File menu Select the bitmap file you created A panel editing window will open and display the read bitmap 3 Edit the icon layout Icon con...

Page 688: ... icon selected last If the icons are then ungrouped the individual icons will have the COM SEG information corresponding to the grouped icons Note LcdUtil17 offers only simplified functions We recommend completing layout during bitmap production 4 Allocate a port to the icon Double click the icon The LCD Driver dialog box opens 4 1 If no LCD driver has been set the LCD Driver dialog box will appea...

Page 689: ...value is set by the LCD driver Uninitialized data You can initiate settings if you click an icon for which no COM SEG has been set No operation The COM SEG information will not be changed Copy COM and SEG The displayed COM SEG information will be set to the icon Increment COM The COM will be incremented 1 and set to the displayed COM SEG information Increment SEG The SEG will be incremented 1 and ...

Page 690: ...o display the corresponding icon in the panel editing window in blue In this window you can also change COM SEG information for icons 11 11 7 Shortcut key list The following shows a list of shortcut keys available with LcdUtil17 Table 11 11 7 1 List of shortcut keys Function Shortcut key Copy Ctrl C Ctrl Insert Cut Ctrl X Delete Paste Ctrl V Shift Insert Icon List Ctrl I Dot Matrix Ctrl M New Ctrl...

Page 691: ...red in Corrective action Enter a correct value 6 Invalid start number or Invalid number of dots COM SEG Cause The number of COM SEG allowed by the driver has been exceeded based on settings for Start dot count and COM SEG allocation direction Corrective action Set the Start dot count and COM SEG allocation direction in accordance with the number of COM SEG allowed by the driver No When using Save ...

Page 692: ...Corrective action Data cannot be saved if an icon or dot matrix extends from the LCD panel The following shows a list of error messages displayed by LcdUtil17 Table 11 11 8 2 List of error messages No During startup 1 Cannot open bitmap file The size of the panel is too large Cause The vertical or horizontal size of the bitmap file is too large Corrective action Use a bitmap file with a horizontal...

Page 693: ...format to be written to target flash memory Generate the file using objcopy exe and moto2ff exe included in the S1C17 Family C compiler package 1 Convert the generated elf file into Motorola S3 format Example To convert sample elf into sample sa in Motorola S3 format objcopy I elf32 little O srec R gbss srec forceS3 sample elf sample sa Refer to Section 11 4 objcopy exe for detailed information on...

Page 694: ...Download the ROM data to be written to the target flash memory to ICDmini using the c17 fwld or c17 fwdc command Example When the target model is c17701 and to erase all blocks and write sample saf gdb c17 fwld sample saf 0 0 0x8000 Set the range to be erased with the second and third parameters start and end blocks for erasing and the fourth parameter flash memory start address at the same time 9...

Page 695: ...11 68 EPSON S5U1C17001C Manual C Compiler Package for S1C17 Family Ver 1 5 0 11 OTHEr TOOlS THIS PAGE IS BLANK ...

Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...

Page 697: ...23 0 PC PSR SP Program counter Processor status register Stack pointer 23 7 0 23 0 0 IL 2 0 7 6 5 IE 4 C 3 V 2 Z 1 N 0 IL 2 0 IE Z N C V Interrupt level Interrupt enable Zero flag Negative flag Carry flag Overflow flag 0 7 Enabled interrupt level 1 Enabled 0 Disabled 1 Zero 0 Non zero 1 Negative 0 Positive 1 Carry borrow 0 No carry 1 Overflow 0 Not overflown 0xff ffff 0xff fc00 0xff fbff 0x00 0000...

Page 698: ...ata file using objcopy moto2ff and sconv32 5 2 Create the option data file using winfog17 5 3 Pack the ROM data file and option data file into a mask data file using winmdc17 5 4 Submit the created data file to Seiko Epson GNU17 IDE C compiler xgcc cpp cc1 Assembler as Linker ld Debugger gdb ICD Simulator Object data translator objcopy file c file o file el file m file p file s Librarian ar file a...

Page 699: ...y C Compiler Package S5U1C17001C Start up Command eclipse Views Displays various information by contents To open a closed view select it from Show View on the Window menu Editor Edits text files such as C sources and assembler sources Status bar Create new resources Select perspective Create new directory file Launch debugger Search Navigate Save Print Build Select working set ...

Page 700: ...cted string file directory Select All Ctrl A Selects all of the contents in currently active document in the editor Find Replace Ctrl F Finds and replaces a string in the editor Find word Searches for the next occurrence matching the search string Find Next Ctrl K Jumps to the next instance of a search string Find Previous Ctrl Shift K Jumps back to the previous instance of a search string Increme...

Page 701: ...ified range Open Project Opens the closed project currently selected in the C C Projects Navigator view Close Project Closes the project currently selected in the C C Projects Navigator view Build All Ctrl B Executes a build process on all projects open in the C C Projects Navigator view Build Project Executes a build process on the project currently selected in the C C Projects Navigator view Bui...

Page 702: ...lp topic related to the view currently activated Key Assist Ctrl Shift L Displays the list of currently available menu commands Software Updates Installs an updater updates plug ins etc for software management About Eclipse for GNU17 Vx x Shows IDE version information and detailed information on plug ins etc GNU17 IDE 4 Development Tools ...

Page 703: ... bookmark a line in which a task is set etc Markers are displayed on the left edge of the corresponding line Error marker Overview ruler The overview ruler shows the position in error and the position at which a bookmark or task is set by a square symbol Click a marker to go to that position Editing area Edit sources in this area While a C source being edited the content assist function shown belo...

Page 704: ...ions be sure to select the desired project or source here GNU17 IDE 6 Development Tools Navigator View Lists the directories and files present in the workspace The type of file to be displayed can be selected using Filters from the view menu Before editing a project or source or performing other operations select the desired project or source here Project Source files Navigate display history Coll...

Page 705: ...ecify a target to execute Sort in alphabetical order Display hide fields static members members other than public Icons Project Binary container Executable format file Include container Include folder Header file Source folder C source file Assembler source file Text file etc Object file Include Variable Function Structure struct Member variable Union union Enumeration type enum Enumerator Functio...

Page 706: ... build operation For errors in the source file you can jump to the corresponding spot in the editor that is in error by clicking on an error message here Clear the contents displayed Automatic scroll lock Enable other view while the Console view is displaying messages Switching Console Opens a new Console Menu Error message Error Warning Locations in error file directory line number ...

Page 707: ...t of a search that was performed using the Search dialog box This view in the initial IDE configuration is not displayed It appears when a search is executed Repeat previous search Open collapse hierarchy list Delete search results selected all Navigate search results Cancel search being executed Search history Enable other view while the Search view is displaying results Menu Item Set values cont...

Page 708: ...E 10 Development Tools Tasks View Shows the tasks To Do registered in the editor letting you jump to or delete a task Menu Completion mark check display Priority High blank Normal Low Menu Description for tasks Task set locations file directory line number Bookmark name description Bookmark set locations file directory line number ...

Page 709: ... line Options S Output assembly code s c Output relocatable object file o E Execute C preprocessor only B path Specify compiler search path I path Specify include file directory fno builtin Disable built in functions D macro string Define macro name O0 O O3 Optimization gstabs Add debugging information with relative path to source files mpointer16 Generate code for 16 bit 64KB data space mshort of...

Page 710: ... macro definition of character string and numeric value if else endif Conditional assembly Can be used when the c xassembler with cpp option of xgcc is specified Major Assembler Pseudo instructions text Declare text section section data Declare data section section rodata Declare rodata section section bss Declare bss section long data Define 4 byte data short data Define 2 byte data byte data Def...

Page 711: ... file specified with the mc17_ext option are invalid The format of the map file is invalid The contents of the map file specified with the mc17_ext option are invalid Cannot close the map file The map file specified with the mc17_ext option cannot be closed after it has been read There are too many characters of one The number of characters except for a new line line in dump file character in a li...

Page 712: ...The offset value of a symbol is over 16bit The address of the symbol exceeds the 16 bit address space The offset value of a symbol is over 24bit The address of the symbol exceeds the 24 bit address space Input object file use both 16bit and 24bit The object files to be linked contain both files created address mode in 24 bit pointer mode and 16 bit pointer mode section XXX is not within 16bit addr...

Page 713: ..._text __START_rodata main o rodata libc a rodata __END_rodata load address symbols __START_data_lma LOADADDR data __END_data_lma __START_data_lma SIZEOF data unused data 2 data 3 bss 2 bss 3 data 1 data 1 text 1 rodata 1 boot o When boot o main o libc a are linked bss 1 data 2 rodata 2 text 2 main o bss 2 data 3 rodata 3 text 3 libc a library bss 3 bss 1 RAM Copy before using data section VMA bss ...

Page 714: ...directory path Changes source file directory c17_euc Displays the EUC code c17_double_starting Enables double starting Debugger gdb Embedded system simulator ES Sim17 file elf file par file cmd elf object file Command file Stdin file INI file file log Command log file file log Trace log file file log Stdout file break gdb Breakpoint storage file from Linker ICD Parameter file file sa Motorola S3 H...

Page 715: ...sed to monitor local variables Breakpoints window Used to manage software PC breakpoints Memory window Used to display and edit memory data Text box for specifying display start address Source window This is the main window of the debugger The menus and the tool bar are generally used in the debugger This window allows execution of some debugging functions such as setting clearing software PC brea...

Page 716: ...uously from the current PC address Step Asm Inst Issues the stepi command to execute one instruction step of the target program at the current PC address Next Asm Inst Issues the nexti command to execute one instruction step of the target program at the current PC address Subroutines are executed as 1 step Save breakpoints Watch Info The gdb debugger stores the breakpoint status and symbol names r...

Page 717: ... a display format for the variable selected in the window Watch Expressions window Breakpoints window Local Variables window List of Shortcut Keys Allowed in the gdb Main Screen S Executes the step command in Source or SRC ASM display mode otherwise stepi N Executes the next command in Source or SRC ASM display mode otherwise nexti F Execute the finish command C Execute the continue command Ctrl O...

Page 718: ... 2 break buffer file Sets the simulated output condition ICD Mini SIM Memory operation c17 fb addr1 addr2 data Fill memory area 8 bits ICD Mini SIM c17 fh addr1 addr2 data Fill memory area 16 bits ICD Mini SIM c17 fw addr1 addr2 data Fill memory area 32 bits ICD Mini SIM x length b addr Dump memory data 8 bits ICD Mini SIM x length h addr Dump memory data 16 bits ICD Mini SIM x length w addr Dump ...

Page 719: ... mode Break by key break Program received Forcibly made to break using the Stop button signal SIGINT Interrupt ICD Mini mode Error messages gdb unrecognized option option An illegal startup option is specified A setup of a serial port was not completed An ICD mode not supported in gdb is specified Address is 24bit over The specified address is out of the 24 bit range The maximum S1C17 address size...

Page 720: ...rom ICD Write entry address max 0x overflow The address of the flash write routine exceeds the upper limit 0xffffff Error messages Cannot display clock counter The execution counter value cannot be displayed when Now Timer break mode is on the lapse of time break is enabled Disable the lapse Please timer break mode off of time break before execution times can be measured Cannot display clock count...

Page 721: ... lt le __ sf2 float type Changes psr and x by a 13 eq ne gt ge lt le Floating point Data Format Double type data format S 63 Exponent part 62 52 Fixed point part 51 0 Double type effective range 0 0 0e 0 0x00000000 00000000 0 0 0e 0 0x80000000 00000000 Maximum normalized number 1 79769e 308 0x7fefffff ffffffff Minimum normalized number 2 22507e 308 0x00100000 00000000 Maximum unnormalized number 2...

Page 722: ...hi3 16 bit arithmetical shift to right x a b bits __lshrhi3 16 bit logical shift to right x a b bits Integral comparison __cmpsi2 comparison long x 2 1 0 __ucmpsi2 Comparison unsigned long x 2 1 0 long long Type Calculation Functions long long type calculation __muldi3 Signed 64 bit multiplication x a b __divdi3 Signed 64 bit division x a b __udivdi3 Unsigned 64 bit division x a b __moddi3 Signed ...

Page 723: ...rmat va_list arg Utility Functions header file stdlib h malloc void malloc size_t size 1 calloc void calloc size_t elt_count size_t elt_size 1 free void free void ptr 1 realloc void realloc void ptr size_t size 1 exit void exit int status abort void abort void bsearch void bsearch const void key const void base size_t count size_t size int compare const void const void qsort void qsort void base s...

Page 724: ...ions need to declare and initialize the global variables Character Functions header file string h memchr void memchr const void s int c size_t n memcmp int memcmp const void s1 const void s2 size_t n memcpy void memcpy void s1 const void s2 size_t n memmove void memmove void s1 const void s2 size_t n memset void memset void s int c size_t n strcat char strcat char s1 const char s2 strchr char strc...

Page 725: ... specified with XXX or the byte data stored in the address W XXX A 16 bit address specified with XXX or the word data stored in the address A XXX A 32 bit address specified with XXX or the 24 bit or 32 bit data stored in the address Immediate immX A X bit unsigned immediate data signX A X bit signed immediate data Symbol Label Symbol A symbol that points an address Label A branch destination label...

Page 726: ...rb rs 7 0 rb 23 0 rb 23 0 1 B rb rs 7 0 rb 23 0 rb 23 0 1 rb 23 0 rb 23 0 1 B rb rs 7 0 B sp imm7 rs 7 0 B imm7 rs 7 0 rd B sp imm20 with sign extension rd B imm20 with sign extension B sp imm20 rs 7 0 B imm20 rs 7 0 rd B sp imm24 with sign extension rd B imm24 with sign extension B sp imm24 rs 7 0 B imm24 rs 7 0 rd 7 0 rs 7 0 rd 15 8 0 rd 23 16 0 rd 7 0 B rb rd 15 8 0 rd 23 16 0 rd 7 0 B rb rd 15...

Page 727: ... imm7 rd 23 16 0 W rb rs 15 0 W rb rs 15 0 rb 23 0 rb 23 0 2 W rb rs 15 0 rb 23 0 rb 23 0 2 rb 23 0 rb 23 0 2 W rb rs 15 0 W sp imm7 rs 15 0 W imm7 rs 15 0 rd imm16 rd symbol imm16 15 0 rd W sp imm20 rd W imm20 W sp imm20 rs 15 0 W imm20 rs 15 0 rd imm16 rd symbol imm16 15 0 rd W sp imm24 rd W imm24 W sp imm24 rs 15 0 W imm24 rs 15 0 rd 23 0 rs 23 0 rd 6 0 imm7 6 0 rd 23 7 0 rd 23 0 A rb 23 0 igno...

Page 728: ...sp 31 24 sp 23 0 sp 23 0 4 rd 23 0 A sp 23 0 ignored A sp 31 24 sp 23 0 sp 23 0 4 sp 23 0 sp 23 0 4 rd 23 0 A sp 23 0 ignored A sp 31 24 A sp 23 0 rs 23 0 A sp 31 24 0 A sp 23 0 rs 23 0 A sp 31 24 0 sp 23 0 sp 23 0 4 A sp 23 0 rs 23 0 A sp 31 24 0 sp 23 0 sp 23 0 4 sp 23 0 sp 23 0 4 A sp 23 0 rs 23 0 A sp 31 24 0 sp 23 2 rs 23 2 sp 6 2 imm7 6 2 sp 23 7 0 rd imm20 sp imm20 rd symbol imm20 19 0 sp s...

Page 729: ...0 imm7 with zero extension sp 23 0 sp 23 0 imm7 with zero extension rd 23 0 rd 23 0 imm20 with zero extension sp 23 0 sp 23 0 imm20 with zero extension rd 23 0 rd 23 0 imm24 sp 23 0 sp 23 0 imm24 rd 15 0 rd 15 0 rs 15 0 C rd 23 16 0 rd 15 0 rd 15 0 rs 15 0 C rd 23 16 0 if C 1 nop if C 0 rd 15 0 rd 15 0 rs 15 0 C rd 23 16 0 if C 0 nop if C 1 rd 15 0 rd 15 0 imm7 with zero extension C rd 23 16 0 rd ...

Page 730: ...ith zero extension C rd 23 16 0 rd 15 0 rd 15 0 imm16 C rd 23 16 0 rd 15 0 rd 15 0 imm16 C rd 23 16 0 rd 15 0 rs 15 0 rd 15 0 rs 15 0 if C 1 nop if C 0 rd 15 0 rs 15 0 if C 0 nop if C 1 rd 15 0 sign7 with sign extension rd 15 0 imm16 rd 15 0 imm16 d 23 0 rs 23 0 rd 23 0 rs 23 0 if C 1 nop if C 0 rd 23 0 rs 23 0 if C 0 nop if C 1 rd 23 0 imm7 with zero extension rd 23 0 imm20 with zero extension rd...

Page 731: ... rd 15 0 rd 15 0 rs 15 0 rd 23 16 0 rd 15 0 rd 15 0 rs 15 0 rd 23 16 0 if C 1 nop if C 0 rd 15 0 rd 15 0 rs 15 0 rd 23 16 0 if C 0 nop if C 1 rd 15 0 rd 15 0 sign7 with sign extension rd 23 16 0 rd 15 0 rd 15 0 imm16 rd 23 16 0 rd 15 0 rd 15 0 imm16 rd 23 16 0 rd 15 0 rs 15 0 rd 23 16 0 rd 15 0 rs 15 0 rd 23 16 0 if C 1 nop if C 0 rd 15 0 rs 15 0 rd 23 16 0 if C 0 nop if C 1 rd 15 0 sign7 with sig...

Page 732: ...sign8 sign7 0 pc label imm20 if N V is true pc pc 2 sign20 if N V is true pc label imm24 if N V is true pc pc 2 sign24 if N V is true pc pc 2 sign8 if Z N V is true sign8 sign7 0 pc label imm20 if Z N V is true pc pc 2 sign20 if Z N V is true pc label imm24 if Z N V is true pc pc 2 sign24 if Z N V is true pc pc 2 sign8 if Z C is true sign8 sign7 0 pc label imm20 if Z C is true pc pc 2 sign20 if Z ...

Page 733: ...4 A sp pc 2 d 0 4 d 1 pc pc 2 sign24 sp sp 4 A sp pc 2 d 0 4 d 1 pc rb sp sp 4 A sp pc 2 d 0 4 d 1 pc imm7 sp sp 4 A sp pc 2 d 0 4 d 1 pc label imm20 sp sp 4 A sp pc 2 d 0 4 d 1 pc imm20 sp sp 4 A sp pc 2 d 0 4 d 1 pc label imm24 sp sp 4 A sp pc 2 d 0 4 d 1 pc imm24 pc A sp 23 0 sp sp 4 sp sp 4 A sp psr pc 2 pc vector TTBR imm5 4 sp sp 4 A sp psr pc 2 pc vector TTBR imm5 4 psr IL imm3 psr pc A sp ...

Page 734: ...ut1 imm20 co_dout0 rd co_dout1 symbol imm20 co_dout0 rd co_dout1 imm24 co_dout0 rd co_dout1 symbol imm24 co_dout0 rd co_dout1 rs rd co_din psr C V Z N co_cvzn co_dout0 rd co_dout1 imm7 rd co_din psr C V Z N co_cvzn co_dout0 rd co_dout1 imm20 rd co_din psr C V Z N co_cvzn co_dout0 rd co_dout1 symbol imm20 rd co_din psr C V Z N co_cvzn co_dout0 rd co_dout1 imm24 rd co_din psr C V Z N co_cvzn co_dout...

Page 735: ...mm20 0x7f ld rd imm20 6 0 imm20 0x7f ld b sp imm20 6 0 rs imm20 0x7f ld imm20 6 0 rs imm16 0x7f ld rd imm16 6 0 Unconditional ext symbol imm16 15 7 ld rd symbol imm16 6 0 imm20 0x7f ld a rd imm20 6 0 imm20 0x7f ld a sp imm20 6 0 Condition 2 0x7f imm20 ext imm20 19 7 ld b rd sp imm20 6 0 0x7f imm20 ext imm20 19 7 ld rd imm20 6 0 0x7f imm20 ext imm20 19 7 ld b sp imm20 6 0 rs 0x7f imm20 ext imm20 19...

Page 736: ...6 0 imm24 0x7f ld rd imm24 6 0 imm24 0x7f ld b sp imm24 6 0 rs imm24 0x7f ld imm24 6 0 rs imm16 0x7f ld rd imm16 6 0 Unconditional ext symbol imm16 15 7 ld rd symbol imm16 6 0 Condition 2 0x7f imm24 0xfffff ext imm24 19 7 ld b rd sp imm24 6 0 0x7f imm24 0xfffff ext imm24 19 7 ld rd imm24 6 0 0x7f imm24 0xfffff ext imm24 19 7 ld b sp imm24 6 0 rs 0x7f imm24 0xfffff ext imm24 19 7 ld imm24 6 0 rs 0x...

Page 737: ...19 7 ld a rd symbol imm24 6 0 Unconditional ext symbol imm24 23 20 ext symbol imm24 19 7 ld a sp symbol imm24 6 0 imm16 0x7f add rd imm16 6 0 imm20 0x7f sub a rd imm20 6 0 imm20 0x7f add a sp imm20 6 0 imm16 0x7f adc rd imm16 6 0 Condition 2 0x7f imm24 0xfffff ext imm24 19 7 ld a rd imm24 6 0 0x7f imm24 0xfffff ext imm24 19 7 ld a sp imm24 6 0 0x7f imm16 ext imm16 15 7 add rd imm16 6 0 0x7f imm20 ...

Page 738: ...mm16 6 0 imm24 0x7f cmp a rd imm24 6 0 imm16 0x7f and rd imm16 6 0 imm16 0x7f or rd imm16 6 0 Condition 2 0x7f imm24 0xfffff ext imm24 19 7 sub a rd imm24 6 0 0x7f imm24 0xfffff ext imm24 19 7 add a sp imm24 6 0 0x7f imm16 ext imm16 15 7 cmp rd imm16 6 0 0x7f imm20 ext imm20 19 7 cmp a rd imm20 6 0 0x7f imm16 ext imm16 15 7 cmc rd imm16 6 0 0x7f imm24 0xfffff ext imm24 19 7 cmp a rd imm24 6 0 0x7f...

Page 739: ...Unconditional ext labe imm20 19 8 jreq label imm20 7 1 128 sign20 127 jrne sign20 7 1 Unconditional ext label imm20 19 7 calla label imm20 6 0 imm20 0x7f jpa imm20 6 0 Unconditional ext label imm24 23 12 call label imm24 11 1 1024 sign24 1023 jpr sign24 11 1 Condition 2 sign20 1024 or 1023 sign20 ext sign20 19 12 jpr sign20 11 1 sign20 128 or 127 sign20 ext sign20 19 8 jrne sign20 7 1 0x7f imm20 e...

Page 740: ...x7f ld cw rd imm20 6 0 Unconditional ext symbol imm20 19 7 ld ca rd symbol imm20 6 0 imm24 0x7f ld cw rd imm24 6 0 Unconditional ext symbol imm24 23 20 ext symbol imm24 19 7 ld ca rd symbol imm24 6 0 Condition 2 1048576 sign24 128 or 127 sign24 1048575 ext sign24 20 8 jrne sign24 7 1 0x7f imm24 0xfffff ext imm24 19 7 jpa imm24 6 0 0x7f imm20 ext imm20 19 7 ld cw rd imm20 6 0 0x7f imm24 0xfffff ext...

Page 741: ...18057 CHINA Phone 86 755 2699 3828 FAX 86 755 2699 3838 EPSON HONG KONG LTD 20 F Harbour Centre 25 Harbour Road Wanchai Hong Kong Phone 852 2585 4600 FAX 852 2827 4346 Telex 65542 EPSCO HX EPSON TAIWAN TECHNOLOGY TRADING LTD 14F No 7 Song Ren Road Taipei 110 TAIWAN Phone 886 2 8786 6688 FAX 886 2 8786 6660 EPSON SINGAPORE PTE LTD 1 HarbourFront Place 03 02 HarbourFront Tower One Singapore 098633 P...

Page 742: ...07 Revised January 2009 Japan D B L C Compiler Package for S1C17 Family Ver 1 5 0 S5U1C17001C Manual EPSON Electronic Devices Website SEMICONDUCTOR OPERATIONS DIVISION http www epson jp device semicon_e Document code 411086605 ...

Reviews: