From 62556f44e90cb83039dc0c8eae49c60a25e05a21 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 2 Oct 2014 16:34:45 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7351 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../ports/ARMCMx/compilers/GCC/ld/STM32F334x8.ld | 31 ++++++++++++++++++++++ os/hal/ports/STM32/STM32F3xx/hal_lld.c | 2 ++ os/hal/ports/STM32/STM32F3xx/stm32_registry.h | 5 ++-- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 os/common/ports/ARMCMx/compilers/GCC/ld/STM32F334x8.ld (limited to 'os') diff --git a/os/common/ports/ARMCMx/compilers/GCC/ld/STM32F334x8.ld b/os/common/ports/ARMCMx/compilers/GCC/ld/STM32F334x8.ld new file mode 100644 index 000000000..8bdc8b676 --- /dev/null +++ b/os/common/ports/ARMCMx/compilers/GCC/ld/STM32F334x8.ld @@ -0,0 +1,31 @@ +/* + ChibiOS - Copyright (C) 2006,2007,2008,2009,2010, + 2011,2012,2013,2014 Giovanni Di Sirio. + + This file is part of ChibiOS. + + ChibiOS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/* + * STM32F3334x8 memory setup. + */ +MEMORY +{ + flash : org = 0x08000000, len = 64k + ram : org = 0x20000000, len = 12k + ccmram : org = 0x10000000, len = 4k +} + +INCLUDE rules.ld diff --git a/os/hal/ports/STM32/STM32F3xx/hal_lld.c b/os/hal/ports/STM32/STM32F3xx/hal_lld.c index cfa538e2e..9c02300dc 100644 --- a/os/hal/ports/STM32/STM32F3xx/hal_lld.c +++ b/os/hal/ports/STM32/STM32F3xx/hal_lld.c @@ -122,8 +122,10 @@ void hal_lld_init(void) { among multiple drivers.*/ rccEnableAPB2(RCC_APB2ENR_SYSCFGEN, TRUE); +#if STM32_HAS_USB /* USB IRQ relocated to not conflict with CAN.*/ SYSCFG->CFGR1 |= SYSCFG_CFGR1_USB_IT_RMP; +#endif } /** diff --git a/os/hal/ports/STM32/STM32F3xx/stm32_registry.h b/os/hal/ports/STM32/STM32F3xx/stm32_registry.h index 1a576e5dd..1336a6ed8 100644 --- a/os/hal/ports/STM32/STM32F3xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32F3xx/stm32_registry.h @@ -1287,11 +1287,10 @@ #define STM32_HAS_OTG2 FALSE #endif /* defined(STM32F358xC) */ - /*===========================================================================*/ /* STM32F334xC. */ /*===========================================================================*/ -#if defined(STM32F334xC) || defined(__DOXYGEN__) +#if defined(STM32F334x8) || defined(__DOXYGEN__) /* ADC attributes.*/ #define STM32_HAS_ADC1 TRUE #define STM32_HAS_ADC2 TRUE @@ -1435,7 +1434,7 @@ #define STM32_HAS_USB FALSE #define STM32_HAS_OTG1 FALSE #define STM32_HAS_OTG2 FALSE -#endif /* defined(STM32F334xC) */ +#endif /* defined(STM32F334x8) */ /** @} */ -- cgit v1.2.3