Codewarrior Development Studio for Microcontrollers V10.X HC(S)08/RS08 Assembler Reference Manual
Total Page:16
File Type:pdf, Size:1020Kb
CodeWarrior Development Studio for Microcontrollers V10.x HC(S)08/RS08 Assembler Reference Manual Document Number: CWMCUS08ASMREF Rev 10.6, 02/2014 CodeWarrior Development Studio for Microcontrollers V10.x HC(S)08/RS08 Assembler Reference Manual, Rev. 10.6, 02/2014 2 Freescale Semiconductor, Inc. Contents Section number Title Page Chapter 1 Using HC(S)08/RS08 Assembler 1.1 Highlights........................................................................................................................................................................25 1.2 Structure of this Document.............................................................................................................................................25 Chapter 2 Working with Assembler 2.1 Programming Overview..................................................................................................................................................27 2.1.1 Project Directory............................................................................................................................................29 2.1.2 External Editor...............................................................................................................................................29 2.2 Managing Assembly Language Project Using CodeWarrior IDE..................................................................................30 2.2.1 Create New Project........................................................................................................................................30 2.2.2 Additional Project Information......................................................................................................................32 2.3 Analysis of Groups and Files in a Project.......................................................................................................................35 2.3.1 CodeWarrior Groups......................................................................................................................................36 2.3.2 Creating New Group......................................................................................................................................37 2.3.3 Adding New File to the Project......................................................................................................................37 2.3.4 Renaming File or Group................................................................................................................................38 2.3.5 Moving File....................................................................................................................................................38 2.3.6 Removing File................................................................................................................................................38 2.3.7 Restoring Deleted File...................................................................................................................................39 2.3.8 Using Editor...................................................................................................................................................39 2.3.9 Generating Listing Files.................................................................................................................................40 2.4 Writing your Assembly Source Files..............................................................................................................................41 2.5 Analyzing Project Files...................................................................................................................................................42 2.6 Assembling Source Files.................................................................................................................................................46 2.6.1 Assembling and Linking with CodeWarrior IDE..........................................................................................46 2.6.2 Assembling with Assembler..........................................................................................................................47 2.6.2.1 Configuring Assembler..................................................................................................................48 CodeWarrior Development Studio for Microcontrollers V10.x HC(S)08/RS08 Assembler Reference Manual, Rev. 10.6, 02/2014 Freescale Semiconductor, Inc. 3 Section number Title Page 2.6.2.2 Input Files......................................................................................................................................52 2.6.2.3 Assembling Assembly Source-code Files......................................................................................54 2.7 Linking Application........................................................................................................................................................60 2.7.1 Linking with CodeWarrior IDE.....................................................................................................................60 2.7.1.1 PRM File........................................................................................................................................60 2.7.1.2 Linking Object-code Files..............................................................................................................62 2.7.2 Linking with Linker.......................................................................................................................................64 2.8 Directly Generating ABS File.........................................................................................................................................69 2.8.1 Creating Absolute Assembly Project.............................................................................................................69 2.8.2 Adapting Absolute Assembly File Created by Wizard..................................................................................70 2.8.3 Generating Absolute Assembly Using CodeWarrior IDE ............................................................................74 2.8.4 Generating Absolute Assembly Using Assembler Build Tool......................................................................74 2.9 Assembler Build Properties Panels.................................................................................................................................75 2.9.1 HCS08 Assembler Build Properties Panels...................................................................................................76 2.9.1.1 HCS08 Assembler..........................................................................................................................77 2.9.1.2 HCS08 Assembler > Output..........................................................................................................77 2.9.1.3 HCS08 Assembler > Output > Configure listing file.....................................................................79 2.9.1.4 HCS08 Assembler > Input.............................................................................................................79 2.9.1.5 HCS08 Assembler > Language......................................................................................................80 2.9.1.6 HCS08 Assembler > Language > Compatibility modes................................................................81 2.9.1.7 HCS08 Assembler > Host..............................................................................................................83 2.9.1.8 HCS08 Assembler > Code Generation..........................................................................................83 2.9.1.9 HCS08 Assembler > Messages......................................................................................................84 2.9.1.10 HCS08 Assembler > Messages > Disable user messages..............................................................85 2.9.1.11 HCS08 Assembler > General.........................................................................................................86 2.9.2 RS08 Assembler Build Properties Panels......................................................................................................87 2.9.2.1 RS08 Assembler.............................................................................................................................87 2.9.2.2 RS08 Assembler > Output.............................................................................................................88 2.9.2.3 RS08 Assembler > Output > Configure Listing File.....................................................................89 CodeWarrior Development Studio for Microcontrollers V10.x HC(S)08/RS08 Assembler Reference Manual, Rev. 10.6, 02/2014 4 Freescale Semiconductor, Inc. Section number Title Page 2.9.2.4 RS08 Assembler > Input................................................................................................................90 2.9.2.5 RS08 Assembler > Language.........................................................................................................92 2.9.2.6 RS08 Assembler > Language > Compatibility modes...................................................................93 2.9.2.7 RS08 Assembler > Host.................................................................................................................94 2.9.2.8 RS08 Assembler > Code Generation.............................................................................................95 2.9.2.9 RS08 Assembler