Home
F2MC-8FX First Step Guide
Contents
1. level define SET INT LEVEL IRQ05 level IO ILR1 amp level define SET INT LEVEL IRQO06 level IO ILR1 amp level 4 32 e d UE eg E epe EIE pe e Ef er Tu ts PEU nsc PE CR E RECS PAP E EE EE EE SE EE E A E E E SCH Dr EE de il ne n fuii Fm mE ai 0x03 SER C OZU 2 c ORES Ets sn lt lt AY p OXCEI COST c oy l 2OxSk 0x03 HSG 2009 ue uL T MORES 0x037 c 4 T OxXCP co FUJITSU TUTORIAL define SET INT LEVEL IRQO07 level IO ILRI amp level 0x03 lt lt 6 0x3F define SET INT LEVEL IRQ08 level IO ILR2 amp level 0x03 OxFC define SET INT LEVEL IRQO09 level IO ILR2 amp level 0x03 lt lt 2 OxF3 define SET INT LEVEL IROlO level IO ILR2 amp level 0x03 lt lt 4 OxCF define SET INT LEVEL IROll level IO ILR2 amp level 0x03 lt lt 6 Ox3F define SET INT LEVEL IRQ12 level IO ILR3 amp level amp 0x03 OxFC define SET INT LEVEL IROl3 level IO ILR3 amp level amp 0x03 lt lt 2 OxF3 define SET INT LEVEL IROl4 level IO ILR3 amp level amp 0x03 lt lt 4 OxCF define SET INT LEVEL IRO15 level IO ILR3 amp level 0x03 lt lt 6 0x3F define SET INT LEVEL IRQl16 level IO ILRA amp level amp 0x03 OxFC define SET INT LEVEL IROl7 level IO ILRA amp
2. IO TMCSRLO ELU return ORE DE oom su VIRES OUTE 07 SRELD 1 LNIE 13 CN TE d IRG 1 Enable void SetClockMainToPll void js 7 ge js mg E Ser PLE Control Register 7 IQ Pie okt MPM GO IO PLLEC bit MPMCI IO PLLC bit MPEN EX Wait ums Main Ens Clock Oscillation is stabilized CLOCK X2 05 CLOCK X2 13 ENABLE Main Clock Oscillation Frequency HIGH LOW SEH 7 Function as general purpose I O port Reload mode Permit Under flow Interruption Request value to 16bits Reload Register HIGH LOW 1 MCLK Permit the count Start count operation Interpupqon y FCH Set the PLL multiplication rate fx I Enable Main Pll Clock Oscillation 4 22 4MHz 4MHz FCH 2 2 a Disable External Input ci z DA yr a Eat A EE n a ur ay TUTORIAL FUJITSU while IO PLLC bit MPRDY 0 Set System Clock Control Register TOTS CC a Wee Aro CLOCK DIV Os t Select System Clock Dividing Ratio TIO or Ge sb C DIVI CLOCK DrVl 1 L No Dividing mr pouwsYcC DEE Sal MAIN PLL CLOCK MODE 0 Select Main PLL Clock Mode poros VC Cd eoo MAIN PLL CLOCK MODE 1 while IO SYCC bit SCMO MAIN PLL CLOCK MODE 0 ki IO SYCC biI1LtSCML MAIN PEL CLOCK MODE LJ J 77 return 4 23 co FUJITSU SorTUNE FIRST STEP GUIDE Sample source sample c D CREER
3. 4 13 rur Pc EE KiC co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE 4 1 3 Setting Workspace B Setting Workspace Set items such as start debugging when Workspace is open and save debug environment when debug ends etc This sample requires no special setting The settings are given for reference 1 Select Setup workspace from the Project menu Set the necessary items in the Setup Workspace dialog za SOFTUNE Workbench sg d IRE Project gt de s ad Project leo ug aisi E Setup Ge E E Bite Project qu uU l Setup Project DES NS ME z Customize Build o Project Dependence EA e Comi gur ati on E e T p S y TUUM ipe SUM i ur S SE SE n Bl e o p Li e ke isen ms ue mu ses ss LET si dal Se ES mmsbs l moe nn fm 4 14 TUTORIAL FUJITSU Seier As E E ET ewm nem yo space iz Open Not Start Debugger CH Start Debugger m CH Start wizard SS in as Save debug setup file debug environment when debug ends S O No Save s Geh Save e CH Inquiry Save E Sa Aubo load the targeted file after makes buld debug session OO NoLoad Geh Load C Inquiry Load 4 15 co FUJITSU SorTUNE FIRST STEP GUIDE 4 1 4 Making Source File B Making Source File This sample uses a simple program that makes LEDs on the target board emit light in regular intervals e init C e sample c e vector c e Startup asm e define h
4. button in the ROM RAM Area List and set the area to allocate the CONST INIT or DIRINIT section Setup Project X en o al rege EFFF DCH MAC PrF HCM ROM_AREA ra When a ROM RAM ama ii specified beyond the intemal AROMAS range the wearing iz issued pr When sections are ananged beyond the range that the A i Click the Set button to add the section name to Section Name List After confirming that the section name is added click the OK button SE Section NI ROM RAM rea N S j ROM AREA REA z p TUE p n ection Na ame a 5 v En his Cen per nd Code Hui c 4 52 TUTORIAL FUJITSU acu Section 3 a Se ection d ame a Adde pr Contents Ty Ty ype m Cons D m Lee DAD O TETE lan AS E vu da arm ee k eer UE i a SS ection d ame o Ades D T Wes D ss Sec ection Name List GINIT Const Im 4 53 co FUJITSU SorTUNE FIRST STEP GUIDE Setup Section x o Dircornst E ae NST Const ee E e Gi OIRINIT Dirconet Set the lO section address so that the following warning may be avoided Click the W1373L The section is placed outside the l O area IO Setup Section Specify in Address D m FE on io IO AO H 000 don 4 54 TUTORIAL FUJITSU 5 Select Register Bank at Category in the Linker tab and set the register bank By default the checkbox is marked only for Bank 0 Mark the checkboxes for all the
5. Contents of the temporary File LE After B I Converter DH Before El Cancel 3 Click the OK button to complete the setting After the target file is made the Converter will start and the S format Adjuster will also start 5 18 APPENDIX A FAQs for Project Design B FAQs for Debugger C Others co FUJITSU SorTUNE FIRST STEP GUIDE App 2 APPENDIX FUJITSU Appendix Q amp A A FAQs for Project Design Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 How do move the Sortune Workbench project to another machine or drive Why is not the source file displayed when debugging is performed by a machine that did not execute Build How do make projects with different language tool options and Member configurations of source files What is the difference between project types loadmodule relocatable and library What does information specified in Target MCU in the Create dialog reflect What is information set in the Setup CPU Information dialog used for Is the extension determined by the type of file How do change the linkage order Is the dependent source file at Make execution compiled when only the include file is changed B FAQs for Debugger Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10 Q11 What should do if the Debugger cannot be started When the conversion is not performed normally after symbolic addressing is performed How to set the path count of a b
6. Debug is made when making a new project When making an additional project configuration the project configuration with the same settings as those of the existing project configuration is copied Removing unnecessary program files in this project configuration from Make Build operation or resetting for Make Build operation a new project configuration can be easily made Instructions are given for the procedure for making the following two project configurations e FLASH microcontroller project configuration flash e Mask release project configuration mask The following file is used just to explain the procedure This file is for the instructions and does not contain any program e FLASH REWRITE c FLASH rewritable program 4 114 TUTORIAL FUJITSU 1 Select the C folder in the Project window select Add Member to folder File from the shortcut menu to add FLASH REWRITE c to the Member SOFTUNE Workbench Teo sample Mel Fie Edt Wen Project Debug Setup window Help EU Workspace sg_sample E E sg sample abs fsg_sample prj Debug E a Source Files rar Pern ui I TEES EH p av Source D i B nam P E ane e S e 4 115 co FUJITSU SorTUNE FIRST STEP GUIDE 2 Select Configuration Add and Delete from the Project menu SUF TUSE Workbench fs sample Lj Bud ND xu mi CRC EJ io gei ze zo Dim def real kv def pr Debs ru r 1 RORS
7. Click Set CPU Information in the MCU tab in the Setup Project dialog to open the Setup CPU Informa tion dialog The settings are explained assuming that the target CPU is the MB95FV100 When the MB number of the target MCU is selected the recommended default is set automatically Sets Frajert ES App 20 APPENDIX e Internal RAM Area tab Specify the start and end addresses of the internal RAM area Setup CPL Information rim PAM Bron d eic uihil Setup internal DAN area e IRQ and ICH tab Set the Simulator Debugger Specify the external interrupts and correspond ICRs un CPU Information X lector z ES Woke e Standby Control Register tab Set the Simulator Debugger opecify the address of the standby control register un CPU Information x I E Setup STEVC pe m um SEE ee CR A OT a T Address E App 21 co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE Q7 Is the extension determined by the type of file Answer The extension is determined by default However any file with any extension can be recognized as a target file When adding a Member to the project any file with any extension can be recognized as a target file by changing the member type For example when adding an Assembler file to the project the file extension is usually asm However a file with the extension s can be recognized as an Assembler file The setting
8. Debug File d Edit DIES REN D Setup Window Help E S o ju ue E Local GE Watch D Watch 50 EE a VU MELDE AC 51 e 2 S Watch i Ws dE Watch4 is ko sample m 47 E R S Debug Command Toolbar o es Bar Eh eT a bar pus XE c TT 4 74 TUTORIAL FUJITSU 2 Register variables Right click the Watch window to select Set from the shortcut menu Enter the variable name in the Setup Watch dialog and click the OK button to register the variables EZ Watch1 A ES Element Edit Delete All delete Monitoring Individual Setting Memory winda Property Close 4 75 co FUJITSU SorTUNE FIRST STEP GUIDE oimilarly register the following variables 10 PLLC a ro scc H IO PDRO 10_PDRE 3 Select Memory from the View menu to open the Memory window opecify the position in the Jump dialog to display address LED pat Check the description of the CONST variable LED pat SOFTUNE Workbench sy sample Debug A E Fie Edt Ven Project Debug Setup Window Help O O O0 E EU orkspace fsg sample CE de sg sample abs fsal Source Files Include Files Dependencies Debug E d s io def prj e B o def rel o der prj E AQLO 27 22 22 29 22 99 23 22 99 22272297922 k 401C 27 DD DD OPA 97 OPA FD 9 9 97 PA fe Ae Ze e Aler Ae
9. _ Debug Flash 5 Z include i io def A mask ll source A A AA A A AS A A UE R A AR AA A a A A ou dua A A mm i UM e E O e WT A e e A A E e E See e le DA e Alm A o4 IS A o m O Xo E e E 4 mo Filename dumplg Ee Save as type Loggina log App 33 co FUJITSU SorTUNE FIRST STEP GUIDE 2 Execute the DUMP 100 10FF command to display memory information on the Command window Right click the Command window and select Logging End from the shortcut menu The log file is made in the specified folder SE oe FF T TE batch fle E dem Hn mm FF E vo po a RETREAT Qm etc ae R SE Logging OB E o d o oo 0 oo oo m oU UU App 34 APPENDIX FUJITSU Q6 Does the Emulator support coverage measurement Answer Both the Emulator MB21 46 09 for the F MC 8FX and the Simulator do not support this function so coverage measurement cannot be performed App 35 co FUJITSU SorTUNE FIRST STEP GUIDE Q7 Does the Emulator support time measurement Answer Although the Emulator MB2141 A B for the FFMC 8L has supported this function the Emulator MB2146 09 for the FFMC 8FX does not The Simulator supporting the function should be used to perform sufficient veri fication debugging App 36 APPENDIX FUJITSU Q8 Does the Emulator support event setting Answer Both the Emulator MB2146 09 for the FFMC 8FX and the Simulator do not support this function so events cannot be se
10. cgunter fj Determine value switch flag Case LOL IO Fb bere Erek case COx ODZI LED pat Al byte BRO bit struct SPRDY H 00 SPBCO H 00 SPBCL BOO SPEM 1 00 WERCH H Dl EBL H DO MPEM Hol co FUJITSU TO PLLC union E 1P 53 Sai 551 bb 573 SA 291 60 l 6d 631 IO PORO bere bresk cese 0xD004r IO FRO beste break case Oe Moe IO FORO bere break case CkEDOLIO IO FORO byte break rase CKOD2QE LO PORO bere break case MwA IO FORO byte break case Ce OAD T EDR Wara LED pac bite struct 1l HE 10 sTEE union 4 byte Ao bit struct DIYO H 00 DITI H 00 H 00 H D LED pat LED pati LED pat 651 Sh LED par t bite struct ME 10 FORD union 4 I ro FDR amp union 4 Gel LED pat SD sari 4 83 co FUJITSU SorTUNE FIRST STEP GUIDE Program execution by Debugger Use the Run command in the Debug menu to execute program using the Debugger The use of the buttons enclosed in line also executes program en SUP TUE Workbench sg sample Debug LS O X B 1 IO PLLC union byte a H E0 RE b t atewect 1 TMCSEBL bit UF D SPRDY H 0 i counter 5 SPECO H 00 counter 0 SPMOl HOG Er Cal Determine value SPEM Hr OU switch flag EPRDY H l case OCx
11. level 0x03 lt lt 2 0xF3 define SET INT LEVEL IROl18 level IO ILRA amp level 0x03 lt lt 4 OxCF define SET INT LEVEL IRO19 level IO ILRA amp level 0x03 lt lt 6 0x3F define SET INT LEVEL IRQ20 level IO ILR5 amp level 0x03 OxFC define SEI INT LEVEL TROSl Level IO IbR5 lt level amp 0x03 lt lt 2 OxF3 define SET INT LEVEL IRQ22 level IO ILR5 amp level amp 0x03 lt lt 4 DXxCEJ3 define SET INT LEVEL IRQ23 level IO ILR5 amp level amp 0x03 lt lt 6 Ox3F ae x Pe Definition for System Clock control register T p av UK nn EN ee S define SUB CLOCK MODE O0 0 define SUB CLOCK MODE 1 0 define SUB PLL CLOCK MODE O0 I define SUB PLL CLOCK MODE 1 0 define MAIN CLOCK MODE O0 0 define MAIN CLOCK MODE 1 I define MAIN PLL CLOCK MODE O0 1 define MAIN PLL CLOCK MODE 1 il define CLOCK DIV1 O0 0 FF Source Clock 1 define CLOCK DIV1 1 0 define CLOCK DIV8 0 n Source Clock 4 x define CLOCK DIV8 1 0 define CLOCK DIV16 Q 0 7 Source Clock 7 8 define CLOCK_DIV16_1 d define CLOCK DIV32 0 d Source Clock 16 define CLOCK DIV32 1 d 4 33 co FUJITSU SorTUNE FIRST STEP GUIDE define CLOCK X1 O0 FE Original Oscillation clock x 1 Fa HOSTING CLOCK X1 1 define CLOCK X2 O Original oscillation Clock x 2 tdefine CLOCK X2 1 idet
12. The setup file is not saved automatically until debugging is terminated When updated save the setup file Select the Save command from the File menu and save the setup file for Simulator in the Overwrite save dialog Saving the setup file is valid only in the debug mode SUFTUNE Workbench sg sample L Fie Edt view Project Debug Setup buo m cue om Ls Cos BE R SS 3 PR E Close Workspace CAN Cave CErl 5 ee D Ld UE Recent Text Fle Recent Workspace Fle rer p EU 4 96 4 3 Debugging by Emulator B Debugging by Emulator TUTORIAL FUJITSU This section describes the procedure for actual machine verification using the Emulator The equipment used for explanation of the Emulator is listed below e MB2146 09 e MB2146 30X e MB2146 401 e MB95FV100 e Crystal oscillator e Power supply for MB2146 401 e USB A B cable MB2146 401 Settings e JP 3 4 e JP 1 2 5 6 7 B Emulator Functions e 4 3 1 Loading Monitor Program BGM Adapter MCU Board Super EVA containing MB95V100 10X Standard evaluation board for FFMC 8X Evaluation chip 4 MHZ 5 VDC 1 1USB Switches 3 and 2 shorted AC adapter 5 0 V Jumper fitted e 4 3 2 Making Setup File by Setup Wizard for Emulator e 4 3 3 Executing Program e 4 3 4 Setting Breakpoint e 4 3 5 Trace 4 97 co FUJITSU SorTUNE FIRST STEP GUIDE 4 3 1 Loading Monitor Program B Download Monitor Program Using the Emula
13. _ union 1 Include Dependencies d char direction LEFT H FE Compile sample c unid Initialize void struct Shift F8 H OL Build Ctrl Fe Ea ee dei H OL uL M Bxfe Hog 24 a xfd pom a e xFb i H Dl EM emu dbg si 23 Oxf7 x o i El seim dog su dunes ES RE 7 24 Bxef PE 3 H DL aM io def prj spe a xdf x n lf io def rel io def 268 e BxbF x H l 27 i x7Ff e x struct 28 n union 1 291 H FF 38 unid main unid dos 24 m m 32 de H l 33 Initialize Initial H ol LT H OL of H 0l Ld t H l 4 pro F66 H Dl case Oxbo04 m Dei H l cor Mi PO e aa EL bitce struct a a H g THM D NivzZI VI c Check dates and compile link DEBUG MBOSFV 100 SIM Break IP F046 T 4 94 TUTORIAL co FUJITSU 3 Execute Load target file in the Debug menu to load the remade target file In this sample program this step may be omitted because Auto load the target file after Make Build is set in Setup Workspace SOFTUNE Workbench Teo sample Debug File Edit View Project Debug Setup Window Help sg sample L In ee E W rkspace fsg sar 7 BI teg sample ER Source File Guer Determine ve aM Io PLLC seglene switch flag i e To SYCC Stack case OxOOOL 7 P
14. be E SOFTUNE Workbench ivi Customize Bar LI Communication module for E asw D D E Communication module for ZIPC 2 SOFTUNE C Compiler 2 SOFTUNE Assembler Pack 4 SOFTUNE C Checker 4 SOFTUNE C Analyzer de Space Read on C C o EGER p ee 2 5 co FUJITSU SorTUNE FIRST STEP GUIDE 5 Follow the wizard instruction to check the components to install and then start installation FzZMLC 8L 8FX Family SOFTUME Professional Pack Setup Install information 4 S singe Destination Wem C S atune dum SOFTUNE Workbench m SOFTUNE Workbench ed Customize Bar Install Midi ua RTS Communication module for EasyCODE No Install SE m Communication module for ZIPC No Install EE SOFTUNE E Compiler Install EE SOFTUNE Assembler Pack Install SOFTUNE C Checker Install SC SE EE E DRM SOFTUNE E Analyzer Install a io E 2 6 3 DEVELOPMENT PROCEDURE co FUJITSU SorTUNE FIRST STEP GUIDE 3 2 DEVELOPMENT PROCEDURE FUJITSU The software development procedure using SorFTUNE is given as a flowchart Set operating environment Design Project Setting development environment Making Workspace Project Setting workspace Making source file Setting project Setting linkage order Execute Make Build Executing Make Build Debugging by Simulator Setting setup wizard Setting up debug environment Making target file Debugging by Simulator Setting memory map Yes l
15. d Sursum 2 2 Fol H al HH F2zmcaFx h m Foz H Hi mb95fvio0 Break EN miii E Debug dus Watch bs P d H L EM emu dbg st 38 Stack EE s NE 29 7 sim Oho eu 39 Inte 2 MAN E P e EZ e in det pp AD fio Property POG H Ol D E io def rel in def AL Mix display Sg Po H ol dz inter H Bite Struct ds wv Activate when stop 43 O PRE union 1 dd IU close i byte H FF 45 iE TFFCOURTEF NN i Ag pees ae ER it struct i I A Determine va poe Foo H Ol da switch flag e Pol H l do case 0x0001 eg P652 H DIl d E E E P63 H l z re e 2 I 52 case Dx0002 AE Pado ue SE IU PDR byt a E A 54 break Poo pee F66 H Ol 55 case OxO004 P657 H 01 L Eis I DRON heart x EAR bitc struct CHMI NMZ YC Opened editor DEBUG MBSSFV 100 SIM Break IP F046 m 4 93 co FUJITSU SorTUNE FIRST STEP GUIDE 2 Execute Make to make a target file SOFTUNE Workbench fsg sample Debug Ma ES File Edit view Project Debug Setup Window Help isa sample LOVE PTE ig Al AE cad Project summe adi Member I sal Elle alle Setup Workspace EH Worespar Me x IOl x aie fsg Setup Project mi ro 4 83 5 Customize Build posed Jir union e SNE KEE d short flag 0x0001 ba a egel Sonicia dd char counter 8x88
16. i Jo Hi EY am 1 42 SCHER geetmmert E Ji pomum Memory Map o FLASH eres control P LM in def pri e Rm def rel o det pri Debug USEFUL FUNCTIONS 2 Set the following items in the Setup Editor dialog e Title gt WZ Editor V4 0 e Execute Filename gt C Program Files WZ EDITORWzeditor exe e Option gt Af j l gt e Executing Directory C Program FilesWZ EDITOR keiups Edibar co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE 4 Select WZ Editor V4 0 for Available Editor and click the OK button Setup Editer Available E dine W Eda Ei f Standard Edho Execute Flename c Wrogeam Fies we E ptiz S E eculina Directions c Wrogeam Files E Mara dali e e AA m ala Fimea cl Line Humber ck a Project Path Caution for using external Editor When using an external editor a message for checking that the file is saved is not displayed at compiling or assembling even when the source file is changed Execute compile assemble after saving the file Example of setting external Editor options e WZ Editor V4 0 gt Af j9el e MIFES V1 0 gt KO e A e UltraEdit32 gt 9ef 9el 1 English version e TextPal32 gt Yel Yl e Power EDITOR gt Af Q l e Codewright32 gt f g l English version of PowerEDITOR e Hidemaru for Win3 1 95 gt NV ol 1 f e ViVi gt Aine 1 9ef 9 10 Note USEFUL FUNCTIONS
17. 3 Click the OK button The source file for which the options are individually set is displayed in blue 2 EU Wworkspace fsg_sample fsg_sample abs fsg sample ey Source Files C H 45m a T EN startup asm inik c es D E veckor c ELE Include Files D ependencies sl Debug m Bal io def prj LEI o det rel io deF pri Debug 4 57 co FUJITSU SorTUNE FIRST STEP GUIDE 4 1 7 Making Target File B Create Target File After setting the project for Make or Build in the active project execute Make or Build to make a target file When Make or Build is executed the include file called from the source file is retrieved and dependencies are updated automatically 1 Set sg sample prj to the active project Select sg sample prj in the Project window and select Set Active Project from the shortcut menu Selecting fsg sample enclosed in the dotted lines also enables this setting SOFTUNE Workbench sg sample fl File Edt Mew Project Debug Setup Window Hep O O O OOO OOOO Seb active project B 35 Source Files E ASM eh startup asm _ Create new Folder Add Member to sde GH 2 2 Set Project WU dun E nit _ Set Linkage arder sample E vector c Si a Include Files HY define h Dependencies Je Debug zx io def prj e EI in def rel io def pri Debug SE List Pie RUE HEX cec nr 4 58 TUTORIAL FUJITSU 2 Select Make or
18. Build in the Project menu clicking the icon enclosed in the dotted lines also enables Build When the Build operation is terminated without error io def rel is generated in the C Softune Sample fsg 8fx_sample io_def Debug ABS directory SOFTUNE Workbench SL s oH X olsa E Member Se ee WT 2 TET Setup veier ER Fsg_s Setup Projecti B y z Customize B Build Wero dp RE Gp a Project Dependence 2 Ee E Chrltrz 4 44 TUTORIAL FUJITSU 11 Save the Project Select Save Workspace Project File from the File menu and click the OK button Caution for customizing I O register file Reinstallation of Sorrune Workbench overwrites the sample I O register file AL WAYS copy the file to another directory before customization 4 45 co FUJITSU SorTUNE FIRST STEP GUIDE 4 1 6 Setting Project B Procedure for Changing Project Settings Select the Project to be set and set the MCU and various language tool options etc If necessary add or change the settings for making a Project and the default tool option settings The following setting method is explained for this sample e Include path of Compiler e Disposition connection and register bank in Linker 1 Select Setup Project from the Project menu SOFTUNE Workbench Teg sample H E File Edit Wiem Project Debug uiro mper ie Active dues zx w fo AddF Project O 5 Vi Oia Ea da E de E Jr E Member Set
19. CONST and INIT are at addresses 4000 to 400C CODE at addresses F000 to F38B INITVECT at addresses FFDO to FFE5 and RESETVECT at addresses FFFC to FFFF Es sq sample mp1 B8 305888 00004003 1 00004004 005004040 agepg agp 1 ABBA AGA CHBBFJSB agnBFFD adgdarrFE 1 GBBBFFFC aGBBBFFFF ag aga ag agam ADA adag RE 80004816 BG P ne Suse m Workoepacefteg sample E rt sg rampie abs Fs GL 5 in det rel io def prj Keyboard ue Errat d Gen sa 4 69 P R P R 1 P R P R XI H R 1 H R I a REL 61 REL 81 REL 81 REL 608 ABS 608 ABS SIHIT CONSTA SD IRIHIT CODE IHTUECT RESETUECT co FUJITSU SorTUNE FIRST STEP GUIDE 3 Specify the map area 1000 FFFF in the Map List tab and click the Delete button setup map E4 Map list E Map ist KEEN El Els i OS OFFF read write Sal 1000 24 2 code read 4 Click the Setup button in the Map List tab setup map ES Map list E ED jst M OFFF read write FFFF undefined 5b Set the area to access the CONST and INIT sections SEHE memory map NI 4 70 TUTORIAL FUJITSU 6 Set the area to access the CODE section Setup memory map rm Les es nr 7 Set the area to access the INITVECT section Setup memory map 8 Set the area to access the RESETVECT section Setupmemorymap EB 4 71 co FUJITSU SorTUNE FIRST STEP GUIDE Setup m
20. FUJITSU Error jump by Hidemaru To use Hidemaru as an external Editor to cause an error jump select Open same file with Hidemaru from the Hidemaru setup menu Others Operating Environment Exclusive Control command and set Inhibit opening of same two files Setup Editor ES A gt E taro n gd EwecuingDiectoy E o o o ro d Standard Editor O 5 11 co FUJITSU SorTUNE FIRST STEP GUIDE 5 3 Setting Customize Bar B Merit in Setting Customize Bar Setting the customize bar allows the user to execute any batch file at the touch of a button The customize bar must be installed together with FFMC 8L 8FX Family SOFTUNE Professional Pack Here are the description of entering any batch file as an example Up to ten customize bars can be entered Customize bar EN AAAA ZA PAN le 5 12 USEFUL FUNCTIONS B Setting Procedure for Customize Bar 1 Switch to the debug mode 2 Select Customize bar Setting from the View menu ga SOFTUNE Workbench sg sample Debug Asus Ames Debug EE PU c qoe zc MON E ci averages a Performance 0 Command obi os Toolbar ow Status Bar 5 13 co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE 3 Select the Number File Kind and Entry batch file to be input in the Customize Bar Setting dialog can be used to refer to the batch file This example enters the batch file fsg_sample prc made in Tutorial in Cha
21. Include Files Dependencies Debug Da d s io det prj PL E o deF rel o det pri Debug Option file in OPT folder SorruuE Workbench makes a temporary file required for compiling assembling in the OPT folder Note that this is a temporary file so its correction will not affect Sorrune Workbench App 17 co FUJITSU SorTUNE FIRST STEP GUIDE Q4 What is the difference between project types loadmodule relocatable and library Answer There are three types of projects that are set in the Create dialog Loadmodule ABS Relocatable REL and Library LIB Select the Loadmodule ABS for a project to make a target fie The Loadmodule ABS determines the ab solute address for all modules The features of the Relocatable REL and project type of the Library LIB are described below Proc wrotkspace Propect Tune Lip Oases nee m MCU change Target HOL Pagat Mari ho sample Target Fdenamus be ampie Mrs Browse Pret Decharge C Soitune a ample sg Browse G Cinta ner iere snae Add to the current wakspace e Relocatable REL The project type of this relocatable format links multiple object files into one relocatable format REL file Only a part of the information in the relocatable file cannot be read The time required for link processing is shorter than that for the library file e Library LIB The project type of the library links multiple object files
22. LED pat 3 57 break 58 case DxO0D05 98 IU PDR byte LED pat 4 60 break Wa CHEMI PF Niv zI VI c Break at FO44 by hardware breakpoint DEBUG MBISFY100 EML Break IP F044 SC 4 106 TUTORIAL FUJITSU Types of breakpoints and how to set There are two types of breakpoint as follows Select Breakpoint from the Debug menu to open the Break dialog This dialog can also set breakpoints lt also provides a list of set breakpoints e Code breakpoint Code breakpoint is a breakpoint to stop the program when the PC attempts to execute a set address For both Simulator and Emulator the PC stop position is a breakpoint before execution Up to 256 breakpoints can be set e Data breakpoint Data breakpoint is a breakpoint to stop program when the PC accesses data at a set address Read write and read write can be set as access conditions Up to two breakpoints including a data monitoring breakpoint can be set e Data monitoring breakpoint This breakpoint stops the program when the PC executes the program at a set address or accesses data at a certain address Read write and read write can be set as the access conditions These conditions are enabled only when the user checks Link checkbox at Watch break in the Data break point details dialog DEE ne Sn eo ue men IEN le mum E Read Data break point details NI Break address S T Daavaid m pou um eR s Dea m Rn E EUR UR S
23. Project Debug Setup Window Help oec c DIEI ROT 3 Edit the MPRDY bit of the IO PLLC register in the Watch window Select the MPRDY bit and Edit from the shortcut menu and then set 1 to the MPRDY bit in the Edit variable dialog ee SOF TUNE Workbench ME n i Fh aE o HR Mise re T Watch a E tro pet 91 a Bim PLLC mamm byte H A E bit BEfGCE d SPREY H 00 1431 Switch the clock from Hain Llock L d g Las void 5ertlockMainTo li woid BRECH Hr GO 146 FBC H O 147 J Ser FLL Conrreol Hegiater SEEM B n0 LAB dE Bain Clock scillarion Freq 149 TID FPLLC bir MPHCO CLOCH X2 D ad 503 I0 PLLC bit MPMCI CLOCK x2 i E 1513 10 PLLC bait MPEM EMABLE 152 FT Wait until Main PLL Clock Osr 1551 Set System Clock Control Hegi FA M peru 1561 I0 ert bat PIVO CLOCK DIVI Os ES ro PDR Adal 1571 10 SCC bit DTV CLOCK DIVl 19 fl 10 PR 158 I STCC bar SCH MAIN FLL CLOC L59 IU STCC bir 3C81 MAIN FLL CLOC 180 while IO_3YCC bit SCHO MA EAE 151 IO SYCC bit 3CHI BA TO iain Property I PT PANT zZI vr rs Iu A A EC o E A EEE oe o yg OO OOoB ro oo E ee EO OD RO 4 81 CO FUJITSU SOFTUNE FIRST STEP GUIDE 4 Edit the SMCO and SCM1 bit of the IO SYCOC register in the Watch window Select the SM
24. WINGOW EE App 47 How to retrieve a file displayed in the SorFruNE Workbench Project window ccce eere rere eer nnne nnns App 49 How to check details of the sample I O register file App 50 How to change the record length of Motorola S format data App 51 How to get the notices on using the Assembler in C App 52 How to read projects developed by V30L26 or earlier SoFTUNE Workbench by V30L27 or later Sorruve Workbench App 53 Vi PREFACE B Purpose of Manual This manual describes the procedures for developing F2MC 8FX software using F2MC 8L 8FX Family SorruuE Professional Pack SorruNE and its functions This manual is intended to give a quick understanding of how to operate Sorruwe efficiently B Readers This manual is written for engineers who develop software using Sorruwe B Features of Manual This manual introduces the procedure for software development with Sorruwe using simple samples It also describes the useful functions and technical knowledge of SoFTUNE B Versions of Tools The versions of the tools used in this manual are as follows F2MC 8L 8FX Family Sorrune Professional Pack REV 300012 e SorTUNE Workbench V30L29 e SOFTUNE C Compiler V30L09 e SOFTUNE Assembler Pack REV 300011 Note Sorrune includes C Checker and C Analyze
25. changed and click the Font button Change the font and size in the Font dialog The font and size can be changed in only the Edit window and Output window when not in the debug mode A a EA SAO IEEE ELE LEE nn rentre A DE SNL Mice e A AN n D m OE ai M m I E s c M di dis NS IT o e AR SN ee AE KN RA Ml AA i e npa EE EE P i S Name CourerNen qu ic T a gt a PUR Bi cl gt r D H D H p Fi amp edasys zi O Lucida Console Terminal App 48 APPENDIX Q3 How to retrieve a file displayed in the Sorrune Workbench Project window Answer co FUJITSU When the first letter of the name of the file to be retrieved is input at the keyboard with focus anywhere in the Project window the focus moves to the retrieved file Note that a file enclosed in a folder cannot be retrieved An example of retrieving is given below 1 Focus on the target file 2 From the keyboard type the first letter of the name of the file to be retrieved El CH Source Files E SE Source Files EN ASM E CH 45M BE startup asm bas init c mn sample c E E vechar c E Include Files S Hi define h 9 Dependencies Debug ba io def prj e o io def rel io def prj mm T Include Files en op define h 3 The focus moves to the retrieved file 4 Debug m o det prj App 49 v Workspace fsg sample E 2 fsg_sample abs
26. ee ere ee kee keet hd Tarif ri N T Y 5 E 4 76 TUTORIAL FUJITSU Making batch file Making batch file enables execution of Set interrupt automatically in switching to the debug mode By executing the batch file the user can save in setting from the dialog The user can set automatic execution of the batch file in the Setup Wizard window Saving the file in the Project directory eliminates the need for specifying a path Setup Wizard E3 Makes settings for tet s target fi fie e Batch file sample fsg sample prc if stremp tostr DEBUGTYPE EML 0 endif reset cancel var all if stremp tostr DEBUGTYPE SIM 220 set interrupt interval D 11 D 25000 endif printf nThe preparations for the execution are completed in 4 77 co FUJITSU SorTUNE FIRST STEP GUIDE 4 2 5 Setting Breakpoint B How to Set Breakpoint During the Debugger executes a program the execution of the program can be stopped when the program counter PC passes a certain address or accesses data at a certain address The position where the execution of the program is stopped is called a breakpoint The user can set the code breakpoints and data breakpoints This sample sets a breakpoint at the beginning of the timer interrupt function in sample c Click the left circle of the source window to set the breakpoint X The yellow line indicates the current position of the instruction pointer Note The value of
27. executing in the standby mode by the Emulator Answer When the user suspends the operation executing in the standby mode by the Emulator MB2146 09 for the F MC 8FX the Debugger breaks at the instruction next to the standby mode shift instruction App 43 co FUJITSU SorTUNE FIRST STEP GUIDE C Others Q1 How to check the version of Sorrune Workbench and each language tool Answer The installation manual describes the version of the Sorruwe tool Select the installation manual for each tool from Program Softune V3 Readme in the Windows start menu and check each tool version About xxxx in the Help menu provides the versions of the following tools e SorTUNE Workbench e C Checker e C Analyzer The user can check the version information on the FFMC 8L 8FX Family Sorrune Professional Pack by the revision number on the CD ROM or in the Sortune Professional Pack Installation Manual C Softune ProPack896 txt Set the following items to display the version information on the language tools such as the Compiler and Assembler pack in the Sorrune Workbench Output window App 44 APPENDIX FUJITSU 1 Select Setup Project from the Project menu to open the Setup Project dialog Select the tab corresponding to the language tool version to be checked and put a checkmark in the Outputs start message checkbox DE Ad Lad Target of setting ef E o del op Waring Le revel Dupu
28. file under the hierarchy of the Project directory For details see APPENDIX A Q1 How do I move the Sortune Workbench project to another machine or drive 4 18 TUTORIAL FUJITSU Sample source init c c A ah it bee ek EEEE i TI Ee lis sample program for First Step Guide ay YE aE x include f2mgorxn include define h void DisableAllInterrupt void VOL ResetPort void void Inite timerlo VOLS void SetClockMainTOP1l1L void gt n Tntretalize i A a EE void Initialize t vola DisableAllInterrupt E Disa ve LL Interrupts y ResetPort FE Reset che POrE 7 init timer160 Initialize 16 bit Reload Timer return EE E Disable all interrupts por EE void DisableAllInterrupt void DE Disable interruption SET INT LEVEL TROOQUCDNT DISABLBE External interrupt ch0 ch4 m SET INT LEVEL IRQOL INT DISABLE PE FExternal anterrupe teni eno SET TNT EVE S IROOZ ENT DISABLE j External interrupt ch2 ch m SET INI LEVEL IROOS INT DISAPBLE 2 External Interrupt casan SET INT LEVEL LROO4 CINT DISABLE E IAE AS TO Q T SET INT LEVEL IRQOS5 INT DISABLE jo X O Tamer Et Ls 2y 4 19 co FUJITSU SorTUNE FIRST STEP GUIDE SET INT LEVEL IRQO06 INT DISABLE 8 16 bit Timer 0 H SET INT LEVEL IRQO7 INT DISABLE LIN UART RE
29. into one library LIB file Unlike the relocatable file the multiple object information in the library file is managed individually it can be read as required or new information be input to the library The time required for link processing is longer than that for the relocatable file App 18 APPENDIX FUJITSU Q5 What does information specified in Target MCU in the Create dialog reflect Answer The settings in Target MCU are used to set the following information e Making of I O area module using sample I O register file e CPU Options including check for section arrangement for Compiler Assembler and Linker e Default settings when Set CPU Information in MCU tab in Setup Project dialog See Q6 for details e Memory map information when Debugger started i B TAM i yea MU n uris e inim os ne QUE Classification 1 see ME Hi um o Relocatable REL Les Ji MCU D change pale Librar LIE Target wO pU a S T x Project Name plc D E Target Filename DS 3 SE GE E eun ue m E a Rm Eus S a allure sangle ah Browse NS ec Create new vier Dependencies Le Add to the curent pt workspace TRE App 19 co FUJITSU SorTUNE FIRST STEP GUIDE Q6 Whatis information set in the Setup CPU Information dialog used for Answer Setting information in the Setup CPU Information dialog is used for the Simulator Debugger or the Emulator Debugger
30. language tool options and Member configurations of source files eee eeee esee eee e eese sienne eene nennen nana nnne App 16 Q4 Whatis the difference between project types loadmodule relocatable and library App 18 Q5 What does information specified in Target MCU in the Greate dialog RE UE ine dc ora corres li nent se eee ae App 19 Q6 What is information set in the Setup CPU Information dialog used for App 20 Q7 Is the extension determined by the type of file App 22 Q8 How dol change the linkage order cce ece erre eere eene en nnnns App 24 Q9 Is the dependent source file at Make execution compiled when only the include file is changed cesses App 26 B FAQS for te e EE App 27 Q1 What should I do if the Debugger cannot be started App 27 Q2 When the conversion is not performed normally after symbolic addressing is performed eee nnmnnn nnmnnn App 28 Q3 How to set the path count of a breakpoint during using the Emulator Debugger cles eese rere eese eere nenne nennen nan App 30 Q4 Why are the settings of breakpoints are changed when the target Tile is changed ee
31. me Select All e Speciation Ee Ee LL CR ae AC t 4 102 TUTORIAL Sai Wizard X E wil be cone when y you m rr OC RTT 4 After completing the settings in the Setup Wizard window click the OK button The setup f Emulator is added SE SE ES T arget of seing ES n H E hue d sd ll quen Setup None D uc eE Kl mE ars he DH ECK CR bx le Aaa gg ou hos sS CECR A SC SCH PRO DAL E mi Bog ms a m og mu nme eu my A ricas Gm en ES t al Fio x a xw mu d m oU mua CT oa E mat G i DM CR ln s ma acu E aos P ua Da f s a uw on S LU sz s a mr LA A CRC RL PAS Seat LUN es rh CE oh NC BS LCL UE are ko tio du FETAL ES a M M i a Eh ems ar Bess ea emptus imt ot X p at el s d Lh LEE ES p Lo Y V Ah di EE ee Ke mn A CE Mes Len AN NULLAEL PE rite E Dess ee PL 2 x D Ciel KS WENN IECH KC 4 103 co FUJITSU lle for the co FUJITSU SorTUNE FIRST STEP GUIDE 5 The added setup file appearsappears on the window The setup file which starts up when the Start debug command in the Debug menu is executed is displayed in blue Double clicking the setup file the Debugger starts up according to its setup information E Fsg_sample E sg sample abs F EE Source Files Include Files 35 Dependencies 4 EM emu dbg sup Bi sim dbg sup Bo io det on o deF rel io def pri l One Frnt f b Optimization of response speed during debu
32. name of project file WSPFILE Transferred as full path name of workspace file ABSPATH Transferred as target file directory OBJPATH Transferred as object file directory LSTPATH Transferred as list file directory PRJCONFIG Transferred as project configuration name ENV environment variable Transferred as environment variable value specified by environment variable in brackets For details refer to Help Section 1 11 Macro Description Usable in Manager of Sorrune Workbench User s Manual 4 Select Disposition Connection at Category in the Linker tab and specify the ROM RAM area By default Mode 2 is set for Automatic Disposition and ROM RAM Area List is also set according to a product In this sample add the area ROM AREA to allocate the CODE section to ROM RAM Area List and change the start address of the area INROMO1 to allocate the CONST INIT and DIRINIT section When the section name is prefixed by the ROM address of the ROM to RAM transfer section is specified that transfers data from ROM to RAM during execution One Pome f What is the ROM to RAM transfer section In developing a program using C Compiler variables with initial values are generated Because these variables are rewritten during execution an application they must be in RAM Therefore in built in programs initial value data cannot be used unless it is placed in ROM and is transferred to RAM before executing the applicati
33. options in one project e Making any folder in the Project enables hierarchical management of Member files e Folders or Member files can be added and moved by dragging and dropping Active project name Active project configuration SOFTUNE Workbench sg sample File Edit View Project Debug Sgfup Window Help Workspace Project E H Weorkspacefsg sample GE sg sample abs fsg_sample prj a S Source Files E ASM a DN startup asm Re eil dl e sample c veckor c E Include Files Hi define h sl Dependencies Debug 7 io def prj E EI io def rel io def pri Debug H E Source Files Include Files Dependencies Debug Subproject 1 4 GENERAL FUJITSU One Fom z Explanation of Terms z e Workspace A workspace is a unit to register and manage two or more projects Firstly making a workspace allows the user to add different versions of projects By adding and hierarchizig these projects these can have dependencies one another e Project A project is a basic unit that manages an operating environment of application programs to be developed Project information includes source file tool options to be used and setting information of an debugger etc Workbench saves these information in a project file e Active project An active project is a project for which menu operations such as Make Build Compile Assemble Start Debug or Update Dependencies will be executed A
34. sample T Debug of derea E zl eee Glee EE cc eta aa EEH Workspace fsg sample ER E sg sample abe AQ d Source Files Al DL 42 interrupt void timer int void 43 ep RK 4n PUSHI A RA 43 CHI LT d SEN Ae FDAC 40 PUSH A _ Include Files RAN F3 HOW A EF Dependencies BAF OE a id Pod x JFO4F 41 PUSHW IX Ja Femcafx h I K EA mbosrvi00 REES Fl WOH SP A F051 E2 MOVI TX m RA 40 PUSH a d Ae JF053 40 PUSHW A ZEN HO X JF054 08 MOV A RO 0 B io def pri Kross 10 SWAF p Bn detrel io def ense 09 Moy Rl ens Ag PUSH A 44 IU THMCSEL bit UF U Clear the rec AX JF 58 A23F CLRB 10 TMCSRLO 02 ds if tcounter gt 5 I X Oros co INCW A Ost Ae PD HO BIX 03 A BEE 510082 MOV counter 32 JF063 6FDOS CMP Ix 03 05 92 JF065 FDO EZ Foss 92 JF068 F803 BNC FO6D on JFOGA 21F1F3 JME FlF3 46 counter e JFOGD 0400 MOV g br bis A A MOT Zo Leuitntert H El 3E CHMI NN Az VI DEBUG MESSFY100 SIM Break IP FO54 2 4 90 TUTORIAL FUJITSU 4 2 8 Monitoring B Monitoring The Memory window and Watch window provide the monitoring function Using the monitoring function the window value is updated on as needed basis even during executing the program Select the window to be monitored and set the sampling time in the Setup debug environment dialog 1 Select Debug Environment from Debu
35. the instruction pointer IP is the same as that of the PC SOFTUNE Workbench sg sample Debug Biel ES File Edit View Project Debug Setup Window Help sg sample Ln Debug n Workspace fsg_sample zi fsg_sample abs fs 37 l ELE Source Files 38 ioc 39 40 ri iL 4l dz interrupt void timer int vnid yector c Include Files 44 I0 THCSELO Hit UF 0 Clear tk Dependencies 45 if counter gt 5 a 46 counter Debu aa 3 1 Determine value to be output Co L da switch flag D Dean 49 case Ox0001 ZA E ER 50 Id PDRO byte LED pat 1 0 Bil io def rel io det orl 51 break 5x case Ux z p3 IU PDEO byte LED pat z La break 55 case OxO004 Se IU PDR byte LED pat 3 ET break EB case Oxo0068 59 IU DDR bere LED pat 4 60 break 61 case 0x0010 be IU PRO byte LED pat 5 53 break B64 case OxO0020 65 I0 PDR byte LED pat 6 A CHEMI Niv zZI VI E DEBUG ME9SE 1 00 SIM Break IP F 4A SS 4 78 TUTORIAL FUJITSU Types of breakpoints and how to set There are two types of breakpoint as follows Select Breakpoints from the Debug menu to open the Break dialog This dialog can also set breakpoints lt also provides a list of set breakpoints e Code breakpoint Code breakpoint is a breakpoint to stop the program when the PC attempts to execute a set address For both Simulator and Emulator the PC stop pos
36. 1 Select Mix display from the shortcut menu in the Source window for displaying the source program at debugging SUFTUNE Workbench sg sample Debug Biel EX File Edit View Project Debug Setup Window Help sq sample b Debug sl alero El E BH Workspace fsg sample ER 5 sg sample abs C H Source Files dz interrupt void timer int void d Edit 41 I0 TMCSELO bit U0F Inline Assembl e 46 counter i Include Files JS S Mosca cn id Jump EDS 3 Eis s Dependencies K io act Go to Current HS Debug KS en C PDRD by E EM emu dbg s e Sr idi Break L D sim dbg su He 52 case Dx0002 E E io det on e 53 10 PDRD by Stack fl io def rel io def eS 54 break ie 55 case 0x0004 Ps 56 I0 PDR Y Gr break re 50 case x n s Y 50 10 PDRO by re 60 break ro Bl case 0x0010 re 52 10 PDR byte LED pat 5 Y 563 break Y D case x nz ro 55 10 PDRO byte LED pat 6 ro 66 break ro 57 case 0x0040 Me 58 10 PDR byte LED pat 7 ro 53 break 70 case x ns E Ke T TT ODON beste THT wnat d H DAM 1 NM E Display source and assemble DEBUG MBISFYIOO SIM Break IP FOSA 4 89 co FUJITSU SorTUNE FIRST STEP GUIDE 2 The source program and disassembled code are displayed at the same time SOFTUNE Workbench sg sample Debug OF ES File Edit View Project Debug Setup Window Help sq
37. 1 Select Text file from New in the File menu and click the OK button New The following button enclosed in line can also make a new text file S File Edit Wen Project Debug Setup Window Help 4 16 2 Make a source file CDI Mal TUTORIAL 1 A A SS E 2 fx init c dl Zs sample program for First Step Guide lj EC E d 6 Hinclude F2nc8fx h 7 include define hr H g unid DisablefllInterrupt void ys 1 void ResetPort void l li void init timer16 void 12 unid SetClockMHaintToPil void rk 13 14 fa 15 Initialize usuz III 7 3 Save the source file Select Text file from Save as in the File menu E Output Window Project file teg sample pr The following button enclosed in line can also save the source file SOFTUNE Workbench fsg_sample 4H x File Edit Mem Project Debug Setup Window Help _ S leis HHAH ug ESE E co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE 4 Select the file save destination name the file and click the Save button In this sample create source and include folders under the Project directory and save the source and include files in the respective folders H E lib EH sample m 896 Le 23 CANALYZER de Checker Eig fsg Sr BFx sample L S Debug 23 include mgl source One Punt Saving file Save the source
38. 5 How to change the record length of Motorola S format data Answer The default length of one record of Motorola S format data created by the load module Converter is fixed at 16 bytes To change the length use the len option for the S format Adjuster For the setting of the S format Adjuster see Section 5 1 Setting External Tool An example of the option to be added when the S format Adjuster is started is given below The example below changes the length of one record of Motorola S format data to 32 bytes Specify Other Parameter NI TA Pak a E Execute Sting E Softune bin M2ms exe CASoftune sample fsa Paramete A CURE C oC DC CT T NC oT o KANN UC o T UR o DC ol ON C oa o LORI DORE um Lom ure c ru POM IS ancel Kelt Bw mag fuu AN E Cad m2 RTT A ars Y MEL aa D d H ASS IA ale a a G DLE NW Lis E Re r A LK dea Ce ee tem D Ps s SE W DCH KS we 16 bytes E fog tampe E el s mp GO 6 T675F 73616D7n6C65D1 5315 8000414008801 BARR EP OF RF PEF OP RF SF RRR PPP RS 5315 000481 QFFFFFFFFFFFFFFEFFFEFFFFEFEF PPP PPP RAS 53150000003 aFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF B 5315BH BhumigFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBR 5d15BHH BhHhSHFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF n 5315BHd8Bhl5FFFFFEFFFFEFFFFFFFFFFFFFFFFFFFFFFEG I 5315 0000406 GFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF bp 5315 0006407 GFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE bp 10 5315 0000108 GFFFFFFFFFFFFFFFFFFFF
39. 5 Selling BLE aK DOU E 4 78 4 2 6 Executing and Stopping Progralm cccscsssssssesssceeeeeeeeeeeeesssseeeeoeeeeensesnsneeeeeesseseeenonens 4 80 ALA AT ART e 4 89 4 20 eedem 4 91 4 2 9 Correcting and Re debugging Program eeeeee ee ceeeeeeeeeee 4 93 43 Debugging by EMUlalOn eene 4 97 4 3 1 Loading Monitor Proa Matinal 4 98 4 3 2 Making Setup File by Setup Wizard for Emulator 4 99 4 3 3 EXECUTING lte e i eme 4 105 4 3 4 Setting Breakpoint criai aa S melee 4 106 E WAC A a 4 110 4 4 Operating Object Format Converter nn nnrrrrrrnennrrrrennnnnnnenenennnnneeennnnnne 4 113 4 4 1 Adding Project Configuration sscccsssssssccccsnasseeccnnssseceecnnsseeseecnnsseeseeennssseess 4 114 4412 Operating CONVE Mead 4 125 D USEFUL FUNCHON HET 5 1 5 1 Set ng External TOO iii ere use ia 5 3 5 2 oelling External EQiOn EE 5 8 5 3 E later Ee ET 5 12 5 4 Setting Customize Bune BEE 5 17 APPENDIX gt 2d OR RIS App 1 APRECIO E EE App 3 A FAQs or Project DesiO Nissan id App 5 Q1 How dol move the Sorruue Workbench project to another machine OF drive eebe App 5 Q2 Whyis not the source file displayed when debugging is performed by a machine that did not execute Build App 14 Q3 How dol make projects with different
40. Build from the Project menu Clicking the button enclosed in the dotted lines also enables Make or Build za SOFTUNE EE Mas d Sp Active e Project me E Project Addi Member Set Wo ksp Wrork n ad etup f pace SR fso Setup Project a Customize Build o e S S E pcs Dependence i Bo x ii ede D puce Qu Ede 000 HERR ETT n ENTM ncm SS Cererem Debug d s io det pr El RI io def rel io def pri Debug 3 Save the Project file The project file is not saved automatically until the workspace is closed When updated save the project file Select the Save command from the File menu and choose the Project file in the Overwrite Save dialog Overwrite save NI Fie ke SE 2 lor mee i Text file i Amt AAA AA AAA A AS AA AA AAA statu su ES omes mn ne Ee Ane iu eral ee pcr E TR PU riae da e CE co an e RS A CRT T Lira A A a A E A M cw M ec LT z D D E 4 59 co FUJITSU SorTUNE FIRST STEP GUIDE OnePant Difference between Make and Build z e Make This function compiles assembles only the updated source file and then connects all objects and libraries to make a target file e Build This function compiles assembles all source files stored in the Project and then connects all objects and libraries to make a target file QOnePamnt Procedure for Compiling assembling Any one of source files can be compiled or assembled Sele
41. C SET INT LEVEL IRQO08 INT DISABLE LIN UART TRA SET INI LEVEL IROOS INI DISABELE gt BI LO Dit PPCL Ly UARI SIO 1 ES SET INT LEVEL IRQ10 INT DISABLE 8 16 bit PPG 1 H I2C 1 SET INT LEVEL IRQ11 INT DISABLE 16 bit Reload Timer 0 Custom 0 SET INT LEVEL IRQ12 INT DISABLE 8 16 bit PPG 0 H e SET INT LEVEL IRQ13 INT DISABLE 8 16 bit PPG OL SET INT LEVEL IRQ14 INT DISABLE 8 16 bit Timer 1 H SET INT LEVEL IRQ15 INT DISABLE 16 bit PPG 0 2 SET INT LEVEL IRQ16 INT DISABLE TO pit Reload Tamer L 12 0 SET INT LEVEL IRQ17 INT DISABLE 16 bit PPG 1 SET INT LEVEL IRQ18 INT DISABLE 10 Dit A D SET INT LEVEL IRQ19 INT DISABLE Timebase Timer SET INT LEVEL IRQ20 INT DISABLE Watch Timer Counter S SET INI LEVEL TRO LEINT DISABLE gt FF External Interrupt che ch11 SC SET INT LEVEL IRQ22 INT DISABLE Pf Ito DIE Ter LR mptertruot Von Loy 7 SET INT LEVEL IRQ23 INT DISABLE FLASH Custom 1 EJ j Disable External int reupe IO ETCOO bit E le DISABLE INTOO IO EICOUDZUCELIEL DISABLE INTO1 IOCETCIOSDLt oELBO DISABLE INTO2 IO EIC1O bit EIEl1 DISABLE INTO3 IOCBICZOJDXtEIEU DISABLE INTOS Y IG ETC bit EITEL DISABLE INTO5 TOLETOSO bt RR DISABLE INTO6 IO EIC30 bit BIEL DISABLE INTO7 IO ERICOTI bit EIEO DISABLE INT10 IO REICOLDZUtIEIEI DISABLE INT11 IO_EIC11 bit E
42. CO SMC 1 bit and select Edit from the shortcut menu and then set 1 to the SMCO SMC1 bit in the Edit variable dialog E e S pa Workbench be sample zT Edit variable Edit variable Lage fe laa Tele rm if IE ES La C Al lal AL Sit Bis E Watchi E LED pat 5 Hiis FLLC union Ae B 10 sTCC anion i Switch the clock from Main Clock byte H 36 idt void SerClockBsinToP1l void d DIO 146 147 Lame 143 l5 r 151 Last 154 1555 156 157 L5Br 158 l6 r I amp l 162 LSJ fe Set PLL Control Register vs So Y Bain Clock Oscillation Frech IO PLLC bir MPMCO CLOCK XZ 0 pr Tum 10 BLLC bit MERCI CLOCK X2 1j SES I0 BULLE bir PEN ENABLE 7 Wal ntil Esin FLE ock zr Set System Clock Control Regi EH IG _ SPCC bit DIYO CLUCK DIFI oO E EX Io PLA Ip STCC bit DIV1 CLOCK DIVI Kaz E 10 PD M M re re m m E bit a mtruct asa HI DO A og H HI D CN CH ID SFCC bit SCS0 a ALAIN FLL CLOC TEMERE x IO arr hit SC MAIN PLL CLOC while 10 STCC bit SCH s MA ID SYCC bic SCHL AA 4 82 i DAME Weerkheench Ian sarl ai adr a4 45 5 47 AB 48 5Di 511 Ep TUTORIAL 5 When the user reruns program the program is executed up to the breakpoint interrupt void timer int Au MES bir UF oO if Hemmtec gt 5
43. E EECH 4 107 co FUJITSU SorTUNE FIRST STEP GUIDE e Sequence breakpoint This breakpoint stops the program being executed when the program is executed at two specified addresses from Level 1 to Level 2 1 Use the Sequence tab for Breakpoint in the Debug menu or select Sequence from the Debug menu to enter an address of the level to be set Select Mix display from the shortcut menu in the Source window check the address and set the level at which transition conditions are set P sample c IB xi X rui 604005 MOV A gt 4005 ZA JFlla 4500 MOV IO PDRO A D r break HX JFllC Z 1Fl l JME Flal 3r case Ox0002 54 10 PDR hyte LED pat 2 pru 504006 Mov A gt 4006 SST 4500 Mov IO PDRO A ECK break on JFl24 21F1A1 JME Fl l 55 case Ox0004 57 IU PDR U byte LED pat 3 na Far 504007 MOV 74007 AX JFlz 4500 mov amp IU PDRO A 58 break Er oi JFl2C 21FlAl JMF Fl l 59 case Uxl ud s 5D IU PDRO byte LED pat 4 prz 04008 Mov A 4008 b i 4500 MOV IO PDRO Gl break JA JFl34 Z1FlAl JME Flal b case Ox0010 63 10 PDR hyte LED pat 5 no UE 2 604009 Mov 4 4009 AX JFl3A 4500 MOV amp IU PDRO A 64 break AX JFl3C 21F1A1 JME Fl l 55 case OxO0020 65 IU PDR U byte LED pat 6 H 604004 MOV A gt 4004 AX JFl42 4500 Mov I0_PDRO amp BT break KR 4 108 PEDE D Code TUTORIAL FUJITSU CH
44. E sample c Le sample program for First Step Guide include f2mc8fzx h include define h define LEFT 1 define RIGHT 2 unsigned short flag 0x0001 unsigned char counter 0x00 unsigned char direction LEFT extern void Initialize void const unsigned char LED pat 9 Ux E 2 187 aaa 2i Oxte 22 Wow Ee ET ee cereus fue NER xIb JH Se xc DAE Go ESS USE y PF meinen 47 DRE AP eee ut USED ES hr o ui USC Eu 7 SS Au E void main void Initialize k 7 Initialize the system while 1 4 24 TUTORIAL FUJITSU JF interrupt handling for l6 bit Reload Timer H S c interrupt void timer_int void IO TMCSRLO bit UF 0 Clear the request flag lr TvTfoounter gt 5 4 counter 0 j Determine value to be output to LEDs according to flag value Switeh Elag 4 case Ox0001 IO PDRO byte LED pat 1 break case 0x0002 IO PDRO byte LED pat 2 break case 0x0004 IO PDRO byte LED pat 3 break case 0x0008 IO PDRO byte LED pat 4 break case 0x0010 IO PDRO byte LED pat 5 break case 0x0020 IO PDRO byte LED pat 6 break case 0x0040 IO PDRO byte LED pat 7 break case 0x0080 IO
45. EH e Age Em IN ee Add or Delete Project Configuration 3 Click Debug in sg_sample prj3 in the Add and delete project configuration dialog and click Add Set flash as a new project name in the Add and delete project configuration dialog BUG and delete project AE E4 e A A IA Rat aa RR LE D 4 116 TUTORIAL FUJITSU Configuration name 4 Click the added project configuration flash and click Active Check that the active project configuration is flash in the Sorruwe Project window Add and delete project Configuration 8 3 fsa sample pa Debug L Debi 4 117 co FUJITSU SorTUNE FIRST STEP GUIDE ee SUE TUSE Workbench eg_s ample 4 118 TUTORIAL FUJITSU 5 Follow steps 2 to 4 to set mask as a new project configuration name P a ipa khench E INT AME 4 119 co FUJITSU SorTUNE FIRST STEP GUIDE Add project CAUSE EJ Delete 1 4 120 TUTORIAL FUJITSU R28 X ro kb 4 121 SOFTUNE FIRST STEP GUIDE CO FUJITSU 6 The added project configuration mask does not require FLASH REWRITE c Remove it from Make Build operation Click FLASH REWRITE c in the C folder in the Project window and select Set Individual setting from the shortcut menu i hg sample OF TURE a ATA EE fq aset be Too sample pri mask El Sy Source Fes F Lg ASM Frs rurzrvrel GE 4 122 TUTORIAL FU
46. ET Time Measurement KEE 3 i break pis byte Call case Ox0002 bit Fal Include File leat tall I0 PDRD byt ZEN poo Vector break H a Dependenc eu I8 ke a a F2mce Load target File ne eg Se WW mbosf BZ e 2 Eg Debug End debug dans Sch rr ge e e case x 008 jl ic Fo4 ow EM emu dba s LK 59 NER E S BL sim_dbg su 60 break 0 Bal io def prj 61 case Ox0010 po o ges G ED io det rel io def 52 IO PDRO byt Eo e PUT Bas break E GI bitc 6d case Ux z Ea IU FDRG 65 IO _PDRO byt byte 66 break B Bie oT case OxOO40 68 IO FIDRO byt E a por 69 break W Pel ZU case UNUUDU FP on FZ 2 momeaye 00 oY 73 break JP d 14 case 0x0l00 FP F7 POS as IO PDRO byt I e P56 D 76 IU PORG byt g PO le Pa SE Lhraal i DE Be bitc TH Load target File Pal ES E Bel slale Reset of MCU a EE ICE die da dd EI Breakpoints Breakpoint Set Reset F9 o counter Fc LED pat a TH M 2 D VI c Bel ES watch O x 3 union union union H FE SLEMEL d e H ol H l H n H 01 H 01 BIO H l BIO struct 1 1 union H FF struct H l H 01 H 01 H ol H 01 H 01 H l H 01 struct 1 DEBUG MBSSFV 100 SIM Break IP F046 4 95 co FUJITSU SorTUNE FIRST STEP GUIDE Saving setup file for Simulator
47. FF enable F12F 2 The program will stop when the PC passes through the sequence from Level 1 to Level 2 SOFTUNE Workbench Teo sample Debug La Fie Edit wiew Project Debug Setup Window Help W rkspace fsg sample GE sg sample abs ELE Source Files Include Files Dependencies Debug Bal io det prj GEI io det rel io def isa sample v petua break 551 case Ox0004 56 IU PORO byte LED pat 3 aes hreak case x ns break el case 0xbo010 ba IU PDR Bbyvte LED pat s EJ Gas break id case Ox0020 65 IU PORO byte LED pat 6 66 break T case 0x0040 65 IU PORO byte LED pat 7 Ba break Eu case DxO00650 PI E OH TT T 5 N T he on T T T e pa M n m 7 e CHMI CNM FP vr e DEBUG IMB9SFY100 EML Break IP F1 2 4 109 co FUJITSU SorTUNE FIRST STEP GUIDE 4 3 5 Trace B Trace When the trace function is enabled data is always sampled and stored in the trace buffer during execution Trace information to be actually displayed is that on the 16 branches immediately preceding suspension of execution The trace buffer is structually a ring shaped so data is overwritten automatically from the beginning of the sequence buffer when the trace buffer is full 1 Select Trace from the View menu to open the Trace window frame no address mnemonic 4 110 TUTORIAL FUJITSU 2 The program
48. FFFFFFFFFFFF2R 11 2315 0000109 0FFFFFFFFFFEFFEFFFFEFFFFFFFEFFFFEZRA S dab s e US dm Z Fo AS Een ses more mu 32 bytes bi sample abi ERRE A 312358m0nagm tTODTTFFFEFBFRF SEF BFR 7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBS5 12 S802 UFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9I S T7 3NBAUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7E S1735BAUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFSE ST1235bBSUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3E 312325DRHFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFETL ST12SABCUFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE 5123608 HFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEDBE 5 12251080FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEH Em ou BR oa Eh vi E ze Pa ot App 51 co FUJITSU SorTUNE FIRST STEP GUIDE Q6 How to get the notices on using the Assembler in C Answer The Accumulator can be used without restrictions but the general purpose registers should be saved by the programmer For details see Help Section 5 1 Assembler Description Function of Sorrune C Compiler App 52 APPENDIX FUJITSU Q7 How to read projects developed by V30L26 or earlier Sorrune Workbench by V30L27 or later Sorrune Workbench Answer Projects developed by V30L26 or earlier versions of Sorrune Workbench have no workspace and have
49. Fog T F037 E4 00 00 31 F3 57 31 Jump 2 When the array symbol LED pat is specified for Position a jump is made to address 4004 where the array is located Postion R e al ai OASE v H x p i nae oe d oa E Eu DC De ren iir tela iam DS Aisne s LN SC Klee nm KOR T e z E Ga it AT n gt mp ae n EA z I m unus d d f id Win diu iE a Ci 4 A s SLE uL B gt m ma m KC Le AL Ei d CPR EE BAR ER Ln DL EI TM PR l KA RE E 8 d x st 1 a SKI g SCH a E Eet Bota ck Keep k E a z many je jee mi oe D fee R3 ug a i z M S Mi di i un QA x o S i 7 E eis s s i mU m d GA D wd ed Haw M W I T A EUN i a B m i muse m miu mum a y r Ta mM N QR mms VER e y F rire Tha EN Rtg a D WR j p E i i mu AT as d Sen b I A d A E e SE o LN App 28 APPENDIX FUJITSU T5 6 7 5 EF DF BF F PP P PP PP 292 22 22 FP 3 Reopen the Jump dialog and specify the fourth array element When amp and the array element symbol amp LED pat 4 are specified for Position a jump is made to address 4008 where the array element is located Position PE D pa 4 Cancel Tl 2 3 4 EF DF BF 7F 22 22 22 22 22 22222222222 2 PP PP P 4 Reopen the Jump dialog and specify the variable counter When ST and the variable symbol amp counter are specified for Position a jump is made t
50. General tab in Setup dialog The Browse button can be used to change the paths for the target directory object file directory and list file directory However if the directory is specified with the absolute path resetting is necessary when the project is moved It is best to perform operation at the default settings Seel EE LE fe Target of setting nai T Lb 4 E o del pr Es Targetfile Directory rs M Browse for Listfile Directory DetusceTs mum WERA App 13 co FUJITSU SorTUNE FIRST STEP GUIDE Q2 Why is not the source file displayed when debugging is performed by a machine that did not execute Build Answer Because the target file has a path information of the source file when Make or Build is executed if the project directory is moved or the project is moved from another machine the source file cannot be displayed properly when the Debugger is started To display the source file properly set the following items 1 When Start debug is selected from the Debug menu to start the Debugger the following dialog is opened Follow the dialog to specify the directory containing the source file mo x oftuned96 FE aes startup asm App 14 APPENDIX FUJITSU 2 Select Debug environment Debug environment from the Setup menu to open the Setup debug en vironment dialog Set all directories containing the source file in the Directory tab mM debug envi
51. IEO DISABLE TINT 4 IO EICI Bit BIEL DISABLE FF INTIS 47 TO MICO Lore ELIO DISABDES d INITIA y TOE ICO bit EIEL e DISABLE IX INTE Y IO EIC31 bit EIEO DISABLE INT16 IO EICOSl bltEIELI DISABLE JA INTIY 4 20 co FUJITSU TUTORIAL ps FF Mable mile reupt y return Eeer x Reset the port S Ee x void ResetPort void IO PDR6 byte IO OFF IO DDR6O Dyte IO OQUIPUT P60 OFF qa Des OE A7 e Deae ORE sy P63 OFF P64 OB y P65 OFF P66 OFF JE DOTE ORES Ay IO PDRO byte IO OFF IO DDRO byte IO OUTPUT 7 pos OFF pe BOL OB 5 ILE UE OB A7 PO3 OFF P04 OFF jo POS OFF POG OFF Ja DOS OB A7 return WEE x Initialize 16 bit Reload Timer 0 SE dee Si void init timerl6 void 4 21 CO FUJITSU DT SOFTUNE FIRST STEP GUIDE 1 Disable interrupt SET INI hEgVEL IROLLCOZS Set the Reload IO TMRO byte TMRH IO TMRO byte TMRL OXAO 0x00 Set the interrupt level level 16bits Reload Register 16bits Reload Register et Timer Control Register IO TMCSRHO IO TMCSRHO IO TMCSRHO LO TMC SRO IO TMCSRHO IO TMCSRHO DIC Monts None Dub RTE DEE MODO MOD1 MOD2 COLO Colt osi 0 O O ae Internal Glock mode Ze Internal clock wet Timer Control Register TO EMOS REO IO TMCSRLO IO TMCSRLO TO lt TMESRE
52. JITSU 7 Click FLASH REWRITE c in the Setup project dialog and check the Remove this file from target of build checkbox Setup Project 4 123 co FUJITSU SorTUNE FIRST STEP GUIDE 8 In the Sorrune Project window check that FLASH REWRITE c is marked with x that means the file is removed from Make Build operation Egli Workbench eq sample ians lest ose spe ale eo rani T b T gen 4 124 TUTORIAL FUJITSU 4 4 2 Operating Converter B Operating Converter This section explains the procedure for operating the object type Converter by the newly added project configuration mask This sample converts the created target file sg__smple abs to the Motorola S format sg sample mhx 1 Select Setup project from the Project menu and check that Target of setting is mask Genera CU jd c Come eel Linker lu Lira aisle EH AE NI Target of setin j a Remove thi fe fom tege of buld p due do i dm SCH E nani en pi SINUS i S Project Type A SE Bm Een I E Targetfile Directory de ke Browse EE Dbiectfie Directory 4 125 co FUJITSU SorTUNE FIRST STEP GUIDE 2 Specify the Converter format to be converted In the Converter tab check the Absolute module converter is started checkbox and select the Motorola S format as the Output Data Format Ses dedit KX Target of setting re O
53. ODDl IO PDR byte LED parji HPO Heol bres Nl mem rap case OXODDZ PEN H DI I0 PDR byte LED patli i re struct d break JM ro ser union 4 case Ox 0d IO PDR hyt LED parti byte RP Dre sk E bit m struct case OR OOO H DIVO H O0 IO PHPD byte LED pati DIVI H 0 hreax came OxOULO SUBS H OD IO PIRO byte LED pat F Y H D break H l came OxODZD a H l IO_FDRO bere LED parle L F break aika case OxO040 H l IO PDED byte LED oer E bite struct break B 10_FDRO union EX case Ox00601 s E 10 PRS onion t CITIES i T PhD Peer gi TET wart 4 84 TUTORIAL FUJITSU 1 Run continuously The program is executed continuously from the current PC position The program being executed stops when the program reaches the breakpoint or Abort is selected from the Debug menu 2 Step In Step by step program execution is performed and stopped after moving the PC to the address of the next instruction When the function call instruction is executed the program execution is stopped at the beginning of the function 3 Step Over Step by step program execution is performed and stopped after moving the PC to the beginning of the next instruction When the function call instruction is executed all the functions are executed and the program execution is stopped after moving the PC to the address o
54. OVW CALL endm FILLO FILLO s Galil main routine end END co FUJITSU TUTORIAL A Poy A _SetClockMainToP11 CONST ROM section to INIT RAM section src_addr dest_addr src_segment EP he adar E Eeer addr A SIZEOF Nsrc segment LMEMTOMEM ROM INIT _ RAM INIT INIT ROM DT RENE TT _RAM_DIRINIT DERENTI section src_addr src_segment A HHisre addr A SIZEOF Nsrc segment LMEMCLEAR DIRDATA Sy DIRDATA DATA 5j DATA _main end _ Start 4 31 co FUJITSU SorTUNE FIRST STEP GUIDE Sample source define h define h sample program for First Step Guide ifndef define h define _ define h define DISABLE 0x00 define ENABLE 0x01 ARSS PATAS A Uu F D finieron Por IVO port data register jiener RO a i eH eee define IO ON 0x00 define IO OFF OXFE ee EE p Definition tor 1 0 port direction register DRE SR DRE DII OL M EAD RE EE define IO OUTPUT OxFF define IO INPUTPUT 0x00 D EE EE EE E E EE E E eae Definition for interrupt level setting register decumas iL define INT DISABLE 0x03 D A rn T RETINET E E EDEN NT Macro for interrupt level setting register define SET INT LEVEL IRQOO level IO ILRO amp level define SET INT LEVEL IRQOl level IO ILRO amp level define SET INT LEVEL IRQ02 level IO ILRO amp level define SET INT LEVEL IRQ03 level IO ILRO amp level define SET INT LEVEL IRQOA level IO ILR1 amp
55. PDRO byte LED pat 8 IO PDR6 byte LED pat 0 break case 0x0100 4 25 co FUJITSU SorTUNE FIRST STEP GUIDE IO PDRO byte LED pat 0 IO PDR6 byte LED pat 1 break case 0x0200 IO PDR6 byte LED pat 2 break case 0x0400 IO PDR6 byte LED pat 3 break case 0x0800 IO PDR6 byte LED pat 4 break case 0x1000 IO PDR6 byte LED pat 5 break case 0x2000 IO PDR6 byte LED pat 6 break case 0x4000 IO PDR6 byte LED pat 7 break case 0x8000 IO PDR6 byte LED pat 8 break switch direction Case RET Te LOGE SLI 4 A Move GED o uput digit Lo ert flag 0x8000 direction RIGHT break case RIGHT lf l flag SoS 1 4 2 Move LED output digit to xight flag 0x0001 direction LEFT break 4 26 TUTORIAL FUJITSU 4 27 co FUJITSU SorTUNE FIRST STEP GUIDE Sample source vector c DERE x d vector c E pe sample program for First Step Guide Gd e EE x nS x Set interrupt function in interrupt vector Pu f we m I x Reference declaration of the interrupt function to be set extern _ interrupt void timer int void 5 Add Interrupt vector 11 of TO PTE reload tamer 0 e pragma intvect timer int 11 EE e c iL E O E x Set the startup function an reset vector y E TAE EE EE E EEE E C x Reference declaration of the startup function to be set extern void sta
56. Setup Wizard for Simulator B Setting Procedure by Setup Wizard When debugging for the first time after making Project execute Start debug in the Debug menu to start the Debugger setup wizard Set each item according to the menu 1 Select Start debug from the Debug menu When the setup wizard is started click Next 4 64 TUTORIAL 2 Select Simulator Debugger at Debugger Type RL wr ri oil ia M alc A E ue ai D rn aia A UE CL BL ap IRR S DL Be A a CE qnom eg ICA E CUL E A UT D T re Ee QAR A ici i E LAW E eg Vo iR DATA a A e D EE e n Pel e e C DS GC Dae UC A DT A E e RE DO NT ct Er D FP a Ts AOS TA ACTAE SAUDI CUN A E AT a AC OS NEE A AA ir DUNT Ree SC AAA y Sas Wizard x Place select debug ee m SE E Debug Type 2 S Emulator m ge Re EERE Simulator Debugger gt is bof d rie D Ces la i gt CR H J D D E eek n s m a 2 Nd e EE KE Kielen a a toe Uae PL si Z LA LR te We mm pme PER ee ee Die idu T d Ce EET ve EE x hr D E DN um D D E p Pee a D SN i D K SC SE i Oe sw s i Drm CR S i s 1 X ME q DARE mtn i wes EL E SHA AR MIO Y RTS Si LN EN AAA ME CAE AAA Pd PR EE ALIS TUR Nang m uus Teen D PELI fa what toma LORSE RAR KI jJ 7 H IBI lare wr EIL EE EIDEM te E S ee eee D AL ERN ATENTA es A s Y e DL ROLL LEE EN AW Se Bae TC ele a C POL CE TID GE at lw T Mea bs El A Hu at lan Vin nan HE Petri ius pem urs T EE D ie e L t Bx ee O a ARO IC om wg CHA e
57. UAL e F2MC 8L 8FX Family Sorrune C CHECKER MANUAL e F2MC 8L 8FX Family Sorrune C ANALYZER MANUAL viii 1 GENERAL 1 1 Features as Integrated Development Environment 1 2 Features of Project Management Functions co FUJITSU SorTUNE FIRST STEP GUIDE This chapter describes the features of Sorrune as an Integrated Development Environment and the features of project management functions 1 1 Features as Integrated Development Environment B Manager Function This function supports operations such as coding debugging and compiling performed in software development comprehensively It enables the user to develop software without paying attention to starting up language tools including a Compiler and Debugger and making option setting files B Debugger Function The user can use two Debuggers Simulator Debugger Emulator Debugger as needed The user can easily set the environments such as the debugging environment and operating environment of the MCU etc B Function for Checking and Analyzing Source Files SoFTunE has C Checker and C Analyzer tools to check and analyze source files written in C For details refer to the manuals for the respective tools B Setting Function for Setting Editors and Tools Although Sorrune has an editor the user can register any editor and use it The user can also set any execution file and execute it from the Sorrune Workbench desktop For details refer to Help Section 4 7 Setup of S
58. aking Target File 4 4 TUTORIAL FUJITSU 4 1 1 Setting up Development Environment Set the contents of the Environment Variable and Workspace tabs in the Setup Development dialog At installation the recommended configurations are set in the Setup Development dialog 1 Start Sorruue Workbench to select Development in the Setup menu SOFTUNE Workbench Sch Gs Man he area control Us k Ke e oard Editora Se E Error o ra uh Fu dz pa mu AER AA a AA IA AAA AA AAA A AR AA AA AAA ER AAA AA AA AA AAA AA EA AAA AAA A Setup Development Environment 4 5 co FUJITSU SorTUNE FIRST STEP GUIDE e Environment Variable tab Set each environment variable When an environment variable is set a brief explanation appears SEHR Bexelopruencm C Softunes BIN E Program Fi TETE Visus Stud esr S oftune INL Saftune sLIB BSE I NCLLIDE LIB83b Saftune sLIB B3B FELANG ASCII ou LC S aftune sLIB B3B S afbinesl IP GE En nvitonment Variable Vala Browse E Specify PATH Esecute file of language tool existence i in installed d E BlNdirectory Ru e Workspace tab Set the basic conditions required to operate Sorrune Workbench Mark the appropriate checkboxes In this tutorial mark the checkboxes given in the following dialog 4 6 TUTORIAL FUJITSU How to change display color of message You can chang
59. ap OFFF read write FFF undefined 4000 400C read Setup map FOOO F285 code read F25C FFCF undefined Delete defined areas Undefined areas may be changed into de ined areas read write code However defined areas cannot be changed into undefined areas in the Setup map dialog To change into undefined areas delete defined areas 4 72 TUTORIAL FUJITSU 4 2 3 Setting Interrupt B Simulation of Timer Interrupt This sample program generates interrupts every fixed period of time using the timer resource However because the Simulator has no timer resource the user needs to set to generate specified interrupts within a fixed cycle in order to simulate the interrupt processing This setting is saved after debugging 1 Select Interrupt from Debugging environment in the Setup menu 2 Set the interrupt number vector number request timing and cycle count in the Interrupt dialog In this sample set these items as follows Interrupt x um Du Re equest ning interval A Cycle s count p 25000 Loes ae Interrupt M 2 Number Request timing oe 2 n ea 25000 4 73 co FUJITSU SorTUNE FIRST STEP GUIDE 4 2 4 Registering and Checking Variables B Registering and Checking Variables Check the descriptions in the Watch window and Memory window 1 Open the Watch window Select Watch Watch 1 from the View menu SOFTUNE Workbench fsg sample
60. banks to be used In this sample click the OK button with the checkbox only for Bank O marked Setup Project ER S sg sample pr in det pry 4 55 co FUJITSU SorTUNE FIRST STEP GUIDE How to set language tool options for each source file 1 Select the source file to be set individually in the Project window to display the shortcut menu Select Set Individual Setting to set individual options in the Setup Project dialog oe Edit view Project Debug Setup Window Hep JI Workspace fsg_ sample E E sg sample abs Teg sample prj i Lus Open nes Si a Include rile em ee m CM m define Get um Dependen Debug dou MI nee EE io def pri Property m 2 ER a io def rel LE I A ee Delete Open List File SS 4 56 TUTORIAL FUJITSU 2 When the C source or the Assembler source is selected the C Compiler tab or the Assembler tab is displayed Set each item Setup Project General C Compiler Category General Emman DM MW Outputs start message v Outputs debug information Warning Level Level 1 M Outputs used stack information file Target of setting Debug ER E fsg sample pr ELE Source Files El 45h Creates an assembly list file o del pr MW Control of default option file Other Option CSS aftune Mib S BE include ample ME Y5F 1 O0 UK Cancel elo
61. cO FUJITSU SI3603FSG 01E F2MC 8FX Family SOFTUNE First Step Guide MB2146 09 BGM Adapter Sorrune First Step Guide 11 June 2004 02004 FUJITSU LIMITED Printed in Japan The contents of this document are subject to change without notice Customers are advised to consult with FUJITSU sales representatives before ordering The information such as descriptions of function and application circuit examples in this document are presented solely for the purpose of reference to show examples of operations and uses of Fujitsu semiconductor device Fujitsu does not warrant proper operation of the device with respect to use based on such information When you develop equipment incorporating the device based on such information you must assume any responsibility arising out of such use of the information Fujitsu assumes no liability for any damages whatsoever arising out of the use of the information Any information in this document including descriptions of function and schematic diagrams shall not be construed as license of the use or exercise of any intellectual property right such as patent right or copyright or any other right of Fujitsu or any third party or does Fujitsu warrant non infringement of any third party s intellectual property right or other right by using such information Fujitsu assumes no liability for any infringement of the intellectual property rights or other rights of third parties which would result from the use of infor
62. cally until debugging is terminated When updated save the setup file Select the Save command from the File menu to save the setup file for the Emulator in the Save dialog The setup file can be saved only in the debug mode ee SOFTUNE Workbench feg sample E 4 112 TUTORIAL FUJITSU 4 4 Operating Object Format Converter B Operating Object Format Converter This section explains the procedure for making a new project configuration for release separately from the project configur for debugging and how to operate the object type Converter The Object Format Converter handles the following file formats Absolute format load module for Linker output abs Motorola S format mhx ahx Intel HEX format ihx ehx hex Binary data file bin e 4 4 1 Adding Project Configuration e 4 4 2 Operating Converter 4 113 co FUJITSU SorTUNE FIRST STEP GUIDE 4 4 1 Adding Project Configuration B Adding Project Configuration A project configuration is a function to manage files for Make Build or the conditions for different option settings with one project This function allows making and managing FLASH microcontroller project to which FLASH self rewritable program files are Member added and mask release projects that remove FLASH self rewritable program files from Make Build operation The project configuration can be switched to make objects and debug for any purpose The default project configuration name
63. ch by V30L27 or later SorTUNE Workbench App 4 re APPENDIX FUJITSU A FAQs for Project Design Q1 How dol move the Sorruue Workbench project to another machine or drive Answer SorruuE Workbench manages project information stored in the workspace using the workspace file work space name wsp lt also manages Member information and information on various language tool options stored in the project using the project file project name pr j and the option data file project name dat If project information managed using the workspace file and Member information managed using the project file are on the same drive as the workspace file and project file Sorrune Workbench manages these informa tion with the relative path if they are on a different drive from the workspace file and project file SoFTUNE Workbench manages with the absolute path If there are no changes in relative path information SoFrune Workbench will automatically recognize path information even if the project is moved However if the information is managed by the absolute path it must be reset when the drive name or path information is changed Setting all necessary files under the workspace file and project file will be helpful when moving the project Fujitsu recommends the user should make the workspace project configuration as described in Chapter 4 Tutorial lib l EHE sample la fsg_sample dat ER Gin d E Fsg sample prc 1 KB C CANALYZER a Fsq_sam
64. ckbox enables to reset or clear each flag If the checkbox is not displayed select Flag from Tool bar in the View menu PWEUPWERPVPS Ha Register FOS A 0000 T 0000 IX 0000 aP z d EP 400D0 IL z FLA GS I z EF 00 DP 0 EO 00 R1 00 Re 00 R3 0U Ed 00 R5 00 R 6 00 RYO 4 87 co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE One Pome E Displaying status bar The status bar displays the following descriptions If the status bar is not displayed select Status Bar from the View menu When Sortune Workbench is in the debug Debugger type is displayed in the mode the display is as follows debug mode Y Break at F 46 by command abort request DEBUG Most Op EML Break IP F046 2 This description indicates the current status of This indicates the number This indicates the Sortune Workbench It also indicates the of the target MCU current IP instruction address information message when the address value when program stops at a breakpoint or is Sortune Workbench is suspended at guarded access Do not fail to This indicates the status of the in the debug mode notice the message debugger Execute or Break in the debug mode 4 88 TUTORIAL FUJITSU 4 2 7 Mix Display B Mix display When Mix display is selected during debugging the C source program and disassembled code are displayed at the same time making step by step program execution possible at disassemble level
65. ct the source file to be compiled in the Project window and execute Compile or Assemble in the shortcut menu Workspace Psq_sample fsg_sample abs fsg_sample prj ELE Source Files ERES asm WE EXE y EJ Include Fil T bl Hi define Delete a Depende reas i Debug Property S NC io def prj open List File El Bio def rel EES D 4 60 TUTORIAL FUJITSU z Error jump function z SorruuE Workbench has an error jump function When an error occurs in compiling or assembling the error message is displayed on the Output window When the user double click the error message the source file starts up to jump to the error line ga SOFTUNE Workbench sg sample File Edit View Project Debug Setup Window Help mH Workspace fsq_sample E E fsg_sample abs fsg_sample prj E a Source Files gd ME ASM o C E startup asm de void main void veckor c Eg Include Files A Hi define h jJ Dependencies il uhile ct i P eer pl jo def prj Es CL io EET i 0 SEN Dun Debug eAsuftuneisampletMsgiaft sampleisourceisample c 36 syntax error near Initia cAsoftuneisampleMsgi fx sampleisourceisample c 45 E4092 both separate parame c sottune sample fisg f_sample source sample c 45 EA062C syntax error near el 4 61 co FUJITSU SorTUNE FIRST STEP GUIDE One Fint f Using external editor When the user uses a
66. drag and drop function facilitates moving of folders and Member files SOFTUNE Workbench sample File Edt View Project Debug Setup Window Hel Ad dX ui pm ce E N Workspace sample 7 EI sample abs sample prj Del C H Source Files Include Files 4 Dependencies Debug App 55 co FUJITSU SorTUNE FIRST STEP GUIDE Conversion and backup of project files Note that the project files read and saved by V30L27 or later versions of Sorrune Workbench cannot be opened by V30L26 or earlier versions of Sorrune Workbench To convert the project files back up the project files and option data files under the following names If the files already exist they will not be overwritten e Project file project name pr project name p03 e Option data file project name dat project name d03 To reopen the project file using V30L26 or earlier version of Sorrune Workbench read the backup file corresponding to this file Look irc Sy Poe sl cf ES E san ird dal Jog3 im sample pr zjoeT LA sample ses Il compile E Sumulstor sup wi samplie ds aa shart ug aram App 56 F2MC 8FX FAMILY SOFTUNE FIRST STEP GUIDE MB2146 09 BGM Adapter June 2004 the first edition FUJITSU LIMITED
67. e E ar 7 LP WE ale DH D Arce H Lg ah ntf ne LL amm M E Fv Ze D Li i ER CI E mi TE s E A RR ee i ei r t eta nm wd i E y AR PR PEL aiit D Ce Ke De r y x 8 CC e N TL ACC H J e La H D CORRE T ea i CH D A us x t DAC damus NC x E amu H D E LE Wat Se e rett SL Larei CE E HEP es pm P erh UN Ur k aem ig T E AA AY y DEA Peach bets H y PR e er EN LS EA ado d AA LA s A Ke d Sach A C 3 ec we ZC ee HUE ia w E lt SCH tr DER 4 BC Ke PA T x man H De at oe a Hie ig sm Cas 4d UE mw 9 i 3 Click Next without specifying Batch File ctun Wizard NI Ee batch fi ile for d ater the star to DEUS the ne ex ND IEEE Du d r Specification b batch lie c Batcht e Browse ll Browse 4 65 co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE 4 Mark the checkbox for Auto load when starting debug The target file is automatically loaded when debugging is started Setup Wizard Make settings for the target file Specification batch file beforeafter load Before Browse After Browse Back Finish Cancel 5 Set items about saving debugging environment Select Select All for Select setting item Setup Wizard Select item on setup file Select setting item C Specification E Erecthiseti TS Back Finish Cancel 4 66 TUTORIAL FUJITSU 6 Follow the instructions on the screen a
68. e the display color of the termination messages displayed in the Output window at Make Build execution Color coding makes the massages more visible and readable To set the color of termination messages mark the checkbox for Termination messages are highlighted at make build in the Project tab and click the Detail optimize button 4 7 co FUJITSU SorTUNE FIRST STEP GUIDE Eu diia LL ra Open the last workspace a at stating E Output tool opion at comple arsemble E Jim fors saves sat t olose workspace a beim fors saves sat t compile assemble 4 8 TUTORIAL FUJITSU 4 9 co FUJITSU SorTUNE FIRST STEP GUIDE 4 1 2 Making Workspace and Project B Making Workspace and Project Make workspace and a Project to generate an absolute type target file 1 Select Workspace Project file from New in the File menu New Dp erc ue co e qud ea E nace Project file 4 10 TUTORIAL FUJITSU 2 In the Create dialog set the following items and click the OK button e Project Type gt Loadmodule ABS e Chip Classification gt FMC8FX e Target MCU MB95FV100 e Project Name fsg sample e Target Filename fsg sample abs e Project Directory C Softune lsample fsg 8fx sample Projecl vecdcpace 3 The Project to generate workspace and a target file is made H Workspace fsg_ sample EI fsg_sample abs fsg_sample prj 29 Source Files Inc
69. f setting General MEU C Compiler Assembler Linker Librari 1 a Debug ei o del pr Auto Disposition Mode z 4000 EFFF ROM _INROMO FOOD FFFF HOM HUM amp REA e When a HUM RHAM area is specified beyond the internal HUM ARAM range the warning ls sued g When sections are arranged beyond the range that the HU RAM area is specified the warning Is sued The Disposition Lonnection option rs reset Option H AL 2 10 _INROMO1 0x4000 0xEFFF 4o ROM AREA DXFDDD DSFFFF Carcel ze Output record S1 S2 S3 The output record depends on the ROM range In the MB965FV100 the ROM area ranges from 0x0000 to OxFFFF and S1 is specified 010000 to OXF FFF 0400000010 OxEFEFFF 0x00000000 to OxFFFFFFFF 5 The S format Adjuster is started to make the formatted Motorola S format file C Softune Sample fsg 8x_sample mask ABS fsg_sample ahx 5 7 co FUJITSU SorTUNE FIRST STEP GUIDE 5 2 Setting External Editor B Merit in using External Editor Instead of the internal Editor the user can use favorite Editor It is also possible to start the source file entered in the Project and cause an error jump An example of setting WZ Editor V4 0 is given B Setting Procedure for External Editor 1 Select Editor from the Setup menu ce SOPTUSE Yorkbench Eu a sample So A X Fa rampe gt ee e e abend d aD LN
70. f the instruction next to the function call instruction 4 Step Out The current function is executed up to its end returning to the function call source and program execution is stopped after moving the PC to the address of the instruction next to the function call instruction 5 Run Until Cursor Program execution is performed up to the immediately preceding instruction at the address at which the current cursor is on the Source or Disassemble window and stopped after moving the PC to the address at the cursor To reset the program execution click Reset of MCU in the Debug menu or the button enclosed in dotted line ga SOFTUNE Workbench teg sample Debug a xi Fle Edt View Project Debug Setup Window Hep 4 85 co FUJITSU SorTUNE FIRST STEP GUIDE z Displaying Register window z When Register is selected from the View menu the Register window is opened The register with a value changed by executing the program is displayed in red on the Register window To display the register select Setup from the shortcut menu Then select the register to be displayed in the Setup display register dialog PC F SS nu T 0001 Ix lFa8 SP lFZ EP 4000 IL z FLA GS I z EF 00 DP O ROIOO Rl 0 Re 00 R3 00 R4 00 R5 00 R6 00 Roo Setup display register NI R2 Fis Rd 4 86 TUTORIAL Status display of MCU condition flag The status of the condition flag is displayed Clicking this che
71. fer n A startup asm sample c Geo vector c Dependencies GEI io det rel in def pri co FUJITSU SorTUNE FIRST STEP GUIDE Q4 How to check details of the sample I O register file Answer The Sample I O Register Files User s Manual describes the details of the sample I O register file This Sample I O Register Files User s Manual provides the manuals for describing the symbol defined by the sample I O register file in the C source and for describing the symbol in the Assembler source in both Japanese and English versions as the following four text files for each product Use the Editor to refer to the file for any purpose Text file name loregj txt Symbol description in C source Japanese version ioreg txt Symbol description in C source English version ioregj a txt Symbol description in Assembler source Japanese version loreg a txt Symbol description in Assembler source English version File directory MB95100 series C Softune lib 896 include sample MB95100 MB95110 series C Softune lib 896 include sample MB951 10 MB95FV100 series C Softunellib 896 include sample MB95FV100 The user s manual for the symbol description in C source can also be opened using the following Windows start menu Program SoftuneV3 Sample IO Register Files FFMC 8L Family Sample IO Register Files USERS MANUAL MB95xxx series Sample lO Register Files USERS MANUAL App 50 APPENDIX FUJITSU Q
72. g Environment in the Setup menu and open the Setup debug environment dialog Select the Monitoring tab and mark the Watch window checkbox The shortcut menu in the Watch window also enables selection of Monitoring The sampling time can be set in 1 second units CUN debug environment LES Senge Stepe eee wen R ie Wee d Directory 1 Tab a Eror RE p Load E PC EN x Sec window po p EL o o o E Dat struct PSU Hol Pl H Ul PES 1 OL PEJ OL Ped E 00 FES H OL FES NI 7 H OL actruct 4 91 CO FUJITSU 2 Click the breakpoint to deselect it SOFTUNE FIRST STEP GUIDE The variables in the Watch window are always updated when the program is executed SOFTUNE Workbench Teo sample Debug File Edit ee TE View Project Debug Setup Window Help E H Workspace fsq_ sample E E fsg_sample abs E Source Files iniF c sample vector Include Files G Dependencies lt HH F2mcBFx h Hi mbasr 100 B Debug B sim dba SU e io det prj e E io def rel io def THM I interrupt void timer d IU THCSRLO Hit UF counter break case Ox0002 IU PDED break case x 4d I PDRD break case Ox0008 IU PDRD break case 0x0010 Io PDED break case x z IU FDRG break case O0x0040 IU PDED break case x s TA DD THwMe Py Peo 0 Determine va swi
73. g the Debugger executes a program the execution of the program can be stopped when the program counter PC passes a certain address or accesses data at a certain address The position where the execution of the program is stopped is called a breakpoint The user can set the code breakpoints data monitoring breakpoints and sequence breakpoints This sample sets a breakpoint at the beginning of the timer interrupt function in sample c Click the left circle of the source window to set the breakpoint X The yellow line indicates the current position of the instruction pointer IP Note The IP value is the same as the PC value SOFTUNE Workbench sy sample Debug E ES File Edit View Project Debug Setup Window Help sq sample L Debug e BB sample c Workspace fsg_sample ER E sg sample abs UE PRESSE DER RSS SSSR E ELE Source Files 39 Interrupt handling for l6 bit Reload Timer O CL Je d 4 2 2 2 41 Include Files dz interrupt void timer inti voidi Dependencies H f Debug da IU TMCSRLO0 bit U0F 0 Clear the req e in def prj 45 if T counter gt 5j f i o In def rel io def n eee s dq Determine value to be output to LEDs do switch flag 49 case DxODO0l 50 IU PDR byte LED pat l1 Le break os case OxO0U2 a IU PDR byte LED pat lt 54 break 55 case Dx0004 56 IU PDR byte
74. ge App 31 Q5 How to save trace results and evaluation results such as memory dump to a file eeeeeec eese erre esee serene nene nn nnns App 33 Q6 Does the Emulator support coverage measurement App 35 Q7 Does the Emulator support time measurement App 36 Q8 Does the Emulator support event Setting sms App 37 Q9 Does the Emulator support the Debugger memory map App 38 Q10 Does the Emulator support the monitoring function App 39 Q11 Are there any restrictions on the instruction count between branches that can be displayed by trace eeesssss App 40 Q12 What should do if the progress bar showing Processing is displayed and the Debugger is not in the execute state when the program is executed by the Emulator App 41 Q13 How to shorten the flash memory update time App 42 Q14 What does the Debugger do if the user suspends the operation during executing in the standby mode by the Emulator App 43 CONG AA sarteeedesSsanasseseecersavsanvessceebastaisn App 44 Q1 How to check the version of Sorrune Workbench and each language tool App 44 Q2 Q3 Q4 Q5 Q6 Q7 How to change the size of the font displayed in each OORIUNE Workbench
75. gging Optimization of response speed optimization during debugging which is one of the settings related to communications determines whether to change the CPU clock to increase a response speed during debugging when the user program breaks Besure to return the CPU clock to its original value when executing the user program That means when this setting is enabled the CPU clock overclocks to increase the communication speed between the host and the target and the response speed during debugging such updating time of flash memory only when the user program breaks When this setting is disabled contrary the CPU clock remains unchanged even when the user program breaks and the communication speed between the host and the target depends on the CPU clock speed set by the user For details about how to change the setting of response speed optimization during debugging see APPENDIX B Q13 How to shorten the flash memory update time 4 104 TUTORIAL FUJITSU 4 3 3 Executing Program B Excuting program 1 Turn on the user power to the MB2146 401 2 The MB2146 09 POWER LED turns orange 3 Double click emu dbg sup in the Debug folder in the Project window to start the Emulator Debugger E ka Debug Po Pee act emu dbg sup 2 i sim dbg sup 4 Reset MCU before executing the program SOFTUNE Workbench SL Gelle Ni 4 105 co FUJITSU SorTUNE FIRST STEP GUIDE 4 3 4 Setting Breakpoint B Setting Breakpoint Durin
76. ine CLOCK X2p5 0 FF Original os lation clock 3642 5 define CLOCK X2p5 1 tanda dafine h 27 4 34 TUTORIAL FUJITSU 4 1 5 Adding Member to Project B Adding a Member Add the made source file to the project Member Make a project that generates an I O area module io def rel as a subproject depending on the fsg sample project 1 Select the Source Files folder and select Create New Folder from the shortcut menu Create the folders ASM and C in the Create New Folder dialog Because these folders are used to help the users manage files in the Sorruwe project the users can name the folders optionally SOFTUNE Workbench sg sample Workspace Fsg_sample fsg_sample abs teg sample prj Add Member to folder gt ue o M 4 35 co FUJITSU SorTUNE FIRST STEP GUIDE 2 Select Add Member to folder File from the shortcut menu for the ASM and c folders Add the file to the Member in the Add Member dialog Workspacefsg_sample CDI fsg_sample abs fsg_sample prj Debug EE E LE RE tt O Ee EC EE RECH C EE E ue Kr EC RR Lc T TOC Err E Mr Add Member Lookin ue v ef amp riEM Files of type Source File c asm Mem Tye automa Insertion Folder 4 36 TUTORIAL FUJITSU 3 An include file can be added to the Member Add the include file to the Include Files folder in
77. is executed and stopped Right click the Trace window to select Refresh from the shortcut menu The trace results appears SOFTUNE Workbench sy sample Debug Me E File Edit View Project Debug Setup Window Help isa sample T Debug MEJES E E Workspace sg_sample ER E fsg_sample abs address Iniemaonic 2 3 Source Files 00015 F075 CHEW Refresh EE 00014 F079 ENZ FOVE Jump 00013 FOVE CHI T Exc nae Include Files 00012 FOF MOV 4 0002 Dependencies 00011 FOSZ CMPU w Instruction Debug 00010 F083 ENZ Foss Gye o Md io def prj 00009 Foss XCHW T CHE e EI io def rel io det 70008 F089 MOVU 000z 00007 FOSC CHPH A Seb 00006 FO8D ENZ DER Find 00005 F092 CHI T Save file 00004 F093 MOI A 0006 00003 F096 CHPH A Clear 00002 F097 ENZ FOSC 00001 F099 TMP Fl2F Close sample cg59 I0 PDRO byte LED pat 00000 F12F MOV 4 gt 4008 al i Hii nan Alteration of window data DEBUG MB9SFY100 EM Break IP F1 7 Display format for trace data There are two display formats for trace data e Display in order of instruction execution Instruction e Display in source lines Source Use the shortcut menu to switch between the display formats for trace data No trace stamp is displayed 4 111 co FUJITSU SorTUNE FIRST STEP GUIDE Saving setup file for the Emulator A setup file is not saved automati
78. is u used d sack main ie UN QU i Fo Control a default option ne o ose Other Option IM px ccc d ucc SI H C SotunesibsSE includeSsample MB35100 ql sp ESS App 45 co FUJITSU SorTUNE FIRST STEP GUIDE 2 When Compile Make or Build is selected from the Project menu the output message is output with version information in the Output window ga SOFTUNE Workbench ES al E Mu M EMEN M ag Source Files 2 Include Files Dependencies Debug 3 Se d s Io def prj o e o deF rel io deF pri Debug 3 0 d Enel du c uu c ee sample c a IF2MC 8L 8FEX Family SOFTUME C Compile HALL RIGHTS RESERVED COPYRIGHT C FUJITSU LIMITED 1986 LICENSED MATERIAL PROGRAM PROPERTY OF FUJITSU LIMITED Note The version displayed in the window may be different from the product version App 46 APPENDIX FUJITSU Q2 How to change the size of the font displayed in each Sorrune Workbench window Answer The user can change the font size by the following procedure 1 Select Font from the View menu to open the Set Font dialog EE v Project TM p RE v Output uc qum i pee SE EH Register a Memory l cuu Performance WI E occ E mor ua c Font m 5i Customize bar gt a Tr e SR iT zo E v T gU c c c Set Font App 47 co FUJITSU SorTUNE FIRST STEP GUIDE 2 Select the window to be
79. ition is a breakpoint before execution e Data breakpoint Data breakpoint is a breakpoint to stop program when the PC accesses data at a set address Head write and read write can be set as access conditions 3 B reak addre eg H 0000 s 3 GE we che Get Si E Pascout PA Break liso Status enable Vimer int enable enable 4 79 co FUJITSU SorTUNE FIRST STEP GUIDE 4 2 6 Executing and Stopping Program The program is executed up to the breakpoint set in Section 4 2 5 This sample includes the program for clock switching However because the Simulator has no resources the PLL clock enters the oscillation stabilization wait state Stop executing the program temporarily and set 1 to the MPRDY bit of the PLL control register IO PLLO in the Watch window and then set 1 to the SCMO SCM bit of the system clock control register IO SYCC When the user reruns the program the program stops at the set breakpoint 1 Click the Run continuously button enclosed in the dotted lines to execute the program 9 H FF H FE H FD H FE H F H EF H DF H BF D 8 H 7F mim PLLC union m 10_SYCC union m 10_PDRO union o LI 10 PORE union SIM Break D 4 80 TUTORIAL FUJITSU 2 Click the Stop execution button enclosed in the dotted lines to stop the program temporarily za SOFTUNE Workbench sy sample Debug OX Fie Edit View
80. l Pack Setup This program will install E AM D JOE Family SOFTLUME Professional Pack on your computer tis strongly recommended that vou exit all Windows programs before running this Setup program 2 3 co FUJITSU SorTUNE FIRST STEP GUIDE 3 Specify the destination directory See E Cautions before specifying the directory FzZMLC 8L 8FX Family SOFTUME Professional Pack Setup Choose Destination Select folder where Setup will install Files M T I 71 7 UTE coenae E Y um 3 E S e n 3 UN prp Uu p B Cautions e Refer to the installation manual before installation e When installing more than one Sorruwe V3 product for F MC 8L F MC 16 and FR Families on one personal computer specify the same destination folder e When installing Sorrune V3 Sorruue V5 and Sortune V6 on one personal computer be sure to specify different destination folders Installation in the same folder is prohibited INSTALLING FUJITSU 4 Select the components to install When a component is selected its description appears at the right side Mark the appropriate checkboxes This manual describes how to operate the following checked tools excluding C Checker and C Analyzer F2MC BL 8FX Family SOFTUME Professional Pack Setup Select Components Choose the components Setup will install Select the components yau want to install and clear the components yau do not want to Dou instal GE EE E En INE mm prm th
81. linker or librarian Ws Ed Workspace fsg_ sample Set active project Jer Create new Folder ee m Add Member to o project ves SE SE ENEE SE Open List File os COE d c Open HEX File App 24 APPENDIX FUJITSU 2 In the Set Linkage order dialog rearrange the items from top in the order in which the user wants to link Use the Up and Down buttons to change the order After completing the settings click the OK button Sct link age arder App 25 co FUJITSU SorTUNE FIRST STEP GUIDE Q9 Is the dependent source file at Make execution compiled when only the include file is changed Answer If the include file is changed even when there is no change in the source file all the dependent files are compiled by executing Make App 26 re APPENDIX FUJITSU B FAQs for Debugger Q1 What should do if the Debugger cannot be started Answer e lfthe POWER LED of the Emulator MB2146 09 is green power may not be supplied to the target board or the target board may not be connected correctly to the MB2146 09 Check the supply voltage level and the connection to the MB2146 09 If the POWER LED is red the MB2146 09 may not be connected correctly to the host Check the connection to the host The POWER LED is orange when the connection is normal e lf the user gets the following error message when the POWER LED of the MB2146 09 is orange dis connect the USB cable from the PC temporaril
82. lude Files Dependencies Debug co FUJITSU SorTUNE FIRST STEP GUIDE Opening the Workspace Project To open the Project after subsequent Workspace Project is made specify the Workspace file The Workspace file in this sample is sg_sample wsp 1 Select Open Workspace from the File menu 2 Select the Workspace file in the Open Workspace dialog Open Workspace NI Look in E Bir sample genam BE Fsg_sample wsp Filename Jeg sam le wen s eic Files of type Workspace Filet wsp s ccs D O KKK Do CD Des DL EK KLEK EA E Tue de O O 4 12 TUTORIAL Opening the recently used Workspace file Five Project files are automatically stored starting with the newest one Select Recent Workspace File from the File menu and choose the workspace file Using this button you need not specify the file name The same is true for the test file SOFTUNE Workbench Fe Edit View et Hr em Window Help CIEN El miel i a ee ut qe E ee Glas ase E ou Se Close Workspace Save US E Save As ee all SS SE Ss ege Print Text Pie E Recent Works vam ace Fle 1 c SoftunelsamplelFsqiorx Ex Peer _ lt ampleifsg_ sample wsp D He PONS PO CE OP NT PORC PONT A CRC A 2 na fei PO ai o n s TEE PCHEPCEO Jed OA OA RUPES LN a im NN BEER er we Er E RAR iar E ee MN uon NUM te Me area RON a set a a me
83. mation contained herein The products described in this document are designed developed and manufactured as contemplated for general use including without limitation ordinary industrial use general office use personal use and household use but are not designed developed and manufactured as contemplated 1 for use accompanying fatal risks or dangers that unless extremely high safety is secured could have a serious effect to the public and could lead directly to death personal injury severe physical damage or other loss i e nuclear reaction control in nuclear facility aircraft flight control air traffic control mass transport control medical life support system missile launch control in weapon system or 2 for use requiring extremely high reliability i e submersible repeater and artificial satellite Please note that Fujitsu will not be liable against you and or any third party for any claims or damages arising in connection with above mentioned uses of the products Any semiconductor devices have an inherent chance of failure You must protect against injury damage or loss from such failures by incorporating safety design measures into your facility and equipment such as redundancy fire protection and prevention of over current levels and other abnormal operating conditions If any products described in this document represent goods or technologies subject to certain restrictions on export under the Foreign Exchange and F
84. mpiler and Assembler and the library search path of the Linker Check the include path in the C Compiler and Assembler tabs and the library search path in the Linker tab in the Setup dialog and change them as necessary The macro may be used to set the include path An example of setting the include path using the macro is shown below The description using the macro is displayed in the Option column enclosed in dotted lines and can be used to check an expanding path e ENV FETOOL lib 896 include sample MB95FV100 Sorruwe install directory e PRJPATH include Project directory Setup Profert Bener MEU C Compier Asanble Lider Lat 1 Ld E p A cl zc Re dei pri lindudePahLat Adi c La E NVIFE T GOL Pb Ese include v ample MBSSFV IO Ke Tun chute App 8 APPENDIX Setup Project Target of setting General MCU C Compiler Assembler Linker Librari d Debug H Category GEI o del pr Include Path Setup Project Target af setting Category Control Library o del on Don t retrieval the default library Don t check debug infomation existence in library Search Path H AL 4o INFIDIMT 0 4000 0xE FFF ro ROM_AREA 08FO00 04FFFF LK Cancel EE App 9 co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE 3 Execute Make or Build in the Project menu to make a
85. n external editor the source file being edited is not saved automatically Therefore the user must save the source file before compiling In addition when the user must set different options for each editor to use the error jump function For details refer to Help Section 1 9 Storing External Editors of Sorrune Workbench User s Manual E Recommended Use of C Checker Fujitsu recommends that the user should use the C Checker after a compiling error in the source file is corrected Using the C Checker enables checking of bug portability and coding errors that are not treated as compiling errors For details see Sorrune C Checker Manual B Recommended Use of C Analyzer Fujitsu recommends that the user should use the C Analyzer after making a target file Using the C Analyzer enables visual checking of the program structure For details see Sorrune C Analyzer Manual 4 62 TUTORIAL FUJITSU 4 2 Debugging by Simulator B Debugging by Simulator This section explains the procedure for verifying program by using the Simulator It also explains briefly the Simulator functions e 4 2 1 Making Setup Wizard for Simulator e 4 2 2 Setting Memory Map e 4 2 3 Setting Interrupt e 4 2 4 Registering and Checking Variables e 4 2 5 Setting Breakpoint e 4 2 6 Executing and Stopping Program e 4 2 7 Mix Display e 4 2 8 Monitoring e 4 2 9 Correcting and Re debugging Program 4 63 co FUJITSU SorTUNE FIRST STEP GUIDE 4 2 1 Making
86. nd click the Finish button This completes the settings The target file is loaded to switch to the debug mode The type of debug modes appears at the bottom of the screen enclosed in dotted line SOFTUNE Workbench Teo sample Debug x pk e wa om E EU Workspace fsg_sample E B sg sample abs fsg_sample E a Source Files EL ASM eh startup asm id vector Br a Include Files ui define h Dependencies sl Debug gt ds io det pri Es Bi io def rel io def Pr Debug de Fur Purzarvre 4 67 co FUJITSU SorTUNE FIRST STEP GUIDE 4 2 2 Setting Memory Map Set the memory map If program access is made with anything other than the set attribute an access violation occurs to stop the program In this sample set the area to access the CONST INIT CODE INITVECT and RESETVECT section 1 Check the CONST INIT CODE INITVECT and RESETVECT sections on the map file To open the map file select sg sample abs as the project name and select Open list file fsg_sample mp1 from the shortcut menu File Edit View Project Debug Setup Window Help EE ie Aet active project 1 creator new folder i A Add Member t to project Set Project E e Linkage order E Rcg e s n Teu c ere Open List File BN OpenHEX File RD c x Tus See mps t D I RE E 4 68 TUTORIAL co FUJITSU As can be seen from the enclosed part
87. o address 0082 where the variable is located ua 01 00 OO OO OO OO OO OO OO DU o0sb OO 00 OO OO OO 00 OO 00 00 00 OO 0095 00 00 OO OO OO OO OO 00 00 00 App 29 co FUJITSU SorTUNE FIRST STEP GUIDE Q3 How to set the path count of a breakpoint during using the Emulator Debugger Answer Help Section 4 6 4 Break Point of Sorrune Workbench Operation Manual describes how to set path count of a breakpoint This function is enabled only in the Simulator mode The Emulator mode does not offer this function App 30 APPENDIX FUJITSU Q4 Why are the settings of breakpoints are changed when the target file is changed Answer When the target file is changed the settings of breakpoints and events specified by symbols are not changed unless the symbol names remain unchanged However the settings of breakpoints and events specified at the absolute address must be reviewed if the source file is corrected to remake a target file An example of a setting from which setup breakpoint information is not inherited when loading the next target file is given below 1 Select Setup from the Project menu to open the Setup Project dialog Select the setup file at Category in the Debug tab in the Setup dialog and click the Change button Setup Project Temetoiseting Assembler Linker Lirarien Converter Debo At d Debug cI catego Jr io dep Avaiable SehpName Sst
88. ogramming of flash memory is completed the Debugger enters the execute state Processing here means that programming of flash memory is in progress To perform debugging in the execute state im mediately after program execution update flash memory Flash area control Download Flash Memory or click the button enclosed in dotted lines ALAS Workbench sg ou LUE m zeen n pem ES E environment EHE pros FLASH pe ome m Erase FLASH memory tara ME init c o sample c veckar c Include Files Dependencies Er ka Debug iR emu dbg sup i sh sim dbg sup 8 io deF prj B io def rel io det port Debug Tool execution nn ES MBSSFVIOUD App 41 co FUJITSU SorTUNE FIRST STEP GUIDE Q13 How to shorten the flash memory update time Answer Select Debug environment from the Setup menu to open the Setup debug environment dialog Set En able for debugging response speed optimization in the Response speed tab Enable is set in the Setup wizard for the Emulator Debugger by default zn HE environment E Execution o E execution AE Watch T Fadi SE ER i io E During Debugging 1 response e speed optimization dm ie 9 2 Enable E Disable fe es User r program es CPU clock i is ae ds ms dde debugging response speed Iz oe the mm App 42 APPENDIX FUJITSU Q14 What does the Debugger do if the user suspends the operation during
89. on The ROM to RAM transfer section enables such use of initial value data For details refer to Help Section 5 9 Sections to be transferred from ROM to RAM of Sortune Linkage Kit MANUAL 4 49 co FUJITSU SorTUNE FIRST STEP GUIDE Click the Set button and set the area name attribute and start and end addresses of the ROM or RAM area in the Setup ROM RAM Area Name dialog Ad dicia LES Target of setting ER o det pry Ch vm ee 8 Bir JMRAMOT 1000 FFFF ROM _INROMO E d BOM BAM range the waming is issued NUT DE Z When sections are n cae ther range s that the Lo INROMO1 Ds1000 0KFFFF o at ecINRAMOT D 0080 0 0F7F o S le Ares sAtibue Slat Address End e Se Es 4 50 TUTORIAL FUJITSU Select the start address of the INROMO and click the Set button to change the start address in the Setup ROM RAM Area Name dialog to H 4000 And change the end address to H EFFF gH A SG ES Target of setting GEI o del pry F7F RAM INRAMUT FFFF ROM IMMO FFFF ROM ROM AREA F NET sections are SEH beyond ther range s that the S ROM RAM area is ce En the one 3 issued us Le INAOMO1 0 1 aaner mu c DR Je INRAMDT DODSD OETE o D Setup ROM RAM Area Name RUM RAM Area Mame NROMDI Area Attribute Start Address End Address RUM H 4000 HEFFF Cancel 4 51 co FUJITSU SorTUNE FIRST STEP GUIDE Click the Set Section
90. only project files The project files can be read by V30L27 Sorrune Workbench The project Member files set previously and the settings of language tool options are all inherited 1 Select Open Workspace from the File menu to open the Open Workspace dialog Specify Project File prj for Files of type and select the project file developed by V30L26 or earlier versions of Sorrune Workbench Look in E Project de E HE File name Cancel sample pr Files of typ Project File pri y App 53 co FUJITSU SorTUNE FIRST STEP GUIDE 2 When the dialog for confirming the conversion of the project file opens click Yes Softune896 NI SEET This EET File i is gud version Convert LA E Fe ASoftunelsamplel896 Projectisample F pti E coe m a E us uc AES is made as Couette a pos The inherited project Member information dependencies and settings of language tool options are made When the workspace project file is saved a new workspace file will be made SOFTUNE Workbench sample File Edit View Project Debug Setup Window Help sample abs sample prj Del EE Source Files ZE Sample c e startup asm Include Files Dependencies Debug App 54 APPENDIX FUJITSU Sorting Member files All project Member files inherited from the previous version are stored in the Source Files folder Create a folder as necessary to sort Member files The
91. orTUNE FIRST STEP GUIDE 6 Copy a sample I O register files to the directory below the project directory of the I O area module creation project Copy all C source files c in C Softuneilib 896 include sample MB95FV100 to C Softune sample fsg 8fx_sample io_def Debug I C 5oftune sample fsq 8fx_ sample io_def Debug File Edit View Favorites Tools Help Address J Cusoftuneisamplelfsg sf _sampletio_defiDlebug Falders File Folder File Folder File Folder File Folder femcBix c 1KB CFile EE lib EMI 896 EHE include Eg sample T 123 MB95100 m 123 MB95110 an 123 MB95FY100 D 911 EHE sample mj 896 m 23 CAMALYZER zu Checker E fsg CL BFx sample Eg Debug EL o def G Debug JE source 5 objectis Disk Free space 67 6 MB 4 40 TUTORIAL 7 Set a member required to an I O area Select Add Member File from the Project menu co FUJITSU Select all the sample I O register files copied in step 6 and click the Open button The Member is then added to the project Specify io def Source Files for insertion wor m a m m a spi see E mma ein le Lo n hi a E m da B m a dM m WEE ad ud d m m p m m a WE ud qa lw ER m SE e Setup Workspace BH Workspar d E ED feo s ZP v E 3 5 Customize E ui PM E E Project Dependencies ie fas C onfigur ation n s E e t x ZE T ee ies 2 D Si E E a HIE d s Ip def
92. oreign Trade Law of Japan the prior authorization by Japanese government will be required for export of those products from Japan CONTENTS 1 GENERAL ina a 1 1 1 1 Features as Integrated Development Environment sss 1 2 1 2 Features of Project Management Functions eee ceres rere 1 4 A c e CO nn PO WX 2 1 3 DEVELOPMENT PROC DURE ste unes xoi spas da uada re Iu cocci e 3 1 As TUTO RIAL ninel ie 4 1 4 1 Designing Workspace PrOjeCtonooccccnnnccconnccccocancccnnanccnnnnnnononnnnonennnnnrnnannrrnnannrrnnnanerennannrnnnanas 4 4 4 1 1 Setting up Development Environment eeeeeeeee eese 4 5 4 1 2 Makig Workspace and Project eeeeeeeeeeeeeee cernerent 4 10 41 3 Seting Works Pace diia 4 14 4 1 4 Making SOURCE FIle a IR 4 16 4 1 5 Adding Member to Frot 4 35 41 6 Setting PROISCU Lin NN te AN olo des neu o Mean Oud uude DEus 4 46 MNA Making Target o A te eurent ide 4 58 42 DeEDUGGING by SIMU IATON in en aa 4 63 4 2 1 Making Setup Wizard for Simulator nnsssssnsnnrreeeennnsnnneeneeeennnnnns 4 64 4 2 2 Setting Memory Map inodo ico Erie itin ioco UE inei EE Ee im 4 68 4 2 3 Set ng InterrUDE o ono e uci A siens 4 73 4 2 4 Registering and Checking Variables eeeec ec eceeeeeeeee eere ee nennen 4 74 42
93. orrune Workbench Operation Manual 1 2 GENERAL FUJITSU One Poit Debugger type Debugger type Equipment required for program evaluation Simulator Debugger Personal computer Emulator Debugger Personal computer ICE target board e Simulator Debugger The Simulator Debugger simulates the MCU operations instruction execution memory space l O ports interrupts reset low power consumption modes etc only with software and evaluates the program The Simulator Debugger is used to evaluate the uncompleted evaluation system and check a single program operation The Simulator Debugger does not support the internal resources and registers associated with them not mentioned in the Sorrune Workbench USER S MANUAL Simulator Debugger e Emulator Debugger The Emulator Debugger is software that controls the in circuit Emulator ICE through a communication line USB from the host computer and evaluates the program 1 3 co FUJITSU SorTUNE FIRST STEP GUIDE 1 2 Features of Project Management Functions B Features of Project Management Functions The project management functions of F 2MC 8L 8FX Family Sorrune Workbench are briefly described below e Introduction of a workspace allows registration and hierarchical management of multiple projects e Making a subproject enables definition of dependencies between projects e Making a project configuration allows setting saving and selection of two or more combinations of
94. ple prj 4 KB i CChecker m fsg sample wsp 1KB EC fsg Sfx_ sample H E Debug A My Computer If the user moves the project to another machine or drive check the following items and change each setting as necessary App 5 co FUJITSU SorTUNE FIRST STEP GUIDE 1 Use Sorrune Workbench to open the moved workspace and check whether the input project and Member file are in the workspace If not they must be reset If there is no project the following message is displayed Specify the path of the project and input the project in the workspace Softune896 AA E H Bei EN nie E A AAA wm ES O Ven ee ET Fier not Fund E D s amb eo def pri fier name det p D ES ARA HERES E E of ype i D I App 6 APPENDIX FUJITSU If there is no Member file it can be reset by changing its properties Click the file and select Property from the shortcut menu to open the File Property dialog E ES Workspacefsg sample E E wg sample ahs feg ample pri E 3 source Files El 1 ASM Huc Ki nk c c gum Ki Open QJ Induce Conds sampls c E E Depend Set d El Debug Ej o dd nes l NN E de rel Property y Open Let File k Genera Conde Del a vae pss pum 4 EL E S 3 Se E we EE E Mod odfied ae 7 1 8 52 Wednesda ze E mm a jm co FUJITSU SorTUNE FIRST STEP GUIDE 2 Check the include paths of the C Co
95. prj TT io def rel io def prj Debug Source Files 21 Include Files Dependencies Add Member 4 41 E e SE oc a n m erp e ET ES xls co FUJITSU SorTUNE FIRST STEP GUIDE Add Member XI Look in E Debug sl SE File name am 0 Files of type SowceFie c asm Cancel Mem Type automate x Insertion Folder io delsouceFles gt H 8 Select Setup Project from the Project menu Click the C Compiler tab in the Setup Project dialog and select the Category Include Path Specify the include path using the following macro and click the Add button to add the path to the Include Path List For details about the macro see Section 4 16 Setting Project ENV FETooL lib 896 include sample MB95FV100 s 506 TUNE Workbench fsg_sample e e em mmm ee Ulli E epa E lalola Ts ala cuca DD Include Files Bg Deperetencies 4 42 TUTORIAL Setup Project General MCL L Compiler Assembler Linker Librari 4 A Category Include Path Eommar ate Include Path ER HVIFETUDL NIBSSSBSineludessamples B 35P1 00 E Target of setting Debug ER s sg sample pri 9 Select the Category Disposition Connection in the Linker tab and disable all options Setup Project Target of setting ERR E m to sample pr RER dei oi Cancel App 4 43 co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE 10 Execute
96. procedure is described below 1 Select Add Member File from the Project menu to open the Add Member dialog 2 Select All Files for Files of Type and Assembly Source Files for Mem Type opecify the file name and click the Open button Pali ewer x Men Tyne The above example recognizes the added change s as an Assembly source file Similarly when any of C source Files Object Files Library Files or Relocatable Files is set for Mem Type each file is recognized as a target file irrespective of the extension App 22 APPENDIX One Paint File types and extensions by default Mem Type is set to Auto by default The recognizable file types and extensions in this mode are listed below e C Source files C i e Assembly source files asm e Object files Ob e Relocatable files rel e Library files lib e Include files h e Other files All files with other extensions are recognized as other files App 23 co FUJITSU CO FUJITSU SOFTUNE FIRST STEP GUIDE Q8 How dol change the linkage order Answer The user can change the linkage order in the Project window The order before being changed is that in which source files are added to the Member The setting procedure is described below 1 Specify the Project target file name and select Set Linkage order from the shortcut menu ER EP EK E l Executing
97. pter 4 C Softune sample fsg 8f x_sample fsg_sample prc Customize bar EEN Dialog Fa File List d Lee Seege prc E a c us ntry Ee USEFUL FUNCTIONS 4 The customize bar is entered and displayed on the window SHE c EHIE Meer prRIBEE EEN EU WorkspaceTsg sample n E E sg sample abs E 3 Source Files Include Files Dependencies Br a Debug oom EM emu dg ei 29 7 sim dbg sur AD io def prj E E io det rel io def gt 2 ri H P ic P N LE 2 a VIE E GE Map SIM 9 15 co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE Displaying customize bar Select Customize bar View from the View menu ga SOFTUNE Workbench fsg_sample Debug View Project Debug Setup Window Web uc cenam c Dl e Ei Performance Command v s 7 A Status Bar S Debug mode The batch file can be input and executed only in the debug mode The debug mode is set when the following items are enclosed in the dotted lines e SIM Simulator Debugger e EML Emulator Debugger DEBUG MBesFvI00 Ca 7 5 16 USEFUL FUNCTIONS 5 4 Setting Customize Build B Merit in Setting Customize Build co FUJITSU When executing Compile Assemble Make and Build the user can register another tool before and after executing the respective tools The following example registers the object module conversion tool S fo
98. r but this manual does not describe them For more information about these tools refer to the respective manuals The MB2146 09 is assumed as the In Circuit Emulator ICE B Cautions e Use this manual as a part of the reference materials for various manuals for SoFTUNE e Use the included sample programs after evaluating them e Viewing the included information requires Adobe Acrobat Reader 5 0 VII B 1 GENERAL This chapter describes the functions and features of SoFTUNE B 2 INSTALLING This chapter explains how to install Sorruwe B 3 DEVELOPMENT PROCEDURE This chapter covers the procedure for software development using Sorruwe B 4 TUTORIAL This chapter gives examples of software development using the F2MC 8L 8FX family Sorruwe V3 including Project creation and Debugger operation through the use of simple samples B 5 USEFUL FUNCTIONS This chapter describes the useful functions of Sorrune Workbench B Appendix FAQ Appendix A C lists frequently asked questions and technical knowledge in question and answer form B Related manuals When using this system please also refer to the following manuals e F MC 8L 8FX Family Sorrune Workbench OPERATION MANUAL e F2MC 8L 8FX Family Sorrune Workbench USER S MANUAL e F MC 8L 8FX Family Sorrune Workbench COMMAND REFERENCE MANUAL e F2MC 8L 8FX Family Sorrune C COMPILER MANUAL e F2MC 8L 8FX Family Sorrune ASSEMBLER MANUAL e F2MC 8L 8FX Family Sorrune LINKAGE KIT MAN
99. reakpoint during using the Emulator Debugger Why are the settings of breakpoints are changed when the target file is changed How to save trace results and evaluation results such as memory dump to a file Does the Emulator support coverage measurement Does the Emulator support time measurement Does the Emulator support event setting Does the Emulator support the Debugger memory map Does the Emulator support the monitoring function Are there any restrictions on the instruction count between branches that can be displayed by trace App 3 CO FUJITSU C Others Q12 Q13 Q14 Q1 Q2 Q3 Q4 Q5 Q6 Q7 SOFTUNE FIRST STEP GUIDE What should do if the progress bar showing Processing is displayed and the Debugger is not in the execute state when the program is executed by the Emulator How to shorten the flash memory update time What does the Debugger do if the user suspends the operation during executing in the standby mode by the Emulator How to check the version of Sorrune Workbench and each language tool How to change the size of the font displayed in each Sorrune Workbench window How to retrieve a file displayed in the Sorrune Workbench Project window How to check details of the sample I O register file How to change the record length of Motorola S format data How to get the notices on using the Assembler in C How to read projects developed by V30L26 or earlier Sorrune Workben
100. rmat Adjuster after starting the Con verter This setting is saved every project B Setting Procedure for Customize Build 1 Select Customize Build from the Project menu SOFTUNE Workbench su ali ici EE e projet 3 aa nd Project af E _ Add Member Setup Works ace p LP se t ee x al ro ec E Fso_ ree Peas aE Configuration EI ae E 1 Include Dependencies E pum p NETS Tm Lt IEEE Bor lol ent E Eee Compile e id E I a 5 o e n 2 xs xx xe i de S d msmo E co FUJITSU SorTUNE FIRST STEP GUIDE 2 Select Converter After in the Setup Customize Build dialog and click the New button in Tree View to set the following items Macro define can be used to for the option In this example a file is made in the ABS folder in the Project directory where the target file is created e itle S Format Adjuster e Execute Filename gt C Softune bin M2ms exe e Option gt xmask abs X mhx o xmask abs X ahx ran 0x4000 OxFFFF S1 e Executing Directory x Setup Customize Build ES Target of setting mb2k_sap C It Treeview DI Title 5 Format Adjuster are Execute Filename S aftune bini rs Browse E Aner K N abso mb o xa ul se Compiler Executing Directory B Browse vis Before o m9 After zi a Linker Before E SE additional JE when executing After Iv Enable zi I Librarian Before
101. ronment SES Execution s SS execution SE Watch SE SE SR Monitoring Directoy T Tab L Enor f output T Load S Um ban information ao ES a Source file search Eu S EE SE A RE E Kee B i TA ER EE ca CR CR T il BONA y NR C App 15 co FUJITSU SorTUNE FIRST STEP GUIDE Q3 How dol make projects with different language tool options and Member configurations of source files Answer By adding project configurations the user can make project setting with different setting conditions for lan guage tool options and Member files for testing and the optimization trial For details see Section 4 4 1 Adding Project Configuration The procedure for removing one file from the Build operation is shown below 1 Click the source file to be removed from the Build operation and select Set Individual Setting from the shortcut menu W arkspace Fsg sample ER E s sample abs fsg sample port Debug 2 43 Source Files ie JS S i Debug NEL io def pi mi io def rel E App 16 APPENDIX FUJITSU 2 Check the Remove this file from target of build checkbox in the General tab in the Setup Project dialog SEE AA EE NI t emove e this fie hom target o of build ae uem n Hess a Vue 3 S ER E fsq_ sample pri E T3 Source Files Project E Workspace sg_sample ER S sg sample abs fsg_sample prj Debug EN Source Files
102. rt void 6t Set RESHIVECI Section aee Dure CO CONST ut oragma section CONST RESETVECT locate 0xfffc void const reset vector 2 VOL L0 0x00 Start 13 4 28 TUTORIAL Sample source startup asm F2MC 8FX Family Sortune First Step Guide startup routine ALL RIGHTS RESERVED COPYRIGHT C FUJITSU LIMITED 2004 LICENSED MATERIAL PROGRAM PROPERTY OF FUJITSU LIMITED S b EE C Start EXPORT start IMPORT main IMPORT _SetClockMainToP11 IMPORT LMEMTOMEM IMPORT LMEMCLEAR IMPORT RAM INIT IMPORT _ROM_INIT IMPORT _RAM DIRINIT IMPORT _ROM_DIRINIT definition to stack area e LON STACK STACK ALIGN 1 p IBS B 254 SLACK TOR JRE aB 2 gt definit Lon to Start address Of data Const anc code secre Lon so PAS DIXON DIRDAIA DIR ALIGN 1 DIRDATA 5 BC TITON DIRINIIZ JIBLB5mE ALIGN 1 4 29 co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE EE 593 SBeETTON DATA DATA ALIGN 2 DATA S SECTION INL DATA ALIGN 2 INTET 94 SRE nee en a ee ce tci e 00 ee Code area ee O A ve ce ne SECTION CODE CODE ALIGN 1 MOVW A STACK TOP MOVW SP A MOVW A PS MOVW A 40x07FF ANDW A MOVW PS A A default setup is B 000 Direct address 0x0080 0x00FF A default setup is B 0 Interruption disable MOVW A PS MOVW A 0x0030 4 30 macro ICOPY MOVW MOVW MOVW CALL endm LOOBREI ES SIE fj Zero clear or VAR macro EIBBO MOVW M
103. sample mhx made in Section 4 4 2 One Punt What is the S format Adjuster The S format Adjuster adjusts data made in Motorola S format in ascending address order and aligns the data count included in one record on a specified value Using the S format Adjuster the formatted file can be made with its Motorola S format kept For details of the Adjuster refer to Help Part 4 Object Format Converters of SOFTUNE Linkage Kit 9 3 co FUJITSU SorTUNE FIRST STEP GUIDE B Setting and Using External Tool 1 Select Tool from the Setup menu Ga BLEUE SL pS EE 5 n Debug e environment i Memory f Map S _ FLASH 4 an a tr Eu Workepnacefeg sample D con E Eft sg sample abs fs E DE as Source Files Em eee Tool deis Include Files Dependencies Debug y hn d s o det prj El RI io det rel io det oi Debug 5 4 cO USEFUL FUNCTIONS FUJITSU 2 Set the following items in the Setup Tool dialog Check the Designate additional option when executing and Use output window checkboxes Click the Set button to set the S format Adjuster in Tool List and click the OK button Macro define can be used for the option In this example a file is made in the ABS folder in the Project directory where the load module is made e Title gt S format Adjuster e Execute Filename gt C Softune bin M2ms exe e Option gt xmask abs X mhx o xmask abs X ahx e Execu
104. subproject depends on the active project If projects are in a workspace one active project always exits e Subproject A subproject is a project that is dependent on other projects Defining a subproject allows it to be Made or Built to link its target file before the parent project is Made or Build e Project configuration Project configuration is setting of projects or configuration of Members that provides different build methods for the target file in the same project Operations such as Make Build or Compile Assemble are executed in units of project configurations When a new project is made the project configuration is made under a default name of Debug When a project configuration is added the setting of the project configuration selected at its source is applied Using the project configuration the user can make multiple projects settings with different language tool options and Member information such as for debugging release and trial within one project co FUJITSU SorTUNE FIRST STEP GUIDE 1 6 2 INSTALLING co FUJITSU SorTUNE FIRST STEP GUIDE 2 2 INSTALLING FUJITSU B Procedure This chapter explains how to install SOFTUNE using an example of installation of F MC 8L 8FX Family SOFTUNE Professional Pack 1 Insert the CD ROM into the drive 2 When setup exe starts up the Setup menu appears FZMLC 8L 8FX Family SOFTUME Professional Pack Setup Welcome to F2HMC B8L 8FX Family SOFTUMNE Professiona
105. t App 37 co FUJITSU SorTUNE FIRST STEP GUIDE Q9 Does the Emulator support the Debugger memory map Answer Although the Emulator MB2141 A B for the F MC 8L has supported the memory map the Emulator MB2146 09 for the FFMC 8FX does not so guarded access cannot be detected The Simulator supporting the memory map should be used to perform sufficient verification debugging App 38 APPENDIX FUJITSU Q10 Does the Emulator support the monitoring function Answer Although the Emulator MB2141 A B for the FFMC 8L has supported this function the Emulator MB2146 09 for the FFMC 8FX does not The Simulator supporting the function should be used to perform sufficient veri fication debugging App 39 co FUJITSU SorTUNE FIRST STEP GUIDE Q11 Are there any restrictions on the instruction count between branches that can be dis played by trace Answer There are the following restrictions If 4094 or more branch instructions are not executed only 4096 instructions from the branch address can be displayed App 40 APPENDIX FUJITSU Q12 What should I do if the progress bar showing Processing is displayed and the De bugger is not in the execute state when the program is executed by the Emulator Answer There is no problem The Emulator MB2146 09 for the FFMC 8FX displays the progress bar when the pro gram is executed after setting changing and deleting breakpoints or programming flash memory When pr
106. t 8 gt Verifying Program NO Debugging by Emulator Loading monitor program Setting setup wizard may be omitted Setting up debug environment Setting memory map Yes Te gt Verifying Actual machine No d RSC 3 3 co FUJITSU Sorrue FIRST STEP GUIDE 3 4 4 TUTORIAL 4 1 Desingnig Workspace Project 4 2 Debugging by Simulator 4 3 Debugging by Emulator 4 4 Operate Object Format Converter co FUJITSU SorTUNE FIRST STEP GUIDE 4 2 TUTORIAL FUJITSU B Outline This chapter gives a concrete example of the software development procedure using Sorruwz by using simple samples This chapter explains how to make Workspace Project debugging by Simulator and Emulator and how to use the Object Format Converter B 4 1 Designing Workspace Project B 4 2 Debugging by Simulator B 4 3 Debugging by Emulator B 4 4 Operate Object Format Converter 4 3 co FUJITSU SorTUNE FIRST STEP GUIDE 4 1 Designing Workspace Project This section explains the procedures from making Workspace Project to making target file creation In this sample the target MCU makes a project of the FFMC 8FX MB95FV100 The explanation assumes that Sorrune Workbench C Compiler and Assembler pack are installed on CA Softune e4 1 1 Setting up Development Environment e 4 1 2 Makig Workspace and Project e 4 1 3 Setting Workspace e 4 1 4 Making Source File e 4 1 5 Adding Member to Project e 4 1 6 Setting Project e 4 1 7 M
107. target file Check that no error has occurred 4 Check Debugger setup information before starting debugging Click the setup file select Change from the shortcut menu to start the setup wizard and check the communication device setting for the Emulator Debugger and the batch file setting before and after loading E W rkspace fsg sample ER 3 sg sample abs fsg_samp 2 3 Source Files SN init c ari sample c ies vecbhar c Include Files Dependencies e Do e EAT EET App 10 APPENDIX a o ew Lacan coe KN ie IO AI dr ss Wizard x It me up p about communication odie Please set your original oscilation frequency to be used 2 im Debugging i cs speed is added the optimal SE EE op Set up original zeiten en x i o eene bs 4 MHz pre Response speed optimization v 29 Enable os Disable Setting pus fie for d after hes stat tof de the ue rz AU URN Specification batch fie dis Ts cun Batch fle j sue B IOWSe durs lee Lam Eed Je fen Demi co FUJITSU co FUJITSU SorTUNE FIRST STEP GUIDE AO Aon oM A AA PLUR AA Ma Eel ME a LU er gl D i LA RA a CR ME ep a ai LR SEE E ER ET e Ra rr A ASA A A ne a npa Ts n Wizard x Makes s setings f far the ven fle Settings a be e completed w when you Ru us dick finish EE SE APPENDIX FUJITSU Setting in
108. tch flagi case 0x0001 IU FDRG Pal Ed 3 union 1 H E LED pat ol ro tc M 10 svcc O 10_PDRO union ha byte H FF Er Hit SUEUCE sea union 1 bat E byt byt bitc SLEUCE de o 10 PORS union 1 byt m byte H EF struct bat HIT byt aM 1 byt Cl bitc struct DEBUG MBSSFV100 SIM Execute IP FOSA m 4 92 TUTORIAL FUJITSU 4 2 9 Correcting and Re debugging Program B Correcting and Re debugging Program This section describes the procedure for correcting and re debugging the source file The user can remake and re debug the target file without completing debugging This procedure can be also used for the Emulator Debugger 1 Right click the Debugger Source window to select the Edit command from the shortcut menu When the Edit window for the source file appears correct the source file ga SOFTUNE Workbench Teo sample Debug Ef ES File Edit view Project Debug Setup Window Help sg sample Debug A fH Workspace fsq_sample EI E sg sample abs j El a Source Files If LED pat 9 eru PLLC union 14 aL 10 SYCC union 29 PDRO union 3 is Ci ample 30 void ne mm Assemble m hyte H FB vector 31 Find bit struct d H E Include Files rh IT 01 BOO H DI Er Dependencies SS
109. the new setup name to Setup Name List Make a setup file for the Emulator Enter emu dbg for Setup Name and click the Add button After the setup wizard starts up set according to the menu EC Ed E3 Target of setting I2 x cR i im Ste Er d io def pri s 5 stup pae ee m E sim dbg d T S Setup Mame 4 100 TUTORIAL FUJITSU a AA ea M x m eh we A EN Ro Wo NOR BEEN BS EN at Roa E it sre Versi wn DT a dier ime woe Fewer via EN rwr ero Pew recen bs ww aw Mee A unen ulis ww Fri Ee SE Wizard 3 Penes select ict wel A d CE D pe e a E i a ny cbe x pe m de Pene select device ype i Device Name SC d lo ay up p about o communication GG Please set pour original oscilan frequency to be used mos pu p SC Debugging i teg speed is adusted GU i the optimal voe UE 3s SE p SE up original osciltion E EMEN frequencMain ope 4 we E A T Response speed optimization m m ux i9 Enable o Disable co FUJITSU SorTUNE FIRST STEP GUIDE m WO ow A oo A em ri E Mala Ca EE IS B A Nl ac MC A Mia Lao HL a e i DR QE TR E EE OA IN Ria a OR i uS e al a LT IE CE A OA unt Mae T ea Setting ES d fa vina after the stat tof 2 TM the oe EE moe v e Es s Specficaon b batch file Ee i i E zi 2 zs po Sa Wizard Make settings for the eae fle SEEHE Wizard Sn UE e elect setting tem m 2 a a Z ge x
110. the same way as a member The include file is read automatically from the directory set using the include path of the language tool at the Make or Build operation Therefore the file does not always have to be added to the Member The file is added to the Dependencies folder when automatically read ga SOFTUNE Workbench ES Ir ES SNE Edit View Project Debug Setup Window Help Wworkspace fsg sample E Ij sg sample abs fsg_sample prj Debug fsg_sample abs fsg_sample prj Debug rce Files init c sample c vector c C H Include Files mE HH define h Dependencies CO FUJITSU SOFTUNE FIRST STEP GUIDE 4 Select Add Project New from the Project menu have vm Add Project Workspai o Elsa 7 Z 5 Customize E Build SE i Project See ms RUE Configuration come Warepece SS O Ue Setup Project i Indude reen coq i pu E E ae RE Stop NM a r DET He Add New Project 4 38 TUTORIAL 5 Set the following items in the Create dialog e Project Type Hhelocatable REL e Chip Type FMC8FX e Target MCU MB95FV100 e Project Name io def e Target Filename io def rel e Project Directory C Softune sample fsg 8fx_ sampleNo def 4 4 y 4 y y e Dependencies Checkbox ON E I Project Ty ype SEE EN o Classification 3 r Loadmodule ABS Ree E arget Filename 4 39 Bowel co FUJITSU co FUJITSU S
111. ting Directory gt x Setup Tool Tide E seals Fira Enn LL Opin F Despere addtional option when esecuter einen Miro dei Eu sd Fle Path XA Linacre aer SE LosdinoduleneEstenson c This completes the tool setting This sample continues to make the formatted Motorola S format file sg sample ahx using the S format Adjuster 9 5 co FUJITSU SorTUNE FIRST STEP GUIDE 3 Select Too execution 1 S Format Adjuster from the Setup menu and start the registered tool STR Sarkhench Fu O wo Pus cing dm Vani b CC TL mix BU Sal Zen tel joues CULTU feaa sieh posses FLASH anes contro in def pri L lo dei rei in def erf Debug FE Fi Pike Perc St of registration tod Maeno 5 4 When the Specify Other Parameters dialog is opened specify the parameters Be sure to put one space before each parameter Sperity Other Parameter E ee S 6 Shane ink ams exe ef E OS x Add Parameter Fe DMODDORFFFF S1 S Specify the following two items as parameters e Output range ran e Output record S1 S2 S3 9 6 USEFUL FUNCTIONS FUJITSU Output range ran opecify the ROM area of the load module as a parameter To check whether the ROM area is specified select Setup Project from the Project menu and choose Disposition Connection at Category in the Linker tab Setup Project Target o
112. tor Debugger requires downloading the monitor program to the ICE according to the chip to be used This ICE checks the type and version of the monitor program at the start of debugging and loads the monitor program automatically This sample gives an example of the connection between the ICE MB2146 09 and personal computer via the USB For details refer to the following manuals e Workbench Operation Manual Appendix B Downloading Monitor Program e Workbench Operation Manual Appendix D Setting USB Interface 1 Connect the ICE to a personal computer via the USB For details of how to connect refer to the manual attached to the ICE 4 98 TUTORIAL FUJITSU 4 3 2 Making Setup File by Setup Wizard for Emulator B Procedure for Setting Setup File by Setup Wizard This section explains the procedure for making an additional setup file for the Emulator incase where the setup file for the Simulator already is made 1 Select Setup Project from the Project menu A setup file cannot be made in the debug mode Use the Terminate debug command in the Debug menu to terminate the debug mode 2 Change the setup name for the Simulator Debugger Click sg_sample prj in Target of setting and select Setup at Category in the Debug tab Change Setup name to sim dbg and click the Change Setup Name button Setup Project 4 99 co FUJITSU SorTUNE FIRST STEP GUIDE 3 sim dbg is added as
113. up Name List ChangeSeupName App 31 co FUJITSU SorTUNE FIRST STEP GUIDE 2 Follow the Wizard window select Specification at the Select setting item and click the Specification button Setup Wizard NI Secta on Ue 00 Be Se elect satiate tem d um T _ 2 es m Select Ai ME ERE ENTRE ue g Specicsin specication PERTE e weg D es e Hier 3 Uncheck the checkbox for Break in the Setup Session dialog SL Session X Select restoration session just after bool We Session ume EE ex Se 3 SE E Window cvy ber SCH Emulation a cd Me a e SE cd M ER E En mr um PF Execute aa Path p uiuo o E gt App 32 APPENDIX FUJITSU Q5 How to save trace results and evaluation results such as memory dump to a file Answer To save the trace results as a file right click the Trace window and select Save from the shortcut menu Specify the file name Information in the Output and Command windows can be logged to a file The procedure for logging information in the Command window to a file is given below 1 Select Command from the View dialog to open the Command window Right click the Command window and select Logging Start from the shortcut menu Specify the file save destination ls Command So EE EE SE EE Logging m AEN md m Save in CH 8f sample e ER E E ER SS a ps
114. up Project X Project ede uos ec Configuration EE DS SE e E a i D x SE E c Build CHS Stop Baath re anes NE Debug ELLE d s Ip def prj ER B io_def rel io def pri Debug 4 46 TUTORIAL FUJITSU 2 Select sg sample prj as the Project to be set SE Al SS E Object Directory Es En mm Browse ES n Ee S 4 47 co FUJITSU SorTUNE FIRST STEP GUIDE 3 Select Include Path at Category in the C Compiler tab and set the include path Click the Add button to add the path to Include Path List The path is usually an absolute path As shown below this tutorial uses the macros for setting to easily move or copy the Project The descriptions using the macro are displayed in the Option column Check that the post expansion path is correct ENV FETOOL lib 896 include sample MB95FV100 gt SoFTUNE install directory PRJPATH include Project directory Setup Project Target of setting Debug hd EI io deit on General MECU E Compiler Assembler Linker Tee Category Include Fath Eommnan ARNI Include Path PR PATH include m z FRIPATH include UK Cancel Apply 4 48 TUTORIAL FUJITSU One Fami What other macro can we use FILE Transferred as full path name of file LOADMODULEFILE Transferred as full path name of load module file PRJFILE Transferred as full path
115. utput start message A ue Er Control of defaut option fle a E 2 m o c 4 126 TUTORIAL FUJITSU 3 When Build is executed the Converter is started after the target file is created generating the conversion file sg sample mhx in the target directory SEA EE ES Target of seting 4 127 co FUJITSU SorTUNE FIRST STEP GUIDE SOFTUNE Workbench sy sample File Edi View Project Debug Setup Window Help cune jenem a SES Che El alo PAPE E EE El E E BE Ell SE e Workspace teg sample El E Fsg_sample abs fsg_sample pri mask E Source Files oo m init c jos sample c E vector c H E Include Files Dependencies e Debug A io def prj ce E io deF rel io deF pri Debug FUE n CCOO Now starting load module converter CSsoftune sample fsg f lt _sample mask4B5fsg_sample mhx 4 128 5 USEFUL FUNCTIONS 5 1 Setting External Tool 5 2 Setting External Editor 5 3 Setting Customize Bar 5 4 Setting Customize Build co FUJITSU SorTUNE FIRST STEP GUIDE 5 2 cO USEFUL FUNCTIONS FUJITSU 5 1 Setting External Tool B Merit in Setting External Tool Registering various tool commands allows the users to start commands from the Sorrune Workbench desktop The following setting example registers the object type Converter S format adjuster and its usage example converts the Motorola S format sg
116. y reconnect it to the PC and then start the Debugger If this error occurs during debugging stop debugging temporarily and disconnect and reconnect the cable to recover Bd TT E6015 rreskd communication stabustor cable connecbon I um e If the communication error still occurs after the above operation the USB driver for the MB2146 09 may not be installed For details about installation and connection refer to e Operation Manual Appendix D Setting USB Interface e Manual attached to the MB2146 09 App 27 co FUJITSU SorTUNE FIRST STEP GUIDE Q2 When the conversion is not performed normally after symbolic addressing is per formed Answer Symbolic addressing is available for line assembling event setting and jumping function in the Memory win dow Use symbol name to specify address symbols such as arrays However for value symbols such as array elements use the symbol name with an address operator amp An example is given using the project made in Chapter 4 Tutorial 1 Start the Simulator Debugger Select Memory from the View menu to open the Memory window Right click the Memory window and select Jump from the shortcut menu to open the Jump dialog sal Memory Ell NI DER 0 1 24 3 4 5 6 DEDOS ER FOOO E4 02 06 El 70 E4 A FOOR EA 00 30 73 71 31 TIA el RE decus cw viii FOl6 E4 00 80 E4 00 04 3a SEa F021 OD E4 00 80 4 00 og Je Assemble FO2C OO 80 E4 00 OO 31
Download Pdf Manuals
Related Search
Related Contents
HK 3480Ampli-Tuner Stéréo - Pdfstream.manualsonline.com 9016 Series DVR User Manual Libretto uso e manutenzione UM10395 UBA2014 evaluation board DVB-18S the report here DuctlessAire DA18-H Use and Care Manual オーブントースターの表示や安全性等をテストしました 取扱説明書 - タカショー Serie LTC 8712 - Bosch Security Systems Copyright © All rights reserved.
Failed to retrieve file