
This avoids a ton of duplication and makes it easier to change a generic target (for example, the "cortex-m" target) for all boards that use it. Also, by making it possible to inherit properties from a parent target specification, it is easier to support out-of-tree boards that don't have to be updated so often. A target specification for a special-purpose board can simply inherit the specification of a supported chip and override the properites it needs to override (like the programming interface).
18 строки
494 Б
JSON
18 строки
494 Б
JSON
{
|
|
"inherits": ["cortex-m"],
|
|
"llvm-target": "armv7m-none-eabi",
|
|
"build-tags": ["bluepill", "stm32f103xx", "stm32"],
|
|
"pre-link-args": [
|
|
"-nostdlib",
|
|
"-nostartfiles",
|
|
"-mcpu=cortex-m3",
|
|
"-mthumb",
|
|
"-T", "targets/stm32.ld",
|
|
"-Wl,--gc-sections",
|
|
"-fno-exceptions", "-fno-unwind-tables",
|
|
"-ffunction-sections", "-fdata-sections",
|
|
"-Os",
|
|
"src/device/stm32/stm32f103xx.s"
|
|
],
|
|
"flash": "openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg -c 'program {hex} reset exit'"
|
|
}
|