Home
Software Development Process Software Development Process
Contents
1. Stop Break Reset 57 View Environment Debug Option Optonalindows Help Program Window main_tutorl c Et view E Source By V Dis Line BREK PRSS Source Click MIX to mcou_init s 1 7 11 view the source wee D DEEN f f display ci code and assembler code Hn 79 Mame tal_irg 4 k a Heady STOP E 33 24 NES AS Stopping Program Execution Click on the Stop icon to stop the program KD30 CAMTOOLARTA M16C062P SEPAS amr e_Codetutorl ST utori x30 File Edit View Environment Debug Option Optonalindows Help ch db gd Go Come Step Over Stop Break Reset SAW EF Program Window main Ed View E Source By V Dis Line BREK PRSS Source initt adc init tmr init uhileti led displauct ff display c tal_irg Hone Hone k MCU 4 34 234 NES AS Setting Breakpoints 1 Click on the Source to view source code only not MIX display ZEIT e ample_Code tutorl Tutor1 x30 INN 0 File Edit View Environment Debug Option OUptonalindowe Help gt ai gd Go Lome Step Aver Return Stop Break Reset SAW Program Window lriain_tutorl c Ed view Source By V Dis
2. Line 55 Source SAE while 41 gt on This Timer Al interrupt routine gets a new sample timeP Al It also varies the LEI Di HHBBA conteolling the LED control variable geg MCU STOP 2 Locate and then set a breakpoint on led display by a double click on in the BRK column that denotes an executable line A B will appear in its place after the breakpoint is set and the line is highlighted in red 3 Click on Go icon to run program 35 24 NE S AS Removing Breakpoints KD30 E XMTODLEXRTA HT5CB2P SKP S5 ample Codestutori Tutor x30 File Edit View Environment Debug ptien Optonalindows Help i gd Go Lome Step Over Return Stop Break Reset SAW EF Program Window main tutorl Ed view Source By V Dis Line 55 Source HAAS i uhileci Program stops Mus d iro at breakpoint Parameters Mone Returns Hone highlighted In Description This Timer 1 interrupt routine gets a new sample a 444083 A timer Al It also varies the Di Yellow HHBBA by controlling the LED control variable al Be Heady MCU STOP You can remove the breakpoint by double clicking on it at the BRK column 36 434 NE S AS Program Stepping gt KD30 C MTOOL RTA M16C62P SKP S
3. gie m F In LL ICD 23 44 NESAS Start Launch KD30 from the Windows Start Menu Lodewright d Microsoft Office Tools RENESAS TOOLS Flash Dwerll5B 2 00 Sony Handheld TMY320A d Sony fey KD30V 320Release 1B El KD 30 Help M5V30252 SKP Startup Utilities Al Adobe Illustrator 10 Mar Internet Explorer Microsol Access or from Tool Manager KD30 Init Window Step 3 Now click the Step 1 Click on Refer and Run Mode tab select M30626FHP mcu Step 2 Select USB E RENESAS KD30 Init Window For full debugging Sampling ads features be sure SampingPetied PE uas Sampling Mode Free Run Mode is is selected for real time execution of your program but debugging is limited Cancel Hep Next Hide Do not select for this tutorial Now click OK to open KD30 s Program window be sure hardware is connected If you get an error check all connections See SKP user s manual on Troubleshooting for details Note 1 See KD30 Help for the differences between Sampling Mode and Free Run Mode Also see the ICD User s Manual for details on how ICD works under these two modes 26 434 NE S AS KD30 Program Window File Edit View Environment Debug Option Basievindows OUptonalindows Help Fm E EE gd Go Come Step
4. El char to hex to decimal etc The Memory Window displays the location and contents of variables 40 tENESAS Modifying the Program Step 1 In the Project Editor click on the by Amain tutor1 r30 ProjectE ditor lt Tutor CXMTU DLXRHTA MIBSCBZ2P SKPXS ample Code tutorl ax le View Project Help X N ell sal IN Ga e e B _ all NZ Tutor 30 Dependencies E Command E Tutorl cmd AS JH Anc tutari r30 Heady 7 Double click on main tutor1 c to edit it 41 234 NES AS Modifying the Program Step 2 mam_tutorl c Notepad Edit Format Help P AAA ATA A A A AAA AAA A aaa a AAO AOA A pme tal irg 1 Scroll down and find irameters None turns ns dscription This Timer interrupt rout 1 rece new samp the function tal irq timer Al I 1 varies the LED 5 i by Ing the LED control wari routine CE A A HOH AAA AA A A AA A A AAA A A A mid tal_irgtvoidd adst 1 Start 20 convers whiletadst 1 walt A D tal ado read AD value and LED switching rat ge roget Y ere js 2 this line to 1 isp count g
5. Over Stop Break Reset SAM Program Window Ed view Ej By v Dis Rad EET PASS Objcode Lahel Hnemonic EB38HHBH LDC Ha HDS EB amp HHHBA HAH 5 EB28HFBH INT BH J EB18HHDH HDHHHH 4 B4 RAL 600015 AA AHHA HHAHBH n1 75 03HBHBH Haal R3 GER B4 RAL AA AHHA HAH n1 HDB HHH R3 8 ha HH RAL 4 HAH Ai HDHH2 C 7503H28H HHHH2H R3 CER B4 E HH RAL 600033 2 4 HH4H2H 6 75 CI BRAK HHH R3 4 k Heady MCU STOP KD30 will disassemble the flash contents or display UND if the flash is blank 27 24 NE S AS KD30 Toolbar Go Button Step Button Break Button Executes target step execution Sets a software breakpoint at the current program of target program cursor position Return Button Runs the program up to SW Button the higher routine Sets a software breakpoint y 4 Step Over Hetum stop Break S W Button Stop Button Executes the target program Stops execution of th
6. project are compiled and assembled a linker combines all the files into a single file These steps can be tedious and repetitive To make the process simple we use an Integrated Development Environment IDE called Manager TM 9 24 NE S AS Start Tool Manager TM Microsoft Office Tools d RENESAS TOOLS Flash verll5B Vv 200 Handheld d Technical Support Sheet V alo ELSE Y 3 20 Release ca Help Startup MSV s0262 5KP T Users Manual Utilities Adobe Illustrator 10 c Internet Explorer From the Windows Start menu click on Programs Renesas tools TM V3 X TM 5 Tool Manager Project Bar Open project button Rebuild button Start new project wizard Build button Run debugger button Partial build button Help button Tool register button Project currently loaded TM Proj Pl Open project editor button Viewer button Start default editor button Tool Manager customize button T ENESAS Tool Manager Exercise We will now perform the following steps Open an existing project Build re build an existing project 12 234 NE S AS an Existing Project Step 1 To open an existing project click on this icon RENESAS Jpen Existing Project Step 2 1 PoetFiestmk A d Locate the C MTOOL SK
7. 30 will tell you the page is going to change click adjust the window size as needed The RAM Monitor displays the current value of the memory area shown on the window It is updated at a preset value which can be modified by the user Ti Monitor Window disp count HHHdHH a ei FF HHH41H HF 07 ep FR FF FF FF FF FF a an op op op HH HHHd2H HH Ch F5 FE 45 F4 HF DS FH HF FF FF 4 FF FF FF FF FF FF FF FF FF FF HHHddH FF FF FF FF FF FF FF FF FF FF FF FF FF FF BBHdFH BF HH HB BB 95 FC 84 GF E8 FA Hi HF 12 HH 64 e Click the icon Note you can view the RAM as it is updating This function is not available in Free Run mode Click the STOP icon before proceeding 39 434 NE S AS Basic Windows Memory amp C Watch ITTITTTIESN Eb The Watch Window allows you to view globals and locals An example BIN DEC be ASCII is shown below Address LABEL DATA angani _ SHR RS Global window SSES 56 DAD 45 MHHdH4 4 Prog Tutorl x3ll SSES z signed int disp count 2 BBBAB7 2E BBBABS 38 400449 34 l SISIS ICT SI 11515 888306 cp Double click on the variable to OPA change display format Le change IPD
8. C 62P the operation of the ICD is transparent to the user s program As a programming tool the ICD Flash over USB M FoUSB Programmer can be used to download user programs to the M16C 62P MCU on the oKP16C62P Board and other Renesas M16C Flash MCU s the ICD will support other 16 MCU s by downloading a MCU Monitor Image file for a particular MCU thru KD30 or FoUSB Programmer NOTE The kernel is only downloaded with the user program when using KD30 Debugger but NOT the FoUSB Programmer 7 24 NE S AS Development Tools Tool Manager An Integrated Development Environment IDE that invokes all necessary software for building your project KD30 PC software that communicates with the ROM Monitor Program in flash on the for program debug KNC30 C compiler limited version of NC30 Conforms to ANSI C standards AS30 Relocatable Assembler oupports structured language and wide variety of macro instructions Flash over USB Programmer Flash programmer for Renesas M16C Flash MCUS 8 234 NE S AS Tool Manager Overview When writing a microcontroller or any computer program the program is usually split into multiple files to make it easier to read and understand While exactly how the files are organized is up to the programmer typically the code is split up in a logical manner into various files e g math functions in one file serial port drivers in another etc After all the files in a
9. ITN ds la pe alo AR CR TJTITETTIETITITTYETTTY Dot TIT H i Power LED Reset 8 character x SW 2 line LCD Thermistor LCD Analog Contrast f Adjust Pot 2 JP1 ii di 12 16 62 Crystal M30626FHPGP User LED s FoUSB ICD Connector 32KHz Crystal Expansion Port User Pushbutton Switches 5 SKP16C62P Board Features M16C 62P M30626FHPGP MCU 24MHz Operating Frequency at 3 0V 5V 384kB Flash ROM 4kB Virtual EEPROM and 31kB RAM 87 GPIO and 4 Key on Wakeup Inputs 11 Timers plus a Watchdog Timer 26 channel 10 bit ADC 2 channel 8 bit DAC 2 DMAC 5 SIO s supports I C and SPI CRC Circuit Onboard User Controls e LED s 3 User 1 Power Removable 2 line x 8 character LCD e Pushbutton Switches 3 User 1 Reset hermistor and potentiometer tied to A D input available on Expansion Ports 6 234 NE S AS ICD RTA FoUSB MON The ICD In Circuit Debugger provides a USB interface to the Host PC and communicates commands and data to and from the SKP16C62P board via a synchronous serial interface As a debugging tool during program debug the ICD KD30 downloads small kernel or ROM Monitor program with the user program to the SKP16C62P Board This kernel provides a communication interface between the M16C 62P MCU and the ICD KD30 Debugger application on MCU status While the kernel uses some resources of the M16
10. P16C62P sample_code directory and open the tutor1 folder 14 ENESAS Open an Existing Project Step 3 Open Gut Project Files tmk B Select tutor1 tmk RENESAS the Project Editor Click on Project Editor icon RENESAS Project Editor ProjectE ditor lt Tutor C MTOOLSATA M16C62P SEKP S ample Codextutorl Imi ES View Project Help Dependencies e Tutor 30 Command Editor window Command window Heady Normally you will only be concerned with the editor window Now click on the by all then click on the by tutor1 x30 then the by tutor r30 17 234 NES AS Editor Window ProjectE ditor lt Tutor C MTOOL RTA M16C62P SKP45 ample_Code tutorl Tut D x File View Project Help P ka This illustrates that 22 the object file 3 Apem main tutorr30 KS me depends on these 2 E Acommontskp_bsp h source files EN At E2p r30 Double click on mam tutor1 c to open it in the default editor Notepad Tool Manager can also be set up to use your favorite editor To change the default editor click on the Tool Register icon on the Tool Bar 18 24 NE S AS Build re build an Existing Project Build Re build Build the project into an executable module by clicking on the Rebuild ico
11. RENESAS SKP16C62P Tutorial 1 Softw Development Process Using TM Tool Manager Renesas Technology America Inc Overview The following tutorial is a brief introduction on how to develop and debug programs using the software and hardware tools included with the SKP16C62P To get the most out of the Starter Kit check out the references at the end of this tutorial Note The tutorial assumes the user has followed the Quick Start Guide and all the software tools and examples have been installed in the default directories 2 24 NE S AS Development Process SKP16C62P M16C 62P MCU Board 1 Write programs User RAM using text editor 5 Correct errors amp repeat process User Flash Monitor Flash UO Connector 2 Tool Manager automates compile amp link a E Host PC USB 4 Debugging info Y Editor e 3 KD30 sends the machine ENEE Errors code to the SKP16C62P durin ch CS downloads uses the symbols for source level debugging Tool Build commanq Absolute file x30 SKP16C62P Connectivity PC with Windows SKP 16C62P 98 2000 XP Board Mini USB Target Cable Cable RENESAS Expansion Lee SKP16C62P Board
12. The KD30 Debugger can be used to verify that the program we developed works exactly as we intended and when it does not we can use KD30 to find out why Breakpoints can be set in to stop the program at certain points of our program so we can verify that up to that point the program still works correctly using registers or variables in memory The number of breakpoints will vary from MCU to MCU For the M16C 62P the maximum no of breakpoints for is 8 KD30 also allows step execution in our program which means program execution on a per line basis whether in source level or machine code level Various windows in KD30 allow us to see register values and memory locations 21 24 NE S AS KD30 Debugger Exercise e Download and run a program on the SKP16C62P board General use of the KD30 Debugger including stepping and setting breakpoints Return to Tool Manager modify the program rebuild and run the updated program on the SKP16C62P board 22 24 NES AS Hardware Before starting KD30 connect the ICD to the SKP16C62P Board as shown Connect the USB cable to the PC On the ICD the Power LED is on and the Status Yellow LED is blinking once a second this means that the ICD USB driver was loaded correctly by Windows M PC with Windows SKP16C62P 98 2000 XP Board Mini USB Target Cable ua RENESAS Cable Poe Ext
13. ample_Code tutorl4 T utori x30 File Edit View Environment Debug Option Optonalindows Help 2 a d Go Come Step Over Retumi Stop Break Reset Sy EF Program Window main tutorl c _ EIE X Ed view E Source Ex V Dis Line PASS Source HIGH 0178 HL 71 HI d 1 80173 RED LED 1 40174 LU LED 1 HL 75 GRM LED hreak case 2 4 SS RED_LED 1 El LU LED k E STOP 20 Try stepping few lines of code by clicking on Step icon Click on Go afterwards to run program again 37 44 NESAS Basic Windows Register Now open the register window nment Debug Option Basicw indaws UptienalVndow Cascade o Over Stop o Arange Icon main tulo el Program Window Val ues n red us Wis ME indicate changes since last switch Dump window RAM Monitor Window viewed Try ASM Watch window ED_ C Watch window stepping and 1 Call Stack Window rez note the Script window 7 RED 01001008 changes TLU The Register window displays the values of the CPU registers after executing an instruction Note Resize the register window as needed 38 5 5 Basic Windows RAM Monitor Double click an address and enter 400 hex KD
14. ck Tutorial 2 details In addition check out the references the next page Have Fun 44 24 NE S AS References and Recommended Reading e SKP16C62P User s Manual This is a must read document It details all the things you need to know on how to use the Starter Kit e Tool Manager V3 X User s Manual To fully understand and get the most out of Tool Manager this is recommended reading e KD30 Version X XX User s Manual The tutorial only covered the basics of KD30 Read this manual to find out all of KD30 s features e NC30 Version X XX User s Manual Check this manual out for features specific to the NC30 compiler e M16C 62P Datasheet and SKP16C62P Board Schematic These are required to write user application programs for the SKP e RTA FoUSB MON User s Manual Read this manual to understand how the ICD works 45 234 NE S AS References and Recommended Reading e M16C 10 20 60 Series C Language Programming Manual This is a great document for any level of programmer The first chapter is an intro to C programming next chapter explains the memory of C programs on microcontrollers and the role of startup programs e M16C 10 20 60 Series Software Manual This document describes the instruction set and timing information for the M16C 20 60 series CPU cores e 530 Version X XX User s Manual Read this manual if you plan on writing A programs in Assembly or when ma
15. e from the value in the target program program counter to the position of the cursor in Reset Button the window Resets the target program Over Button Step over function subroutine call 28 234 NE S AS Download a Program to the SKP16C62P Board M16C 62P MCU so EU Edt view Environment Debug Upton LpkienafVindews Help Load Module Reload Image Symbol ROM Data Save Dizazm TOA Sample Code tubord T utar 20 dh Sample Lades S5 S 3 nenonic _ T8 3 L 5 ample _ Code altageDietectsaltageD etect x30 LDC FL 4 Ch 5 ample Lode det deta 3L LDC 5 ee LDC IH E il LDC HDHHBH IH SE MOU B RAL HDBH15 E 4 MOU HM HAH h1 29 234 NES AS Download a Program to the SKP16C62P Board M16C 62P MCU Download Look in C d File name Files of type In the c MTOOL SKP16C62P sample_code tutor directory select tutor1 x30 30 234 NE S AS Download a Program to the SKP16C62P Board M16C 62P MCU After downloading the program KD30 opens the file where the reset vector points to KD30 C MTOOLSRTA M16C62P SKP S ample Codestutori ST utori x30 File Edit View Environment Debug Option Optonalindowe Help E 3 FE gd Go Come Step Over Stop Break R
16. eset 57 E Program Window ncrt0_tutorl a30 E Source By V Dis PASS Source Kees start 1 HHBHHh 19 Glear U aut Hdata 5E Con ech sh regis ldinth HUECTOR ADR pS SSS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS SS Current location Variable area initialization This code uses macro for initializing variables Clears global variah of MCU sets intialized variables etc CO LLL rogram 5 area initialize d counter Is Ready MCU STOP highlighted Now click on View to see the program source code 31 24 NES AS Viewing Source Files in the Project 1 Click source Address _ Object Source TUTOR OU tutori a30 2 Source window sect30_tutorl MAIN TUTOR T Op is displayed 4 Double click main to view it on the 3 Click main tutor1 c Program Window 32 434 NE S AS Running Downloaded Program Click on the Go icon to run the tutor1 program you just downloaded LED s D1 D2 amp D3 will blink sequentially Turning the Analog Adjust potentiometer on clockwise increases the LED blink rate and turning it counter clockwise decreases the LED blink rate 5 30 C MTOOL RTA M16C62P SKP Sample_Code tutorl T utori x30 _ ici File w 9 4X4 7 Go Come Step Over
17. king changes to the startup file Application Notes and Sample Programs Application notes and other sample programs can be accessed from Renesas Technology America s website http www renesas com PLATFORM 46 234 NE S AS
18. n This will re compile and link all the source files Clicking the Build icon will only compile files that have been modified since the last build Always Rebuild when any compiler or Tool Manager options have changed Clicking on any of the build icons opens the Builder window 19 s t NES AS Builder Window The major use of the window is to determine if any errors or warnings occurred and where Edit View Acton Help ND ajele 11 Rights Reserued processing pass 1 processing ncrtB tutorl r38 processing Xmain tutorl r3B processing Libraries processing pass 2 processing XncrtB tutorl r38 processing Xmain tutor1 r3B processing C XHTO DLXLIB38Xnc38lib lib B2ZERU r38 3 processing C XHT DLXLEIB3 Xnc3 lib lib BCUPY r3B y The no of errors and warnings Will show up in this window You can then scroll up to find where the error s occurred If no errors were found Finish will be displayed DATA 0000258 600102H Byte s ROMDATA HBBHHHB BBBBBH 5 CODE Eyte s xxxxxxxx Finish Now that you finished compiling linking the file the next step is to download and run the program on the SKP16C62P Board using the KD30 Debugger and ICD Do not close Tool Manager yet We will be returning to it later 20 24 NES AS KD30 Debugger Overview
19. t 4 if LED control disp count 1 ff return to initial tal Ox3FF adQ fa 3 Save the revised file from the File menu 4 Build the project again 42 Load re load Modified Program In KD30 with the program stopped reload code by selecting Reload from the File menu 2 E XMTOOLSRTA H TR amp CB2P SKP ample Tutorl x30 File Edit View Environment Debug BasicWwindows OUptionalindows Help Download Reload Upload Save Dizazm ES TOS S ample L adestutarT Tutar 20 dh Sample _ CodeS KEPT estt SKEPT est s30 SCA Sample Code VoltageDetect VoltageD etect 30 Ch 5 ample x3t bh 19 Glear U Flag so CPU uses Exil ata SE top sh set sh register for sh TE H 42 A Variable area initialization This code uses macro s see sect 6645 is For initializing variables Clears global variables sets intialized variables etc 9047 TS H 4 4 Reload target program STOP Turning Analog Adjust potentiometer on SKP16C62P Board clockwise decreases the LED blink rate Turning it counter clockwise increases the blink rate 43 24 NE S AS End of Tutorial This is the end of the tutorial You can try downloading other sample programs from the Sample Code directory For a tutorial on creating a new project che
Download Pdf Manuals
Related Search
Related Contents
WSM - manual IMPOSA Lite II Series User`s Manual Crosley CR1205A User's Manual QUICK START GUIDE - Advanced Bionics Internet Móvel Clix American Weigh Scales LB-3000 9915083 1999-2000 Vol. III ATV Service Manual Chapter O.S. ブラシレスモーター 取扱説明書 警 告 ・注 意 安全上 SportTrainer SD-1225E Copyright © All rights reserved.
Failed to retrieve file