Merge pull request #10323 from maribu/stm32f103c8_rom_hack
boards: Enable STM32F103C8 ROM hack via env var
This commit is contained in:
commit
880b3319db
@ -61,12 +61,12 @@ you can flash the device with:
|
|||||||
|
|
||||||
To make use of the entire 128 KB flash, compile your application with:
|
To make use of the entire 128 KB flash, compile your application with:
|
||||||
|
|
||||||
$ make BOARD=bluepill CPU_MODEL=stm32f103cb
|
$ make STM32F103C8_FLASH_HACK=1 BOARD=bluepill
|
||||||
|
|
||||||
This sets the `CPU_MODEL` make variable to `stm32f103cb`, the default
|
This sets the `CPU_MODEL` make variable to `stm32f103cb`, the default
|
||||||
value is `stm32f103c8`. These two CPU models basically only have one
|
value is `stm32f103c8`. These two CPU models basically only have one
|
||||||
major difference, the latter has 128 KB flash while the former has 64
|
major difference, the latter has 128 KB flash while the former has 64
|
||||||
KB.
|
KB. You may also set `STM32F103C8_FLASH_HACK` as environment variable.
|
||||||
|
|
||||||
If you want to flash a binary compiled this way you either need to
|
If you want to flash a binary compiled this way you either need to
|
||||||
figure out how to adjust the OpenOCD configuration to make it use 128 KB
|
figure out how to adjust the OpenOCD configuration to make it use 128 KB
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
## the cpu to build for
|
## the cpu to build for
|
||||||
export CPU = stm32f1
|
export CPU = stm32f1
|
||||||
export CPU_MODEL = stm32f103c8
|
STM32F103C8_FLASH_HACK ?= 0
|
||||||
|
ifneq ($(STM32F103C8_FLASH_HACK),0)
|
||||||
|
export CPU_MODEL = stm32f103cb
|
||||||
|
else
|
||||||
|
export CPU_MODEL = stm32f103c8
|
||||||
|
endif
|
||||||
|
|
||||||
INCLUDES += -I$(RIOTBOARD)/common/stm32f103c8/include
|
INCLUDES += -I$(RIOTBOARD)/common/stm32f103c8/include
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user