Topics

How to specify flash offset for a new board


kees@...
 

Hi,

I want to add support for my Sodaq boards. These are SAMD21, Arduino Zero compatible boards with the Arduino bootloaders on them. So, I want the code (flash) to be located at an offset of 0x2000. How do I specify this offset?


Jan Van Winkel
 

Hi Kees,

You can do this by creating a partition in a device tree configuration and set the chosen node"zephyr,code-partition" to point to this partition.

See following files for an example: 

Reel Board Partition definition:

Reel Board "zephyr,code-partition" assignment:

Best regards,
Jan

On Sun, Nov 3, 2019 at 10:06 PM <kees@...> wrote:
Hi,

I want to add support for my Sodaq boards. These are SAMD21, Arduino Zero compatible boards with the Arduino bootloaders on them. So, I want the code (flash) to be located at an offset of 0x2000. How do I specify this offset?


laczenJMS
 

Hi Kees and Jan,

Zephyr links the code for a code partition specified in the dts as shown above by Jan by specifying in the proj.conf file:

CONFIG_HAS_FLASH_LOAD_OFFSET=y

CONFIG_USE_CODE_PARTITION=y

Kind regards,

Jehudi



Stefan Jaritz
 

As well


CONFIG_FLASH_LOAD_OFFSET=0x20000


in proj.conf works fine for stm32f4xx MCUs



On 04/11/2019 08:17, laczenJMS wrote:
Hi Kees and Jan,

Zephyr links the code for a code partition specified in the dts as shown above by Jan by specifying in the proj.conf file:

CONFIG_HAS_FLASH_LOAD_OFFSET=y

CONFIG_USE_CODE_PARTITION=y Kind regards, Jehudi