Skip to content

Commit

Permalink
Merge pull request #941 from grevaillot/to_merge/option2
Browse files Browse the repository at this point in the history
[refactoring] Cleanup for option bytes and flash settings
  • Loading branch information
Nightwalker-87 committed Apr 22, 2020
2 parents 8de09dc + 8e69625 commit 027c4b4
Show file tree
Hide file tree
Showing 3 changed files with 417 additions and 471 deletions.
10 changes: 5 additions & 5 deletions include/stlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ extern "C" {

enum stlink_flash_type {
STLINK_FLASH_TYPE_UNKNOWN = 0,
STLINK_FLASH_TYPE_F0,
STLINK_FLASH_TYPE_L0,
STLINK_FLASH_TYPE_F4,
STLINK_FLASH_TYPE_L4,
STLINK_FLASH_TYPE_F1_XL,
STLINK_FLASH_TYPE_F0, /* used by f0, f1 (except f1xl),f3. */
STLINK_FLASH_TYPE_F1_XL, /* f0 flash with dual bank, apparently */
STLINK_FLASH_TYPE_F4, /* used by f2, f4, f7 */
STLINK_FLASH_TYPE_L0, /* l0, l1 */
STLINK_FLASH_TYPE_L4, /* l4, l4+ */
STLINK_FLASH_TYPE_G0,
STLINK_FLASH_TYPE_G4,
STLINK_FLASH_TYPE_WB
Expand Down
8 changes: 6 additions & 2 deletions src/chipid.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ static const struct stlink_chipid_params devices[] = {
.flash_pagesize = 0x20000,
.sram_size = 0x20000,
.bootrom_base = 0x1fff0000,
.bootrom_size = 0x7800
.bootrom_size = 0x7800,
.option_base = 0x1FFFC000,
.option_size = 4,
},
{ // PM0063
.chip_id = STLINK_CHIPID_STM32_F1_LOW,
Expand Down Expand Up @@ -218,7 +220,9 @@ static const struct stlink_chipid_params devices[] = {
.flash_pagesize = 0x20000,
.sram_size = 0x20000,
.bootrom_base = 0x1fff0000,
.bootrom_size = 0x7800
.bootrom_size = 0x7800,
.option_base = 0x1FFFC000,
.option_size = 4,
},
{
// STM32F410 MCUs. Support based on DM00180366.pdf (RM0401) document.
Expand Down
Loading

0 comments on commit 027c4b4

Please sign in to comment.