• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Suche öffnen
  • English
  • Campo
  • StudOn
  • FAUdir
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
Menu Menu schließen
  • Lehrstuhl
    • Team
    • Aktuelles
    • Kontakt und Anfahrt
    • Leitbild
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Confidential Computing
      • Eingebettete Systemsoftware
      • Verteilte Systeme
    • Projekte
      • AIMBOS
      • BALu
      • BFT2Chain
      • DOSS
      • Mirador
      • NEON
      • PAVE
      • ResPECT
      • Watwa
    • Projektkampagnen
      • maRE
    • Seminar
      • Systemsoftware
    Portal Forschung
  • Publikationen
  • Lehre
    • Sommersemester 2025
      • Applied Software Architecture
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • System-Level Programming
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    • Wintersemester 2024/25
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Systemprogrammierung 2
      • Verlässliche Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Systemnahe Programmierung in C
    • Vorlesung
      • Übung
        • Folien
        • Aufgaben
        • SPiCboard
          • Bauanleitung
            • Programmieren im CIP
              • Programmieren von zu Hause
                • libspicboard-Doku
                  • SPiC-IDE
                    • SPiCsim
                      • FAQ
                        • Projekte
                        • Linux libc-Doku
                        • Prüfung
                          • Evaluation
                            • Intern

                            libspicboard-Doku

                            • libspicboard
                            check.h
                            Go to the documentation of this file.
                            1 #ifndef CHECK_H
                            2 #define CHECK_H
                            3 
                            4 #include <limits.h>
                            5 
                            6 /**
                            7  * \addtogroup Check
                            8  *
                            9  * \brief Check compiler settings
                            10  *
                            11  * Since GCC offers a bunch of different compiler settings, this header
                            12  * tries to help detecting possible bugs (during compile time) which would
                            13  * lead to incompatibility with the provided libspicboard.
                            14  *
                            15  * @{
                            16  * \file check.h
                            17  * \version \$Rev: 7715 $
                            18  */
                            19 
                            20 #define XSTR(s) STR(s)
                            21 #define STR(s) #s
                            22 
                            23 // Check C Standard
                            24 #ifdef __STDC__
                            25 #if defined(__STDC_VERSION__) && (__STDC_VERSION__ < 201112L)
                            26 #if __STDC_VERSION__ >= 199901L
                            27 ##pragma message ("You are using C99 Standard. Thats okay, but we would suggest to use C11")
                            28 #else
                            29 #error The minimum support Standard is C99!
                            30 #endif
                            31 #endif
                            32 #else
                            33 #error You are using a non standard C compiler
                            34 #endif
                            35 
                            36 // Check GNU Extensions
                            37 #ifndef __GNUC__
                            38 #pragma message ("GCC Extensions are not available - you wont be able to use __flash")
                            39 #else
                            40 // Set compiler options
                            41 #pragma GCC optimize ("short-enums")
                            42 #pragma GCC optimize ("pack-struct")
                            43 #endif
                            44 
                            45 // Check CPU clock rate
                            46 #ifndef F_CPU
                            47 #define F_CPU 16000000UL
                            48 #pragma message ("CPU frequency defaults now to 16 MHz")
                            49 #elif F_CPU == 1000000UL
                            50 #pragma message ("You are using 1 MHz CPU frequency - please make sure that the libspicboard you are using was built for this frequency!")
                            51 #elif F_CPU != 16000000UL
                            52 #error The CPU Frequency is not supported!
                            53 #endif
                            54 
                            55 // Check unsigned char
                            56 #if ! defined(__CHAR_UNSIGNED__) || CHAR_MIN < 0
                            57 #error chars are signed - you should use unsigned for the SPiCboard (-funsigned-char)
                            58 #endif
                            59 
                            60 // Check unallowed imports
                            61 #if defined(_COM_H) && defined(_CONSOLE_H)
                            62 #error serial communication and serial console cannot be used together!
                            63 #endif
                            64 
                            65 
                            66 /**
                            67  * \def CHECK_ENUM_SIZE(VAR, LEN)
                            68  *
                            69  * Aborts compilation if the size of VAR is not euqal LEN
                            70  */
                            71 #define CHECK_ENUM_SIZE(VAR, LEN) _Static_assert(sizeof(VAR) == (LEN), "enum " STR(VAR) " has the wrong size and therefore it is not compatible to the libspicboard; check your compiler flags (-fshort-enums)");
                            72 
                            73 /** @}*/
                            74 
                            75 #endif
                            Friedrich-Alexander-Universität
                            Erlangen-Nürnberg

                            Schlossplatz 4
                            91054 Erlangen
                            • Impressum
                            • Datenschutz
                            • Barrierefreiheit
                            • Facebook
                            • RSS Feed
                            • Xing
                            Nach oben