cancel
Showing results for 
Search instead for 
Did you mean: 

Configuration of Option bytes in source code, Cosmic

FLast.19.71
Associate II
Posted on October 17, 2016 at 11:12

Hi,

is it possible to specify Options bytes in source file ?

I mean something similar to what I use with Microchip PIC18 (in .c files):

#pragma config  WDT = ON // WDT Enabled

#pragma config  WDTPS = 256 // Watchdog prescaler 1:256

#pragma config  CP0 = ON // Program memory is code-protected

#pragma config  IESO = OFF // Two-Speed Start-up disabled

#pragma config  FOSC = HS // HS oscillator

or with Microchip PIC16 (in .asm files):

__CONFIG _DEBUG_OFF & _FCMEN_ON & _IESO_ON & _BOD_ON & _CPD_ON & _CP_ON & _MCLRE_ON & _PWRTE_ON & _WDT_ON & _HS_OSC

I have found only one method yet, which is via STVD->Tools->Programmer->OPTION BYTE

This is very clumsy, I would like to provide customer a single .s19 file that contains everything.

1 REPLY 1
luca239955_stm1_st
Senior II
Posted on October 17, 2016 at 12:50

Hello,

the short answer is: no.

More in details you can declare the otpion byte values as constants in the source code, but then you need a debugger/programmer that understands these special values at special addresses and know how to program them transparently for the user, and that's not the case for STVD as of today (ZAP can do that, but it's not included in the Free Special Edition package).

Regards,

Luca