[TARGET]
Name=STM32F031C4
[LINK]
## link command file for STM32F031C4
## Copyright (c) 2015 by COSMIC Software
##
+seg .vector -b 0x8000000 -m 0x4000 -n .vector # vectors start address
#if defined(__OPT_PSPLIT__)
-k
#endif
+seg .const -a .vector -n .const -r2 # constants follow vectors
+seg .text -a .const -n .text # program follow constants
+seg .data -b 0x20000000 -m 0x1000 -n .data -r2 # data start address
+seg .bss -a .data -n .bss
## interrupt vectors
#if defined(__STP_VECTOR__)
__STP_VECTORFILE__
#endif
## startup file
#if defined(__STP_CRTS__)
"crts.cx0"
#elif defined(__STP_CRTSI__)
"crtsi.cx0"
#endif
## application files
__STP_FILES__
## libraries
#if defined(__STP_FLOAT__)
#if defined(__OPT_PSPREC__)
"libf.cx0"
#else
"libd.cx0"
#endif
#endif
"libi.cx0" # C library (if needed)
"libm.cx0" # machine library
## symbols
+def __sram=pstart(.bss) # bss start address
+def __eram=pend(.bss) # bss end address
+def __stack=0x20001000 # stack pointer initial value
+def __memory=pend(.bss) # symbol used by library
[VECTOR]
/* INTERRUPT VECTOR TABLE FOR STM32F031
* Copyright (c) 2015 by COSMIC Software
*/
extern void _stext(void); /* startup code */
extern int _stack; /* stack address */
/* dummy interrupt function
*/
@interrupt void _dummit(void)
{
}
#pragma section const {vector}
/* vector table
*/
void (* const _vectab[48])(void) = {
/* 0 */ (void *)&_stack, /* Initial Stack Pointer */
/* 1 */ _stext, /* Initial Program Counter */
/* 2 */ _dummit, /* Non-maskable Interrupt (NMI) */
/* 3 */ _dummit, /* Hard Fault */
/* 4 */ _dummit, /* reserved */
/* 5 */ _dummit, /* reserved */
/* 6 */ _dummit, /* reserved */
/* 7 */ _dummit, /* reserved */
/* 8 */ _dummit, /* reserved */
/* 9 */ _dummit, /* reserved */
/* 10 */ _dummit, /* reserved */
/* 11 */ _dummit, /* Supervisor Call (SVCall) */
/* 12 */ _dummit, /* reserved */
/* 13 */ _dummit, /* reserved */
/* 14 */ _dummit, /* Pendable Service Request */
/* 15 */ _dummit, /* System Tick Timer */
/* 16 */ _dummit, /* Watchdog */
/* 17 */ _dummit, /* PDD/VDD supply */
/* 18 */ _dummit, /* RTC */
/* 19 */ _dummit, /* FLASH */
/* 20 */ _dummit, /* RCC/CRS */
/* 21 */ _dummit, /* EXTI0_1 */
/* 22 */ _dummit, /* EXTI2_3 */
/* 23 */ _dummit, /* EXTI4_15 */
/* 24 */ _dummit, /* TSC */
/* 25 */ _dummit, /* DMA channel 1 */
/* 26 */ _dummit, /* DMA channel 2, 3 */
/* 27 */ _dummit, /* DMA channel 4, 5 */
/* 28 */ _dummit, /* ADC/COMP */
/* 29 */ _dummit, /* TIM1 break, update */
/* 30 */ _dummit, /* TIM1 capture compare */
/* 31 */ _dummit, /* TIM2 */
/* 32 */ _dummit, /* TIM3 */
/* 33 */ _dummit, /* TIM6/DAC */
/* 34 */ _dummit, /* TIM7 */
/* 35 */ _dummit, /* TIM14 */
/* 36 */ _dummit, /* TIM15 */
/* 37 */ _dummit, /* TIM16 */
/* 38 */ _dummit, /* TIM17 */
/* 39 */ _dummit, /* I2C1 */
/* 40 */ _dummit, /* I2C2 */
/* 41 */ _dummit, /* SPI1 */
/* 42 */ _dummit, /* SPI2 */
/* 43 */ _dummit, /* USART1 */
/* 44 */ _dummit, /* USART2 */
/* 45 */ _dummit, /* USART3_8 */
/* 46 */ _dummit, /* CEC/CAN */
/* 47 */ _dummit, /* USB */
};
[OPTION]
+mod0