nasa / SBN

38 stars 23 forks source link

Current SBN does not build w/ cFE 6.7.12 #17

Closed johnphamngc closed 4 years ago

johnphamngc commented 4 years ago

cFE 6.7.12 altered the message header structs. CCSDS_CmdSecHdr_t.Command has now been split from a single uint16 field containing both function code and checksum to two uint8 fields. This does mean that endian-swapping is no longer necessary, so the offending block of code may be removed altogether.

/opt/rh/devtoolset-9/root/usr/bin/gcc -DSIMULATION=i686-linux -D_LINUX_OS_ -Dsbn_EXPORTS -I/data/workspace/phamj/xxxxxxx/build/inc -Iinc -I/data/workspace/phamj/halo-integration/osal/src/os/inc -I/data/workspace/phamj/halo-integration/psp/fsw/inc -I/data/workspace/phamj/halo-integration/cfe/fsw/cfe-core/src/inc -I/data/workspace/phamj/halo-integration/cfe/cmake/target/inc -Icfe_core_default_vcu/inc -I/src/sb -I/data/workspace/phamj/halo-integration/apps/sbn/fsw/platform_inc -Wall  -m32   -D_XOPEN_SOURCE=600    -g -fPIC   -std=c99 -Wstrict-prototypes -Wall -Wwrite-strings -Wpointer-arith -Wcast-align -MD -MT apps/sbn/CMakeFiles/sbn.dir/fsw/src/sbn_app.c.o -MF apps/sbn/CMakeFiles/sbn.dir/fsw/src/sbn_app.c.o.d -o apps/sbn/CMakeFiles/sbn.dir/fsw/src/sbn_app.c.o   -c /data/workspace/phamj/halo-integration/apps/sbn/fsw/src/sbn_app.c
/data/workspace/phamj/xxxxxxx/apps/sbn/fsw/src/sbn_app.c: In function ‘SwapCCSDS’:
/data/workspace/phamj/xxxxxxx/apps/sbn/fsw/src/sbn_app.c:99:26: error: ‘CCSDS_CmdSecHdr_t’ {aka ‘struct <anonymous>’} has no member named ‘Command’
   99 |         CmdPktPtr->SECHDR.Command = CFE_MAKE_BIG16(CmdPktPtr->SECHDR.Command);;
      |                          ^
In file included from /data/workspace/phamj/xxxxxxx/cfe/fsw/cfe-core/src/inc/cfe_sb.h:43,
                 from /data/workspace/phamj/xxxxxxx/cfe/fsw/cfe-core/src/inc/cfe_evs_msg.h:41,
                 from /data/workspace/phamj/xxxxxxx/cfe/fsw/cfe-core/src/inc/cfe_evs.h:42,
                 from /data/workspace/phamj/xxxxxxx/cfe/fsw/cfe-core/src/inc/cfe.h:51,
                 from /data/workspace/phamj/xxxxxxx/apps/sbn/fsw/src/sbn_pack.h:7,
                 from /data/workspace/phamj/xxxxxxx/apps/sbn/fsw/src/sbn_app.c:27:
/data/workspace/phamj/xxxxxxx/apps/sbn/fsw/src/sbn_app.c:99:69: error: ‘CCSDS_CmdSecHdr_t’ {aka ‘struct <anonymous>’} has no member named ‘Command’
   99 |         CmdPktPtr->SECHDR.Command = CFE_MAKE_BIG16(CmdPktPtr->SECHDR.Command);;
      |                                                                     ^
/data/workspace/phamj/xxxxxxx/cfe/fsw/cfe-core/src/inc/ccsds.h:45:34: note: in definition of macro ‘CFE_MAKE_BIG16’
   45 |   #define CFE_MAKE_BIG16(n) ( (((n) << 8) & 0xFF00) | (((n) >> 8) & 0x00FF) )
      |                                  ^
/data/workspace/phamj/xxxxxxx/apps/sbn/fsw/src/sbn_app.c:99:69: error: ‘CCSDS_CmdSecHdr_t’ {aka ‘struct <anonymous>’} has no member named ‘Command’
   99 |         CmdPktPtr->SECHDR.Command = CFE_MAKE_BIG16(CmdPktPtr->SECHDR.Command);;
      |                                                                     ^
/data/workspace/phamj/xxxxxxx/cfe/fsw/cfe-core/src/inc/ccsds.h:45:58: note: in definition of macro ‘CFE_MAKE_BIG16’
   45 |   #define CFE_MAKE_BIG16(n) ( (((n) << 8) & 0xFF00) | (((n) >> 8) & 0x00FF) )
      |                          
CDKnightNASA commented 4 years ago

Thanks, I'll look into this soon.

iamthad commented 4 years ago

Probably caused by https://github.com/nasa/cFE/commit/2d48787b0e75e0a2cd93bb384eb66547fbc14de7

CDKnightNASA commented 4 years ago

I've pushed a fix, at some point the TLM secondary header will be network-order as well--Will have to track when cFS changes the definition.