\ TEMPLATE FILE for STM32F0xx
\ created by svdcutter for Mecrisp-Stellaris Forth by Matthias Koch
\ sdvcutter takes a CMSIS-SVD file plus a hand edited config.xml file as input
\ By Terry Porter "terry@tjporter.com.au"
compiletoflash
\ available forth template words as selected by config.xml
$48001400 constant GPIOF
GPIOF $0 + constant GPIOF_MODER
GPIOF $4 + constant GPIOF_OTYPER
GPIOF $8 + constant GPIOF_OSPEEDR
GPIOF $C + constant GPIOF_PUPDR
GPIOF $10 + constant GPIOF_IDR
GPIOF $14 + constant GPIOF_ODR
GPIOF $18 + constant GPIOF_BSRR
GPIOF $1C + constant GPIOF_LCKR
GPIOF $20 + constant GPIOF_AFRL
GPIOF $24 + constant GPIOF_AFRH
GPIOF $28 + constant GPIOF_BRR
: GPIOF. cr
." GPIOF_MODER $" GPIOF_MODER @ hex. GPIOF_MODER 2b.
." GPIOF_OTYPER $" GPIOF_OTYPER @ hex. GPIOF_OTYPER 1bhalf.
." GPIOF_OSPEEDR $" GPIOF_OSPEEDR @ hex. GPIOF_OSPEEDR 2b.
." GPIOF_PUPDR $" GPIOF_PUPDR @ hex. GPIOF_PUPDR 2b.
." GPIOF_IDR $" GPIOF_IDR @ hex. GPIOF_IDR 1bhalf.
." GPIOF_ODR $" GPIOF_ODR @ hex. GPIOF_ODR 1bhalf.
." GPIOF_BSRR $" GPIOF_BSRR @ hex. GPIOF_BSRR 1b.
." GPIOF_LCKR $" GPIOF_LCKR @ hex. GPIOF_LCKR 1b.
." GPIOF_AFRL $" GPIOF_AFRL @ hex. GPIOF_AFRL 4b.
." GPIOF_AFRH $" GPIOF_AFRH @ hex. GPIOF_AFRH 4bb.
." GPIOF_BRR $" GPIOF_BRR @ hex. GPIOF_BRR 1b.
;
$48000800 constant GPIOC
GPIOC $0 + constant GPIOC_MODER
GPIOC $4 + constant GPIOC_OTYPER
GPIOC $8 + constant GPIOC_OSPEEDR
GPIOC $C + constant GPIOC_PUPDR
GPIOC $10 + constant GPIOC_IDR
GPIOC $14 + constant GPIOC_ODR
GPIOC $18 + constant GPIOC_BSRR
GPIOC $1C + constant GPIOC_LCKR
GPIOC $20 + constant GPIOC_AFRL
GPIOC $24 + constant GPIOC_AFRH
GPIOC $28 + constant GPIOC_BRR
: GPIOC. cr
." GPIOC_MODER $" GPIOC_MODER @ hex. GPIOC_MODER 2b.
." GPIOC_OTYPER $" GPIOC_OTYPER @ hex. GPIOC_OTYPER 1bhalf.
." GPIOC_OSPEEDR $" GPIOC_OSPEEDR @ hex. GPIOC_OSPEEDR 2b.
." GPIOC_PUPDR $" GPIOC_PUPDR @ hex. GPIOC_PUPDR 2b.
." GPIOC_IDR $" GPIOC_IDR @ hex. GPIOC_IDR 1bhalf.
." GPIOC_ODR $" GPIOC_ODR @ hex. GPIOC_ODR 1bhalf.
." GPIOC_BSRR $" GPIOC_BSRR @ hex. GPIOC_BSRR 1b.
." GPIOC_LCKR $" GPIOC_LCKR @ hex. GPIOC_LCKR 1b.
." GPIOC_AFRL $" GPIOC_AFRL @ hex. GPIOC_AFRL 4b.
." GPIOC_AFRH $" GPIOC_AFRH @ hex. GPIOC_AFRH 4bb.
." GPIOC_BRR $" GPIOC_BRR @ hex. GPIOC_BRR 1b.
;
$48000000 constant GPIOA
GPIOA $0 + constant GPIOA_MODER
GPIOA $4 + constant GPIOA_OTYPER
GPIOA $8 + constant GPIOA_OSPEEDR
GPIOA $C + constant GPIOA_PUPDR
GPIOA $10 + constant GPIOA_IDR
GPIOA $14 + constant GPIOA_ODR
GPIOA $18 + constant GPIOA_BSRR
GPIOA $1C + constant GPIOA_LCKR
GPIOA $20 + constant GPIOA_AFRL
GPIOA $24 + constant GPIOA_AFRH
GPIOA $28 + constant GPIOA_BRR
: GPIOA. cr
." GPIOA_MODER $" GPIOA_MODER @ hex. GPIOA_MODER 2b.
." GPIOA_OTYPER $" GPIOA_OTYPER @ hex. GPIOA_OTYPER 1bhalf.
." GPIOA_OSPEEDR $" GPIOA_OSPEEDR @ hex. GPIOA_OSPEEDR 2b.
." GPIOA_PUPDR $" GPIOA_PUPDR @ hex. GPIOA_PUPDR 2b.
." GPIOA_IDR $" GPIOA_IDR @ hex. GPIOA_IDR 1bhalf.
." GPIOA_ODR $" GPIOA_ODR @ hex. GPIOA_ODR 1bhalf.
." GPIOA_BSRR $" GPIOA_BSRR @ hex. GPIOA_BSRR 1b.
." GPIOA_LCKR $" GPIOA_LCKR @ hex. GPIOA_LCKR 1b.
." GPIOA_AFRL $" GPIOA_AFRL @ hex. GPIOA_AFRL 4b.
." GPIOA_AFRH $" GPIOA_AFRH @ hex. GPIOA_AFRH 4bb.
." GPIOA_BRR $" GPIOA_BRR @ hex. GPIOA_BRR 1b.
;
$40021000 constant RCC
RCC $0 + constant RCC_CR
RCC $4 + constant RCC_CFGR
RCC $8 + constant RCC_CIR
RCC $C + constant RCC_APB2RSTR
RCC $10 + constant RCC_APB1RSTR
RCC $14 + constant RCC_AHBENR
RCC $18 + constant RCC_APB2ENR
RCC $1C + constant RCC_APB1ENR
RCC $20 + constant RCC_BDCR
RCC $24 + constant RCC_CSR
RCC $28 + constant RCC_AHBRSTR
RCC $2C + constant RCC_CFGR2
RCC $30 + constant RCC_CFGR3
RCC $34 + constant RCC_CR2
: RCC. cr
." RCC_CR $" RCC_CR @ hex. RCC_CR 1b.
." RCC_CFGR $" RCC_CFGR @ hex. RCC_CFGR 1b.
." RCC_CIR $" RCC_CIR @ hex. RCC_CIR 1b.
." RCC_APB2RSTR $" RCC_APB2RSTR @ hex. RCC_APB2RSTR 1b.
." RCC_APB1RSTR $" RCC_APB1RSTR @ hex. RCC_APB1RSTR 1b.
." RCC_AHBENR $" RCC_AHBENR @ hex. RCC_AHBENR RCC_AHBENR.
." RCC_APB2ENR $" RCC_APB2ENR @ hex. RCC_APB2ENR RCC_APB2ENR.
." RCC_APB1ENR $" RCC_APB1ENR @ hex. RCC_APB1ENR RCC_APB1ENR.
." RCC_BDCR $" RCC_BDCR @ hex. RCC_BDCR 1b.
." RCC_CSR $" RCC_CSR @ hex. RCC_CSR 1b.
." RCC_AHBRSTR $" RCC_AHBRSTR @ hex. RCC_AHBRSTR 1b.
." RCC_CFGR2 $" RCC_CFGR2 @ hex. RCC_CFGR2 1b.
." RCC_CFGR3 $" RCC_CFGR3 @ hex. RCC_CFGR3 1b.
." RCC_CR2 $" RCC_CR2 @ hex. RCC_CR2 1b.
;
compiletoram