summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-05-01 17:32:17 -0700
committerVincent Palatin <vpalatin@chromium.org>2012-05-09 01:13:26 +0000
commit71c86b38c3862da28368acf0d44779eb1fcc088b (patch)
tree8e7b6448217c7db7d32d5d05d6aca28e9dd95803 /core
parent87b427829993e7c5b2fb66fc1e134ace43d28cf9 (diff)
downloadchrome-ec-71c86b38c3862da28368acf0d44779eb1fcc088b.tar.gz
stm32: add flash programming support
Implements the on-chip flash erasing and writing functions. The actual writing is done from a routine in internal RAM (using the special .iram.text section) with interrupt disabled as we cannot read flash during the writing process. The write-protect feature is only lightly tested. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:8865 TEST=run on Daisy, from the EC console, use flasherase and flashwrite commands and observe the results using rw command. Change-Id: I4c64cf28b23df52b18500b42a32a7d3668d45ba6
Diffstat (limited to 'core')
-rw-r--r--core/cortex-m/ec.lds.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index ba0b2733b5..ea89e241e9 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -76,6 +76,8 @@ SECTIONS
*(.data.tasks)
*(.data)
. = ALIGN(4);
+ *(.iram.text)
+ . = ALIGN(4);
__data_end = .;
} > IRAM
#if defined(SECTION_IS_RO) && defined(CONFIG_VBOOT)