AnsweredAssumed Answered

Generated code by PE don't compile if C-ANSI compilation flag is set

Question asked by Stephane Briand on Sep 20, 2011
Latest reply on May 22, 2012 by Stephane Briand

I post this message because I am unable to compile my HCS08 project with ANSI compilation flag.

I use processor expert to generate code of some components (ADC, UART, PIO...)

 

Two files appear not ANSI compliant :

  - start08.C : asm keyword is unknown, should be __asm.

  - IO_Map.h : error:C1021 Bit field type is not 'int'

typedef union {
  byte Byte;
  struct {
    byte PTAD0       :1;                                       /* Port A Data Register Bit 0 */
    byte PTAD1       :1;                                       /* Port A Data Register Bit 1 */
    byte PTAD2       :1;                                       /* Port A Data Register Bit 2 */
    byte PTAD3       :1;                                       /* Port A Data Register Bit 3 */
    byte             :1; 
    byte             :1; 
    byte             :1; 
    byte             :1; 
  } Bits;
  struct {
    byte grpPTAD :4;
    byte         :1;
    byte         :1;
    byte         :1;
    byte         :1;
  } MergedBits;
} PTADSTR;

 

I read in a documentation about processor expert : "Beans can support several languages (ASM, ANSI C, Modula and others) and the code is generated for the selected language."

 

I hope that C-ANSI compilation is possible, and that someone can help me.

 

Regards

 

Outcomes