Uploaded image for project: 'CANopen Slave'
  1. CANopen Slave
  2. PSCOS-357

Public packed structures are not according to specification

    Details

    • Type: Change
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: V3.9.0.0
    • Component/s: None
    • Labels:
      None
    • Account:
      SPC CanOpen Slave (SPCCANOPENSL)

      Description

      All public headers need to define proper packed structs. The compiler specific needs are defined in the Hilscher definitions.

      The header shall follow the following structure

      // Start of pragma based packed handling e.g. Microsoft compiler
      #ifdef __HIL_PRAGMA_PACK_ENABLE
      #pragma __HIL_PRAGMA_PACK_1(HEADER_FILE_NAME_UNIQU_DEFINE)
      #endif
      
      // A struct/typedef which contains all required defines for attribute based packing, e.g. gcc 
      typedef __HIL_PACKED_PRE struct __HIL_PACKED_POST
      {
        uint16_t usValue1;
        uint32_t ulValue2;
      } STRUCT_NAME_T;
      
      // ... more structs 
      
      // End of  pragma based packed handling
      #ifdef __HIL_PRAGMA_PACK_ENABLE
      #pragma __HIL_PRAGMA_UNPACK_1(HEADER_FILE_NAME_UNIQU_DEFINE)
      #endif
      

       

        Attachments

          Issue Links

            Expenses

              Activity

                Status Description

                  People

                  • Reporter:
                    ABe Andreas B [X] (Inactive)
                  • Votes:
                    0 Vote for this issue
                    Watchers:
                    0 Start watching this issue

                    Dates

                    • Created:
                      Updated:
                      Resolved: