-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 #968
Comments
@rutgerhendriks: You can give it a try and see if everything works as intended. |
@rutgerhendriks : Any update on this? |
Well, I got it to work, so that's great. Now I need to get it cleaned up and make a PR that does only this.. |
I created the PR #997. I see there are some conflicts now, how to proceed in resolving them? |
I think these conflicts appear more complex than they actually are. |
ok, I'll have a look |
I know there was a lot going on recently, but don't bother too much about it - take your time. |
Commandline-Output:
Commandline:
st-flash --area=option read
Output:
Option bytes read is currently not supported for connected chip
could not read option bytes (-1)
Expected/description:
TL;DR
Reading or writing option bytes on the F76xxx is currently not supported. Adding support worked, but I have some confusion on how option bytes are handled.
For a project I need to change the boot_add option byte to a different value in order to boot the device from a different sector than the default value.
The thing is, the boot_add0 and boot_add1 option bytes are not written using the standard FLASH_OPTCR address, but with the FLASH_OPTCR1 address 4 bytes further
By adding functions for the F7 and FLASH_F7 defines (copy of F4 functions and defines) and adding the FLASH_F7_OPTCR1, I'm able to write the desired option byte boot_add0.
I'm willing to provide a pull request, but I'm not sure how to proceed at this moment, because it seems to me that option bytes in the project are a special beast. To support option bytes the option_base and option_size need to be added to chipid.c (in this case the base is 0x1FFF0000 and the size is 0x20) and checks are present for this, but the option bytes themselves are read and written using FLASH_Fx_OPTCR and therefor expect exactly one 32bit value. Perhaps the current behaviour is correct for some chips, but it is not for the F767.
I would propose to add the following to support the OPTCR1 boot_add0 and boot_add1 options:
I would propose to change the following to make option bytes more clear/consistent:
How do you guys feel about this? Will it work for other chips too?
The text was updated successfully, but these errors were encountered: