Hello,
Several boards (mostly STM32) have the following lines;
OPENOCD_LOAD_CMD = "flash write_image erase ${O}/${KERNEL_BIN_NAME}
${CONFIG_FLASH_BASE_ADDRESS}"
OPENOCD_VERIFY_CMD = "verify_image ${O}/${KERNEL_BIN_NAME}
${CONFIG_FLASH_BASE_ADDRESS}"
in their Makefile.board file.
The CONFIG_FLASH_BASE_ADDRESS only seems to be a Kconfig variable for
the ARC architecture in arch/arc/Kconfig
For the other platforms it only seems to end up in the files generated
from the DTS, like;
.../outdir/olimex_stm32_e407/include/generated/generated_dts_board.h
The problem seems to be that when calling
make BOARD=olimex_stm32_e407 flash
the variable CONFIG_FLASH_BASE_ADDRESS is not defined in the Makefile
environment, because it doesn't come from Kbuild but from a C header
file. So the flashing goes wrong (because the
${CONFIG_FLASH_BASE_ADDRESS} is empty).
If I change the Makefile.board to;
OPENOCD_LOAD_CMD = "flash write_image erase ${O}/${KERNEL_BIN_NAME}
0x08000000"
Than flashing works (0x08000000 is the flash address on the STM32F4).
I don't have other hardware to test, but are the developers of the
nucleo_*, stm32* boards sure "make flash" works ?
- Erwin