Home
Megawin 8051 GNU Debugger
Contents
1. read P2 and show to 7 segment Debug_show_msg_to_7 7seg 31h show RAM addr 31h s value to 7 segment set a Breakpoint with No 0x01 which will blink on the 7 segment Debug_set_breakpoint 01h set a Breakpoint with No 0xF2 which will blink on the 7 segment Debug_set_breakpoint 0F2h set a Breakpoint with No var5 which will blink on the 7 segment MOV var5 O0Blh Debug_set_breakpoint vard Debug_show_msg_to_PC 5Ch show immediate value Ox5C to PC monitor Debug_show_msg_to_PC var3 show var3 s value to PC monitor Debug_show_msg_to_PC ACC show SFR ACC to PC monitor Debug_show_msg_to_PC B snow SFR B to PC monitor Debug_show_msg_to_PC P3 read P3 and show to PC monitor Jah show RAM addr 32h content to PC monitor and store into var4 11 Debug_show_msg_to_PC get an argument from PC Debug_get_argument_from_PC arg var4 arg MOV This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 4 YI MEGAWIN Megawin 8051 GNU Debugger i417 MAKE YOU WIN User Manual v4 00 3 2 Insert the Debug Agent for a Non relocatable Project If the user s project consists of only one assembly program which has its code segment and data segment not re locatable that is its code address and variable address are absolutely specified by the user rather than automatically arranged by the Linker then what Section 3 1 mentions can not be used The follo
2. Files SINCLUDE REG MPCcoSusi sls 1ng STNCLUDE delay inc 5 aus ee Step2 fa DEBUG INC 4 4 gt gt h Build For Help press F1 L 83 4 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 7 Y MEGAWIN Uy MAKE YOU WIN Megawin 8051 GNU Debugger User Manual v4 00 3 1 1 Debug Agent Functions for a C lanquage Module DEBUG H defines the debug functions for C language modules as listed below Function r name Description Argu ment Function r name Description Argument Function name Description Argument Function name oc pLON Function r name Description Argument Function r name Description Argument _ Debug_ clear_ LCD _Clear the LCD panel of the Debugger 7 _ Debug_show_msg_to_LCD unsigned char msg Show a message on the LCD panel of the Debugger msg which is to be shown on the LCD panel R Debug_ Show _msg_ to _fseg unsigned char msg Show a message on the 7 segment of the Debugger _msg which i Is to be shown on the T segment Debug_set_breakpoint unsigned char BP_no Seta breakpoint in the application code and pressing the GO key on the Debugger will let __the application code continue to go Argu ment BP _no which is the breakpoint number assigned by user to be shown c on n the 7 segment Debug_ show
3. debug function Debug_set_breakpoint to do it And pressing the GO key on the Debugger will let the MCU continue to go ahead l Start Debug_set_breakpoint BP_nol Now BP_nol will blink on the 7 segment and user can check system Debug_set_breakpoint BP_no2 Now BP_no2 will blink on the 7 segment and user can check system This document information is the intellectual property of Megawin Technology Co Ltd 18 Megawin Technology Co Ltd 2007 All right reserved Megawin 8051 GNU Debugger User Manual v4 00 Yd MEGAWIN r MAKE YOU WIN Example 5 Pseudo Step debugging Sometimes user would like to step by step execute the program for debugging By successively inserting the debug function Debug_set_breakpoint within the critical program section where the bug is most probably found the Debugger can emulate quasi Step debugging Pressing the GO key on the Debugger will let the MCU execute the next instruction S Start Instruction 1 Debug_set_breakpoint BP_nol BP_nol will blink on the 7 segment Now and user can check system Instruction 2 Critical program section Debug_set_breakpoint BP_no2 BP_no2 will blink on the 7 segment Now and user can check system Instruction 3 Debug_set_breakpoint BP_no3 BP_no3 will blink on the
4. the debug commands from the debugged Target However if the Debugger is connected to a powered off Target system the Debugger s LCD panel amp 7 segment LEDs will show Timeout or Command error and Er respectively It is because the state of the SDA pin scanned by the Debugger is logic 0 which means a START condition of a debug command is sent to the Debugger but it is a fake START caused by the powered off Target system Anyway it does not matter for this condition The LCD panel will stably show Ready as long as the Target system is powered on 23 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved
5. use It is responsible for displaying and even saving the message from the debugged Target which calls the debug function Debug_show_msg_to_PC Of course the user should connect the Debugger to PC via an RS 232 cable in order to use this debug function Another debug function Debug_get_argument_from_PC also needs to run this application program To run this program just doubly click 8051_GNU_Debugger exe then follow its instructions as shown below If you want the displayed data to be saved answer yes by entering Y or y and then enter the file name with extension ixt because the data are saved as text format The user should enter the correct COM port number 1 9 to which the Debugger is connected After the specified COM port is successfully opened the message COMx is successfully opened amp Ready will appear on the PC monitor Now user can use the debug functions Debug _show_msg_to PC and Debug_get_argument_from_PC To close this application program just click x at upper right corner If any error happens close it and re open it The following picture shows the execution 8051_GNU_Debugger exe ei _ Ox GNU Debugger ver 4 0 XEXE Save data for Debus show msg to PC Y N y Filer lame c tmp debue txt COM Port o k a ta g A LUM4 is sstul ly ead oem This document information is the intellectual property of Megawin Technolo
6. which is proprietarily designed for Megawin 8051 MCU products Like the traditional ICE In Circuit Emulator this Debugger provides the necessary functions for embedded firmware developing and debugging Additionally its compact hardware with an LCD panel as shown in the following picture can work stand alone That is it doesn t need the host intervened and thus also provides an off line debugging The design concept of this Debugger is somewhat like the popular GNU Debugger which is an extremely powerful and flexible tool for embedded system development The key point of the GNU Debugger is to implement a Debug Agent which is a small program running in the target s hardware and helps the Debugger carry out requests to monitor and control the target s application code being debugged So the Megawin 8051 GNU Debugger consists of the Debugger and the Debug Agent a library function code for developing and debugging Picture of the Megawin 8051 GNU Debugger 7 segment LCD Panel LEDs Megawin 8051 GNU Debugger THOG7A F DBG2 Debug Tool Power reset key Of LCD Contrast Adjustment Note There are three debug interface connectors DBG1 DBG2 and DBG3 which are all the same for user s convenience to connect this Debugger to the target system This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Me
7. 051 GNU Debugger DBG1 2 3 Note In this example target MCU s P1 7 is used for the debug interface 2 2 Firmware Less than 250 bytes of target MCU s program memory are reserved for the Debug Agent Target MCU s Program Memory Debug Agent Less than 250 bytes Note The absolute memory address where the Debug Agent is located is determined by the Linker after compiled or assembled This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Megawin 8051 GNU Debugger MAKE YOU WIN User Manual v4 00 ZY MEGAWIN Megawin 8051 GNU Debugger C47 S E A User Manual v4 00 3 Use the Debugger As described in Section 2 2 to use the Debugger the user must insert the Debug Agent in his application code The following sections will demonstrate how to do tt 3 1 Insert the Debug Agent Follow the steps Step1 Add the Debug Agent DEBUG_Pxx LIB into the project Step2 Include the header file DEBUG H or DEBUG INC in the source modules which will call the debug functions Where Pxx stands for any GPIO pin which is assigned for the debug interface by user For example DEBUG_P16 LIB means P1 6 is used as the debug interface Of course the Debug Agents which use different GPIO pin are also provided The DEB
8. 4 YI MEGAWIN Megawin 8051 GNU Debugger EGS EAE MAKE YOU WIN User Manual v4 00 Megawin 8051 GNU Debugger User Manual By Vincent Y C Yu This document information is the intellectual property of Megawin Technology Co Ltd 1 Megawin Technology Co Ltd 2007 All right reserved 4 YI MEGAWIN Megawin 8051 GNU Debugger MAKE YOU WIN User Manual v4 00 Contents 1 Introduction and Features nsonnennennennennennnrnennerrerrsrrurrnrrerrnrrerrsrrerrerrerrerren 3 ded AN OAU CIO oeae xceeeseeecuaacsaaeseceeeeeaeueacee et eenmeneamecepe at anes ens aoueaeaenweeee sae neeeen eeaeesce 3 Fo USS aa ts vee eas E ane cge ce tte T E E ASS 4 2 System Regu iemMeNiS scetsnccmensennsnedads riana EE ETEEN 5 e AONA a E E E eodhstenaatiiay ett oeesunereetanan 5 Pe FN E E 5 3 Use the Debugger ccccccccceecceececeeeeeeeeeeeeteneeaeeeseeeeeueesseesseeseetsueeaeeesaeeeas 6 Ort MASERU ISOC A ee E a E N S 6 3 1 1 Debug Agent Functions for a C language Module cccccccceseeeeeeeeeeeeeeeeeaeeeeeeeeeaaeeeeeeesaeeseeeeeeas 8 3 1 2 Debug Agent Functions for an Assembly Module cccccccceecceeeeeceeeeeeeeeseeeseseeseessaeeeseeeessaes 10 3 2 Insert the Debug Agent for a Non relocatable Project ccccceccseccceeeeeeeeceeeseeeeeeeeseeeeseees 12 4 Application Program on PC site ce ceccceccceeeeceeeeeeeeseeeseeeseeeeaneeseeesseeesees 13 5 Demonstration Examples cccccccccsecceee
9. 7 segment Now and user can check system Instruction 4 Debug_set_breakpoint BP_no4 Now BP_no4 will blink on the 7 segment and user can check system This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 19 ZY MEGAWIN Megawin 8051 GNU Debugger Fake vouwn User Manual v4 00 Example 6 Check the ADC result There is an ADC function in Megawin MPC82 series MCU To check the ADC result user can insert the debug function Debug_show_msg_to_LCD after an A to D conversion is finished As shown in the following diagram the ADC result will be displayed on the LCD panel Start Start A to D conversion er Check if conversion finished 7 Y 1 J Debug_show_msg_to_LCD ADC 20 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Megawin 8051 GNU Debugger E YOU WIN User Manual v4 00 Example 7 Check a Timer s counting value To check a Timers counting value whenever you want please stop the Timer prior to inserting the debug function Debug_show_msg_to_LCD with argument THx or TLx In this example Timer1 s counting value is to be checked Debug_show_msg_to_LCD T
10. H1 Debug_show_msg_to_LCD TL1 21 This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Megawin 8051 GNU Debugger C47 ear ae User Manual v4 00 Example 8 Check data in the IAP memory To check the IAP data use the debug function Debug _show_msg_to_LCD See the following flow chart If use Debug_show_msg_to_ PC it is necessary to connect the Debugger to PC s COM port and execute the 8051_GNU_Debugger exe See Section 4 for the Application Program on the PC site ISPCR 0x83 ISPCR 7 ISPEN 1 enable ISP IFMT 0x01 select Read Mode and initialize addrH addrL IFARDH addrH High byte address IFADRL addrL Low byte address SCMD 0x46 trigger ISP processing SCMD 0xB9 Debug show msg to LCD IFD or Debug_show_msg_to_PC IFD Check if a N sa end address 2 22 addrH addrL addrH addrL 1 This document information is the intellectual property of Megawin Technology Co Ltd 22 Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Megawin 8051 GNU Debugger a User Manual v4 00 MAKE YOU WIN 6 Special Notes for the Debugger Normally the LCD panel will show Ready whenever the Debugger is in its ready state which means the Debugger is ready to receive
11. UG H is used for C language modules while the DEBUG INC is used for assembly modules See the following examples Example 1 For a C language Module ICi testC51 ision2 D tmp Debug Tool testC51 C _ ox File Edit View Project Debug Peripherals Tools SVCS Window Help acug 4 KR jA BS na DA n ae m Ba ecs pete teeteeteeeeeee eee etek eeeeeeeeeee eee eee eee as 3 4 Target testC5l testc51 c3 gt Module name t tt ttttttttttttttttttttttttttttttttttt ttttt ttt t t t tttt 3 83 Source Files testle l finclude REG MPC89L516 h Hinclude delay h eA Hinclude acbug h Step2 a REG _MPC89L516 H DELAY H define LED G P13 Green DEBUG H define LED RA P14 Red define LED O P15 Orange fdefine LED PI Yellow F Files SH Regs C Books Build Find in Files This document information is the intellectual property of Megawin Technology Co Ltd 6 Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Megawin 8051 GNU Debugger MAKE YOU WIN User Manual v4 00 Example 2 For an Assembly Module Ii test Hision2 D mp Debug Tool test A51 OX E File Edit View Project Debug Fegpherals Tools SY CS Window Help le x aa B Sca E4sAAAA jA EEE E E E E E Bey See ae E E S ee as a E E a f Target test test a51 Module name i a r a r r r r r e a a r r r e a r r r er r a r r r a r a r r r r e a r r r E r E Si a onree Files i test AS ai L ah
12. _msg_ to PC unsigned char mso Show a message to PC S monitor _imsg which i is to be shown on PC unsigned char arg Debug _get_ argument_ from_ PC 0 Get one byte data from PC to be used in the application code arg which is the destination of the data from PC This document information is the intellectual property of Megawin Technology Co Ltd 8 Megawin Technology Co Ltd 2007 All right reserved Megawin 8051 GNU Debugger User Manual v4 00 Y MEGAWIN G4 O77 Make YoU WIN Sample Code include unsigned char varl var2 var3 var4 var5 clear the LCD panel immediate value 0x5A to LCD panel debug h void main void varl s value to LCD panel P1 and show to LCD panel immediate value 0x5B to 7 segment show var2 s value to 7 segment show unsigned char arg read Debug_clear_LCD Debug_show_msg_to_LCD 0x5A Debug_show_msg_to_LCD varl show P2 and show to 7 segment which will blink on the 7 segment Debug_show_msg_to_LCD P1 show Debug_show_msg_to_7 seg Qx5B Debug_show_msg_to_7 seg var2 read which will blink on the 7 segment Debug_show_msg_to_7 seg P2 which will blink on the 7 segment set a Breakpoint with No 0x01 Debug_set_breakpoint 0x01 set a Breakpoint with No 0xF2 Debug_set_breakpoint OxF2 set a Breakpoint with No var5 show immediate value 0x5C to PC monitor show vars s value toe PC monitor read P3 and sh
13. ceeeeeeceeeeeeceeecaeeeseeeeeseeseeeseeeeeesaeegs 14 Example 1 Check the program flow cccccccccsseccccssseeceeeeecseuceeseuseessageesseaeeessaueessaeeessaneeessgeeeesaas 15 Example 2 Modify contents of SFR and RAM cccccccccseeceeceeeeeseeeeeeseeeeeseeeeseeeeeeseeeeeseeeeeseees 16 Example 3 Continuously monitor the MCU s internal status cccccceececseeeeeceeeeeteeeeeeeeneeetenes 17 Ex ample 4 Pseudo Breakpoint cc ce tuescatacetdecgabenatiadeatbacatdandeudasaanegaadeddeeliedesusdtdacessSaesentesaerestncnaleds 18 Example 5 Pseudo Step debugging ccccccccssseceeseeeeceeseeeeeeeceeeeeeeseeeeeesseeeeeessaeeeessaeseesagaes 19 Exampole G CNeck He FI fe SUI enspinn EE E utadnn cuareeeo 20 Example 7 Check a Timers counting value cccceccccceeeeeeseeeeeceeeeeseeeeesseeeeseeeeeseaeeesaaeeesaeeeessaes 21 Example 8 Check data in the IAP memory ccccecccecseeeeceeseeceeeeeesaeeeeseeeeesseaeeesaeeeeeseeeessaeeesaaes 22 6 Special Notes for the Debugger ccccsseccceseeceeeeteeeeseeeeseeeeteneeseneeteneetas 23 This document information is the intellectual property of Megawin Technology Co Ltd 2 Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Megawin 8051 GNU Debugger C47 jee YOU WIN User Manual v4 00 1 Introduction and Features 1 1 Introduction The Megawin 8051 GNU Debugger is a powerful and low cost development kit
14. gawin 8051 GNU Debugger MAKE YOU WIN User Manual v4 00 1 2 Features Six useful and powerful features help you develop your application code and catch the bugs in the application code Feature 1 Real chip debugging via a 1 pin serial interface It means only one I O pin of the Target is needed for debugging Feature 2 Run time displaying any message you want to check such as SFR value RAM data state of input port etc Feature 3 Pseudo Breakpoint It makes the application code stay anywhere you want like stop to let you inspect what has happened in the system And pressing the GO key makes CPU continue to go ahead Feature 4 Pseudo Step debugging By successive inserting the Set Breakpoint command in the critical program section can emulate Step execution Feature 5 While linked to PC much more messages can be shown on the PC s monitor or saved to hard disk for later analysis Feature 6 While linked to PC the debugged Target can ask some arguments from PC for debugging or specific developing purpose In addition Available for both 5V and 3 3V Target system This document information is the intellectual property of Megawin Technology Co Ltd 4 Megawin Technology Co Ltd 2007 All right reserved 2 System Requirements 2 1 Hardware Just one pin of target MCU s GPIO is reserved for communicating with the Debugger Target Sytem Megawin 8
15. ght reserved _ r r Yd MEGAWIN UAS MAKE YOU WIN Megawin 8051 GNU Debugger User Manual v4 00 Example 3 Continuously monitor the MCU s internal status User can continuously monitor the MCU s internal status such as state of an input port contents of RAM or SFR etc See the following examples The status is continuously displayed on the LCD panel Start Start P1 OxFF TCON 0 1 falling edge triggered Debug_show_msg_to_LCD P1 Note In this case P1 s input is continuously monitored Debug_show_msg_to_LCD TCON lf fte monitor TCON 1 the INTO interrupt flag Note In this case if TCON 1 is changed to 1 then we can know a falling edge on INTO had happened This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved Start unsigned char varl _Debug_show_msg_to_LCD var1 Notes In this case varl monitored to check if it is updated in some interrupt service routine is continuously 17 ZY MEGAWIN Megawin 8051 GNU Debugger C47 ee ae User Manual v4 00 Example 4 Pseudo Breakpoint Sometimes user would like to have the MCU temporarily stay somewhere not go ahead but like stop for checking what happened in the system Use the
16. gy Co Ltd 13 Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Megawin 8051 GNU Debugger C47 oe ae User Manual v4 00 5 Demonstration Examples This Debugger provides versatile functions for embedded firmware developing and debugging Several examples are presented in this section They are Example 1 Check the program flow Example 2 Modify contents of SFR and RAM Example 3 Continuously monitor the MCU s internal status Example 4 Pseudo Breakpoint Example 5 Pseudo Step debugging Example 6 Check the ADC result Example 7 Check a Timer s counting value Example 8 Check data in the IAP memory This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Megawin 8051 GNU Debugger C47 ee ae User Manual v4 00 Example 1 Check the program flow In program developing stage checking the program flow and monitoring where the MCU runs is very important For this purpose user can insert the debug function Debug _show_msg_to_LCD with different arguments into the key branch points as illustrated in the following diagram Suppose 0x00 OxDO OxD1 and OxFO are sequentially displayed on the LCD panel while the MCU start to run then we can know the program flow is shown as the blue line Start Debug_show_msg _to_LCD 0x00 4 Debug_sho
17. ow to PC monitor var5 0xB1 Debug_set_breakpoint var5 and Store into vara Debug_show_msg_to_PC 0x5C Debug_show_msg_to_PC var3 j Debug_show_msg_to_PC P3 get an argument from PC arg Debug_get_argument_from_PC var4 arg This document information is the intellectual property of Megawin Technology Co Ltd Megawin Technology Co Ltd 2007 All right reserved 4 YI MEGAWIN Megawin 8051 GNU Debugger Us MAKE YOU WIN User Manual v4 00 3 1 2 Debug Agent Functions for an Assembly Module DEBUG INC defines the debug functions by MACRO type for assembly modules as listed below o 7 Description Argu ment MAGRO name i Description Argument Description Argument MACRO name Debug_set_breakpoint BP_no Set a breakpoint in the application code and pressing the GO key on the Debugger will let __the application code continue to go Argument Description MACRO name Debug_show_msg_to_PC msg Description Argu ment MACRO name Description Argument Debug_clear_LCD ee Clear the LCD panel of the Debugger N A Debug _show_msg_to LCD msg Show a message on the LCD panel of the Debugger msg which is to be shown on the LCD panel i Debug_show_msg_to_7seg msg Show a message on the 7 segment of the Debugger msg which is to be shown on the 7 segment BP_no which is the breakpoint number assigned by user to be shown on the 7 segment Show a message to PC
18. s monitor msg which is to be shown on PC Debug_get_argument_from_PC arg Get one byte data from PC to be used in the application code arg which is the destination of the data from PC This document information is the intellectual property of Megawin Technology Co Ltd 10 Megawin Technology Co Ltd 2007 All right reserved Megawin 8051 GNU Debugger User Manual v4 00 Y MEGAWIN G4 7 Make YoU WIN Sample Code debug inc SINCLUDE data_test SEGMENT DATA RSEG data_test varl DS dq varz DS 1 Vors DS 1 var4 DS 1 Varo DS i arg DS 1 i _ a ee ee ee ee ee ee ee ee ee ee ee es ee ee ef ee ee ee ee ee ee ee a ee ee ee ee ee ee ee ee eS ee P code_test SEGMENT CODE RSEG code _test USING 0 sa eS se ee Start Debug_clear_LCD clear the LCD panel Debug_show_msg_to_LCD 5Ah show immediate value 5Ah to LCD panel Debug_show_msg_to_LCD varl show varl s value to LCD panel Debug_show_msg_to_LCD ACC show SFR ACC s value to LCD panel Debug_show_msg_to_LCD B show SFR B s value to LCD panel Debug_show_msg_to_LCD Pl read Pl and show to LCD panel Debug_show_msg_to_LCD 30h show RAM addr 30h s value to LCD panel Debug_show_msg_to_7seg 5Bh show immediate value 0x5B to 7 segment Debug_show_msg_to_7 seg var2 show var2 s value to 7 7 segment Debug_show_msg_to_ seg ACC show SFR ACC s value to 7 segment Debug_show_msg_to_ seg B show SFR B s value to 7 segment Debug_show_msg_to_7 seg P2
19. w_msg _to_LCD 0xD0 0 SS J ly Debug_show_msg Debug_show_msg _to_LCD 0xA0 _to_LCD 0xD1 CC Debug_show_msg t bo LCD CxBO _show_msg Debug_show_msg Debug_show_msg Debug_show_msg _LCD OxFO i cto LED OxDzZ _to_LCD 0xEO _te _ LCD 0XA1 j E Debug_show_msg j _to_LCD 0xC0 Debug_show_msg t E0 LCD 0XB1 This document information is the intellectual property of Megawin Technology Co Ltd 15 Megawin Technology Co Ltd 2007 All right reserved ZY MEGAWIN Megawin 8051 GNU Debugger C47 ee ae User Manual v4 00 Example 2 Modify contents of SFR and RAM Sometimes user would like to modify the contents of some SFR or RAM while MCU is running Use the debug function Debug_get_argument_from_PC to do it Refer to the following diagram A Start unsigned char varl varl Debug_get_argument_from_PC TK Debug_get_argument_from_PC IP Debug_get_argument_from_ PC DPH Debug_get_argument_from_PC DPL Debug_get_argument_from_PC SCON Debug_get_argument_from_ PC TMOD Debug_get_argument_from_PC Pl Debug_get_argument_from_PC This document information is the intellectual property of Megawin Technology Co Ltd 16 Megawin Technology Co Ltd 2007 All ri
20. wing example shows a non relocatable assembly program The user should open the file DEBUG PIN to edit the definition for SDA which is one of the target s I O pin used as the interface to the Debugger as shown below SDA BIT P41 6 the user may change P1 6 to the other wanted I O pin In this example the user should notice where to include DEBUG PIN and where to insert the Debug Agent DEBUG A51 SINCLUDE DEBUG INC include header file Var DATA 30h Variables are absolutely assigned by var2 DATA Sih non relocatable definition var3 DATA 32h Ela BLT 20 0 flag2 BET 20nd flags BIT 2 Ofi CSEG AT 0000h absolutely assign code address JMP start ORG 0040h absolutely assign code address Start MOV SP 7Eh ssa INSTrUCTLON tisa Instruction JMP Label_1 ORG 1000h absolutely assign code address Label 1 ieee 10S PUCctiLoOn z420 CINSTIUCT LON JMP Label 2 ORG 2000h absolutely assign code address Label 2 taws LINSTLUCTION sese INST rucrcion r _ SINCLUDE DEBUG A51 insert the Debug Agent END end of program This document information is the intellectual property of Megawin Technology Co Ltd 12 Megawin Technology Co Ltd 2007 All right reserved Y 3 MEGAWIN Megawin 8051 GNU Debugger UAS MAKE YOU WIN User Manual v4 00 4 Application Program on PC site The PC site application program is just a console mode software program and is very easy to
Download Pdf Manuals
Related Search
Related Contents
Instructions Conceptronic 4-Ports Cube USB 2.0 Hub Manual - Omron HP Matrix Operating Environment 7.0 論理サーバー管理ユーザーガイド Peavey SSE UB2T User's Manual RX109 Stopuhr User`s Manual - Minarik Drives Softswitch128TM Copyright © All rights reserved.
Failed to retrieve file