Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


Write option bytes

Hello.

I have been doing some tests and have come to the conclusion that I need to modify the option bytes.

For now I did it on st-link, but it is not feasible to use this method in future.

How do you write to the option bytes?

I did not want to have to do this in the firmware (using the core to write in the flash the values of the option bytes).

I’ve already searched in all files (in the PIC I was all “fuses” in a header file) but I have not found where this is to be done.

Can you help me?

Thank you!

No one writes in the option bytes?

Can no one give more information about how you do this?

Where are the option bytes configured in the project?


Hi.
Did you find an answer to your question? Because I have the exact same and can’t find any solution...

Thank you.

Hello

Unfortunately I did not get any response, and the problem continues...

Maybe there’s more assistance for TruStudio ...


Hello,

Did you solved the problem? I am using stlink and I think it sets the Flash protection on so i have problems afterwards with my bootloader.

How can I set the configuration bytes or fuses in system workbench???

I know that the ST-LINK Utility from ST is capable of editing the Option Bytes.
Option Bytes

In my experience System Workbench is not capable of doing so. Plus System Workbench is not the tool I planned to use in production. Two good reasons to find an other way to flash the Option Bytes: embed them into the binary file.

Here is an extract of my source code:

// 0x 1FFF F800 -> Option Byte 1 (nUSER, USER, nRDP, RDP)
const uint32_t optionbytes1 attribute(( section(“.optionbytes1”) )) = 0x20DF55AA;
// 0x 1FFF F804 -> Option Byte 2 (nData1, Data1, nData0, Data0)
const uint32_t optionbytes2 attribute(( section(“.optionbytes2”) )) = 0x00FF00FF;
// 0x 1FFF F808 -> Option Byte 3 (nWRP1, WRP1, nWRP0, WRP0)
const uint32_t optionbytes3 attribute(( section(“.optionbytes3”) )) = 0x00FF00FF;
// 0x 1FFF F80C -> Option Byte 4 (nWRP3, WRP3, nWRP2, WRP2)
const uint32_t optionbytes4 attribute(( section(“.optionbytes4”) )) = 0x00FF00FF;


Here is an extract of my Linker script:

MEMORY
{
...
FUSES (r) : ORIGIN = 0x1FFFF800, LENGTH = 16 /* Option Bytes (configuration fuses) */
...
}

SECTIONS
{
...
.fuses :
{
. = ALIGN(4);
KEEP(*(.optionbytes1))
KEEP(*(.optionbytes2))
KEEP(*(.optionbytes3))
KEEP(*(.optionbytes4))
. = ALIGN(4);
} >FUSES
...
}


In the end I obtain a binary file that embeds a section relative to the Option Bytes.
Here is an extract of my *.hex file:

:020000041FFFDC
:10F80000AA55DF20FF00FF0000FF00FFFF00FF0000


Doing like that allows you to flash your Option Bytes from System Workbench!