diff --git a/FreeRTOSConfig.h b/FreeRTOSConfig.h index 727eb79..2c2a0b7 100644 --- a/FreeRTOSConfig.h +++ b/FreeRTOSConfig.h @@ -126,7 +126,8 @@ to exclude the API function. */ ///* Cortex-M specific definitions. */ -#if defined(GEX_PLAT_F103_BLUEPILL) || defined(GEX_PLAT_F303_DISCOVERY) +#if defined(GEX_PLAT_F103_BLUEPILL) || defined(GEX_PLAT_F303_DISCOVERY) \ + || defined(GEX_PLAT_F407_DISCOVERY) // This is for F103+ /* The lowest interrupt priority that can be used in a call to a "set priority" diff --git a/gex_hooks.c b/gex_hooks.c index 5be3785..3db152a 100644 --- a/gex_hooks.c +++ b/gex_hooks.c @@ -18,7 +18,7 @@ void GEX_MsTick(void) TF_Tick(comm); StatusLed_Tick(); } -extern void HardFault_Handler(void); + /** * Early init, even before RTOS starts */ diff --git a/platform/plat_compat.h b/platform/plat_compat.h index ad0d456..2b78d8f 100644 --- a/platform/plat_compat.h +++ b/platform/plat_compat.h @@ -145,6 +145,51 @@ #define STATUS_LED_PORT 'E' #define STATUS_LED_PIN 13 +#elif defined(GEX_PLAT_F407_DISCOVERY) + +// platform name for the version string + #define GEX_PLATFORM "STM32F407-Discovery" + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + // size, determines position of the flash storage + #define FLASH_SIZE (1024*1024) + #define SETTINGS_BLOCK_SIZE (1024*2) // this must be a multiple of FLASH pages + #define SETTINGS_FLASH_ADDR (0x08000000 + FLASH_SIZE - SETTINGS_BLOCK_SIZE) + + // Number of GPIO ports A,B,C... + #define PORTS_COUNT 6 + + // Lock jumper config + #define LOCK_JUMPER_PORT 'C' + #define LOCK_JUMPER_PIN 14 // completely random choice here... TBD + + // Status LED config + #define STATUS_LED_PORT 'D' // orange + #define STATUS_LED_PIN 13 + #else #error "BAD PLATFORM! Please select GEX platform using a -DGEX_PLAT_* compile flag" #endif