1 / 75

The GreenHills Tool Chain

7-2. Multi 2.1/3.5 - Directory Structure. Multi v2.1C:\green \libsrc \armtsf \armtsfb. Multi v3.5C:\ghs \libsys \arm4 \arm4b. 7-3. . Multi 2.1/3.5 - System Library. System related functions libsys.aContains customized IO stubs ind_io.cNo

hilliard
Download Presentation

The GreenHills Tool Chain

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. 7-1 The GreenHills Tool Chain

    2. 7-2 Multi 2.1/3.5 - Directory Structure

    3. 7-3 Multi 2.1/3.5 - System Library System related functions libsys.a Contains customized IO stubs ind_io.c No longer replace system library in GHS directory /ghs/arm4b/libsys.a New custom GHS library ghs.o Replaced io file during final link na2.bld

    4. 7-4 Multi 2.1/3.5 - Build File Compatible with multi2000 v3.5 na1.bld, na2.bld, bsp.bld, … Automatically upgraded format when modified Insert additional files Options are added or removed byteorder bigendian c_options New format not compatible with v2.1 Using an editor to avoid format change Wordpad ultraedit

    5. 7-5 Multi 2.1/3.5 – new Compiler Stricter compliance to C standard Casting variable types Additional warnings generated No line feed Variable used when not initialized Variable not used NETOS files cleaned bsp, header files, examples

    6. 7-6 Overview of Multi 2000 Build Environment

    7. 7-7 Major Components By Green Hills Software Integrated Development Environment (IDE) Includes Builder Compiler Linker Editor Source Debugger Version Control Run-Time Error Checking

    8. 7-8 Builder Window

    9. 7-9 Graphical User Interface Multi-2000 provides a color-assisted text editor

    10. 7-10 Adding files to the project C files and libraries are added to the project simply by a multi-selectable dialog window

    11. 7-11 Build Through Debug Review

    12. 7-12 Building the project Once all files are present in project workspace, building is readily done

    13. 7-13 Connecting to Target (1of 3) In the Builder, choose Remote > Connect to Target.

    14. 7-14 Connecting to Target (2 of 3) Enter OCDSERV command line.

    15. 7-15 Connecting to Target (3 of 3) Two new windows IN/OUT –Displays Printf’s TARGET—can read/write to Memory/CPU

    16. 7-16 Starting Debugger

    17. 7-17 Debugger Features Set Break Points-Software and Hardware Step through code Examine C-code Examine Interlaced Assembly Examine values of variables, registers, memory

    18. 7-18 Debugger Windows

    19. 7-19 Download code to Target

    20. 7-20 Run Program

    21. 7-21 Breakpoints NET+OS supports both software and hardware breakpoints. Software breakpoints (instruction fetches) are only possible while debugging from RAM Actual instruction is replaced with a special bit pattern that forces the ARM into debug mode. Unlimited number of software breakpoints available. Hardware breakpoints (data accesses) are possible while debugging from RAM or ROM. Triggered by particular address access. Maximum of one hardware breakpoint at a time. (Green Hills Limitation)

    22. 7-22 Software Breakpoints Adding a software breakpoint takes one click!

    23. 7-23 Hardware Breakpoints Hardware breakpoints installed via entering address or symbol name, r/w/x.

    24. 7-24 Debugging in a multi threaded operating environment – ThreadX Tools Multi-2000 has a number of specific tools for debugging and analyzing ThreadX.

    25. 7-25 ThreadX Tools

    26. 7-26 ThreadX Tools

    27. 7-27 Linking Files

    28. 7-28 Introduction The linker places text & data into the appropriate sections of memory, as defined by the User-supplied section map, or Default linker section map Application can benefit by splitting the program into sections such that it will more readily support different types of memories. Factors include: Speed of parts (performance requirements) Cost & availability

    29. 7-29 Linker Directives File Major GHS supplied linker directives:

    30. 7-30 Linker Directives File (cont.) NETSilicon provided linker directives Common linker attributes align(expr) - Section will start on first expr-byte aligned address following previous section pad(expr) - Linker will reserve expr bytes for this section in memory ROM(expr) - Section becomes a ROMmable copy of expr. Section inherits the attributes and data of expr, while expr is modified to reserve address space only (as if it were all padding with no data) The following is from netos\examples\nahttp\debug.lx -sec { .reset 0x000000 : .picbase 0x4000 : .romreset ROM(.reset) : .text : .intercall : .interfunc : .syscall : .fixaddr : .fixtype : .rodata : .romdata ROM(.data) : .romsdata ROM(.sdata) : .secinfo : .pidbase align(16) : .sdabase : .sbss : .sdata : .data : .bss : .heap align(16) pad(0x100000) : .stack align(16) pad(0x2000) : .netosstack align(16) pad(0x10000) : .free_mem align(16) pad(0x10000) : }The following is from netos\examples\nahttp\debug.lx -sec { .reset 0x000000 : .picbase 0x4000 : .romreset ROM(.reset) : .text : .intercall : .interfunc : .syscall : .fixaddr : .fixtype : .rodata : .romdata ROM(.data) : .romsdata ROM(.sdata) : .secinfo : .pidbase align(16) : .sdabase : .sbss : .sdata : .data : .bss : .heap align(16) pad(0x100000) : .stack align(16) pad(0x2000) : .netosstack align(16) pad(0x10000) : .free_mem align(16) pad(0x10000) : }

    31. 7-31 ROM and RAM Execution

    32. 7-32 Basic RAM & ROM requirements for NET+OS 512KB – 1MB Flash Recommended Primarily for code storage Code execution for low-end applications 2MB – 8MB RAM Recommended Data buffering for DMA channels Thread stacks Heap Place holder for new image download Code execution for higher-end applications

    33. 7-33 System Memory Map

    34. 7-34 System Memory Map BSP provided memory map is designed with cache in mind. Same map will work with or without cache. Entire memory map configured using 2 control registers per chip select. Address bit masking allows for multiple memory images – ideal for setting up cacheable regions.

    35. 7-35 Relative application speed FLASH memory typically 90-120ns read access time. Can decrease access time to 35-50ns by leaving flash chip “on” all the time. SDRAM typically 7-10ns access time. Running from RAM is typically faster.

    36. 7-36 Supporting FTP FLASH upgrade FTP server must be running out of either Flash or RAM. FLASH update is invoked by an FTP client requesting to “put” file of special keyword filename. File is transferred to Net+ARM system memory buffer (RAM). A subsequent procedure, running in RAM, burns Flash with this new image. Running in RAM is the key to this step.

    37. 7-37 Project Structure

    38. 7-38 ramimagezip.bld - what it looks like

    39. 7-39 project.bld - contents

    40. 7-40 project.bld - what it looks like

    41. 7-41 3 Ways to Run…

    42. 7-42 Run-time Physical Memory Mapping

    43. 7-43 ramimagezip Executable Location

    44. 7-44 Memory Map - ramimagezip

    45. 7-45 rom.bld Executable Location

    46. 7-46 Rom-based Memory Map - rom.bld

    47. 7-47 ROM Compression - romzip.bld

    48. 7-48 romzip.bld - what it looks like

    49. 7-49 romzip.bld Executable Location

    50. 7-50 Memory Map - romzip.bld

    51. 7-51 ramimage.o location, pre-decompression

    52. 7-52 Decompression and Relocation

    53. 7-53 Summary Develop & debug with ramimagezip.bld Must Open romzip.bld, to inherit proper include directories, etc. double-click ramimagezip.bld from within romzip.bld Once desired functionality reached, simply compile romzip.bld romzip.bin will be generated Download to flash Power cycle will invoke romzip to run from Flash After about 15 seconds, ramimagezip will be running From RAM Flash no longer used at this point Original ramimagezip memory map now in effect

    54. 7-54 Multi 2000 Configuration

    55. 7-55 Introduction MULTI-2000 is a user configurable IDE Users can control: Compiler options Linker options Visual look and feel

    56. 7-56 Project | Options

    57. 7-57 General Tab Gives the user a location to add extra direction information, macro definitions, extra options to commands, etc.Gives the user a location to add extra direction information, macro definitions, extra options to commands, etc.

    58. 7-58 Optimization Tab Selecting Optimize for Speed or Optimize for Size will bring up the Advanced button allowing the user to further customize optimization parametersSelecting Optimize for Speed or Optimize for Size will bring up the Advanced button allowing the user to further customize optimization parameters

    59. 7-59 Run-time Error Tab Memory checking defaults to ‘None’. Other options are: Allocation – Checks for attempts to free non-allocated memory Memory – Checks for attempts to free previously free-ed memoryMemory checking defaults to ‘None’. Other options are: Allocation – Checks for attempts to free non-allocated memory Memory – Checks for attempts to free previously free-ed memory

    60. 7-60 Configuration Tab Allows the user to specify environment specific information about the tools, file locations, etc. Allows the user to specify environment specific information about the tools, file locations, etc.

    61. 7-61 Action Tab

    62. 7-62 Advanced Tab

    63. 7-63 Project | Language Options Allows the user to specify C, C++, Ada, Pascal, and FORTRAN specific optionsAllows the user to specify C, C++, Ada, Pascal, and FORTRAN specific options

    64. 7-64 C Tab C versions include Kernighan & Ritchie, ANSI, Strict ANSI, and Transition Mode. C versions include Kernighan & Ritchie, ANSI, Strict ANSI, and Transition Mode.

    65. 7-65 Project | CPU Options

    66. 7-66 ARM Options Select ARM7tm for the processor, and the appropriate choice of default, none, software, or FPA10. Other options include generating thumb code, code in big-endian format, and code linked for thumb libraries.Select ARM7tm for the processor, and the appropriate choice of default, none, software, or FPA10. Other options include generating thumb code, code in big-endian format, and code linked for thumb libraries.

    67. 7-67 Project | Toolchain Options The toolchain dialogs applies only to the tools you are usingThe toolchain dialogs applies only to the tools you are using

    68. 7-68 Linker Tab The Linker tab gives the user the ability to control linker specific options, as well as how mapfiles will be generated.The Linker tab gives the user the ability to control linker specific options, as well as how mapfiles will be generated.

    69. 7-69 Assembler Tab The Assembler tab allows the user to specify the assembler and listing file options.The Assembler tab allows the user to specify the assembler and listing file options.

    70. 7-70 Config | Options

    71. 7-71 General Tab The General tab gives the user a lot of control over MULTI-2000’s look and feel. Menu structures, window control, keyboard and mouse bindings can all be changed. The General tab gives the user a lot of control over MULTI-2000’s look and feel. Menu structures, window control, keyboard and mouse bindings can all be changed.

    72. 7-72 Debugger Tab The Debugger tab allows the users to control the performance and operation of the built in debugger. The Debugger tab allows the users to control the performance and operation of the built in debugger.

    73. 7-73 Editor Tab The Editor tab allows the user to specify and control attributes of MULTI-2000’s built in editor. Users are also able to integrate their favorite editor, specifying it by name in the More Editor Options dialog.The Editor tab allows the user to specify and control attributes of MULTI-2000’s built in editor. Users are also able to integrate their favorite editor, specifying it by name in the More Editor Options dialog.

    74. 7-74 Version Control Tab The Version Control tab allows the user to integrate their revision control system with the MULTI-2000 environment. Arguments are predefined for popular systems such as ClearCase™, and RCS, as well as Green Hills Software’s own MULTI Version Control, MVC.The Version Control tab allows the user to integrate their revision control system with the MULTI-2000 environment. Arguments are predefined for popular systems such as ClearCase™, and RCS, as well as Green Hills Software’s own MULTI Version Control, MVC.

    75. 7-75 Colors Tab The Color tab allows the user to control what colors are used for source code, build files, and within the debugger. Select a colored box to launch the color chooser.The Color tab allows the user to control what colors are used for source code, build files, and within the debugger. Select a colored box to launch the color chooser.

    76. 7-76 Summary For further reading consult Building and Editing with Multi2000, Green Hills Software(M32W89NG)

More Related