diff options
-rw-r--r-- | chip/stm32/config-stm32f03x.h | 42 | ||||
-rw-r--r-- | chip/stm32/config_chip.h | 3 | ||||
-rw-r--r-- | util/stm32mon.c | 2 |
3 files changed, 47 insertions, 0 deletions
diff --git a/chip/stm32/config-stm32f03x.h b/chip/stm32/config-stm32f03x.h new file mode 100644 index 0000000000..9334878266 --- /dev/null +++ b/chip/stm32/config-stm32f03x.h @@ -0,0 +1,42 @@ +/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/* Memory mapping */ +#define CONFIG_FLASH_BASE 0x08000000 +#define CONFIG_FLASH_PHYSICAL_SIZE 0x00008000 +#define CONFIG_FLASH_SIZE CONFIG_FLASH_PHYSICAL_SIZE +#define CONFIG_FLASH_BANK_SIZE 0x1000 +#define CONFIG_FLASH_ERASE_SIZE 0x0400 /* erase bank size */ +#define CONFIG_FLASH_WRITE_SIZE 0x0002 /* minimum write size */ + +/* No page mode on STM32F, so no benefit to larger write sizes */ +#define CONFIG_FLASH_WRITE_IDEAL_SIZE 0x0002 + +#define CONFIG_RAM_BASE 0x20000000 +#define CONFIG_RAM_SIZE 0x00001000 + +/* Size of one firmware image in flash */ +#define CONFIG_FW_IMAGE_SIZE (16 * 1024) + +#define CONFIG_FW_RO_OFF 0 +#define CONFIG_FW_RO_SIZE (CONFIG_FW_IMAGE_SIZE - CONFIG_FW_PSTATE_SIZE) +#define CONFIG_FW_RW_OFF CONFIG_FW_IMAGE_SIZE +#define CONFIG_FW_RW_SIZE CONFIG_FW_IMAGE_SIZE +#define CONFIG_FW_WP_RO_OFF CONFIG_FW_RO_OFF +#define CONFIG_FW_WP_RO_SIZE CONFIG_FW_IMAGE_SIZE + +/* + * Put pstate after RO to give RW more space and make RO write protect region + * contiguous. + */ +#define CONFIG_FW_PSTATE_SIZE CONFIG_FLASH_BANK_SIZE +#define CONFIG_FW_PSTATE_OFF (CONFIG_FW_RO_OFF + CONFIG_FW_RO_SIZE) + +/* Number of IRQ vectors on the NVIC */ +#define CONFIG_IRQ_COUNT 32 + +/* Reduced history because of limited RAM */ +#undef CONFIG_CONSOLE_HISTORY +#define CONFIG_CONSOLE_HISTORY 3 diff --git a/chip/stm32/config_chip.h b/chip/stm32/config_chip.h index 2f7a35f3d6..a01909045c 100644 --- a/chip/stm32/config_chip.h +++ b/chip/stm32/config_chip.h @@ -31,6 +31,9 @@ #elif defined(CHIP_VARIANT_STM32F07X) /* STM32F07xx */ #include "config-stm32f07x.h" +#elif defined(CHIP_VARIANT_STM32F03X) +/* STM32F03x */ +#include "config-stm32f03x.h" #else #error "Unsupported chip variant" #endif diff --git a/util/stm32mon.c b/util/stm32mon.c index 4b1a5438a9..2e73bcf8f3 100644 --- a/util/stm32mon.c +++ b/util/stm32mon.c @@ -57,6 +57,8 @@ struct stm32_def { {0x427, "STM32L15xxC", 0x08000000, 0x40000, 256}, {0x420, "STM32F100xx", 0x08000000, 0x20000, 1024}, {0x410, "STM32F102R8", 0x08000000, 0x10000, 1024}, + {0x440, "STM32F05x", 0x08000000, 0x10000, 1024}, + {0x444, "STM32F03x", 0x08000000, 0x10000, 1024}, {0x448, "STM32F07xB", 0x08000000, 0x20000, 1024}, { 0 } }; |