Skip to content

Extract Flash information from the Pack description and add it to the Build information files (*.cbuild-run.yml) #2367

@RobertRostohar

Description

@RobertRostohar

Describe The Problem To Be Solved
Flash information that the debugger can use to erase and program Flash without RAM based Flash algorithm is specified in the Pack description under flashinfo. This information should be extracted and provided in the *.cbuild-run.yml file.

Suggest A Solution
Extract Flash information from the pack and add it to the flash-info: node under cbuild-run: node in *.cbuild-run.yml as described below (implementation and documentation).

flash-info:

The flash-info: node collects the Flash information of the device (specified in DFP) and board (specified in BSP).

flash-info:
  - name:      [Required] Name of the specified flash device.
    start:     [Required] Base address of the specified flash device as mapped into target memory system.
    page-size: [Required] Programming page size (page is the smallest unit that can be programmed).
    blocks:    [Required] An ordered list of subsequent blocks (block is the smallest unit that can be erased).
    blank-val: [Optional] Expected memory value for unprogrammed address ranges (64-bit value). The access size used to read back programmed memory defines the number of least significant bytes of this value that are compared. Defaults to 0xFFFFFFFFFFFFFFFF if not specified.
    fill-val:  [Optional] Value that a debugger uses to fill the remainder of a programming page (64-bit value). The access size used in [FlashBufferWrite](https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/debug_description.html#DebugFunctions) defines the number of least significant bytes of this value to write. Defaults to 0xFFFFFFFFFFFFFFFF if not specified.
    ptime:     [Optional] Timeout in milliseconds for programming a page. Defaults to 100 if not specified.
    etime:     [Optional] Timeout in milliseconds for erasing a block. Defaults to 300 if not specified.
    pname:     [Optional] Executes programming only for a specific processor; default is for all processors.
blocks:
  - count:     [Required] Number of subsequent blocks.
    size:      [Required] Block size in bytes. The overall memory size that is covered by this block is count times size.
    arg:       [Optional] An optional argument to pass to flash operation sequence. A debugger writes this value to the pre-defined debug access variable __FlashArg at start of a flash operation. It is a non-negative number specific to this device. Defaults to 0 if not specified.

gap property should be deprecated and not used.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No type

Projects

Status

Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions