Caught signal 22: SIGABRT ??

Help
Rabis49
2010-05-31
2013-03-12
  • Rabis49
    Rabis49
    2010-05-31

    Hi,
    in the new windows version #5893 I get this message.
    But my C-file is okay. It works fine with an older version.
    Is something to know ???
    Regards
    Rabis49

     
  • Maarten Brock
    Maarten Brock
    2010-05-31

    Without the C file contents there is no way for anyone to reconstruct this problem, now is there?

     
  • Rabis49
    Rabis49
    2010-06-01

    Okay, here is the source:
    main.h

    //-----------------------------------------------------------------------------
    #ifndef __MAIN
     #define __MAIN
     #include <AT89C51AC3.h>
     #include <stdio.h>
     #include <serial_IO.h>
    #endif
    //-----------------------------------------------------------------------------
    #define Xtal          22118400
    #define x2            1
    #define Baud          38400
    #define RELOAD_T0     64              // Timer 0 Reload 256-192;
    #define ON            1
    #define OFF           0
    //-----------------------------------------------------------------------------
    __sbit __at (0x2F)    BIT2F;         // set in ISR Timer0 every second
    __sbit __at (0x2E)    POLE;          // Umpolung
    __sbit __at (0x2D)    S_ELYSE;       // Schalter Elektrolyse merken
    // INPUT
    #define CURR_MON      P1_0           // Analog AN0
    #define VOLT_MON      P1_1           // Analog AN1
    #define ELEKTROLYSE   P1_2           // Elektrolyse ON/OFF
    #define DPD_CONTROL   P1_3           // DPD Controller
    #define FLOW_LOW      P1_4           // Durchfluss, unterer Grenzwert
    #define FLOW_HIGH     P1_5           // Durchfluss, oberer  Grenzwert
    // OUTPUT
    #define LED_GN        P2_0
    #define LED_YE        P2_1
    #define LED_RD        P2_2
    #define PUMPE_SET     P2_3
    //#define CURR_SET      P2_4           // Analog
    //#define VOLT_SET      P2_5           // Analog
    #define POLE_REVERSAL P2_6           // Umpolung
    #define POWER_SUPPLY  P2_7           // Netzteil ON/OFF
    // SPI
    #define SS            P3_5           // SPI Slave Select
    #define MISO          P4_2           // SPI Master Input  Slave Output
    #define SCK           P4_3           // SPI Serial Clock
    #define MOSI          P4_4           // SPI Master Output Slave Input
    //-----------------------------------------------------------------------------
    unsigned char tick,msec,seconds,minutes,hours;
    //-----------------------------------------------------------------------------
    

    and main.c

    //-----------------------------------------------------------------------------
    #include "./main.h"
    //-----------------------------------------------------------------------------
    // Function: Timer 0 Initialisierung
    //
    void Timer0_Init (void) {
      TMOD  |= 0x02;            // Timer 0 Mode 2, 8 Bit Autoreload
      TL0    = RELOAD_T0;
      TH0    = RELOAD_T0;               
      IPL0   = 0x00;            // Interruptprioritaet  
      ET0    = 1;               // Timer 0 Interrupt EIN */
    }
    //-----------------------------------------------------------------------------
    // Function: Timer 0 Interrupt
    //
    void Timer0_ISR (void) __interrupt TF0_VECTOR __using 1 {
      tick++;
      if (tick == 192){
         tick = 0;
         msec++;      
         if (msec == 100) {
            msec = 0;
            seconds++;
            BIT2F = 1;    
            if (seconds == 60) {
               seconds = 0;
               minutes++; 
               if (minutes == 60) {
                  minutes = 0;
                  hours++; 
                  if (hours == 24) {
                     hours = 0;
                  }  
               } 
            } 
         } 
      }         
    }
    //-----------------------------------------------------------------------------
    // Function: main
    //
    void main(void) {
    #if (x2 == 1)
      CKCON0 = 0x01;          // x2 mode
      CKCON1 = 0x00;          // SPI clock/6
    #else
      CKCON0 = 0x00;
      CKCON1 = 0x00;          // SPI clock/12
    #endif  
      Timer0_Init(); 
      EA     = 1;             // Alle Interrupts EIN  
      BIT2F  = 0; 
      TR0    = 1;             // Start Timer 0  
      LED_RD = OFF;          
      inituart((unsigned int) \
              (256-((Xtal/Baud)*(x2+1)/192)));  // Timer1
      printf_fast("\r\n\e-dis agrarian V1.0, ");
      printf_fast(__DATE__);putchar(',');
      printf_fast(__TIME__);
      printf_fast("\r\n");      
      
      while(1) {
        S_ELYSE = ELEKTROLYSE;
        if (BIT2F) {                               // jede Sekunde
           if (S_ELYSE & ELEKTROLYSE) {     // Electrolyse eingeschaltet
               PUMPE_SET = ON ;
               if (FLOW_LOW & FLOW_HIGH & DPD_CONTROL) {
                  POWER_SUPPLY = ON; 
               }
            }
           else {
              PUMPE_SET    = OFF;
             POWER_SUPPLY = OFF;    
          }
       }
       BIT2F = 0;                           // abgearbeitet
      }      
    }
    //-----------------------------------------------------------------------------
    //-----------------------------------------------------------------------------
    

    Thanks for fast answer!

    Rabis49