[TARGET]
Name=STM32F101VC
[LINK]
## link command file for STM32F101VC
## Copyright (c) 2015 by COSMIC Software
##
+seg .vector -b 0x8000000 -o0 -m 0x10000 -n .vector # vectors start address
#if defined(__OPT_PSPLIT__)
-k
#endif
+seg .sconst -a .vector -n .sconst -r2 # short constants follow vectors
+seg .const -a .sconst -m 0x40000 -n .const # large constants follow short constants
+seg .text -a .const -n .text # program follow constants
+seg .sdata -b 0x20000000 -o0 -m 0x1000 -n .sdata -r2 -id # short data start address
+seg .sbss -a .sdata -n .sbss # short bss follow short data
+seg .bss -a .sbss -o0 -m 0x8000 -n .bss # large bss follow short bss
+seg .data -a .bss -n .data # large data follow large bss
## interrupt vectors
#if defined(__STP_VECTOR__)
__STP_VECTORFILE__
#endif
## startup file
#if defined(__STP_CRTS__)
"crts.cxm"
#elif defined(__STP_CRTSI__)
"crtsi.cxm"
#endif
## application files
__STP_FILES__
## libraries
#if defined(__OPT_PMODS__)
#if defined(__STP_FLOAT__)
#if defined(__OPT_PFPU__)
"libfpus.cxm"
#elif defined(__OPT_PSPREC__)
"libfs.cxm"
#else
"libds.cxm"
#endif
#endif
"libilc.cxm" # C library (if needed)
#elif defined(__OPT_PMODSC__)
#if defined(__STP_FLOAT__)
#if defined(__OPT_PFPU__)
"libfpusc.cxm"
#elif defined(__OPT_PSPREC__)
"libfsc.cxm"
#else
"libdsc.cxm"
#endif
#endif
"libisc.cxm" # C library (if needed)
#elif defined(__OPT_PMODL__)
#if defined(__STP_FLOAT__)
#if defined(__OPT_PFPU__)
"libfpul.cxm"
#elif defined(__OPT_PSPREC__)
"libfl.cxm"
#else
"libdl.cxm"
#endif
#endif
"libil.cxm" # C library (if needed)
#else
#if defined(__STP_FLOAT__)
#if defined(__OPT_PFPU__)
"libfpulc.cxm"
#elif defined(__OPT_PSPREC__)
"libflc.cxm"
#else
"libdlc.cxm"
#endif
#endif
"libilc.cxm" # C library (if needed)
#endif
"libm.cxm" # machine library
## symbols
+def __sram=pstart(.sbss) # bss start address
+def __eram=pend(.bss) # bss end address
+def __sdata=pstart(.sdata) # start of based data
+def __stack=0x20008000 # stack pointer initial value
+def __memory=pend(.data) # symbol used by library
[VECTOR]
/* INTERRUPT VECTOR TABLE FOR STM32F101
* 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[76])(void) = {
/* 0 */ (void *)&_stack, /* Initial Stack Pointer */
/* 1 */ _stext, /* Initial Program Counter */
/* 2 */ _dummit, /* Non-maskable Interrupt (NMI) */
/* 3 */ _dummit, /* Hard Fault */
/* 4 */ _dummit, /* MemManage Fault */
/* 5 */ _dummit, /* Bus Fault */
/* 6 */ _dummit, /* Usage fault */
/* 7 */ _dummit, /* reserved */
/* 8 */ _dummit, /* reserved */
/* 9 */ _dummit, /* reserved */
/* 10 */ _dummit, /* reserved */
/* 11 */ _dummit, /* Supervisor Call (SVCall) */
/* 12 */ _dummit, /* Debug Monitor */
/* 13 */ _dummit, /* reserved */
/* 14 */ _dummit, /* Pendable Service Request */
/* 15 */ _dummit, /* System Tick Timer */
/* 16 */ _dummit, /* Watchdog */
/* 17 */ _dummit, /* PVD */
/* 18 */ _dummit, /* TAMPER */
/* 19 */ _dummit, /* RTC */
/* 20 */ _dummit, /* FLASH */
/* 21 */ _dummit, /* RCC */
/* 22 */ _dummit, /* EXTI0 */
/* 23 */ _dummit, /* EXTI1 */
/* 24 */ _dummit, /* EXTI2 */
/* 25 */ _dummit, /* EXTI3 */
/* 26 */ _dummit, /* EXTI4 */
/* 27 */ _dummit, /* DMA1 channel 1 */
/* 28 */ _dummit, /* DMA1 channel 2 */
/* 29 */ _dummit, /* DMA1 channel 3 */
/* 30 */ _dummit, /* DMA1 channel 4 */
/* 31 */ _dummit, /* DMA1 channel 5 */
/* 32 */ _dummit, /* DMA1 channel 6 */
/* 33 */ _dummit, /* DMA1 channel 7 */
/* 34 */ _dummit, /* ADC1/ADC2 */
/* 35 */ _dummit, /* CAN1 TX / USB HP */
/* 36 */ _dummit, /* CAN1 RX0 / USB LP */
/* 37 */ _dummit, /* CAN1 RX1 */
/* 38 */ _dummit, /* CAN1 SCE */
/* 39 */ _dummit, /* EXTI5_9 */
/* 40 */ _dummit, /* TIM1 break / TIM9 */
/* 41 */ _dummit, /* TIM1 update / TIM10 */
/* 42 */ _dummit, /* TIM1 trigger / TIM11 */
/* 43 */ _dummit, /* TIM1 capture compare */
/* 44 */ _dummit, /* TIM2 */
/* 45 */ _dummit, /* TIM3 */
/* 46 */ _dummit, /* TIM4 */
/* 47 */ _dummit, /* I2C1 event */
/* 48 */ _dummit, /* I2C1 error */
/* 49 */ _dummit, /* I2C2 event */
/* 50 */ _dummit, /* I2C2 error */
/* 51 */ _dummit, /* SPI1 */
/* 52 */ _dummit, /* SPI2 */
/* 53 */ _dummit, /* USART1 */
/* 54 */ _dummit, /* USART2 */
/* 55 */ _dummit, /* USART3 */
/* 56 */ _dummit, /* EXTI10_15 */
/* 57 */ _dummit, /* RTC alarm */
/* 58 */ _dummit, /* USB wakeup */
/* 59 */ _dummit, /* TIM8 break / TIM12 */
/* 60 */ _dummit, /* TIM8 update / TIM13 */
/* 61 */ _dummit, /* TIM8 trigger / TIM14 */
/* 62 */ _dummit, /* TIM8 capture compare */
/* 63 */ _dummit, /* ADC3 */
/* 64 */ _dummit, /* FSMC */
/* 65 */ _dummit, /* SDIO */
/* 66 */ _dummit, /* TIM5 */
/* 67 */ _dummit, /* SPI3 */
/* 68 */ _dummit, /* UART4 */
/* 69 */ _dummit, /* UART5 */
/* 70 */ _dummit, /* TIM6 */
/* 71 */ _dummit, /* TIM7 */
/* 72 */ _dummit, /* DMA2 channel 1 */
/* 73 */ _dummit, /* DMA2 channel 2 */
/* 74 */ _dummit, /* DMA2 channel 3 */
/* 75 */ _dummit, /* DMA2 channel 4, 5 */
};
[OPTION]
+modlc