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

da1469x: hal_flash: Autodetect and configure flash #2827

Merged
merged 8 commits into from May 23, 2022

Conversation

agross-korg
Copy link
Contributor

This patch adds in auto-detection and configuration of Gigadevice and Macronix
flash devices based on the manufacturer and device ID. The intent in this is to
allow for a single binary to work on devices with different flash.

Normally, the flash is initialized by the ROM bootloader on the device. However, if the image being loaded is RAM_RESIDENT, that header will not exist and the ROM bootloader will not provision the device to have a working flash configuration.

Signed-off-by: Andy Gross andy.gross@juul.com

This patch adds in autodetection and configuration of Gigadevice and Macronix
flash devices based on the manufacturer and device ID.  The intent in this is to
allow for a single binary to work on devices with different flash.

Signed-off-by: Andy Gross <andy.gross@juul.com>
This patch moves the rdid structure to the BSP.  The default structure will be a
empty array.  Extern references are used to access the array and its size.

Signed-off-by: Andy Gross <andy.gross@juul.com>
@agross-korg agross-korg requested a review from kasjer May 18, 2022 06:09
Signed-off-by: Andy Gross <andy.gross@juul.com>
hw/bsp/dialog_da1469x-dk-pro/src/hal_bsp.c Outdated Show resolved Hide resolved
hw/mcu/dialog/da1469x/src/hal_flash.c Outdated Show resolved Hide resolved
Signed-off-by: Andy Gross <andy.gross@juul.com>
This patch fixes build breakage after moving the rdids to the BSP vs MCU.

Signed-off-by: Andy Gross <andy.gross@juul.com>
Signed-off-by: Andy Gross <andy.gross@juul.com>
Signed-off-by: Andy Gross <andy.gross@juul.com>
Signed-off-by: Andy Gross <andy.gross@juul.com>
@utzig
Copy link
Member

utzig commented May 20, 2022

Style check summary

No suggestions at this time!

Copy link
Contributor

@kasjer kasjer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agross-korg agross-korg merged commit b375f64 into apache:master May 23, 2022
JustineKH pushed a commit to JuulLabs/mynewt-core that referenced this pull request Jul 8, 2022
da146x: hal_flash: Autodetect and configure flash

This patch adds in autodetection and configuration of Gigadevice and Macronix
flash devices based on the manufacturer and device ID.  The intent in this is to
allow for a single binary to work on devices with different flash.

Signed-off-by: Andy Gross <andy.gross@juul.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants