Re: "dummy-flash" device tree possible bug?

Michael Hope <michaelh@...>

Hi Diego.  zephyr,flash sets where the main code is stored and is used to calculate the address and size of the code section.  In your case it probably doesn't make sense as you'll probably store things in DRAM on the i.MX7.

If I was you I'd leave a fake flash entry in the dts file and use it to set the RAM load address.

-- Michael

On Wed, 7 Feb 2018 at 20:19 Diego Sueiro <diego.sueiro@...> wrote:
Hi there,

I'm currently working on porting Zephyr to i.MX7 SoC and I'm facing an error with cmake when it is generating the generated_dts_board.h.
I want to use only the sram and in my dts I removed the "zephyr,flash" property. I'm not sure if I'm doing this correctly. If I don't want a flash should I need to set it to a specific entry or just remove the property from the dts?

Error message:
Makefile:854: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
-- Selected BOARD colibri_imx7d_m4
Zephyr version: 1.10.99
Parsing Kconfig tree in <snip>/Kconfig
Using <snip>/tests/shell/build/colibri_imx7d_m4/zephyr/.config as base
-- Generating zephyr/include/generated/generated_dts_board.h
Traceback (most recent call last):
  File "<snip>/scripts/dts/", line 906, in <module>
  File "<snip>/scripts/dts/", line 896, in main
    insert_defs(chosen['zephyr,flash'], defs, load_defs, {})
KeyError: 'zephyr,flash'
CMake Error at <snip>/dts/dts.cmake:111 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  <snip>/cmake/app/boilerplate.cmake:227 (include)
  CMakeLists.txt:1 (include)

I managed to fix the error with this change:
diff --git a/scripts/dts/ b/scripts/dts/
index e917deb..c03f236 100755
--- a/scripts/dts/
+++ b/scripts/dts/
@@ -889,11 +889,13 @@ def main():
         load_defs['CONFIG_FLASH_LOAD_SIZE'] = \
             lookup_defs(part_defs, chosen['zephyr,code-partition'],
+        node_address = chosen['zephyr,flash']
         load_defs['CONFIG_FLASH_LOAD_OFFSET'] = 0
         load_defs['CONFIG_FLASH_LOAD_SIZE'] = 0
+        node_address = 'dummy-flash'
-    insert_defs(chosen['zephyr,flash'], defs, load_defs, {})
+    insert_defs(node_address, defs, load_defs, {})


Diego Sueiro

Zephyr-devel mailing list

Join to automatically receive all group messages.