openhwgroup / core-v-mcu

This is the CORE-V MCU project, hosting CORE-V's embedded-class cores.
https://docs.openhwgroup.org/projects/core-v-mcu
Other
165 stars 50 forks source link

Using the A2 bootloader to program flash memory #302

Closed abdullahyildiz closed 1 year ago

abdullahyildiz commented 1 year ago

It is mentioned in CORE-V-MCU Quick Start Guide that A2 bootloader is capable of programming the flash memory. I checked the default A2 bootloader source code and couldn't have found any code block that is used for programming the flash memory.

Is it required to implement such functionality in the boot code?

MikeOpenHWGroup commented 1 year ago

Hi @abdullahyildiz, I presume you refering to the Using the-Bootloader section of the Quick Start Guide, which says:

The A2 bootloader is capable of collecting an executable file in Srecord format via UART0 and storing it into flash.

I believe you are right, and that statement is incorrect. I believe (do not know for sure) that programming the flash is a feature of cli_test. I will confirm this with @gmartin102 and update this issue (and create a PR to fix the QSG).

gmartin102 commented 1 year ago

Mike, You are correct, The A2 bootloader can load and Srec file into ram and jump to the starting address. As you mentioned the cli_test program can load an image from the uart and program the flash.

Greg

From: Mike Thompson @.> Date: Thursday, March 9, 2023 at 8:32 AM To: openhwgroup/core-v-mcu @.> Cc: Greg Martin @.>, Mention @.> Subject: Re: [openhwgroup/core-v-mcu] Using the A2 bootloader to program flash memory (Issue #302) CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi @abdullahyildizhttps://github.com/abdullahyildiz, I presume you refering to the Using the-Bootloaderhttps://github.com/openhwgroup/core-v-mcu/tree/master/emulation/quickstart#using-the-bootloader section of the Quick Start Guide, which says:

The A2 bootloader is capable of collecting an executable file in Srecord format via UART0 and storing it into flash.

I believe you are right, and that statement is incorrect. I believe (do not know for sure) that programming the flash is a feature of cli_test. I will confirm this with @gmartin102https://github.com/gmartin102 and update this issue (and create a PR to fix the QSG).

— Reply to this email directly, view it on GitHubhttps://github.com/openhwgroup/core-v-mcu/issues/302#issuecomment-1462163445, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AP2QBUYBLXI2UAKQJO23V53W3HSW7ANCNFSM6AAAAAAVVDKPPE. You are receiving this because you were mentioned.Message ID: @.***>

MikeOpenHWGroup commented 1 year ago

Thanks @gmartin102. @abdullahyildiz, please have a look at pull-request #303.

MikeOpenHWGroup commented 1 year ago

Fixed in #312.