stm32: add support for the STM32F4Discovery

Signed-off-by: Yusuke Mitsuki <mickey.happygolucky@gmail.com>
This commit is contained in:
Yusuke Mitsuki
2019-04-12 13:36:14 +09:00
committed by Ayke van Laethem
parent 315cd4059f
commit 1322f404a6
7 changed files with 571 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
MEMORY
{
FLASH_TEXT (rw) : ORIGIN = 0x08000000, LENGTH = 1M
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
}
_stack_size = 4K;
INCLUDE "targets/arm.ld"
+18
View File
@@ -0,0 +1,18 @@
{
"inherits": ["cortex-m"],
"llvm-target": "armv7em-none-eabi",
"build-tags": ["stm32f4disco", "stm32f407", "stm32"],
"cflags": [
"--target=armv7em-none-eabi",
"-Qunused-arguments"
],
"ldflags": [
"-T", "targets/stm32f407.ld"
],
"extra-files": [
"src/device/stm32/stm32f407.s"
],
"flash": "openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c 'program {hex} reset exit'",
"ocd-daemon": ["openocd", "-f", "interface/stlink.cfg", "-f", "target/stm32f4x.cfg"],
"gdb-initial-cmds": ["target remote :3333", "monitor halt", "load", "monitor reset", "c"]
}