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

CDD_IPC: GHS compiler throws errors for implicit (void *) to uintptr_t coversions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • MCAL
    • MCAL-23486
    • 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 IPC library 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 how up with TI ARM Clang Compiler. 

      1. Error #167: argument of type "void *" is incompatible with parameter of type "uintptr_t"
      2. Error #513:  a value of type "void *" cannot be assigned to an entity of type "uintptr_t"

      Error line marked ith ==>

      Log for Error #1 (Logs from 9.0 SDK)

      mcal/ti/CddIpc/src/Cdd_Ipc.c", line 842 (col. 39): error #167: argument of type "void *" is incompatible with parameter of type "uintptr_t"

      static sint32 Cdd_IpcHIsrPost(Ipc_OsalHIsrHandle *handle)
      {
          sint32 rtnVal = IPC_EBADARGS;    if (NULL != handle)
          {
      ==>        handle->hIsrFxn(handle->arg0, NULL);
              rtnVal = IPC_SOK;
          }
          return (rtnVal);
      } 

      Log for Error #2 (Logs from 9.0 SDK)

      mcal/CddIpc/src/Cdd_Ipc.c", line 827 (col. 25): error #513: a value of type "void *" cannot be assigned to an entity of type "uintptr_t"
      mcal/CddIpc/src/Cdd_Ipc.c", line 828 (col. 25): error #513: a value of type "void *" cannot be assigned to an entity of type "uintptr_t"

      static void Cdd_IpcHIsrDelete(Ipc_OsalHIsrHandle *handle)
      {
          if (NULL != handle)
          {
      ==>        handle->arg0    = NULL;
      ==>        handle->arg1    = NULL;
              handle->hIsrFxn = NULL;
              handle->hLosHisrHandle = NULL;
          }    return;
      } 

      Analysis
      arg0 and arg1 defined as uintptr_t, but NULL is defined (void *)

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

              Created:
              Updated:
              Resolved: