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

[feature] Option bytes on the STM32F767 ZIT6 Nucleo-144 #997

Merged
merged 14 commits into from
Jul 19, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Continue merging upstream
rutgerhendriks committed Jun 25, 2020
commit 972ecf8d960919d0c9433c73b809ddcc701f847b
3 changes: 2 additions & 1 deletion src/common.c
Original file line number Diff line number Diff line change
@@ -3637,8 +3637,9 @@ int stlink_write_option_bytes(stlink_t *sl, stm32_addr_t addr, uint8_t* base, ui

if (ret) {
ELOG("Flash option write failed!\n");
else
} else {
ILOG("Wrote %d option bytes to %#010x!\n", len, addr);
}

/* Re-lock flash. */
lock_flash_option(sl);
5 changes: 2 additions & 3 deletions src/st-flash/flash.c
Original file line number Diff line number Diff line change
@@ -140,7 +140,6 @@ int main(int ac, char** av) {
{
Nightwalker-87 marked this conversation as resolved.
Show resolved Hide resolved
size_t size = 0;
if (FLASH_FORMAT_IHEX == o.format) {
if (o.format == FLASH_FORMAT_IHEX) {
err = stlink_parse_ihex(o.filename, stlink_get_erased_pattern(sl), &mem, &size, &o.addr);

if (err == -1) {
@@ -150,7 +149,7 @@ int main(int ac, char** av) {
}
if ((o.addr >= sl->flash_base) &&
(o.addr < sl->flash_base + sl->flash_size)) {
if (FLASH_FORMAT_IHEX == o.format)
if (FLASH_FORMAT_IHEX == o.format) {
err = stlink_mwrite_flash(sl, mem, (uint32_t)size, o.addr);
} else {
err = stlink_fwrite_flash(sl, o.filename, o.addr);
@@ -162,7 +161,7 @@ int main(int ac, char** av) {
}
} else if ((o.addr >= sl->sram_base) &&
(o.addr < sl->sram_base + sl->sram_size)) {
if (FLASH_FORMAT_IHEX == o.format)
if (FLASH_FORMAT_IHEX == o.format) {
err = stlink_mwrite_sram(sl, mem, (uint32_t)size, o.addr);
} else {
err = stlink_fwrite_sram(sl, o.filename, o.addr);
Loading