This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Range error

Other Parts Discussed in Thread: MSP430F6777

Dear sir,

I am using MSP430F6777 device. Following error is coming after adding some code section:-

Error[e18]: Range error,
Number out of range. Valid range is -32768 (-0x8000) to 65535 (0xFFFF).
File: E:\Backup 25032014\Pro80_18oct\Sources\LCD.c, Line: 718
Source: MOV.W #`?<Constant "S.No. : GAT">`, R13
Where $ = power_up_disp + 0x14 [0x30A3A]
in module "LCD" (E:\Backup 25032014\Pro80_18oct\Debug\Obj\LCD.r43),
offset 0x14 in segment part 74, segment CODE
What: #no label found# [0x10020]
Allowed range: 0xFFFF8000 - 0xFFFF
Operand: #no label found# [0x10020]
in module LCD (E:\Backup 25032014\Pro80_18oct\Debug\Obj\LCD.r43),
Offset 0x0 in segment part 6, segment DATA16_C
Error while running Linker

Pls suggest me.

Regards

  • If you would post the code from the line referred in the error and the code related to this line, someone here might give you the reason for the error.

    yogendra agarwal said:
    File: E:\Backup 25032014\Pro80_18oct\Sources\LCD.c, Line: 718

  • Dear sir,

    Pls find the same,

    sprintf(disp_msg_array, "S.No.   : GAT");

    Regards

    Yogendra

  • Sir,

    One more error is coming,

    Error[e16]: Segment DATA16_C (size: 0x4d82 align: 0x1) is too long for segment definition. At least 0xf26 more bytes needed. The problem occurred while processing the segment placement command "-Z(CONST)DATA16_C,DATA16_ID,DIFUNCT,CHECKSUM=C000-FF7F", where at the moment of placement the available memory ranges were "CODE:c124-ff7f"
    Reserved ranges relevant to this placement:
    c000-c02d CSTART
    c02e-c123 ISR_CODE
    c124-ff7f DATA16_C

    Pl suggest.

    Regards

  • In the first case, it looks as though you have places a segment in a memory area where it can't be placed. For example, segments named DATA16 must be placed below 64K since the compiler use small machine instructions to access them.

    The second error is simply an "out of memory" error -- you are trying to squeeze to much code and/or data into the memory of the device (or into a specific memory range).

    If you are using a device with memory above 64 KB, you use utilize the high memory either by using the large data model, or use the medium data model and selectively placing some object in high memory using the __data20 memory type. For more information on this, I would recommend using the IAR compiler manual, which is provided as a PDF with IAR Embedded Workbench.

        -- Anders Lindgren, IAR Systems, Author of the IAR compiler for MSP430

  • Dear sir,

    Can you pl provide me the linker file for device MSP430F6777?

    Regards

  • yogendra agarwal said:
    Can you pl provide me the linker file for device MSP430F6777?

    Depending on your IDE, the linker file is either already in your project folder, or you’ll find it in the IDE installation folder. In the latter case, the project settings might point you to its location. You need to copy it into your project folder and change the project settings to use this copy instead of the default.
    Note, that when you change the linker file for your project, you’ll have to check whether the default file has undergone any changes, and implement these changes into your customized file. The linker file needs to match the current header files and the compiler and linker version. It may (and in the past, it has a few times) significantly change between IDE revisions. Or not at all. You need to check.

  • In My IAR version, there is no option to select device MSP430F6777. Is there any device update patch exists? or i have to update my IAR version?

    Pl suggest.

    Regards

  • Unfortunately, we do not have a device update patch. The recommended way is to upgrade Embedded Workbench to a newer version.

    Having said that, if you still want to use your current version, you can download the kickstart version of the IAR tools and move the .menu, .sfr, .ddf, .xcl, and .h files to your existing tool. There is no guarantee that it will work, however, the format of these files have been stable for quite some time.

    One thing you have to watch out for, though, is hardware bugs. As far as possible, we try to work around hardware bugs automatically in the tools. If you use an old tool version with a device that didn't exist when that tool was released, there is a risk that your application could be affected.

        -- Anders Lindgren

**Attention** This is a public forum