Re: CONFIG_FLASH_BASE_ADDRESS


Erwan Gouriou
 

Hi Erwin,


Indeed, make flash functionality has been lost when moving to dts description.
The issue is reported in JIRA:
https://jira.zephyrproject.org/browse/ZEP-2119
Andy proposed a PR to correct this:
https://github.com/zephyrproject-rtos/zephyr/pull/275

Can you have a try?

Erwan



On 30 May 2017 at 00:50, Erwin Rol <mailinglists@...> wrote:
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
_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel

Join devel@lists.zephyrproject.org to automatically receive all group messages.