drygascon128_arm_selector.h 2.29 KB
Newer Older
1 2 3 4 5
#ifndef __DRYGASCON_ARM_SELECTOR_H__
#define __DRYGASCON_ARM_SELECTOR_H__
//Optional file to select the best implementation for each chip

#ifdef STM32H743xx
6 7
    #define __DRYGASCON_ARM_SELECTOR_V7M_FPU__
    #define __DRYGASCON_ARM_SELECTOR_FOUND__
8 9 10
#endif

#ifdef STM32F746xx
11 12 13 14 15 16 17 18 19 20
    #define __DRYGASCON_ARM_SELECTOR_V7M_FPU__
    #define __DRYGASCON_ARM_SELECTOR_FOUND__
#endif

#ifdef STM32F411xx
    #define __DRYGASCON_ARM_SELECTOR_V7M_FPU__
    #define __DRYGASCON_ARM_SELECTOR_FOUND__
#endif

#ifdef STM32L552xx //technically it is V8M but we don't have a specific code for that one
21
    #define __DRYGASCON_ARM_SELECTOR_V7M__
22
    #define __DRYGASCON_ARM_SELECTOR_FOUND__
23 24 25 26
#endif

#ifdef STM32F103xx
    #define __DRYGASCON_ARM_SELECTOR_V7M__
27
    #define __DRYGASCON_ARM_SELECTOR_FOUND__
28 29 30 31
#endif

#ifdef STM32L011xx
    #define __DRYGASCON_ARM_SELECTOR_V6M__
32
    #define __DRYGASCON_ARM_SELECTOR_FOUND__
33 34 35 36
#endif

#ifdef __SAM3X8E__
    #define __DRYGASCON_ARM_SELECTOR_V7M__
37
    #define __DRYGASCON_ARM_SELECTOR_FOUND__
38 39 40 41
#endif

//TODO: add more chips here

42 43 44 45 46 47 48 49 50 51
#ifndef __DRYGASCON_ARM_SELECTOR_FOUND__
    //more generic defines catching whole families
    #if defined(STM32F4xx) || defined(STM32F7xx) || defined(STM32H7xx)
        #define __DRYGASCON_ARM_SELECTOR_V7M_FPU__
        #define __DRYGASCON_ARM_SELECTOR_FOUND__
    #endif

    #if defined(STM32F1xx)
        #define __DRYGASCON_ARM_SELECTOR_V7M__
        #define __DRYGASCON_ARM_SELECTOR_FOUND__
52 53 54
    #endif
#endif

55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
#ifdef __DRYGASCON_ARM_SELECTOR_V7M_FPU__
    #define DRYGASCON_G_OPT   drygascon128_g_v7m_fpu
    #define DRYGASCON_F_OPT   drygascon128_f_v7m_fpu
    #define DRYGASCON_G0_OPT  drygascon128_g0_v7m_fpu
#endif

#ifdef __DRYGASCON_ARM_SELECTOR_V7M_FPU_X__
    #define DRYGASCON_G_OPT   drygascon128_g_v7m_fpu_x
    #define DRYGASCON_F_OPT   drygascon128_f_v7m_fpu_x
    #define DRYGASCON_G0_OPT  drygascon128_g0_v7m_fpu_x
#endif

#ifdef __DRYGASCON_ARM_SELECTOR_V7M__
    #define DRYGASCON_G_OPT   drygascon128_g_v7m
    #define DRYGASCON_F_OPT   drygascon128_f_v7m
    #define DRYGASCON_G0_OPT  drygascon128_g0_v7m
#endif

73 74 75 76 77 78 79 80
#ifdef __DRYGASCON_ARM_SELECTOR_V6M__
        #define DRYGASCON_G_OPT   drygascon128_g_v6m
        #define DRYGASCON_F_OPT   drygascon128_f_v6m
        //#define DRYGASCON_G0_OPT drygascon128_g0_v6m
        #define DRYGASCON_ALIGN_INPUT_32
#endif

#endif