Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: memory regions from devicetree & explicit code locations #33656

Closed

Commits on Apr 1, 2021

  1. cmake: boilerplate: add BOARD_LAYOUT parsing

    Add a second modifier to the board string that allows for specifying a
    code layout. Both board revision and board layout can be specified
    independently, or together. If specified together, the layout must
    follow the revision.
    
    A board indicates that it supports multiple code layouts by the presence
    of the `layouts` folder in the board folder. If this folder exists and
    no layout is specified, the `default` layout is selected. The selected
    layout must exactly match an overlay file in that folder.
    
    An optional Kconfig configuration file may also exist.
    
    For example, for a layout of `mcuboot` on board `test`:
    ```
    test
     - layouts
       - default.overlay
       - mcuboot.overlay
       - mcuboot.conf
      -test.dts
      -...
    ```
    
    The valid board specifiers are now:
    `board`
    `board@revision`
    `board%layout`
    `board@revision%layout`
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    52b5311 View commit details
    Browse the repository at this point in the history
  2. cmake: apply layout overlays and configuration

    Apply board dts overlays and kconfig configurations when `BOARD_LAYOUT`
    is specified.
    
    Fixes #31487.
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    cdfea7c View commit details
    Browse the repository at this point in the history
  3. boards: nrf52840dk_nrf52840: convert to layouts

    Convert the nrf52840dk_nrf52840 board to use the new board layouts as
    a demonstration of the changes required.
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    0279ba0 View commit details
    Browse the repository at this point in the history
  4. linker: macros for memory regions from devicetree

    Adds a public macro for creating memory regions from devicetree
    partitions. All partitions under `chosen/zephyr,flash` result in an
    output region.
    
    `DT_PARTITION_REGIONS` declares the memory regions for consumption by
    ld. While macro limitations mean that region names are quoted and there
    are no seperators between regions, ld appears to handle this fine.
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    ba76b22 View commit details
    Browse the repository at this point in the history
  5. linker: arm: generate memory regions from dt

    Generate linker memory regions from flash partitions that exist under
    the chosen node `zephyr,flash`. This makes the linker aware of the
    various flash memory regions. If code overflows from one region to
    another, the linker will complain. This additionally enables variables
    to be placed at absolute memory addresses by placing sections inside
    the generated memory regions.
    
    Fixes #31073, #27471.
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    9f999e0 View commit details
    Browse the repository at this point in the history
  6. linker: arm: simplify region definitions

    Simplify bespoke memory region definitions by declaring the regions
    directly from devicetree nodes.
    
    Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
    Jordan Yates committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    8ea65e8 View commit details
    Browse the repository at this point in the history