chore(hal): remove StdPeriph (#5023)
Co-authored-by: raphaelcoeffic <1050031+raphaelcoeffic@users.noreply.github.com> Co-authored-by: Malte Langermann <malte@langermann.net> Co-authored-by: 3djc <3djc@gh.com> Co-authored-by: Richard Li <richard.li@ces.hk>
This commit is contained in:
co-authored by
raphaelcoeffic
Malte Langermann
3djc
Richard Li
parent
fea402a6e3
commit
6579905088
@@ -24,6 +24,7 @@ if(NOT NATIVE_BUILD)
|
||||
add_library(stm32cube_ll OBJECT EXCLUDE_FROM_ALL
|
||||
# LL drivers
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_ll_gpio.c
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_ll_fmc.c
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_ll_tim.c
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_ll_dma.c
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_ll_usart.c
|
||||
@@ -46,6 +47,8 @@ if(NOT NATIVE_BUILD)
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_hal_dma.c
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_hal_pcd.c
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_hal_pcd_ex.c
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_hal_flash.c
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_hal_flash_ex.c
|
||||
${STM32CUBE_DIR}/Src/stm32f4xx_hal_cortex.c
|
||||
|
||||
${STM32_COLORLCD_DRIVERS}
|
||||
@@ -62,29 +65,19 @@ if(NOT NATIVE_BUILD)
|
||||
endif()
|
||||
|
||||
# StdPeriph library
|
||||
set(STM32LIB_DIR ${THIRDPARTY_DIR}/STM32F4xx_DSP_StdPeriph_Lib_V1.8.0/Libraries)
|
||||
include_directories(${STM32LIB_DIR}/STM32F4xx_StdPeriph_Driver/inc)
|
||||
set(STM32LIB_DIR ${THIRDPARTY_DIR})
|
||||
include_directories(${STM32LIB_DIR}/CMSIS/Device/ST/STM32F4xx/Include)
|
||||
include_directories(${STM32LIB_DIR}/CMSIS/Include)
|
||||
|
||||
add_definitions(-DSTM32F4)
|
||||
|
||||
set(STM32_STDPERIPH_DIR ${STM32LIB_DIR}/STM32F4xx_StdPeriph_Driver)
|
||||
|
||||
set(STM32_STDPERIPH_SRC
|
||||
targets/common/arm/stm32/f4/system_stm32f4xx.c
|
||||
${STM32_STDPERIPH_DIR}/src/misc.c
|
||||
${STM32_STDPERIPH_DIR}/src/stm32f4xx_gpio.c
|
||||
${STM32_STDPERIPH_DIR}/src/stm32f4xx_dbgmcu.c
|
||||
${STM32_STDPERIPH_DIR}/src/stm32f4xx_rcc.c
|
||||
${STM32_STDPERIPH_DIR}/src/stm32f4xx_flash.c
|
||||
)
|
||||
|
||||
if(CPU_TYPE_FULL STREQUAL STM32F429xI)
|
||||
set(STM32_STDPERIPH_SRC ${STM32_STDPERIPH_SRC}
|
||||
boards/generic_stm32/startup/startup_stm32f42_43xxx.s
|
||||
${STM32_STDPERIPH_DIR}/src/stm32f4xx_fmc.c
|
||||
${STM32_STDPERIPH_DIR}/src/stm32f4xx_dma.c
|
||||
)
|
||||
elseif (CPU_TYPE_FULL STREQUAL STM32F413xG)
|
||||
set(STM32_STDPERIPH_SRC ${STM32_STDPERIPH_SRC}
|
||||
|
||||
@@ -120,7 +120,9 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "stm32f4xx.h"
|
||||
#include "thirdparty/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h"
|
||||
#include "stm32_hal.h"
|
||||
#include "stm32_hal_ll.h"
|
||||
|
||||
/**
|
||||
* @}
|
||||
@@ -195,8 +197,8 @@
|
||||
uint32_t SystemCoreClock = 168000000;
|
||||
#endif
|
||||
|
||||
__I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
|
||||
__I uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
|
||||
const uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
|
||||
const uint8_t APBPrescTable[8] = {0, 0, 0, 0, 1, 2, 3, 4};
|
||||
|
||||
/**
|
||||
* @}
|
||||
@@ -257,10 +259,8 @@ void SystemInit(void)
|
||||
|
||||
#if defined(SDRAM)
|
||||
void SDRAM_Init();
|
||||
void FMC_SDRAMWriteProtectionConfig(uint32_t SDRAM_Bank, FunctionalState NewState);
|
||||
|
||||
SDRAM_Init(); // calls SDRAM_GPIOConfig()
|
||||
FMC_SDRAMWriteProtectionConfig(((uint32_t)0x00000001), DISABLE);
|
||||
#endif
|
||||
|
||||
#ifdef DATA_IN_ExtSRAM
|
||||
|
||||
Reference in New Issue
Block a user