From 14dc50c95da6e16d56b5bc0a1c9750b38dcbf680 Mon Sep 17 00:00:00 2001 From: Nicolas Reinecke Date: Wed, 27 Apr 2016 23:48:36 +0200 Subject: [PATCH 1/2] add stm32f1xx port --- os/hal/ports/STM32/STM32F1xx/platform.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 os/hal/ports/STM32/STM32F1xx/platform.mk diff --git a/os/hal/ports/STM32/STM32F1xx/platform.mk b/os/hal/ports/STM32/STM32F1xx/platform.mk new file mode 100644 index 00000000..d2aeae05 --- /dev/null +++ b/os/hal/ports/STM32/STM32F1xx/platform.mk @@ -0,0 +1,14 @@ +include ${CHIBIOS}/os/hal/ports/STM32/STM32F1xx/platform.mk + +PLATFORMSRC += ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD/CRCv1/hal_crc_lld.c \ + ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c \ + ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD/FSMCv1/hal_nand_lld.c \ + ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc_sram.c \ + ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD/TIMv1/hal_eicu_lld.c \ + ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD/TIMv1/hal_timcap_lld.c \ + ${CHIBIOS_CONTRIB}/os/hal/src/hal_fsmc_sdram.c + +PLATFORMINC += ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD/CRCv1 \ + ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD/FSMCv1 \ + ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD/TIMv1 \ + ${CHIBIOS_CONTRIB}/os/hal/ports/STM32/LLD From 409a3f226db366ec2918970b732e0ed26dbf173e Mon Sep 17 00:00:00 2001 From: Nicolas Reinecke Date: Fri, 29 Apr 2016 14:14:51 +0200 Subject: [PATCH 2/2] FSMC: fix build on stm32f1x and stm32f3 STM32F1,3 has no fsmc reset function so make it optional --- os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c b/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c index fe486968..8b1082c7 100644 --- a/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c +++ b/os/hal/ports/STM32/LLD/FSMCv1/hal_fsmc.c @@ -120,7 +120,9 @@ void fsmc_start(FSMCDriver *fsmcp) { /* Enables the peripheral.*/ #if STM32_FSMC_USE_FSMC1 if (&FSMCD1 == fsmcp) { +#ifdef rccResetFSMC rccResetFSMC(); +#endif rccEnableFSMC(FALSE); #if (!STM32_NAND_USE_EXT_INT && HAL_USE_NAND) nvicEnableVector(STM32_FSMC_NUMBER, STM32_FSMC_FSMC1_IRQ_PRIORITY); @@ -143,7 +145,9 @@ void fsmc_stop(FSMCDriver *fsmcp) { if (fsmcp->state == FSMC_READY) { /* Resets the peripheral.*/ +#ifdef rccResetFSMC rccResetFSMC(); +#endif /* Disables the peripheral.*/ #if STM32_FSMC_USE_FSMC1