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.

Fatal Error: Segment DATA20_Z must be defined in a segment definition option

Other Parts Discussed in Thread: MSP430F5510, MSP430F5438A, MSP430F5310, MSP430WARE

Hi ,

       I am new to MSP430 .I am using IAR embedded workbench . i got a driver files from mspware set up.In their coding they have done the I2C communication using MSP430F5438A IC   it is successfully built by IAR .But ,when i am changing the IC number to MSP430F5510 ,it is not getting build and showing fatal error which is  Segment DATA20_Z must be defined in a segment definition option. what is the solution for this error?

 

 

Best Regards,

Rajesh.M.

 

  • Hello,

    Can you try selecting "large memory model" under Project --> Options --> General Options --> Target (tab) --> Data Model?

    Regards,

    Priya

  • Hi,

    I have the same problem. I have selected the large memory model but the problem still persist.

    The code is in my Interrupt Routine for USCI_A0_VECTOR

    When the code is as follows then I get an error:

    unsigned char RXData;

        if((UART_queryStatusFlags(__MSP430_BASEADDRESS_USCI_A0__, UART_RECEIVE_ERROR))||
               (UART_queryStatusFlags(__MSP430_BASEADDRESS_USCI_A0__, UART_FRAMING_ERROR)) ||
                       (UART_queryStatusFlags(__MSP430_BASEADDRESS_USCI_A0__, UART_PARITY_ERROR))  ||
                               (UART_queryStatusFlags(__MSP430_BASEADDRESS_USCI_A0__, UART_OVERRUN_ERROR))){
                                       
                                       unsigned char DummyRead = UART_receiveData(__MSP430_BASEADDRESS_USCI_A0__);
                                       
                               }
        else{
                    RXData =  UART_receiveData(__MSP430_BASEADDRESS_USCI_A0__);
        }

    If I remove the highlight code then the problem disappears.

    The error I receive:

    Fatal Error[e72]: Segment DATA20_Z must be defined in a segment definition option (-Z, -b or -P)

    Regards,

    Gary

  • As per the MSP430WARE example code when I compile for MSP430F5438a then it compiles fine but when I compile for the MSP430F5310 then I receive the above mentioned error. Is there a linker error?

  • From IAR

    I notice that the linker configuration file:

    <EW430>\430\config\lnk430f5310.xcl

     

    .. does not contain definitions of DATA20_Z, like for example the file <EW430>\430\config\lnk430f5324.xcl does.

     

    If you make a copy of "lnk430f5310.xcl" and place it in $PROJ_DIR$, you can add the following line to the "// Read/write memory" group of commands:

     

    -Z(DATA)DATA20_I,DATA20_Z,DATA20_N,DATA20_HEAP+_DATA20_HEAP_SIZE

     

    I will check with our developers if this is to be considered a bug in EW430, since I think you should be able to build with Data Model = Large for MSP430F5310.

**Attention** This is a public forum