# 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


and

FLASH_OPTCR    EQU     0x0FFFAAEC
;// </e>

IF      FLASH_OPT <> 0
DCD     FLASH_OPTCR
ENDIF

END


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

• Not familiar with that particular part but maybe a typo for OTP (one-time programmable). Does that part have any ROM type variants that can only be programmed once? – PeterJ Oct 11 '14 at 10:24
• @PeterJ Hmm, the [ST reference manual]st.com/web/en/resource/technical/document/reference_manual/… seems to confirm that it does indeed have some OTP space; but it looks like it's rather small, certainly not being able to fit the whole program binary. – Bartek Banachewicz Oct 11 '14 at 10:27
• Maybe it's "Optional" memory - i.e., external memory on the EIB. – Majenko Oct 11 '14 at 10:30
• @Majenko I've added some additional - hopefully helpful - information. – Bartek Banachewicz Oct 11 '14 at 10:33
• Also it may refer to the "option" bytes at 0x1FFF C000 - 0x1FFF C007, which if they are anything like the PIC chips are to do with configuring how the chip runs at startup - things like clock sources, etc. – Majenko Oct 11 '14 at 10:42

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)