Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

conversion from Keil to SDCC for AT89C51ED2

don89c
2007-08-06
2013-03-12
  • don89c
    don89c
    2007-08-06

    I'm attempting to use SDCC (Version #4 May 31, 2007) to compile a C program previously compiled using Keil demo compiler and run successfully on the target (AT89C51ED2).  I downloaded the AT89C51xD2 header file for the SDCC compiler from the Atmel web site.  Whe I compile the program, I receive three error messages (one each for lines 110, 116, and 118), which is "error 146:  two or more storage classes in declaration for 'type_specifier declaration_specifiers'  Lines 110, 116 and 118 are included below:

    107// ---------- Data & I/O Variables ----------

    unsigned char data g_uc_SPI_data=0;
    bit data g_b_SPI_extracted=0;   

    unsigned char data g_uc_AC_volt_reading=0; // AC voltage sensor reading value 8-bit

    unsigned char data g_uc_detector_AB_id=0; // detector A & B id values 4-bit each

    bit data g_b_GFI_bit=0; // ground fault interrupt bit, input (1=GFI circuit trip)

    bit data g_b_OverTemp_bit=1; // over temperature bit, output (1=no power)

    unsigned char data g_uc_config_bits=0x00; // general configuration bits (6 upper bits)