现在的位置: 首页 > 综合 > 正文

Use Memory Layout from Target Dialog

2013年10月03日 ⁄ 综合 ⁄ 共 7651字 ⁄ 字号 评论关闭

       Use Memory Layout from Target Dialog

            When enabled, µVision creates a linker scatter file from the memory information supplied in the dialogs Target and Properties.
When disabled, then the 

            R/O BaseR/W Base, and Scatter File can be set manually. The scatter file defines the memory layout and allows assigning modules to specific memory areas.

refer:

Target (MDK-ARM)

The window Options for Target - Target allows configuring the device and application for using an operating system, set the code generation options, and specifying the memory areas of the device.

Xtal (MHz)
Specifies the XTAL frequency of your device. XTAL is used to configure the debugger and Flash programmer. Note that XTAL reflects the main oscillator externally connected to the device. 
Operating System
Select the RTX Kernel which adds the correct RTX library and enables kernel aware debugging.
System-Viewer File (.Sfr):
Specifies the file for debugging peripheral registers with the System Viewer. For details refer toAdding System Viewer Windows.
Code Generation
Select ARM-Mode or Thumb-Mode for the application.
Use Cross-Module Optimization enables the linker feedback file that allows further code optimizations.
Select usage for the Floating Point Hardware on devices that have a Vector Floating Point (VFP) co-processor:

  • not used: code generated does not use any VFP instructions (Compiler switch: none, Assembler switch: none)
  • library calls: compiler generates library calls that use VFP instructions (generates typically the smallest code and should be used when Thumb mode is selected)
    (Compiler switch: --fpu=softvfp+vfpv2, Assembler switch: --fpu=vfpv2)
  • in-line (strict ANSI): compiler mostly uses the VFP unit with in-line code (generates fast code that conforms to the ANSI standard).  (Compiler switch: --fpu=vfpu2,
    Assembler switch: --fpu=vfpv2)
  • in-line (fast): compiler uses for all VFP instructions in-line code (error checking does not always conform to the ANSI standard). (Compiler switch: --fpu=vfpv2
    --fpmode=fast, Assembler switch: --fpu=vfpv2)

Use MicroLIB to change the C run-time library set for smallest code application code. MicroLIB is not fully ANSI compatible but sufficient for most small embedded applications.

Use Link-Time Code Generation enables multi-file compilation that performs additional code optimizations, as:

  • function in-lining across modules.
  • removing variables and functions that are not referenced.
  • optimizing memory access by re-arranging variables.
  • re-using memory pools where possible.

Big Endian defines the method of accessing multi-byte data.

Read/Only Memory Areas
Specify the RO areas (typically located in ROM space). The default check box before each entry enables the area globally for the application. Individual modules may be assigned in the Propertiesdialog
to specific areas. Startup selects the area used for the Startup code.
Read/Write Memory Areas
Specify the ZI and RW areas (typically located in RAM space). The default check box before each entry enables the area globally for the application. Individual modules may be assigned in theProperties dialog
to specific areas. Noinit selects areas that should be excluded from zero initialization.

 Note

  • The Memory Areas settings can be used to create a linker scatter file. This requires enabling Use Memory Layout from Target Dialog in the
    dialog Options for Target - Linker.
  • The options described above depend on the device in use and might not be visible or enabled for each device.

Properties

Open this dialog with the context menu of the window Project; menu item Options for item. The dialog includes check boxes with tri-state alternatives:

  • Not checked - this property is disabled.
  • Checked and gray - this property inherits the property from the parent object.
  • Checked and white - this property is set individually for the object.
Path, Size, Last Change
Display information about the selected object.
File Type
Associates a file with a file type.
Include in Target Build
Disable this option to exclude the group or source file from this project target. The file is not translated and not linked into
the application object file. This option is useful, for example, for an application that runs on different hardware systems. Each system might need its own configuration file. The option allows to exclude those configuration files not needed for a particular
target.
Always Build
Enable this option to enforce translating a source module with every build process. For example, setting this option is useful for files containing macros that compute information about the application version, __DATE__,
or __TIME__.
Generate Assembler SRC File
Instructs the C compiler to generate an assembler source file from this C module. Typically this option is used when the C source file contains #pragma asm / endasm sections.
Assemble SRC File
Use this option together with the option Generate Assembler SRC File to translate the assembler source code generated by Compiler into an object file that can be linked to the application.
Link Publics Only
Available for C51, C16x, and C251 families: Instructs Linker to link only PUBLIC symbols from that module. Check this option, when you want to use entry or variable addresses from a different application.
It refers in the most cases to an absolute object file, which may be part of the project.
Code Bank
Available for C51 and C251 families: Assigns the program code of a file or file group to a specific code bank. Requires that you enable code banking in the Options — Target dialog.
Compile C File with EC++
Available for C16x families: Use the Embedded C++ Compiler to compile standard C files, if you have mixed C/C++ projects.
Stop on Exit Code
Specify an exit code to stop the build process upon translator messages. By default, µVision translates all files in a build process, regardless of error or warning messages.
Custom Arguments
Useful for files that require a Custom Translator.
Memory Assignment
Available for ARM and Cortex-M families: Assign a file or group to specify memory regions. Code/Const (RO), Zero Initialized Data (ZI), and standard data (RW) areas can be selected. Note: enter the available
memory regions in the dialog Options for Target. Also, enable Use Memory Layout from Target Dialog in the dialog Linker.
Select Modules
Available for files of the type Library. Allows to always include specific modules from a Library. By default, only the needed modules are loaded into the object file.

 Note

  • C16x stands for C16x, XE16x, and XC20x.

Make RW Sections Position Independent
When enabled, the variable region containing the RW and ZI output sections are position-independent. When disabled, the RW and ZI sections are located to absolute memory addresses. Generates
the linker command-line option --rwpi.
Make RO Sections Position Independent
When enabled, the constant and code region containing the RO output section is position-independent. When disabled, the RO section is located to an absolute memory address. Generates the linker command-line option --ropi.
Don't Search Standard Libraries
Disables the scanning of default compiler run-time libraries. Generates the linker command-line option--noscanlib.
Report 'might fail' Conditions as Errors
Reports conditions that might result in a failure as errors rather than warnings. Generates the linker command-line option --strict.
R/O Base
Sets the address for constant and code region containing the RO output section. The address must be word-aligned. If not specified, the default RO base address is 0x8000. The R/O Base specifies also the initial program entry
address. This option is active when Use Memory Layout from Target Dialog is disabled.
R/W Base
Set the address for the variable region containing RW and ZI output sections. The address must be word-aligned. This option is active when Use Memory Layout from Target Dialog is disabled.
disable Warnings
Enter the warning numbers that should get suppressed during compile time. Separate a list of numbers by commas (,). Generates the linker command-line option --diag_suppress.
Scatter File
Shows the name of the scatter-loading file (*.sct). The file provides grouping and placement details of the various regions and sections in the image. This option is active when Use Memory Layout from Target Dialog is disabled.
...
Is a browse-button to attach the scatter-loading file. This option is active when Use Memory Layout from Target Dialog is disabled.
Edit...
This button opens the scatter-loading file in the µVision editor. This option is active when Use Memory Layout from Target Dialog is disabled.
Misc Controls
Allows specifying linker commands for which there are no individual dialog controls.
Linker control string
Displays the current linker command-line directives.

抱歉!评论已关闭.