What does the “OPT” build target stand for


When exploring the example projects, I've noticed that the regular Blinky project has 3 targets.


I think I understand what Flash and RAM stand for (it's all a bit confusing), but I haven't seen "OPT" before; what is it? What could it be used for?

I've seen multiple address spaces described for STM32F407 (that I'm using). How does it relate to them?

I think that the assembly file is additionally linked with the OPT target. The parts that interested me were:

;// <e> Flash Option Bytes
FLASH_OPT       EQU     1


;// </e>

                IF      FLASH_OPT <> 0
                AREA    |.ARM.__AT_0x1FFFC000|, CODE, READONLY
                DCD     FLASH_OPTCR


I admit I understand close to nothing from them, though.

Best Answer

Oh, I found that in the description (should've looked there at once):

The Blinky program is available in different targets:

  STM32F407 RAM:      configured for on-chip RAM
                      (used for target debugging)

  STM32F407 Flash:    configured for on-chip Flash
                      (used for production or target debugging)

  STM32F407 OPT:      STM32F407 with Flash Options Bytes
                      (used for programming)