Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-11670

Eth_VirtualMacapp: GHS compiler throws errors for flexible array variable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • MCAL
    • MCAL-23488
    • MCUSW_J7_09.01.00
    • MCUSW_J7_09.02.00
    • Hide
      j7200-evm
      j721e-evm
      j721s2-evm
      j784s4-evm
      Show
      j7200-evm j721e-evm j721s2-evm j784s4-evm

      The MCAL Ethernet library application code goes into the ASIL-D MCU R5F core. Customer is using GHS Safety Certified Compiler which generates a number of errors and warnings, which do not show up with TI ARM Clang Compiler. 

      Error line marked ith ==>

      1. mcal/Eth/include/Eth_Packet.h", line 119 (col. 19): error #94: the size of an array must be greater than zero

      /**
       *  \brief Ethernet frame
       *
       *  Ethernet frame without VLAN tag
       */
      typedef struct
      {
          Eth_FrameHeader hdr;
          /**< Ethernet frame header */
      ==>    uint8 payload[0U];
          /**< Pointer to the frame's payload */
      } __attribute__((packed)) Eth_Frame;

      Analysis
      GHS doesn't like any structure or variable that has zero size. Given that this is data generated by TI, Customer insists TI fix the issues.

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: