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.

CCS/MSP430FR5994: CCS/MSP430FR5994

Part Number: MSP430FR5994

Tool/software: Code Composer Studio

How do I resolve this warning?

Description Resource Path Location Type
#515-D a value of type "void *" cannot be assigned to an entity of type "__SFR_FARPTR" aes256.c /Gemini/source line 205 C/C++ Problem?

linr of code look like this; DMA0DA  = (void *)encrypted_data;             

Craig        

  • For the source file that gets this diagnostic, please follow the directions in the article How to Submit a Compiler Test Case.

    Thanks and regards,

    -George

  • TI and Craig,

    I have the same problem and it works fine on IAR. All I'm trying to do is put an address into the source and destination address of the DMA registers for AES encryption. It appears the only way to get the warning to go away is to use the DriverLib calls. This is really an inconvenience!

    Here's the code with the commented out lines to avoid warnings. Note that the code works with the warnings and the correct address is being set properly but the compiler doesn't like it.

        // Setup DMA0: channel 0
    //  DMA0SA  = (void *)&AESADOUT;                                //set the src  address
        DMA_setSrcAddress(DMA_CHANNEL_0, (AES256_BASE + OFS_AESADOUT), DMA_DIRECTION_UNCHANGED);
    
    // DMA0DA = encrypted_data; //set the dest address DMA_setDstAddress(DMA_CHANNEL_0, (uint32_t)encrypted_data, DMA_DIRECTION_INCREMENT);

    Best regards,
    -Jim
  • I use:

      .      
      __data20_write_long((uintptr_t)&DMA4DA, (uintptr_t)&UCB2TXBUF); // __SFR_FARPTR nonsense
      .  

    [Edit: Ignore the "."-s, it was the only way I could get the code formatter to behave.]

  • What is uintptr type?

  • <stdint.h> says it's:

    .
    typedef unsigned long uintptr_t;
    .

  • Thanks Bruce,

    I wish this was documented somewhere. If it is, I couldn't find it.

    That seems to work too.

    // The IAR Way...
    // DMA0SA = (void *)&AESADOUT; /set the src address // DMA0DA = encrypted_data; //set the dest address // Compiles, need to check out addressing
    __data20_write_long((uintptr_t)&DMA0SA, (uintptr_t)&AESADOUT); __data20_write_long((uintptr_t)&DMA0DA, (uintptr_t)&encrypted_data);
    // Using DriverLib. This works. Verified Addressing DMA_setSrcAddress(DMA_CHANNEL_0, (AES256_BASE + OFS_AESADOUT), DMA_DIRECTION_UNCHANGED); DMA_setDstAddress(DMA_CHANNEL_0, (uint32_t)encrypted_data, DMA_DIRECTION_INCREMENT);

    Best regards,
    -Jim