work on f407 support

sipo
Ondřej Hruška 7 years ago
parent 9e45f4e6ec
commit a3e043a8e1
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 3
      FreeRTOSConfig.h
  2. 2
      gex_hooks.c
  3. 45
      platform/plat_compat.h

@ -126,7 +126,8 @@ to exclude the API function. */
///* Cortex-M specific definitions. */ ///* 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+ // This is for F103+
/* The lowest interrupt priority that can be used in a call to a "set priority" /* The lowest interrupt priority that can be used in a call to a "set priority"

@ -18,7 +18,7 @@ void GEX_MsTick(void)
TF_Tick(comm); TF_Tick(comm);
StatusLed_Tick(); StatusLed_Tick();
} }
extern void HardFault_Handler(void);
/** /**
* Early init, even before RTOS starts * Early init, even before RTOS starts
*/ */

@ -145,6 +145,51 @@
#define STATUS_LED_PORT 'E' #define STATUS_LED_PORT 'E'
#define STATUS_LED_PIN 13 #define STATUS_LED_PIN 13
#elif defined(GEX_PLAT_F407_DISCOVERY)
// platform name for the version string
#define GEX_PLATFORM "STM32F407-Discovery"
#include <stm32f4xx.h>
#include <stm32f4xx_hal.h>
#include <stm32f4xx_ll_adc.h>
#include <stm32f4xx_ll_crc.h>
#include <stm32f4xx_ll_dac.h>
#include <stm32f4xx_ll_dma.h>
#include <stm32f4xx_ll_dma2d.h>
#include <stm32f4xx_ll_exti.h>
#include <stm32f4xx_ll_fmc.h>
#include <stm32f4xx_ll_fsmc.h>
#include <stm32f4xx_ll_gpio.h>
#include <stm32f4xx_ll_i2c.h>
#include <stm32f4xx_ll_lptim.h>
#include <stm32f4xx_ll_pwr.h>
#include <stm32f4xx_ll_rcc.h>
#include <stm32f4xx_ll_rng.h>
#include <stm32f4xx_ll_rtc.h>
#include <stm32f4xx_ll_sdmmc.h>
#include <stm32f4xx_ll_spi.h>
#include <stm32f4xx_ll_tim.h>
#include <stm32f4xx_ll_usart.h>
#include <stm32f4xx_ll_usb.h>
#include <stm32f4xx_ll_utils.h>
// 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 #else
#error "BAD PLATFORM! Please select GEX platform using a -DGEX_PLAT_* compile flag" #error "BAD PLATFORM! Please select GEX platform using a -DGEX_PLAT_* compile flag"
#endif #endif

Loading…
Cancel
Save