diff --git a/Mcu/e230/GD32E230K8_FLASH.ld b/Mcu/e230/GD32E230K8_FLASH.ld deleted file mode 100644 index 6ec5ad32..00000000 --- a/Mcu/e230/GD32E230K8_FLASH.ld +++ /dev/null @@ -1,153 +0,0 @@ -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = 0x20002000; /* end of RAM */ - - -/* Generate a link error if heap and stack don't fit into RAM */ -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -MEMORY -{ -FLASH (rx) : ORIGIN = 0x08001000, LENGTH = 27K -FLASH_VERSION (rx) : ORIGIN = 0x08007C00 - 48, LENGTH = 14 -FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32 -EEPROM (rx) : ORIGIN = 0x08007C00, LENGTH = 1K -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K - -} - -/* Define output sections */ -SECTIONS -{ - /* The startup code goes first into FLASH */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data goes into FLASH */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH - .ARM : { - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - } >FLASH - - .preinit_array : - { - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - } >FLASH - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - } >FLASH - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - } >FLASH - - .firmware_version : - { - . = ALIGN(4); - KEEP (*(.firmware_info)) - } >FLASH_VERSION - - /* The file name */ - .file_name : - { - . = ALIGN(4); - KEEP (*(.file_name)) - } >FILE_NAME - - - /* used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections goes into RAM, load LMA copy after code */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - } >RAM AT> FLASH - - /* Uninitialized data section */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss secion */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough RAM left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the standard libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} - diff --git a/Mcu/e230/Startup/startup_gd32e23x.s b/Mcu/e230/Startup/startup_gd32e23x.s deleted file mode 100644 index 085fb905..00000000 --- a/Mcu/e230/Startup/startup_gd32e23x.s +++ /dev/null @@ -1,273 +0,0 @@ -/** - ****************************************************************************** - * @file startup_gd32e23x.s - * @author - * @version V1.0.0 - * @date 10/15/2010 - * @brief GD32E23x Value Series startup file - * This module performs: - * - Set the initial SP - * - Set the initial PC == Reset_Handler, - * - Set the vector table entries with the exceptions ISR address - * - Configure the clock system - * - Branches to main in the C library (which eventually - * calls main()). - ******************************************************************************* - */ - - .syntax unified - .cpu cortex-m23 - .fpu softvfp - .thumb - -.global g_pfnVectors -.global Default_Handler - -/* start address for the initialization values of the .data section. -defined in linker script */ -.word _sidata -/* start address for the .data section. defined in linker script */ -.word _sdata -/* end address for the .data section. defined in linker script */ -.word _edata -/* start address for the .bss section. defined in linker script */ -.word _sbss -/* end address for the .bss section. defined in linker script */ -.word _ebss - -/** - * @brief This is the code that gets called when the processor first - * starts execution following a reset event. Only the absolutely - * necessary set is performed, after which the application - * supplied main() routine is called. - * @param None - * @retval None -*/ - - .section .text.Reset_Handler - .weak Reset_Handler - .type Reset_Handler, %function -Reset_Handler: - ldr r0, =_estack /* set stack pointer */ - mov sp, r0 - -/* Copy the data segment initializers from flash to SRAM */ - ldr r0, =_sdata - ldr r1, =_edata - ldr r2, =_sidata - -LoopCopyDataInit: - ldr r3, [r2] - adds r2, r2, #4 - str r3, [r0] - adds r0, r0, #4 - cmp r0, r1 - bcc LoopCopyDataInit - -/* Zero fill the bss segment. */ - ldr r0, =_sbss - ldr r1, =_ebss - movs r2, #0 -LoopFillZerobss: - str r2, [r0] - adds r0, r0, #4 - cmp r0, r1 - bcc LoopFillZerobss - -/* Call the clock system intitialization function.*/ - bl SystemInit -/* Call static constructors */ -/* bl __libc_init_array */ -/* Call the application entry point.*/ - bl main - bx lr -.size Reset_Handler, .-Reset_Handler - -/** - * @brief This is the code that gets called when the processor receives an - * unexpected interrupt. This simply enters an infinite loop, preserving - * the system state for examination by a debugger. - * @param None - * @retval None -*/ - .section .text.Default_Handler,"ax",%progbits -Default_Handler: -Infinite_Loop: - b Infinite_Loop - .size Default_Handler, .-Default_Handler -/****************************************************************************** -* -* The minimal vector table for a Cortex M23. Note that the proper constructs -* must be placed on this to ensure that it ends up at physical address -* 0x0000.0000. -* -******************************************************************************/ - .section .isr_vector,"a",%progbits - .type g_pfnVectors, %object - .size g_pfnVectors, .-g_pfnVectors - -g_pfnVectors: - .word _estack // top of stack - .word Reset_Handler // Reset Handler - .word NMI_Handler // NMI Handler - .word HardFault_Handler // Hard Fault Handler - .word 0 // Reserved - .word 0 // Reserved - .word 0 // Reserved - .word 0 // Reserved - .word 0 // Reserved - .word 0 // Reserved - .word 0 // Reserved - .word SVC_Handler // SVCall Handler - .word 0 // Reserved - .word 0 // Reserved - .word PendSV_Handler // PendSV Handler - .word SysTick_Handler // SysTick Handler - - // External Interrupts - .word WWDGT_IRQHandler // 16:Window Watchdog Timer - .word LVD_IRQHandler // 17:LVD through EXTI Line detect - .word RTC_IRQHandler // 18:RTC through EXTI Line - .word FMC_IRQHandler // 19:FMC - .word RCU_IRQHandler // 20:RCU - .word EXTI0_1_IRQHandler // 21:EXTI Line 0 and EXTI Line 1 - .word EXTI2_3_IRQHandler // 22:EXTI Line 2 and EXTI Line 3 - .word EXTI4_15_IRQHandler // 23:EXTI Line 4 to EXTI Line 15 - .word 0 // Reserved - .word DMA_Channel0_IRQHandler // 25:DMA Channel 0 - .word DMA_Channel1_2_IRQHandler // 26:DMA Channel 1 and DMA Channel 2 - .word DMA_Channel3_4_IRQHandler // 27:DMA Channel 3 and DMA Channel 4 - .word ADC_CMP_IRQHandler // 28:ADC and Comparator - .word TIMER0_BRK_UP_TRG_COM_IRQHandler // 29:TIMER0 Break,Update,Trigger and Commutation - .word TIMER0_Channel_IRQHandler // 30:TIMER0 Channel Capture Compare - .word 0 // Reserved - .word TIMER2_IRQHandler // 32:TIMER2 - .word TIMER5_IRQHandler // 33:TIMER5 - .word 0 // Reserved - .word TIMER13_IRQHandler // 35:TIMER13 - .word TIMER14_IRQHandler // 36:TIMER14 - .word TIMER15_IRQHandler // 37:TIMER15 - .word TIMER16_IRQHandler // 38:TIMER16 - .word I2C0_EV_IRQHandler // 39:I2C0 Event - .word I2C1_EV_IRQHandler // 40:I2C1 Event - .word SPI0_IRQHandler // 41:SPI0 - .word SPI1_IRQHandler // 42:SPI1 - .word USART0_IRQHandler // 43:USART0 - .word USART1_IRQHandler // 44:USART1 - .word 0 // Reserved - .word 0 // Reserved - .word 0 // Reserved - .word I2C0_ER_IRQHandler // 48:I2C0 Error - .word 0 // Reserved - .word I2C1_ER_IRQHandler // 50:I2C1 Error - -/******************************************************************************* -* Provide weak aliases for each Exception handler to the Default_Handler. -* As they are weak aliases, any function with the same name will override -* this definition. -*******************************************************************************/ - - .weak NMI_Handler - .thumb_set NMI_Handler,Default_Handler - - .weak HardFault_Handler - .thumb_set HardFault_Handler,Default_Handler - - .weak SVC_Handler - .thumb_set SVC_Handler,Default_Handler - - .weak DebugMon_Handler - .thumb_set DebugMon_Handler,Default_Handler - - .weak PendSV_Handler - .thumb_set PendSV_Handler,Default_Handler - - .weak SysTick_Handler - .thumb_set SysTick_Handler,Default_Handler - - .weak WWDGT_IRQHandler - .thumb_set WWDGT_IRQHandler,Default_Handler - - .weak LVD_IRQHandler - .thumb_set LVD_IRQHandler,Default_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Default_Handler - - .weak FMC_IRQHandler - .thumb_set FMC_IRQHandler,Default_Handler - - .weak RCU_IRQHandler - .thumb_set RCU_IRQHandler,Default_Handler - - .weak EXTI0_1_IRQHandler - .thumb_set EXTI0_1_IRQHandler,Default_Handler - - .weak EXTI2_3_IRQHandler - .thumb_set EXTI2_3_IRQHandler,Default_Handler - - .weak EXTI4_15_IRQHandler - .thumb_set EXTI4_15_IRQHandler,Default_Handler - - .weak DMA_Channel0_IRQHandler - .thumb_set DMA_Channel0_IRQHandler,Default_Handler - - .weak DMA_Channel1_2_IRQHandler - .thumb_set DMA_Channel1_2_IRQHandler,Default_Handler - - .weak DMA_Channel3_4_IRQHandler - .thumb_set DMA_Channel3_4_IRQHandler,Default_Handler - - .weak ADC_CMP_IRQHandler - .thumb_set ADC_CMP_IRQHandler,Default_Handler - - .weak TIMER0_BRK_UP_TRG_COM_IRQHandler - .thumb_set TIMER0_BRK_UP_TRG_COM_IRQHandler,Default_Handler - - .weak TIMER0_Channel_IRQHandler - .thumb_set TIMER0_Channel_IRQHandler,Default_Handler - - .weak TIMER2_IRQHandler - .thumb_set TIMER2_IRQHandler,Default_Handler - - .weak TIMER5_IRQHandler - .thumb_set TIMER5_IRQHandler,Default_Handler - - .weak TIMER13_IRQHandler - .thumb_set TIMER13_IRQHandler,Default_Handler - - .weak TIMER14_IRQHandler - .thumb_set TIMER14_IRQHandler,Default_Handler - - .weak TIMER15_IRQHandler - .thumb_set TIMER15_IRQHandler,Default_Handler - - .weak TIMER16_IRQHandler - .thumb_set TIMER16_IRQHandler,Default_Handler - - .weak I2C0_EV_IRQHandler - .thumb_set I2C0_EV_IRQHandler,Default_Handler - - .weak I2C1_EV_IRQHandler - .thumb_set I2C1_EV_IRQHandler,Default_Handler - - .weak SPI0_IRQHandler - .thumb_set SPI0_IRQHandler,Default_Handler - - .weak SPI1_IRQHandler - .thumb_set SPI1_IRQHandler,Default_Handler - - .weak USART0_IRQHandler - .thumb_set USART0_IRQHandler,Default_Handler - - .weak USART1_IRQHandler - .thumb_set USART1_IRQHandler,Default_Handler - - .weak I2C0_ER_IRQHandler - .thumb_set I2C0_ER_IRQHandler,Default_Handler - - .weak I2C1_ER_IRQHandler - .thumb_set I2C1_ER_IRQHandler,Default_Handler - - -/******************* END OF FILE *******************/ diff --git a/Mcu/f031/STM32F031C6TX_FLASH.ld b/Mcu/f031/STM32F031C6TX_FLASH.ld deleted file mode 100644 index 6031fc97..00000000 --- a/Mcu/f031/STM32F031C6TX_FLASH.ld +++ /dev/null @@ -1,197 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32F031C6Tx Device from STM32F0 series - * 32Kbytes FLASH - * 4Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200 ; /* required amount of heap */ -_Min_Stack_Size = 0x400 ; /* required amount of stack */ - -/* Memories definition */ -MEMORY -{ - SRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192 - RAM (xrw) : ORIGIN = 0x200000C0, LENGTH = 4K - 192 - FLASH_VECTAB (rx) : ORIGIN = 0x08001000, LENGTH = 192 - FLASH_VERSION (rx) : ORIGIN = 0x080010C0, LENGTH = 14 - FLASH (rx) : ORIGIN = ORIGIN(FLASH_VERSION) + LENGTH(FLASH_VERSION), LENGTH = 27K - 32 -(LENGTH(FLASH_VECTAB) + LENGTH(FLASH_VERSION)) - FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32 - EEPROM (rx) : ORIGIN = 0x080007C00, LENGTH = 1K - -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH_VECTAB - - /* The firmware version and name - at a fixed address to make it possible to read it from firmware files. */ - .firmware_version : - { - . = ALIGN(4); - KEEP (*(.firmware_info)) - } >FLASH_VERSION - - - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* The file name */ - .file_name : - { - . = ALIGN(4); - KEEP (*(.file_name)) - } >FILE_NAME - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/Mcu/f031/Startup/startup_stm32f031c6tx.s b/Mcu/f031/Startup/startup_stm32f031c6tx.s deleted file mode 100644 index 57985373..00000000 --- a/Mcu/f031/Startup/startup_stm32f031c6tx.s +++ /dev/null @@ -1,264 +0,0 @@ -/** - ****************************************************************************** - * @file startup_stm32f031x6.s - * @author MCD Application Team - * @brief STM32F031x4/STM32F031x6 devices vector table for GCC toolchain. - * This module performs: - * - Set the initial SP - * - Set the initial PC == Reset_Handler, - * - Set the vector table entries with the exceptions ISR address - * - Branches to main in the C library (which eventually - * calls main()). - * After Reset the Cortex-M0 processor is in Thread mode, - * priority is Privileged, and the Stack is set to Main. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2016 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - - .syntax unified - .cpu cortex-m0 - .fpu softvfp - .thumb - -.global g_pfnVectors -.global Default_Handler - -/* start address for the initialization values of the .data section. -defined in linker script */ -.word _sidata -/* start address for the .data section. defined in linker script */ -.word _sdata -/* end address for the .data section. defined in linker script */ -.word _edata -/* start address for the .bss section. defined in linker script */ -.word _sbss -/* end address for the .bss section. defined in linker script */ -.word _ebss - - .section .text.Reset_Handler - .weak Reset_Handler - .type Reset_Handler, %function -Reset_Handler: - ldr r0, =_estack - mov sp, r0 /* set stack pointer */ - -/* Copy the data segment initializers from flash to SRAM */ - ldr r0, =_sdata - ldr r1, =_edata - ldr r2, =_sidata - movs r3, #0 - b LoopCopyDataInit - -CopyDataInit: - ldr r4, [r2, r3] - str r4, [r0, r3] - adds r3, r3, #4 - -LoopCopyDataInit: - adds r4, r0, r3 - cmp r4, r1 - bcc CopyDataInit - -/* Zero fill the bss segment. */ - ldr r2, =_sbss - ldr r4, =_ebss - movs r3, #0 - b LoopFillZerobss - -FillZerobss: - str r3, [r2] - adds r2, r2, #4 - -LoopFillZerobss: - cmp r2, r4 - bcc FillZerobss - -/* Call the clock system intitialization function.*/ - bl SystemInit -/* Call static constructors */ - bl __libc_init_array -/* Call the application's entry point.*/ - bl main - -LoopForever: - b LoopForever - - -.size Reset_Handler, .-Reset_Handler - -/** - * @brief This is the code that gets called when the processor receives an - * unexpected interrupt. This simply enters an infinite loop, preserving - * the system state for examination by a debugger. - * - * @param None - * @retval : None -*/ - .section .text.Default_Handler,"ax",%progbits -Default_Handler: -Infinite_Loop: - b Infinite_Loop - .size Default_Handler, .-Default_Handler -/****************************************************************************** -* -* The minimal vector table for a Cortex M0. Note that the proper constructs -* must be placed on this to ensure that it ends up at physical address -* 0x0000.0000. -* -******************************************************************************/ - .section .isr_vector,"a",%progbits - .type g_pfnVectors, %object - .size g_pfnVectors, .-g_pfnVectors - - -g_pfnVectors: - .word _estack - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word SVC_Handler - .word 0 - .word 0 - .word PendSV_Handler - .word SysTick_Handler - .word WWDG_IRQHandler /* Window WatchDog */ - .word PVD_IRQHandler /* PVD through EXTI Line detect */ - .word RTC_IRQHandler /* RTC through the EXTI line */ - .word FLASH_IRQHandler /* FLASH */ - .word RCC_IRQHandler /* RCC */ - .word EXTI0_1_IRQHandler /* EXTI Line 0 and 1 */ - .word EXTI2_3_IRQHandler /* EXTI Line 2 and 3 */ - .word EXTI4_15_IRQHandler /* EXTI Line 4 to 15 */ - .word 0 /* Reserved */ - .word DMA1_Channel1_IRQHandler /* DMA1 Channel 1 */ - .word DMA1_Channel2_3_IRQHandler /* DMA1 Channel 2 and Channel 3 */ - .word DMA1_Channel4_5_IRQHandler /* DMA1 Channel 4 and Channel 5 */ - .word ADC1_IRQHandler /* ADC1 */ - .word TIM1_BRK_UP_TRG_COM_IRQHandler /* TIM1 Break, Update, Trigger and Commutation */ - .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */ - .word TIM2_IRQHandler /* TIM2 */ - .word TIM3_IRQHandler /* TIM3 */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word TIM14_IRQHandler /* TIM14 */ - .word 0 /* Reserved */ - .word TIM16_IRQHandler /* TIM16 */ - .word TIM17_IRQHandler /* TIM17 */ - .word I2C1_IRQHandler /* I2C1 */ - .word 0 /* Reserved */ - .word SPI1_IRQHandler /* SPI1 */ - .word 0 /* Reserved */ - .word USART1_IRQHandler /* USART1 */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - -/******************************************************************************* -* -* Provide weak aliases for each Exception handler to the Default_Handler. -* As they are weak aliases, any function with the same name will override -* this definition. -* -*******************************************************************************/ - - .weak NMI_Handler - .thumb_set NMI_Handler,Default_Handler - - .weak HardFault_Handler - .thumb_set HardFault_Handler,Default_Handler - - .weak SVC_Handler - .thumb_set SVC_Handler,Default_Handler - - .weak PendSV_Handler - .thumb_set PendSV_Handler,Default_Handler - - .weak SysTick_Handler - .thumb_set SysTick_Handler,Default_Handler - - .weak WWDG_IRQHandler - .thumb_set WWDG_IRQHandler,Default_Handler - - .weak PVD_IRQHandler - .thumb_set PVD_IRQHandler,Default_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Default_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Default_Handler - - .weak RCC_IRQHandler - .thumb_set RCC_IRQHandler,Default_Handler - - .weak EXTI0_1_IRQHandler - .thumb_set EXTI0_1_IRQHandler,Default_Handler - - .weak EXTI2_3_IRQHandler - .thumb_set EXTI2_3_IRQHandler,Default_Handler - - .weak EXTI4_15_IRQHandler - .thumb_set EXTI4_15_IRQHandler,Default_Handler - - .weak DMA1_Channel1_IRQHandler - .thumb_set DMA1_Channel1_IRQHandler,Default_Handler - - .weak DMA1_Channel2_3_IRQHandler - .thumb_set DMA1_Channel2_3_IRQHandler,Default_Handler - - .weak DMA1_Channel4_5_IRQHandler - .thumb_set DMA1_Channel4_5_IRQHandler,Default_Handler - - .weak ADC1_IRQHandler - .thumb_set ADC1_IRQHandler,Default_Handler - - .weak TIM1_BRK_UP_TRG_COM_IRQHandler - .thumb_set TIM1_BRK_UP_TRG_COM_IRQHandler,Default_Handler - - .weak TIM1_CC_IRQHandler - .thumb_set TIM1_CC_IRQHandler,Default_Handler - - .weak TIM2_IRQHandler - .thumb_set TIM2_IRQHandler,Default_Handler - - .weak TIM3_IRQHandler - .thumb_set TIM3_IRQHandler,Default_Handler - - .weak TIM14_IRQHandler - .thumb_set TIM14_IRQHandler,Default_Handler - - .weak TIM16_IRQHandler - .thumb_set TIM16_IRQHandler,Default_Handler - - .weak TIM17_IRQHandler - .thumb_set TIM17_IRQHandler,Default_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Default_Handler - - .weak SPI1_IRQHandler - .thumb_set SPI1_IRQHandler,Default_Handler - - .weak USART1_IRQHandler - .thumb_set USART1_IRQHandler,Default_Handler - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ - diff --git a/Mcu/f051/STM32F051K6TX_FLASH.ld b/Mcu/f051/STM32F051K6TX_FLASH.ld deleted file mode 100644 index 7f690038..00000000 --- a/Mcu/f051/STM32F051K6TX_FLASH.ld +++ /dev/null @@ -1,194 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32F051K6Tx Device from STM32F0 series - * 32Kbytes FLASH - * 8Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200 ; /* required amount of heap */ -_Min_Stack_Size = 0x400 ; /* required amount of stack */ - -/* Memories definition */ - -MEMORY -{ - SRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192 - RAM (xrw) : ORIGIN = 0x200000C0, LENGTH = 8K - 192 - FLASH_VECTAB (rx) : ORIGIN = 0x08001000, LENGTH = 192 - FLASH_VERSION (rx) : ORIGIN = 0x080010C0, LENGTH = 14 - FLASH (rx) : ORIGIN = ORIGIN(FLASH_VERSION) + LENGTH(FLASH_VERSION), LENGTH = 27K - 32 - (LENGTH(FLASH_VECTAB) + LENGTH(FLASH_VERSION)) - FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32 - EEPROM (rx) : ORIGIN = 0x08007C00, LENGTH = 1K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH_VECTAB - - /* The firmware version and name - at a fixed address to make it possible to read it from firmware files. */ - .firmware_version : - { - . = ALIGN(4); - KEEP (*(.firmware_info)) - } >FLASH_VERSION - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - /* The file name */ - .file_name : - { - . = ALIGN(4); - KEEP (*(.file_name)) - } >FILE_NAME - - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/Mcu/f051/Startup/startup_stm32f051k6tx.s b/Mcu/f051/Startup/startup_stm32f051k6tx.s deleted file mode 100644 index 2f56507c..00000000 --- a/Mcu/f051/Startup/startup_stm32f051k6tx.s +++ /dev/null @@ -1,285 +0,0 @@ -/** - ****************************************************************************** - * @file startup_stm32f051x8.s - * @author MCD Application Team - * @brief STM32F051x4/STM32F051x6/STM32F051x8 devices vector table for GCC toolchain. - * This module performs: - * - Set the initial SP - * - Set the initial PC == Reset_Handler, - * - Set the vector table entries with the exceptions ISR address - * - Branches to main in the C library (which eventually - * calls main()). - * After Reset the Cortex-M0 processor is in Thread mode, - * priority is Privileged, and the Stack is set to Main. - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2016 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - - .syntax unified - .cpu cortex-m0 - .fpu softvfp - .thumb - -.global g_pfnVectors -.global Default_Handler - -/* start address for the initialization values of the .data section. -defined in linker script */ -.word _sidata -/* start address for the .data section. defined in linker script */ -.word _sdata -/* end address for the .data section. defined in linker script */ -.word _edata -/* start address for the .bss section. defined in linker script */ -.word _sbss -/* end address for the .bss section. defined in linker script */ -.word _ebss - - .section .text.Reset_Handler - .weak Reset_Handler - .type Reset_Handler, %function -Reset_Handler: - ldr r0, =_estack - mov sp, r0 /* set stack pointer */ - -/* Copy the data segment initializers from flash to SRAM */ - ldr r0, =_sdata - ldr r1, =_edata - ldr r2, =_sidata - movs r3, #0 - b LoopCopyDataInit - -CopyDataInit: - ldr r4, [r2, r3] - str r4, [r0, r3] - adds r3, r3, #4 - -LoopCopyDataInit: - adds r4, r0, r3 - cmp r4, r1 - bcc CopyDataInit - -/* Zero fill the bss segment. */ - ldr r2, =_sbss - ldr r4, =_ebss - movs r3, #0 - b LoopFillZerobss - -FillZerobss: - str r3, [r2] - adds r2, r2, #4 - -LoopFillZerobss: - cmp r2, r4 - bcc FillZerobss - -/* Call the clock system intitialization function.*/ - bl SystemInit -/* Call static constructors */ - bl __libc_init_array -/* Call the application's entry point.*/ - bl main - -LoopForever: - b LoopForever - - -.size Reset_Handler, .-Reset_Handler - -/** - * @brief This is the code that gets called when the processor receives an - * unexpected interrupt. This simply enters an infinite loop, preserving - * the system state for examination by a debugger. - * - * @param None - * @retval : None -*/ - .section .text.Default_Handler,"ax",%progbits -Default_Handler: -Infinite_Loop: - b Infinite_Loop - .size Default_Handler, .-Default_Handler -/****************************************************************************** -* -* The minimal vector table for a Cortex M0. Note that the proper constructs -* must be placed on this to ensure that it ends up at physical address -* 0x0000.0000. -* -******************************************************************************/ - .section .isr_vector,"a",%progbits - .type g_pfnVectors, %object - .size g_pfnVectors, .-g_pfnVectors - - -g_pfnVectors: - .word _estack - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word SVC_Handler - .word 0 - .word 0 - .word PendSV_Handler - .word SysTick_Handler - .word WWDG_IRQHandler /* Window WatchDog */ - .word PVD_IRQHandler /* PVD through EXTI Line detect */ - .word RTC_IRQHandler /* RTC through the EXTI line */ - .word FLASH_IRQHandler /* FLASH */ - .word RCC_CRS_IRQHandler /* RCC and CRS */ - .word EXTI0_1_IRQHandler /* EXTI Line 0 and 1 */ - .word EXTI2_3_IRQHandler /* EXTI Line 2 and 3 */ - .word EXTI4_15_IRQHandler /* EXTI Line 4 to 15 */ - .word TSC_IRQHandler /* TSC */ - .word DMA1_Channel1_IRQHandler /* DMA1 Channel 1 */ - .word DMA1_Channel2_3_IRQHandler /* DMA1 Channel 2 and Channel 3 */ - .word DMA1_Channel4_5_IRQHandler /* DMA1 Channel 4 and Channel 5 */ - .word ADC1_COMP_IRQHandler /* ADC1, COMP1 and COMP2 */ - .word TIM1_BRK_UP_TRG_COM_IRQHandler /* TIM1 Break, Update, Trigger and Commutation */ - .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */ - .word TIM2_IRQHandler /* TIM2 */ - .word TIM3_IRQHandler /* TIM3 */ - .word TIM6_DAC_IRQHandler /* TIM6 and DAC */ - .word 0 /* Reserved */ - .word TIM14_IRQHandler /* TIM14 */ - .word TIM15_IRQHandler /* TIM15 */ - .word TIM16_IRQHandler /* TIM16 */ - .word TIM17_IRQHandler /* TIM17 */ - .word I2C1_IRQHandler /* I2C1 */ - .word I2C2_IRQHandler /* I2C2 */ - .word SPI1_IRQHandler /* SPI1 */ - .word SPI2_IRQHandler /* SPI2 */ - .word USART1_IRQHandler /* USART1 */ - .word USART2_IRQHandler /* USART2 */ - .word 0 /* Reserved */ - .word CEC_CAN_IRQHandler /* CEC and CAN */ - .word 0 /* Reserved */ - -/******************************************************************************* -* -* Provide weak aliases for each Exception handler to the Default_Handler. -* As they are weak aliases, any function with the same name will override -* this definition. -* -*******************************************************************************/ - - .weak NMI_Handler - .thumb_set NMI_Handler,Default_Handler - - .weak HardFault_Handler - .thumb_set HardFault_Handler,Default_Handler - - .weak SVC_Handler - .thumb_set SVC_Handler,Default_Handler - - .weak PendSV_Handler - .thumb_set PendSV_Handler,Default_Handler - - .weak SysTick_Handler - .thumb_set SysTick_Handler,Default_Handler - - .weak WWDG_IRQHandler - .thumb_set WWDG_IRQHandler,Default_Handler - - .weak PVD_IRQHandler - .thumb_set PVD_IRQHandler,Default_Handler - - .weak RTC_IRQHandler - .thumb_set RTC_IRQHandler,Default_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Default_Handler - - .weak RCC_CRS_IRQHandler - .thumb_set RCC_CRS_IRQHandler,Default_Handler - - .weak EXTI0_1_IRQHandler - .thumb_set EXTI0_1_IRQHandler,Default_Handler - - .weak EXTI2_3_IRQHandler - .thumb_set EXTI2_3_IRQHandler,Default_Handler - - .weak EXTI4_15_IRQHandler - .thumb_set EXTI4_15_IRQHandler,Default_Handler - - .weak TSC_IRQHandler - .thumb_set TSC_IRQHandler,Default_Handler - - .weak DMA1_Channel1_IRQHandler - .thumb_set DMA1_Channel1_IRQHandler,Default_Handler - - .weak DMA1_Channel2_3_IRQHandler - .thumb_set DMA1_Channel2_3_IRQHandler,Default_Handler - - .weak DMA1_Channel4_5_IRQHandler - .thumb_set DMA1_Channel4_5_IRQHandler,Default_Handler - - .weak ADC1_COMP_IRQHandler - .thumb_set ADC1_COMP_IRQHandler,Default_Handler - - .weak TIM1_BRK_UP_TRG_COM_IRQHandler - .thumb_set TIM1_BRK_UP_TRG_COM_IRQHandler,Default_Handler - - .weak TIM1_CC_IRQHandler - .thumb_set TIM1_CC_IRQHandler,Default_Handler - - .weak TIM2_IRQHandler - .thumb_set TIM2_IRQHandler,Default_Handler - - .weak TIM3_IRQHandler - .thumb_set TIM3_IRQHandler,Default_Handler - - .weak TIM6_DAC_IRQHandler - .thumb_set TIM6_DAC_IRQHandler,Default_Handler - - .weak TIM14_IRQHandler - .thumb_set TIM14_IRQHandler,Default_Handler - - .weak TIM15_IRQHandler - .thumb_set TIM15_IRQHandler,Default_Handler - - .weak TIM16_IRQHandler - .thumb_set TIM16_IRQHandler,Default_Handler - - .weak TIM17_IRQHandler - .thumb_set TIM17_IRQHandler,Default_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Default_Handler - - .weak I2C2_IRQHandler - .thumb_set I2C2_IRQHandler,Default_Handler - - .weak SPI1_IRQHandler - .thumb_set SPI1_IRQHandler,Default_Handler - - .weak SPI2_IRQHandler - .thumb_set SPI2_IRQHandler,Default_Handler - - .weak USART1_IRQHandler - .thumb_set USART1_IRQHandler,Default_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Default_Handler - - .weak CEC_CAN_IRQHandler - .thumb_set CEC_CAN_IRQHandler,Default_Handler - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ - diff --git a/Mcu/f415/AT32F415x8_FLASH.ld b/Mcu/f415/AT32F415x8_FLASH.ld deleted file mode 100644 index c2cb55c4..00000000 --- a/Mcu/f415/AT32F415x8_FLASH.ld +++ /dev/null @@ -1,171 +0,0 @@ -/* -***************************************************************************** -** -** File : AT32F415x8_FLASH.ld -** -** Abstract : Linker script for AT32F415x8 Device with -** 64KByte FLASH, 32KByte RAM -** -** Set heap size, stack size and stack location according -** to application requirements. -** -** Set memory bank area and size if external memory is used. -** -** Target : Artery Tek AT32 -** -** Environment : Arm gcc toolchain -** -***************************************************************************** -*/ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = 0x20008000; /* end of RAM */ - -/* Generate a link error if heap and stack don't fit into RAM */ -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Specify the memory areas */ -MEMORY -{ -FLASH (rx) : ORIGIN = 0x08001000, LENGTH = 27K -FLASH_VERSION (rx) : ORIGIN = 0x08007C00 - 48, LENGTH = 14 -FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32 -EEPROM (rx) : ORIGIN = 0x08007C00, LENGTH = 1K -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K -} - -/* Define output sections */ -SECTIONS -{ - /* The startup code goes first into FLASH */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data goes into FLASH */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH - .ARM : { - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - } >FLASH - - .preinit_array : - { - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - } >FLASH - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - } >FLASH - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - } >FLASH - - .firmware_version : - { - . = ALIGN(4); - KEEP (*(.firmware_info)) - } >FLASH_VERSION - - - /* The file name */ - .file_name : - { - . = ALIGN(4); - KEEP (*(.file_name)) - } >FILE_NAME - - /* used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections goes into RAM, load LMA copy after code */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - } >RAM AT> FLASH - - /* Uninitialized data section */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss secion */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough RAM left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the standard libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/Mcu/f415/Startup/startup_at32f415.s b/Mcu/f415/Startup/startup_at32f415.s deleted file mode 100644 index 1a618e26..00000000 --- a/Mcu/f415/Startup/startup_at32f415.s +++ /dev/null @@ -1,409 +0,0 @@ -/** - ****************************************************************************** - * @file startup_at32f415.s - * @version v2.0.7 - * @date 2022-08-16 - * @brief at32f415xx devices vector table for gcc toolchain. - * this module performs: - * - set the initial sp - * - set the initial pc == reset_handler, - * - set the vector table entries with the exceptions isr address - * - configure the clock system and the external sram to - * be used as data memory (optional, to be enabled by user) - * - branches to main in the c library (which eventually - * calls main()). - * after reset the cortex-m4 processor is in thread mode, - * priority is privileged, and the stack is set to main. - ****************************************************************************** - */ - - .syntax unified - .cpu cortex-m4 - .fpu softvfp - .thumb - -.global g_pfnVectors -.global Default_Handler - -/* start address for the initialization values of the .data section. -defined in linker script */ -.word _sidata -/* start address for the .data section. defined in linker script */ -.word _sdata -/* end address for the .data section. defined in linker script */ -.word _edata -/* start address for the .bss section. defined in linker script */ -.word _sbss -/* end address for the .bss section. defined in linker script */ -.word _ebss -/* stack used for SystemInit_ExtMemCtl; always internal RAM used */ - -/** - * @brief This is the code that gets called when the processor first - * starts execution following a reset event. Only the absolutely - * necessary set is performed, after which the application - * supplied main() routine is called. - * @param None - * @retval None -*/ - - .section .text.Reset_Handler - .weak Reset_Handler - .type Reset_Handler, %function -Reset_Handler: - -/* Copy the data segment initializers from flash to SRAM */ - movs r1, #0 - b LoopCopyDataInit - -CopyDataInit: - ldr r3, =_sidata - ldr r3, [r3, r1] - str r3, [r0, r1] - adds r1, r1, #4 - -LoopCopyDataInit: - ldr r0, =_sdata - ldr r3, =_edata - adds r2, r0, r1 - cmp r2, r3 - bcc CopyDataInit - ldr r2, =_sbss - b LoopFillZerobss -/* Zero fill the bss segment. */ -FillZerobss: - movs r3, #0 - str r3, [r2], #4 - -LoopFillZerobss: - ldr r3, = _ebss - cmp r2, r3 - bcc FillZerobss - -/* Call the clock system intitialization function.*/ - bl SystemInit -/* Call static constructors */ - bl __libc_init_array -/* Call the application's entry point.*/ - bl main - bx lr -.size Reset_Handler, .-Reset_Handler - -/** - * @brief This is the code that gets called when the processor receives an - * unexpected interrupt. This simply enters an infinite loop, preserving - * the system state for examination by a debugger. - * @param None - * @retval None -*/ - .section .text.Default_Handler,"ax",%progbits -Default_Handler: -Infinite_Loop: - b Infinite_Loop - .size Default_Handler, .-Default_Handler -/****************************************************************************** -* -* The minimal vector table for a Cortex M3. Note that the proper constructs -* must be placed on this to ensure that it ends up at physical address -* 0x0000.0000. -* -*******************************************************************************/ - .section .isr_vector,"a",%progbits - .type g_pfnVectors, %object - .size g_pfnVectors, .-g_pfnVectors - - -g_pfnVectors: - .word _estack - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word MemManage_Handler - .word BusFault_Handler - .word UsageFault_Handler - .word 0 - .word 0 - .word 0 - .word 0 - .word SVC_Handler - .word DebugMon_Handler - .word 0 - .word PendSV_Handler - .word SysTick_Handler - - /* External Interrupts */ - .word WWDT_IRQHandler /* Window Watchdog Timer */ - .word PVM_IRQHandler /* PVM through EXINT Line detect */ - .word TAMPER_IRQHandler /* Tamper */ - .word ERTC_IRQHandler /* ERTC */ - .word FLASH_IRQHandler /* Flash */ - .word CRM_IRQHandler /* CRM */ - .word EXINT0_IRQHandler /* EXINT Line 0 */ - .word EXINT1_IRQHandler /* EXINT Line 1 */ - .word EXINT2_IRQHandler /* EXINT Line 2 */ - .word EXINT3_IRQHandler /* EXINT Line 3 */ - .word EXINT4_IRQHandler /* EXINT Line 4 */ - .word DMA1_Channel1_IRQHandler /* DMA1 Channel 1 */ - .word DMA1_Channel2_IRQHandler /* DMA1 Channel 2 */ - .word DMA1_Channel3_IRQHandler /* DMA1 Channel 3 */ - .word DMA1_Channel4_IRQHandler /* DMA1 Channel 4 */ - .word DMA1_Channel5_IRQHandler /* DMA1 Channel 5 */ - .word DMA1_Channel6_IRQHandler /* DMA1 Channel 6 */ - .word DMA1_Channel7_IRQHandler /* DMA1 Channel 7 */ - .word ADC1_IRQHandler /* ADC1 */ - .word CAN1_TX_IRQHandler /* CAN1 TX */ - .word CAN1_RX0_IRQHandler /* CAN1 RX0 */ - .word CAN1_RX1_IRQHandler /* CAN1 RX1 */ - .word CAN1_SE_IRQHandler /* CAN1 SE */ - .word EXINT9_5_IRQHandler /* EXINT Line [9:5] */ - .word TMR1_BRK_TMR9_IRQHandler /* TMR1 Brake and TMR9 */ - .word TMR1_OVF_TMR10_IRQHandler /* TMR1 overflow and TMR10 */ - .word TMR1_TRG_HALL_TMR11_IRQHandler /* TMR1 Trigger and hall and TMR11 */ - .word TMR1_CH_IRQHandler /* TMR1 channel */ - .word TMR2_GLOBAL_IRQHandler /* TMR2 */ - .word TMR3_GLOBAL_IRQHandler /* TMR3 */ - .word TMR4_GLOBAL_IRQHandler /* TMR4 */ - .word I2C1_EVT_IRQHandler /* I2C1 Event */ - .word I2C1_ERR_IRQHandler /* I2C1 Error */ - .word I2C2_EVT_IRQHandler /* I2C2 Event */ - .word I2C2_ERR_IRQHandler /* I2C2 Error */ - .word SPI1_IRQHandler /* SPI1 */ - .word SPI2_IRQHandler /* SPI2 */ - .word USART1_IRQHandler /* USART1 */ - .word USART2_IRQHandler /* USART2 */ - .word USART3_IRQHandler /* USART3 */ - .word EXINT15_10_IRQHandler /* EXINT Line [15:10] */ - .word ERTCAlarm_IRQHandler /* ERTC Alarm through EXINT Line */ - .word OTGFS1_WKUP_IRQHandler /* OTGFS1 Wakeup from suspend */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word SDIO1_IRQHandler /* SDIO1 */ - .word TMR5_GLOBAL_IRQHandler /* TMR5 */ - .word 0 /* Reserved */ - .word UART4_IRQHandler /* UART4 */ - .word UART5_IRQHandler /* UART5 */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word DMA2_Channel1_IRQHandler /* DMA2 Channel1 */ - .word DMA2_Channel2_IRQHandler /* DMA2 Channel2 */ - .word DMA2_Channel3_IRQHandler /* DMA2 Channel3 */ - .word DMA2_Channel4_5_IRQHandler /* DMA2 Channel4 & Channel5 */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word OTGFS1_IRQHandler /* OTGFS1 */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word CMP1_IRQHandler /* CMP1 */ - .word CMP2_IRQHandler /* CMP2 */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word DMA2_Channel6_7_IRQHandler /* DMA2 Channel6 & Channel7 */ - -/******************************************************************************* -* -* Provide weak aliases for each Exception handler to the Default_Handler. -* As they are weak aliases, any function with the same name will override -* this definition. -* -*******************************************************************************/ - .weak NMI_Handler - .thumb_set NMI_Handler,Default_Handler - - .weak HardFault_Handler - .thumb_set HardFault_Handler,Default_Handler - - .weak MemManage_Handler - .thumb_set MemManage_Handler,Default_Handler - - .weak BusFault_Handler - .thumb_set BusFault_Handler,Default_Handler - - .weak UsageFault_Handler - .thumb_set UsageFault_Handler,Default_Handler - - .weak SVC_Handler - .thumb_set SVC_Handler,Default_Handler - - .weak DebugMon_Handler - .thumb_set DebugMon_Handler,Default_Handler - - .weak PendSV_Handler - .thumb_set PendSV_Handler,Default_Handler - - .weak SysTick_Handler - .thumb_set SysTick_Handler,Default_Handler - - .weak WWDT_IRQHandler - .thumb_set WWDT_IRQHandler,Default_Handler - - .weak PVM_IRQHandler - .thumb_set PVM_IRQHandler,Default_Handler - - .weak TAMPER_IRQHandler - .thumb_set TAMPER_IRQHandler,Default_Handler - - .weak ERTC_IRQHandler - .thumb_set ERTC_IRQHandler,Default_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Default_Handler - - .weak CRM_IRQHandler - .thumb_set CRM_IRQHandler,Default_Handler - - .weak EXINT0_IRQHandler - .thumb_set EXINT0_IRQHandler,Default_Handler - - .weak EXINT1_IRQHandler - .thumb_set EXINT1_IRQHandler,Default_Handler - - .weak EXINT2_IRQHandler - .thumb_set EXINT2_IRQHandler,Default_Handler - - .weak EXINT3_IRQHandler - .thumb_set EXINT3_IRQHandler,Default_Handler - - .weak EXINT4_IRQHandler - .thumb_set EXINT4_IRQHandler,Default_Handler - - .weak DMA1_Channel1_IRQHandler - .thumb_set DMA1_Channel1_IRQHandler,Default_Handler - - .weak DMA1_Channel2_IRQHandler - .thumb_set DMA1_Channel2_IRQHandler,Default_Handler - - .weak DMA1_Channel3_IRQHandler - .thumb_set DMA1_Channel3_IRQHandler,Default_Handler - - .weak DMA1_Channel4_IRQHandler - .thumb_set DMA1_Channel4_IRQHandler,Default_Handler - - .weak DMA1_Channel5_IRQHandler - .thumb_set DMA1_Channel5_IRQHandler,Default_Handler - - .weak DMA1_Channel6_IRQHandler - .thumb_set DMA1_Channel6_IRQHandler,Default_Handler - - .weak DMA1_Channel7_IRQHandler - .thumb_set DMA1_Channel7_IRQHandler,Default_Handler - - .weak ADC1_IRQHandler - .thumb_set ADC1_IRQHandler,Default_Handler - - .weak CAN1_TX_IRQHandler - .thumb_set CAN1_TX_IRQHandler,Default_Handler - - .weak CAN1_RX0_IRQHandler - .thumb_set CAN1_RX0_IRQHandler,Default_Handler - - .weak CAN1_RX1_IRQHandler - .thumb_set CAN1_RX1_IRQHandler,Default_Handler - - .weak CAN1_SE_IRQHandler - .thumb_set CAN1_SE_IRQHandler,Default_Handler - - .weak EXINT9_5_IRQHandler - .thumb_set EXINT9_5_IRQHandler,Default_Handler - - .weak TMR1_BRK_TMR9_IRQHandler - .thumb_set TMR1_BRK_TMR9_IRQHandler,Default_Handler - - .weak TMR1_OVF_TMR10_IRQHandler - .thumb_set TMR1_OVF_TMR10_IRQHandler,Default_Handler - - .weak TMR1_TRG_HALL_TMR11_IRQHandler - .thumb_set TMR1_TRG_HALL_TMR11_IRQHandler,Default_Handler - - .weak TMR1_CH_IRQHandler - .thumb_set TMR1_CH_IRQHandler,Default_Handler - - .weak TMR2_GLOBAL_IRQHandler - .thumb_set TMR2_GLOBAL_IRQHandler,Default_Handler - - .weak TMR3_GLOBAL_IRQHandler - .thumb_set TMR3_GLOBAL_IRQHandler,Default_Handler - - .weak TMR4_GLOBAL_IRQHandler - .thumb_set TMR4_GLOBAL_IRQHandler,Default_Handler - - .weak I2C1_EVT_IRQHandler - .thumb_set I2C1_EVT_IRQHandler,Default_Handler - - .weak I2C1_ERR_IRQHandler - .thumb_set I2C1_ERR_IRQHandler,Default_Handler - - .weak I2C2_EVT_IRQHandler - .thumb_set I2C2_EVT_IRQHandler,Default_Handler - - .weak I2C2_ERR_IRQHandler - .thumb_set I2C2_ERR_IRQHandler,Default_Handler - - .weak SPI1_IRQHandler - .thumb_set SPI1_IRQHandler,Default_Handler - - .weak SPI2_IRQHandler - .thumb_set SPI2_IRQHandler,Default_Handler - - .weak USART1_IRQHandler - .thumb_set USART1_IRQHandler,Default_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Default_Handler - - .weak USART3_IRQHandler - .thumb_set USART3_IRQHandler,Default_Handler - - .weak EXINT15_10_IRQHandler - .thumb_set EXINT15_10_IRQHandler,Default_Handler - - .weak ERTCAlarm_IRQHandler - .thumb_set ERTCAlarm_IRQHandler,Default_Handler - - .weak OTGFS1_WKUP_IRQHandler - .thumb_set OTGFS1_WKUP_IRQHandler,Default_Handler - - .weak SDIO1_IRQHandler - .thumb_set SDIO1_IRQHandler,Default_Handler - - .weak TMR5_GLOBAL_IRQHandler - .thumb_set TMR5_GLOBAL_IRQHandler,Default_Handler - - .weak UART4_IRQHandler - .thumb_set UART4_IRQHandler,Default_Handler - - .weak UART5_IRQHandler - .thumb_set UART5_IRQHandler,Default_Handler - - .weak DMA2_Channel1_IRQHandler - .thumb_set DMA2_Channel1_IRQHandler,Default_Handler - - .weak DMA2_Channel2_IRQHandler - .thumb_set DMA2_Channel2_IRQHandler,Default_Handler - - .weak DMA2_Channel3_IRQHandler - .thumb_set DMA2_Channel3_IRQHandler,Default_Handler - - .weak DMA2_Channel4_5_IRQHandler - .thumb_set DMA2_Channel4_5_IRQHandler,Default_Handler - - .weak OTGFS1_IRQHandler - .thumb_set OTGFS1_IRQHandler,Default_Handler - - .weak CMP1_IRQHandler - .thumb_set CMP1_IRQHandler,Default_Handler - - .weak CMP2_IRQHandler - .thumb_set CMP2_IRQHandler,Default_Handler - - .weak DMA2_Channel6_7_IRQHandler - .thumb_set DMA2_Channel6_7_IRQHandler,Default_Handler diff --git a/Mcu/f421/AT32F421x6_FLASH.ld b/Mcu/f421/AT32F421x6_FLASH.ld deleted file mode 100644 index f8c07c8d..00000000 --- a/Mcu/f421/AT32F421x6_FLASH.ld +++ /dev/null @@ -1,171 +0,0 @@ -/* -***************************************************************************** -** -** File : AT32F421x6_FLASH.ld -** -** Abstract : Linker script for AT32F421x6 Device with -** 32KByte FLASH, 16KByte RAM -** -** Set heap size, stack size and stack location according -** to application requirements. -** -** Set memory bank area and size if external memory is used. -** -** -** Environment : Arm gcc toolchain -** -***************************************************************************** -*/ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = 0x20004000; /* end of RAM */ - -/* Generate a link error if heap and stack don't fit into RAM */ -_Min_Heap_Size = 0x200; /* required amount of heap */ -_Min_Stack_Size = 0x400; /* required amount of stack */ - -/* Specify the memory areas */ -MEMORY -{ -FLASH (rx) : ORIGIN = 0x08001000, LENGTH = 27K -FLASH_VERSION (rx) : ORIGIN = 0x08007C00 - 48, LENGTH = 14 -FILE_NAME (rx) : ORIGIN = 0x08007C00 - 32, LENGTH = 32 -EEPROM (rx) : ORIGIN = 0x08007C00, LENGTH = 1K -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 16K - -} - -/* Define output sections */ -SECTIONS -{ - /* The startup code goes first into FLASH */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH - - /* The program code and other data goes into FLASH */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data goes into FLASH */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH - .ARM : { - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - } >FLASH - - .preinit_array : - { - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - } >FLASH - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - } >FLASH - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - } >FLASH - - .firmware_version : - { - . = ALIGN(4); - KEEP (*(.firmware_info)) - } >FLASH_VERSION - - /* The file name */ - .file_name : - { - . = ALIGN(4); - KEEP (*(.file_name)) - } >FILE_NAME - - - /* used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections goes into RAM, load LMA copy after code */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - } >RAM AT> FLASH - - /* Uninitialized data section */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss secion */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough RAM left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the standard libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/Mcu/f421/Startup/startup_at32f421.s b/Mcu/f421/Startup/startup_at32f421.s deleted file mode 100644 index 0fa1e18c..00000000 --- a/Mcu/f421/Startup/startup_at32f421.s +++ /dev/null @@ -1,287 +0,0 @@ -/** - ****************************************************************************** - * @file startup_at32f421.s - * @version v2.0.8 - * @date 2022-08-16 - * @brief at32f421xx devices vector table for gcc toolchain. - * this module performs: - * - set the initial sp - * - set the initial pc == reset_handler, - * - set the vector table entries with the exceptions isr address - * - configure the clock system and the external sram to - * be used as data memory (optional, to be enabled by user) - * - branches to main in the c library (which eventually - * calls main()). - * after reset the cortex-m4 processor is in thread mode, - * priority is privileged, and the stack is set to main. - ****************************************************************************** - */ - - .syntax unified - .cpu cortex-m4 - .fpu softvfp - .thumb - -.global g_pfnVectors -.global Default_Handler - -/* start address for the initialization values of the .data section. -defined in linker script */ -.word _sidata -/* start address for the .data section. defined in linker script */ -.word _sdata -/* end address for the .data section. defined in linker script */ -.word _edata -/* start address for the .bss section. defined in linker script */ -.word _sbss -/* end address for the .bss section. defined in linker script */ -.word _ebss -/* stack used for SystemInit_ExtMemCtl; always internal RAM used */ - -/** - * @brief This is the code that gets called when the processor first - * starts execution following a reset event. Only the absolutely - * necessary set is performed, after which the application - * supplied main() routine is called. - * @param None - * @retval None -*/ - - .section .text.Reset_Handler - .weak Reset_Handler - .type Reset_Handler, %function -Reset_Handler: - -/* Copy the data segment initializers from flash to SRAM */ - movs r1, #0 - b LoopCopyDataInit - -CopyDataInit: - ldr r3, =_sidata - ldr r3, [r3, r1] - str r3, [r0, r1] - adds r1, r1, #4 - -LoopCopyDataInit: - ldr r0, =_sdata - ldr r3, =_edata - adds r2, r0, r1 - cmp r2, r3 - bcc CopyDataInit - ldr r2, =_sbss - b LoopFillZerobss -/* Zero fill the bss segment. */ -FillZerobss: - movs r3, #0 - str r3, [r2], #4 - -LoopFillZerobss: - ldr r3, = _ebss - cmp r2, r3 - bcc FillZerobss - -/* Call the clock system intitialization function.*/ - bl SystemInit -/* Call static constructors */ - bl __libc_init_array -/* Call the applications entry point.*/ - bl main - bx lr -.size Reset_Handler, .-Reset_Handler - -/** - * @brief This is the code that gets called when the processor receives an - * unexpected interrupt. This simply enters an infinite loop, preserving - * the system state for examination by a debugger. - * @param None - * @retval None -*/ - .section .text.Default_Handler,"ax",%progbits -Default_Handler: -Infinite_Loop: - b Infinite_Loop - .size Default_Handler, .-Default_Handler -/****************************************************************************** -* -* The minimal vector table for a Cortex M3. Note that the proper constructs -* must be placed on this to ensure that it ends up at physical address -* 0x0000.0000. -* -*******************************************************************************/ - .section .isr_vector,"a",%progbits - .type g_pfnVectors, %object - .size g_pfnVectors, .-g_pfnVectors - - -g_pfnVectors: - .word _estack - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word MemManage_Handler - .word BusFault_Handler - .word UsageFault_Handler - .word 0 - .word 0 - .word 0 - .word 0 - .word SVC_Handler - .word DebugMon_Handler - .word 0 - .word PendSV_Handler - .word SysTick_Handler - - /* External Interrupts */ - .word WWDT_IRQHandler /* Window Watchdog Timer */ - .word PVM_IRQHandler /* PVM through EXINT Line detect */ - .word ERTC_IRQHandler /* ERTC */ - .word FLASH_IRQHandler /* Flash */ - .word CRM_IRQHandler /* CRM */ - .word EXINT1_0_IRQHandler /* EXINT Line 1 & 0 */ - .word EXINT3_2_IRQHandler /* EXINT Line 3 & 2 */ - .word EXINT15_4_IRQHandler /* EXINT Line 15 ~ 4 */ - .word 0 /* Reserved */ - .word DMA1_Channel1_IRQHandler /* DMA1 Channel 1 */ - .word DMA1_Channel3_2_IRQHandler /* DMA1 Channel 3 & 2 */ - .word DMA1_Channel5_4_IRQHandler /* DMA1 Channel 5 & 4 */ - .word ADC1_CMP_IRQHandler /* ADC1 & Comparator */ - .word TMR1_BRK_OVF_TRG_HALL_IRQHandler /* TMR1 brake overflow trigger and hall */ - .word TMR1_CH_IRQHandler /* TMR1 channel */ - .word 0 /* Reserved */ - .word TMR3_GLOBAL_IRQHandler /* TMR3 */ - .word TMR6_GLOBAL_IRQHandler /* TMR6 */ - .word 0 /* Reserved */ - .word TMR14_GLOBAL_IRQHandler /* TMR14 */ - .word TMR15_GLOBAL_IRQHandler /* TMR15 */ - .word TMR16_GLOBAL_IRQHandler /* TMR16 */ - .word TMR17_GLOBAL_IRQHandler /* TMR17 */ - .word I2C1_EVT_IRQHandler /* I2C1 Event */ - .word I2C2_EVT_IRQHandler /* I2C2 Event */ - .word SPI1_IRQHandler /* SPI1 */ - .word SPI2_IRQHandler /* SPI2 */ - .word USART1_IRQHandler /* USART1 */ - .word USART2_IRQHandler /* USART2 */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word 0 /* Reserved */ - .word I2C1_ERR_IRQHandler /* I2C1 Error */ - .word 0 /* Reserved */ - .word I2C2_ERR_IRQHandler /* I2C2 Error */ - -/******************************************************************************* -* -* Provide weak aliases for each Exception handler to the Default_Handler. -* As they are weak aliases, any function with the same name will override -* this definition. -* -*******************************************************************************/ - .weak NMI_Handler - .thumb_set NMI_Handler,Default_Handler - - .weak HardFault_Handler - .thumb_set HardFault_Handler,Default_Handler - - .weak MemManage_Handler - .thumb_set MemManage_Handler,Default_Handler - - .weak BusFault_Handler - .thumb_set BusFault_Handler,Default_Handler - - .weak UsageFault_Handler - .thumb_set UsageFault_Handler,Default_Handler - - .weak SVC_Handler - .thumb_set SVC_Handler,Default_Handler - - .weak DebugMon_Handler - .thumb_set DebugMon_Handler,Default_Handler - - .weak PendSV_Handler - .thumb_set PendSV_Handler,Default_Handler - - .weak SysTick_Handler - .thumb_set SysTick_Handler,Default_Handler - - .weak WWDT_IRQHandler - .thumb_set WWDT_IRQHandler,Default_Handler - - .weak PVM_IRQHandler - .thumb_set PVM_IRQHandler,Default_Handler - - .weak ERTC_IRQHandler - .thumb_set ERTC_IRQHandler,Default_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Default_Handler - - .weak CRM_IRQHandler - .thumb_set CRM_IRQHandler,Default_Handler - - .weak EXINT1_0_IRQHandler - .thumb_set EXINT1_0_IRQHandler,Default_Handler - - .weak EXINT3_2_IRQHandler - .thumb_set EXINT3_2_IRQHandler,Default_Handler - - .weak EXINT15_4_IRQHandler - .thumb_set EXINT15_4_IRQHandler,Default_Handler - - .weak DMA1_Channel1_IRQHandler - .thumb_set DMA1_Channel1_IRQHandler,Default_Handler - - .weak DMA1_Channel3_2_IRQHandler - .thumb_set DMA1_Channel3_2_IRQHandler,Default_Handler - - .weak DMA1_Channel5_4_IRQHandler - .thumb_set DMA1_Channel5_4_IRQHandler,Default_Handler - - .weak ADC1_CMP_IRQHandler - .thumb_set ADC1_CMP_IRQHandler,Default_Handler - - .weak TMR1_BRK_OVF_TRG_HALL_IRQHandler - .thumb_set TMR1_BRK_OVF_TRG_HALL_IRQHandler,Default_Handler - - .weak TMR1_CH_IRQHandler - .thumb_set TMR1_CH_IRQHandler,Default_Handler - - .weak TMR3_GLOBAL_IRQHandler - .thumb_set TMR3_GLOBAL_IRQHandler,Default_Handler - - .weak TMR6_GLOBAL_IRQHandler - .thumb_set TMR6_GLOBAL_IRQHandler,Default_Handler - - .weak TMR14_GLOBAL_IRQHandler - .thumb_set TMR14_GLOBAL_IRQHandler,Default_Handler - - .weak TMR15_GLOBAL_IRQHandler - .thumb_set TMR15_GLOBAL_IRQHandler,Default_Handler - - .weak TMR16_GLOBAL_IRQHandler - .thumb_set TMR16_GLOBAL_IRQHandler,Default_Handler - - .weak TMR17_GLOBAL_IRQHandler - .thumb_set TMR17_GLOBAL_IRQHandler,Default_Handler - - .weak I2C1_EVT_IRQHandler - .thumb_set I2C1_EVT_IRQHandler,Default_Handler - - .weak I2C2_EVT_IRQHandler - .thumb_set I2C2_EVT_IRQHandler,Default_Handler - - .weak SPI1_IRQHandler - .thumb_set SPI1_IRQHandler,Default_Handler - - .weak SPI2_IRQHandler - .thumb_set SPI2_IRQHandler,Default_Handler - - .weak USART1_IRQHandler - .thumb_set USART1_IRQHandler,Default_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Default_Handler - - .weak I2C1_ERR_IRQHandler - .thumb_set I2C1_ERR_IRQHandler,Default_Handler - - .weak I2C2_ERR_IRQHandler - .thumb_set I2C2_ERR_IRQHandler,Default_Handler diff --git a/Mcu/g071/STM32G071GBUX_FLASH.ld b/Mcu/g071/STM32G071GBUX_FLASH.ld deleted file mode 100644 index a995fdf2..00000000 --- a/Mcu/g071/STM32G071GBUX_FLASH.ld +++ /dev/null @@ -1,196 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32G071GBUx Device from STM32G0 series - * 128Kbytes FLASH - * 36Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200 ; /* required amount of heap */ -_Min_Stack_Size = 0x400 ; /* required amount of stack */ - -/* Memories definition */ - - - -MEMORY -{ - RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 36K - FLASH_VECTAB (rx) : ORIGIN = 0x08001000, LENGTH = 192 - FLASH_VERSION (rx) : ORIGIN = 0x080010C0, LENGTH = 14 - FLASH (rx) : ORIGIN = ORIGIN(FLASH_VERSION) + LENGTH(FLASH_VERSION), LENGTH = 62K - 32 - (LENGTH(FLASH_VECTAB) + LENGTH(FLASH_VERSION)) - FILE_NAME (rx) : ORIGIN = 0x0800F800 - 32, LENGTH = 32 - EEPROM (rx) : ORIGIN = 0x0800F800, LENGTH = 2K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH_VECTAB - - /* The firmware version and name - at a fixed address to make it possible to read it from firmware files. */ - .firmware_version : - { - . = ALIGN(4); - KEEP (*(.firmware_info)) - } >FLASH_VERSION - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* The file name */ - .file_name : - { - . = ALIGN(4); - KEEP (*(.file_name)) - } >FILE_NAME - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/Mcu/g071/Startup/startup_stm32g071gbux.s b/Mcu/g071/Startup/startup_stm32g071gbux.s deleted file mode 100644 index fd4532f7..00000000 --- a/Mcu/g071/Startup/startup_stm32g071gbux.s +++ /dev/null @@ -1,288 +0,0 @@ -/** - ****************************************************************************** - * @file startup_stm32g071xx.s - * @author MCD Application Team - * @brief STM32G071xx devices vector table for SW4STM32 toolchain. - * This module performs: - * - Set the initial SP - * - Set the initial PC == Reset_Handler, - * - Set the vector table entries with the exceptions ISR address - * - Branches to main in the C library (which eventually - * calls main()). - * After Reset the Cortex-M0+ processor is in Thread mode, - * priority is Privileged, and the Stack is set to Main. - ****************************************************************************** - * @attention - * - * Copyright (c) 2018 STMicroelectronics. All rights reserved. - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - - .syntax unified - .cpu cortex-m0 - .fpu softvfp - .thumb - -.global g_pfnVectors -.global Default_Handler - -/* start address for the initialization values of the .data section. -defined in linker script */ -.word _sidata -/* start address for the .data section. defined in linker script */ -.word _sdata -/* end address for the .data section. defined in linker script */ -.word _edata -/* start address for the .bss section. defined in linker script */ -.word _sbss -/* end address for the .bss section. defined in linker script */ -.word _ebss - - .section .text.Reset_Handler - .weak Reset_Handler - .type Reset_Handler, %function -Reset_Handler: - ldr r0, =_estack - mov sp, r0 /* set stack pointer */ - -/* Copy the data segment initializers from flash to SRAM */ - movs r1, #0 - b LoopCopyDataInit - -CopyDataInit: - ldr r3, =_sidata - ldr r3, [r3, r1] - str r3, [r0, r1] - adds r1, r1, #4 - -LoopCopyDataInit: - ldr r0, =_sdata - ldr r3, =_edata - adds r2, r0, r1 - cmp r2, r3 - bcc CopyDataInit - ldr r2, =_sbss - b LoopFillZerobss -/* Zero fill the bss segment. */ -FillZerobss: - movs r3, #0 - str r3, [r2] - adds r2, r2, #4 - - -LoopFillZerobss: - ldr r3, = _ebss - cmp r2, r3 - bcc FillZerobss - -/* Call the clock system intitialization function.*/ - bl SystemInit -/* Call static constructors */ - bl __libc_init_array -/* Call the application's entry point.*/ - bl main - -LoopForever: - b LoopForever - - -.size Reset_Handler, .-Reset_Handler - -/** - * @brief This is the code that gets called when the processor receives an - * unexpected interrupt. This simply enters an infinite loop, preserving - * the system state for examination by a debugger. - * - * @param None - * @retval : None -*/ - .section .text.Default_Handler,"ax",%progbits -Default_Handler: -Infinite_Loop: - b Infinite_Loop - .size Default_Handler, .-Default_Handler -/****************************************************************************** -* -* The minimal vector table for a Cortex M0. Note that the proper constructs -* must be placed on this to ensure that it ends up at physical address -* 0x0000.0000. -* -******************************************************************************/ - .section .isr_vector,"a",%progbits - .type g_pfnVectors, %object - .size g_pfnVectors, .-g_pfnVectors - - -g_pfnVectors: - .word _estack - .word Reset_Handler - .word NMI_Handler - .word HardFault_Handler - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word SVC_Handler - .word 0 - .word 0 - .word PendSV_Handler - .word SysTick_Handler - .word WWDG_IRQHandler /* Window WatchDog */ - .word PVD_IRQHandler /* PVD through EXTI Line detect */ - .word RTC_TAMP_IRQHandler /* RTC through the EXTI line */ - .word FLASH_IRQHandler /* FLASH */ - .word RCC_IRQHandler /* RCC */ - .word EXTI0_1_IRQHandler /* EXTI Line 0 and 1 */ - .word EXTI2_3_IRQHandler /* EXTI Line 2 and 3 */ - .word EXTI4_15_IRQHandler /* EXTI Line 4 to 15 */ - .word UCPD1_2_IRQHandler /* UCPD1, UCPD2 */ - .word DMA1_Channel1_IRQHandler /* DMA1 Channel 1 */ - .word DMA1_Channel2_3_IRQHandler /* DMA1 Channel 2 and Channel 3 */ - .word DMA1_Ch4_7_DMAMUX1_OVR_IRQHandler /* DMA1 Channel 4 to Channel 7, DMAMUX1 overrun */ - .word ADC1_COMP_IRQHandler /* ADC1, COMP1 and COMP2 */ - .word TIM1_BRK_UP_TRG_COM_IRQHandler /* TIM1 Break, Update, Trigger and Commutation */ - .word TIM1_CC_IRQHandler /* TIM1 Capture Compare */ - .word TIM2_IRQHandler /* TIM2 */ - .word TIM3_IRQHandler /* TIM3 */ - .word TIM6_DAC_LPTIM1_IRQHandler /* TIM6, DAC and LPTIM1 */ - .word TIM7_LPTIM2_IRQHandler /* TIM7 and LPTIM2 */ - .word TIM14_IRQHandler /* TIM14 */ - .word TIM15_IRQHandler /* TIM15 */ - .word TIM16_IRQHandler /* TIM16 */ - .word TIM17_IRQHandler /* TIM17 */ - .word I2C1_IRQHandler /* I2C1 */ - .word I2C2_IRQHandler /* I2C2 */ - .word SPI1_IRQHandler /* SPI1 */ - .word SPI2_IRQHandler /* SPI2 */ - .word USART1_IRQHandler /* USART1 */ - .word USART2_IRQHandler /* USART2 */ - .word USART3_4_LPUART1_IRQHandler /* USART3, USART4 and LPUART1 */ - .word CEC_IRQHandler /* CEC */ - -/******************************************************************************* -* -* Provide weak aliases for each Exception handler to the Default_Handler. -* As they are weak aliases, any function with the same name will override -* this definition. -* -*******************************************************************************/ - - .weak NMI_Handler - .thumb_set NMI_Handler,Default_Handler - - .weak HardFault_Handler - .thumb_set HardFault_Handler,Default_Handler - - .weak SVC_Handler - .thumb_set SVC_Handler,Default_Handler - - .weak PendSV_Handler - .thumb_set PendSV_Handler,Default_Handler - - .weak SysTick_Handler - .thumb_set SysTick_Handler,Default_Handler - - .weak WWDG_IRQHandler - .thumb_set WWDG_IRQHandler,Default_Handler - - .weak PVD_IRQHandler - .thumb_set PVD_IRQHandler,Default_Handler - - .weak RTC_TAMP_IRQHandler - .thumb_set RTC_TAMP_IRQHandler,Default_Handler - - .weak FLASH_IRQHandler - .thumb_set FLASH_IRQHandler,Default_Handler - - .weak RCC_IRQHandler - .thumb_set RCC_IRQHandler,Default_Handler - - .weak EXTI0_1_IRQHandler - .thumb_set EXTI0_1_IRQHandler,Default_Handler - - .weak EXTI2_3_IRQHandler - .thumb_set EXTI2_3_IRQHandler,Default_Handler - - .weak EXTI4_15_IRQHandler - .thumb_set EXTI4_15_IRQHandler,Default_Handler - - .weak UCPD1_2_IRQHandler - .thumb_set UCPD1_2_IRQHandler,Default_Handler - - .weak DMA1_Channel1_IRQHandler - .thumb_set DMA1_Channel1_IRQHandler,Default_Handler - - .weak DMA1_Channel2_3_IRQHandler - .thumb_set DMA1_Channel2_3_IRQHandler,Default_Handler - - .weak DMA1_Ch4_7_DMAMUX1_OVR_IRQHandler - .thumb_set DMA1_Ch4_7_DMAMUX1_OVR_IRQHandler,Default_Handler - - .weak ADC1_COMP_IRQHandler - .thumb_set ADC1_COMP_IRQHandler,Default_Handler - - .weak TIM1_BRK_UP_TRG_COM_IRQHandler - .thumb_set TIM1_BRK_UP_TRG_COM_IRQHandler,Default_Handler - - .weak TIM1_CC_IRQHandler - .thumb_set TIM1_CC_IRQHandler,Default_Handler - - .weak TIM2_IRQHandler - .thumb_set TIM2_IRQHandler,Default_Handler - - .weak TIM3_IRQHandler - .thumb_set TIM3_IRQHandler,Default_Handler - - .weak TIM6_DAC_LPTIM1_IRQHandler - .thumb_set TIM6_DAC_LPTIM1_IRQHandler,Default_Handler - - .weak TIM7_LPTIM2_IRQHandler - .thumb_set TIM7_LPTIM2_IRQHandler,Default_Handler - - .weak TIM14_IRQHandler - .thumb_set TIM14_IRQHandler,Default_Handler - - .weak TIM15_IRQHandler - .thumb_set TIM15_IRQHandler,Default_Handler - - .weak TIM16_IRQHandler - .thumb_set TIM16_IRQHandler,Default_Handler - - .weak TIM17_IRQHandler - .thumb_set TIM17_IRQHandler,Default_Handler - - .weak I2C1_IRQHandler - .thumb_set I2C1_IRQHandler,Default_Handler - - .weak I2C2_IRQHandler - .thumb_set I2C2_IRQHandler,Default_Handler - - .weak SPI1_IRQHandler - .thumb_set SPI1_IRQHandler,Default_Handler - - .weak SPI2_IRQHandler - .thumb_set SPI2_IRQHandler,Default_Handler - - .weak USART1_IRQHandler - .thumb_set USART1_IRQHandler,Default_Handler - - .weak USART2_IRQHandler - .thumb_set USART2_IRQHandler,Default_Handler - - .weak USART3_4_LPUART1_IRQHandler - .thumb_set USART3_4_LPUART1_IRQHandler,Default_Handler - - .weak CEC_IRQHandler - .thumb_set CEC_IRQHandler,Default_Handler - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ - diff --git a/STM32F051K6TX_FLASH.ld b/STM32F051K6TX_FLASH.ld deleted file mode 100644 index 15d654b0..00000000 --- a/STM32F051K6TX_FLASH.ld +++ /dev/null @@ -1,187 +0,0 @@ -/** - ****************************************************************************** - * @file LinkerScript.ld - * @author Auto-generated by STM32CubeIDE - * @brief Linker script for STM32F051K6Tx Device from STM32F0 series - * 32Kbytes FLASH - * 8Kbytes RAM - * - * Set heap size, stack size and stack location according - * to application requirements. - * - * Set memory bank area and size if external memory is used - ****************************************************************************** - * @attention - * - *

© Copyright (c) 2020 STMicroelectronics. - * All rights reserved.

- * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ****************************************************************************** - */ - -/* Entry Point */ -ENTRY(Reset_Handler) - -/* Highest address of the user mode stack */ -_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */ - -_Min_Heap_Size = 0x200 ; /* required amount of heap */ -_Min_Stack_Size = 0x400 ; /* required amount of stack */ - -/* Memories definition */ - -MEMORY -{ - SRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 192 - RAM (xrw) : ORIGIN = 0x200000C0, LENGTH = 8K - 192 - FLASH_VECTAB (rx) : ORIGIN = 0x08001000, LENGTH = 192 - FLASH_VERSION (rx) : ORIGIN = 0x080010C0, LENGTH = 14 - FLASH (rx) : ORIGIN = ORIGIN(FLASH_VERSION) + LENGTH(FLASH_VERSION), LENGTH = 27K - (LENGTH(FLASH_VECTAB) + LENGTH(FLASH_VERSION)) - EEPROM (rx) : ORIGIN = 0x080007C00, LENGTH = 1K -} - -/* Sections */ -SECTIONS -{ - /* The startup code into "FLASH" Rom type memory */ - .isr_vector : - { - . = ALIGN(4); - KEEP(*(.isr_vector)) /* Startup code */ - . = ALIGN(4); - } >FLASH_VECTAB - - /* The firmware version and name - at a fixed address to make it possible to read it from firmware files. */ - .firmware_version : - { - . = ALIGN(4); - KEEP (*(.firmware_info)) - } >FLASH_VERSION - - /* The program code and other data into "FLASH" Rom type memory */ - .text : - { - . = ALIGN(4); - *(.text) /* .text sections (code) */ - *(.text*) /* .text* sections (code) */ - *(.glue_7) /* glue arm to thumb code */ - *(.glue_7t) /* glue thumb to arm code */ - *(.eh_frame) - - KEEP (*(.init)) - KEEP (*(.fini)) - - . = ALIGN(4); - _etext = .; /* define a global symbols at end of code */ - } >FLASH - - /* Constant data into "FLASH" Rom type memory */ - .rodata : - { - . = ALIGN(4); - *(.rodata) /* .rodata sections (constants, strings, etc.) */ - *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ - . = ALIGN(4); - } >FLASH - - .ARM.extab : { - . = ALIGN(4); - *(.ARM.extab* .gnu.linkonce.armextab.*) - . = ALIGN(4); - } >FLASH - - .ARM : { - . = ALIGN(4); - __exidx_start = .; - *(.ARM.exidx*) - __exidx_end = .; - . = ALIGN(4); - } >FLASH - - .preinit_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array*)) - PROVIDE_HIDDEN (__preinit_array_end = .); - . = ALIGN(4); - } >FLASH - - .init_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT(.init_array.*))) - KEEP (*(.init_array*)) - PROVIDE_HIDDEN (__init_array_end = .); - . = ALIGN(4); - } >FLASH - - .fini_array : - { - . = ALIGN(4); - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT(.fini_array.*))) - KEEP (*(.fini_array*)) - PROVIDE_HIDDEN (__fini_array_end = .); - . = ALIGN(4); - } >FLASH - - /* Used by the startup to initialize data */ - _sidata = LOADADDR(.data); - - /* Initialized data sections into "RAM" Ram type memory */ - .data : - { - . = ALIGN(4); - _sdata = .; /* create a global symbol at data start */ - *(.data) /* .data sections */ - *(.data*) /* .data* sections */ - - . = ALIGN(4); - _edata = .; /* define a global symbol at data end */ - - } >RAM AT> FLASH - - /* Uninitialized data section into "RAM" Ram type memory */ - . = ALIGN(4); - .bss : - { - /* This is used by the startup in order to initialize the .bss section */ - _sbss = .; /* define a global symbol at bss start */ - __bss_start__ = _sbss; - *(.bss) - *(.bss*) - *(COMMON) - - . = ALIGN(4); - _ebss = .; /* define a global symbol at bss end */ - __bss_end__ = _ebss; - } >RAM - - /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ - ._user_heap_stack : - { - . = ALIGN(8); - PROVIDE ( end = . ); - PROVIDE ( _end = . ); - . = . + _Min_Heap_Size; - . = . + _Min_Stack_Size; - . = ALIGN(8); - } >RAM - - /* Remove information from the compiler libraries */ - /DISCARD/ : - { - libc.a ( * ) - libm.a ( * ) - libgcc.a ( * ) - } - - .ARM.attributes 0 : { *(.ARM.attributes) } -} diff --git a/e230makefile.mk b/e230makefile.mk deleted file mode 100644 index 32e8db55..00000000 --- a/e230makefile.mk +++ /dev/null @@ -1,28 +0,0 @@ - -TARGETS_E230 := GD32DEV_A_E230\ - - -HAL_FOLDER_E230 := $(HAL_FOLDER)/e230 - -MCU_E230 := -mcpu=cortex-m23 -mthumb -fsigned-char -LDSCRIPT_E230 := $(HAL_FOLDER_E230)/GD32E230K8_FLASH.ld - -SRC_DIR_E230 := \ - $(HAL_FOLDER_E230)/Src \ - $(HAL_FOLDER_E230)/Drivers/CMSIS/Source\ - $(HAL_FOLDER_E230)/Drivers/GD32E23x_standard_peripheral/Source \ - $(HAL_FOLDER_E230)/Startup - -CFLAGS_E230 += \ - -I$(HAL_FOLDER_E230)/Inc \ - -I$(HAL_FOLDER_E230)/Drivers/CMSIS/Include \ - -I$(HAL_FOLDER_E230)/Drivers/CMSIS/Core/Include \ - -I$(HAL_FOLDER_E230)/Drivers/GD32E23x_standard_peripheral/Include - -CFLAGS_E230 += \ - -DGD32E230 \ - -DGD32E23x \ - -DUSE_STDPERIPH_DRIVER - - -SRC_E230 := $(foreach dir,$(SRC_DIR_E230),$(wildcard $(dir)/*.[cs])) diff --git a/f031makefile.mk b/f031makefile.mk deleted file mode 100644 index 5ea76ef5..00000000 --- a/f031makefile.mk +++ /dev/null @@ -1,34 +0,0 @@ - -TARGETS_F031 := REF_F031 \ - -HAL_FOLDER_F031 := $(HAL_FOLDER)/f031 - -MCU_F031 := -mcpu=cortex-m0 -mthumb -LDSCRIPT_F031 := $(HAL_FOLDER_F031)/STM32F031C6TX_FLASH.ld - -SRC_DIR_F031 += \ - $(HAL_FOLDER_F031)/Startup \ - $(HAL_FOLDER_F031)/Src \ - $(HAL_FOLDER_F031)/Drivers/STM32F0xx_HAL_Driver/Src - -CFLAGS_F031 := \ - -I$(HAL_FOLDER_F031)/Inc \ - -I$(HAL_FOLDER_F031)/Drivers/STM32F0xx_HAL_Driver/Inc \ - -I$(HAL_FOLDER_F031)/Drivers/CMSIS/Include \ - -I$(HAL_FOLDER_F031)/Drivers/CMSIS/Device/ST/STM32F0xx/Include - -CFLAGS_F031 += \ - -DHSE_VALUE=8000000 \ - -DSTM32F031x6 \ - -DHSE_STARTUP_TIMEOUT=100 \ - -DLSE_STARTUP_TIMEOUT=5000 \ - -DLSE_VALUE=32768 \ - -DDATA_CACHE_ENABLE=0 \ - -DINSTRUCTION_CACHE_ENABLE=0 \ - -DVDD_VALUE=3300 \ - -DLSI_VALUE=40000 \ - -DHSI_VALUE=8000000 \ - -DUSE_FULL_LL_DRIVER \ - -DPREFETCH_ENABLE=1 - -SRC_F031 := $(foreach dir,$(SRC_DIR_F031),$(wildcard $(dir)/*.[cs])) diff --git a/f051_ll_bi_dir Debug.launch b/f051_ll_bi_dir Debug.launch deleted file mode 100644 index df14d08f..00000000 --- a/f051_ll_bi_dir Debug.launch +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/f051_ll_bi_dir.ioc b/f051_ll_bi_dir.ioc deleted file mode 100644 index defe7c36..00000000 --- a/f051_ll_bi_dir.ioc +++ /dev/null @@ -1,247 +0,0 @@ -#MicroXplorer Configuration settings - do not modify -ADC.ClockPrescaler=ADC_CLOCK_ASYNC_DIV1 -ADC.ContinuousConvMode=DISABLE -ADC.DMAContinuousRequests=DISABLE -ADC.DataAlign=ADC_DATAALIGN_RIGHT -ADC.DiscontinuousConvMode=ENABLE -ADC.EOCSelection=ADC_EOC_SEQ_CONV -ADC.EnableAnalogWatchDog=false -ADC.ExternalTrigConv=ADC_SOFTWARE_START -ADC.ExternalTrigConvEdge=ADC_EXTERNALTRIGCONVEDGE_NONE -ADC.IPParameters=ClockPrescaler,Resolution,DataAlign,ScanConvMode,ContinuousConvMode,DiscontinuousConvMode,DMAContinuousRequests,EOCSelection,Overrun,LowPowerAutoWait,LowPowerAutoPowerOff,SamplingTime,ExternalTrigConv,ExternalTrigConvEdge,EnableAnalogWatchDog -ADC.LowPowerAutoPowerOff=DISABLE -ADC.LowPowerAutoWait=DISABLE -ADC.Overrun=ADC_OVR_DATA_PRESERVED -ADC.Resolution=ADC_RESOLUTION_12B -ADC.SamplingTime=ADC_SAMPLETIME_239CYCLES_5 -ADC.ScanConvMode=ADC_SCAN_DIRECTION_FORWARD -COMP1.Hysteresis=COMP_HYSTERESIS_NONE -COMP1.IPParameters=TriggerMode,Hysteresis -COMP1.TriggerMode=COMP_TRIGGERMODE_IT_RISING_FALLING -Dma.Request0=USART1_RX -Dma.Request1=USART1_TX -Dma.RequestsNb=2 -Dma.USART1_RX.0.Direction=DMA_PERIPH_TO_MEMORY -Dma.USART1_RX.0.Instance=DMA1_Channel3 -Dma.USART1_RX.0.MemDataAlignment=DMA_MDATAALIGN_BYTE -Dma.USART1_RX.0.MemInc=DMA_MINC_ENABLE -Dma.USART1_RX.0.Mode=DMA_NORMAL -Dma.USART1_RX.0.PeriphDataAlignment=DMA_PDATAALIGN_BYTE -Dma.USART1_RX.0.PeriphInc=DMA_PINC_DISABLE -Dma.USART1_RX.0.Priority=DMA_PRIORITY_LOW -Dma.USART1_RX.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority -Dma.USART1_TX.1.Direction=DMA_MEMORY_TO_PERIPH -Dma.USART1_TX.1.Instance=DMA1_Channel4 -Dma.USART1_TX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE -Dma.USART1_TX.1.MemInc=DMA_MINC_ENABLE -Dma.USART1_TX.1.Mode=DMA_NORMAL -Dma.USART1_TX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE -Dma.USART1_TX.1.PeriphInc=DMA_PINC_DISABLE -Dma.USART1_TX.1.Priority=DMA_PRIORITY_LOW -Dma.USART1_TX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority -File.Version=6 -IWDG.IPParameters=Window,Prescaler,Reload -IWDG.Prescaler=IWDG_PRESCALER_16 -IWDG.Reload=4000 -IWDG.Window=4095 -KeepUserPlacement=false -Mcu.Family=STM32F0 -Mcu.IP0=ADC -Mcu.IP1=COMP1 -Mcu.IP10=TIM14 -Mcu.IP11=TIM16 -Mcu.IP12=TIM17 -Mcu.IP13=USART1 -Mcu.IP2=DMA -Mcu.IP3=IWDG -Mcu.IP4=NVIC -Mcu.IP5=RCC -Mcu.IP6=SYS -Mcu.IP7=TIM1 -Mcu.IP8=TIM2 -Mcu.IP9=TIM6 -Mcu.IPNb=14 -Mcu.Name=STM32F051K6Tx -Mcu.Package=LQFP32 -Mcu.Pin0=PA1 -Mcu.Pin1=PA3 -Mcu.Pin10=PA13 -Mcu.Pin11=PA14 -Mcu.Pin12=PA15 -Mcu.Pin13=PB6 -Mcu.Pin14=PB7 -Mcu.Pin15=VP_ADC_TempSens_Input -Mcu.Pin16=VP_IWDG_VS_IWDG -Mcu.Pin17=VP_SYS_VS_Systick -Mcu.Pin18=VP_TIM1_VS_ClockSourceINT -Mcu.Pin19=VP_TIM1_VS_no_output4 -Mcu.Pin2=PA5 -Mcu.Pin20=VP_TIM2_VS_ClockSourceINT -Mcu.Pin21=VP_TIM6_VS_ClockSourceINT -Mcu.Pin22=VP_TIM14_VS_ClockSourceINT -Mcu.Pin23=VP_TIM16_VS_ClockSourceINT -Mcu.Pin24=VP_TIM17_VS_ClockSourceINT -Mcu.Pin3=PA6 -Mcu.Pin4=PA7 -Mcu.Pin5=PB0 -Mcu.Pin6=PB1 -Mcu.Pin7=PA8 -Mcu.Pin8=PA9 -Mcu.Pin9=PA10 -Mcu.PinsNb=25 -Mcu.ThirdPartyNb=0 -Mcu.UserConstants= -Mcu.UserName=STM32F051K6Tx -MxCube.Version=6.3.0 -MxDb.Version=DB.6.0.30 -NVIC.ADC1_COMP_IRQn=true\:0\:0\:true\:false\:true\:false\:true -NVIC.DMA1_Channel2_3_IRQn=true\:1\:0\:true\:false\:true\:true\:true -NVIC.DMA1_Channel4_5_IRQn=true\:1\:0\:true\:false\:true\:false\:true -NVIC.ForceEnableDMAVector=false -NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false -NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true -NVIC.TIM14_IRQn=true\:2\:0\:true\:false\:true\:true\:true -NVIC.TIM16_IRQn=true\:2\:0\:true\:false\:true\:true\:true -NVIC.TIM6_DAC_IRQn=true\:0\:0\:false\:false\:true\:true\:true -NVIC.USART1_IRQn=true\:1\:0\:true\:false\:true\:true\:true -PA1.Mode=INP -PA1.Signal=COMP1_INP -PA10.Signal=S_TIM1_CH3 -PA13.Locked=true -PA13.Mode=Serial_Wire -PA13.Signal=SYS_SWDIO -PA14.Mode=Serial_Wire -PA14.Signal=SYS_SWCLK -PA15.Locked=true -PA15.Signal=GPIO_Output -PA3.Locked=true -PA3.Mode=IN3 -PA3.Signal=ADC_IN3 -PA5.Locked=true -PA5.Mode=INM -PA5.Signal=COMP1_INM -PA6.Locked=true -PA6.Mode=IN6 -PA6.Signal=ADC_IN6 -PA7.Mode=PWM Generation1 CH1 CH1N -PA7.Signal=TIM1_CH1N -PA8.Signal=S_TIM1_CH1 -PA9.Signal=S_TIM1_CH2 -PB0.Mode=PWM Generation2 CH2 CH2N -PB0.Signal=TIM1_CH2N -PB1.Mode=PWM Generation3 CH3 CH3N -PB1.Signal=TIM1_CH3N -PB6.Locked=true -PB6.Mode=Asynchronous -PB6.Signal=USART1_TX -PB7.Locked=true -PB7.Mode=Asynchronous -PB7.Signal=USART1_RX -PinOutPanel.RotationAngle=0 -ProjectManager.AskForMigrate=true -ProjectManager.BackupPrevious=false -ProjectManager.CompilerOptimize=2 -ProjectManager.ComputerToolchain=false -ProjectManager.CoupleFile=false -ProjectManager.CustomerFirmwarePackage= -ProjectManager.DefaultFWLocation=true -ProjectManager.DeletePrevious=true -ProjectManager.DeviceId=STM32F051K6Tx -ProjectManager.FirmwarePackage=STM32Cube FW_F0 V1.11.3 -ProjectManager.FreePins=false -ProjectManager.HalAssertFull=false -ProjectManager.HeapSize=0x200 -ProjectManager.KeepUserCode=true -ProjectManager.LastFirmware=true -ProjectManager.LibraryCopy=1 -ProjectManager.MainLocation=Src -ProjectManager.NoMain=false -ProjectManager.PreviousToolchain=TrueSTUDIO -ProjectManager.ProjectBuild=false -ProjectManager.ProjectFileName=f051_ll_bi_dir.ioc -ProjectManager.ProjectName=f051_ll_bi_dir -ProjectManager.RegisterCallBack= -ProjectManager.StackSize=0x400 -ProjectManager.TargetToolchain=STM32CubeIDE -ProjectManager.ToolChainLocation= -ProjectManager.UnderRoot=true -ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-LL-true,2-MX_DMA_Init-DMA-false-LL-true,3-SystemClock_Config-RCC-false-LL-true,4-MX_ADC_Init-ADC-false-LL-true,5-MX_COMP1_Init-COMP1-false-LL-true,6-MX_TIM1_Init-TIM1-false-LL-true,7-MX_TIM2_Init-TIM2-false-LL-true,8-MX_IWDG_Init-IWDG-false-LL-true,9-MX_TIM16_Init-TIM16-false-LL-true,10-MX_TIM14_Init-TIM14-false-LL-true,11-MX_TIM6_Init-TIM6-false-LL-true,12-MX_TIM17_Init-TIM17-false-LL-true,13-MX_USART1_UART_Init-USART1-false-LL-true -RCC.AHBFreq_Value=48000000 -RCC.APB1Freq_Value=48000000 -RCC.APB1TimFreq_Value=48000000 -RCC.CECFreq_Value=32786.88524590164 -RCC.FCLKCortexFreq_Value=48000000 -RCC.FamilyName=M -RCC.HCLKFreq_Value=48000000 -RCC.HSICECFreq_Value=32786.88524590164 -RCC.I2SFreq_Value=48000000 -RCC.IPParameters=AHBFreq_Value,APB1Freq_Value,APB1TimFreq_Value,CECFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSICECFreq_Value,I2SFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLMCOFreq_Value,PLLMUL,SYSCLKFreq_VALUE,SYSCLKSource,TimSysFreq_Value,USART1Freq_Value,VCOOutput2Freq_Value -RCC.MCOFreq_Value=48000000 -RCC.PLLCLKFreq_Value=48000000 -RCC.PLLMCOFreq_Value=24000000 -RCC.PLLMUL=RCC_PLL_MUL12 -RCC.SYSCLKFreq_VALUE=48000000 -RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK -RCC.TimSysFreq_Value=48000000 -RCC.USART1Freq_Value=48000000 -RCC.VCOOutput2Freq_Value=4000000 -SH.S_TIM1_CH1.0=TIM1_CH1,PWM Generation1 CH1 CH1N -SH.S_TIM1_CH1.ConfNb=1 -SH.S_TIM1_CH2.0=TIM1_CH2,PWM Generation2 CH2 CH2N -SH.S_TIM1_CH2.ConfNb=1 -SH.S_TIM1_CH3.0=TIM1_CH3,PWM Generation3 CH3 CH3N -SH.S_TIM1_CH3.ConfNb=1 -TIM1.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_ENABLE -TIM1.Channel-PWM\ Generation1\ CH1\ CH1N=TIM_CHANNEL_1 -TIM1.Channel-PWM\ Generation2\ CH2\ CH2N=TIM_CHANNEL_2 -TIM1.Channel-PWM\ Generation3\ CH3\ CH3N=TIM_CHANNEL_3 -TIM1.Channel-PWM\ Generation4\ No\ Output=TIM_CHANNEL_4 -TIM1.CounterMode=TIM_COUNTERMODE_UP -TIM1.DeadTime=60 -TIM1.IPParameters=Channel-PWM Generation1 CH1 CH1N,Channel-PWM Generation2 CH2 CH2N,Channel-PWM Generation3 CH3 CH3N,Prescaler,Period,DeadTime,CounterMode,TIM_MasterOutputTrigger,TIM_MasterSlaveMode,Channel-PWM Generation4 No Output,AutoReloadPreload -TIM1.Period=1999 -TIM1.Prescaler=0 -TIM1.TIM_MasterOutputTrigger=TIM_TRGO_RESET -TIM1.TIM_MasterSlaveMode=TIM_MASTERSLAVEMODE_DISABLE -TIM14.IPParameters=Prescaler,Period -TIM14.Period=4000 -TIM14.Prescaler=23 -TIM16.IPParameters=Period -TIM16.Period=9000 -TIM17.IPParameters=Prescaler,Period -TIM17.Period=65535 -TIM17.Prescaler=47 -TIM2.IPParameters=Prescaler,Period -TIM2.Period=0xFFFF -TIM2.Prescaler=23 -TIM6.IPParameters=Prescaler,Period -TIM6.Period=65535 -TIM6.Prescaler=23 -USART1.BaudRate=9600 -USART1.IPParameters=VirtualMode-Asynchronous,BaudRate -USART1.VirtualMode-Asynchronous=VM_ASYNC -VP_ADC_TempSens_Input.Mode=IN-TempSens -VP_ADC_TempSens_Input.Signal=ADC_TempSens_Input -VP_IWDG_VS_IWDG.Mode=IWDG_Activate -VP_IWDG_VS_IWDG.Signal=IWDG_VS_IWDG -VP_SYS_VS_Systick.Mode=SysTick -VP_SYS_VS_Systick.Signal=SYS_VS_Systick -VP_TIM14_VS_ClockSourceINT.Mode=Enable_Timer -VP_TIM14_VS_ClockSourceINT.Signal=TIM14_VS_ClockSourceINT -VP_TIM16_VS_ClockSourceINT.Mode=Enable_Timer -VP_TIM16_VS_ClockSourceINT.Signal=TIM16_VS_ClockSourceINT -VP_TIM17_VS_ClockSourceINT.Mode=Enable_Timer -VP_TIM17_VS_ClockSourceINT.Signal=TIM17_VS_ClockSourceINT -VP_TIM1_VS_ClockSourceINT.Mode=Internal -VP_TIM1_VS_ClockSourceINT.Signal=TIM1_VS_ClockSourceINT -VP_TIM1_VS_no_output4.Mode=PWM Generation4 No Output -VP_TIM1_VS_no_output4.Signal=TIM1_VS_no_output4 -VP_TIM2_VS_ClockSourceINT.Mode=Internal -VP_TIM2_VS_ClockSourceINT.Signal=TIM2_VS_ClockSourceINT -VP_TIM6_VS_ClockSourceINT.Mode=Enable_Timer -VP_TIM6_VS_ClockSourceINT.Signal=TIM6_VS_ClockSourceINT -board=f051bldc -isbadioc=true diff --git a/f051makefile.mk b/f051makefile.mk deleted file mode 100644 index 22f65e91..00000000 --- a/f051makefile.mk +++ /dev/null @@ -1,38 +0,0 @@ - -TARGETS_F051 := \ - FD6288_F051 MP6531_F051 IFLIGHT_F051 TMOTOR55_F051 TMOTOR45_F051 HGLRC_F051 SISKIN_F051 \ - DIATONE_F051 MAMBA_F40PRO_F051 MAMBA_F50PRO_F051 MAMBA_F60PRO_F051 \ - WRAITH32V1_F051 WRAITH32V2_F051 CRTEENSY_HILARIESC_F051 FLYCOLOR_F051 HVFLYCOLOR_F051 AIKONSINGLE_F051 \ - SKYSTARS_F051 AM32REF_F051 BLPWR_F051 NEUTRONRC_F051 RAZOR32_F051 RHINO80A_F051 - -HAL_FOLDER_F051 := $(HAL_FOLDER)/f051 - -MCU_F051 := -mcpu=cortex-m0 -mthumb -LDSCRIPT_F051 := $(HAL_FOLDER_F051)/STM32F051K6TX_FLASH.ld - -SRC_DIR_F051 += \ - $(HAL_FOLDER_F051)/Startup \ - $(HAL_FOLDER_F051)/Src \ - $(HAL_FOLDER_F051)/Drivers/STM32F0xx_HAL_Driver/Src - -CFLAGS_F051 := \ - -I$(HAL_FOLDER_F051)/Inc \ - -I$(HAL_FOLDER_F051)/Drivers/STM32F0xx_HAL_Driver/Inc \ - -I$(HAL_FOLDER_F051)/Drivers/CMSIS/Include \ - -I$(HAL_FOLDER_F051)/Drivers/CMSIS/Device/ST/STM32F0xx/Include - -CFLAGS_F051 += \ - -DHSE_VALUE=8000000 \ - -DSTM32F051x8 \ - -DHSE_STARTUP_TIMEOUT=100 \ - -DLSE_STARTUP_TIMEOUT=5000 \ - -DLSE_VALUE=32768 \ - -DDATA_CACHE_ENABLE=0 \ - -DINSTRUCTION_CACHE_ENABLE=0 \ - -DVDD_VALUE=3300 \ - -DLSI_VALUE=40000 \ - -DHSI_VALUE=8000000 \ - -DUSE_FULL_LL_DRIVER \ - -DPREFETCH_ENABLE=1 - -SRC_F051 := $(foreach dir,$(SRC_DIR_F051),$(wildcard $(dir)/*.[cs])) diff --git a/f415makefile.mk b/f415makefile.mk deleted file mode 100644 index 8f0e4ebc..00000000 --- a/f415makefile.mk +++ /dev/null @@ -1,26 +0,0 @@ - -TARGETS_F415 := \ - AT32DEV_F415 TEKKO32_F415 - -HAL_FOLDER_F415 := $(HAL_FOLDER)/F415 - -MCU_F415 := -mcpu=cortex-m4 -mthumb -LDSCRIPT_F415 := $(HAL_FOLDER_F415)/AT32F415x8_FLASH.ld - -SRC_DIR_F415 := \ - $(HAL_FOLDER_F415)/Startup \ - $(HAL_FOLDER_F415)/Src \ - $(HAL_FOLDER_F415)/Drivers/drivers/src - -CFLAGS_F415 := \ - -I$(HAL_FOLDER_F415)/Inc \ - -I$(HAL_FOLDER_F415)/Drivers/drivers/inc \ - -I$(HAL_FOLDER_F415)/Drivers/CMSIS/cm4/core_support \ - -I$(HAL_FOLDER_F415)/Drivers/CMSIS/cm4/device_support - -CFLAGS_F415 += \ - -DAT32F415K8U7_4 \ - -DUSE_STDPERIPH_DRIVER - - -SRC_F415 := $(foreach dir,$(SRC_DIR_F415),$(wildcard $(dir)/*.[cs])) diff --git a/f421makefile.mk b/f421makefile.mk deleted file mode 100644 index 1da4aa15..00000000 --- a/f421makefile.mk +++ /dev/null @@ -1,27 +0,0 @@ - -TARGETS_F421 := WRAITH32_F421 AIKON_SINGLE_F421 AIKON_55A_F421 FOXEER_F421 HAKRC_K_F421 \ - HAKRC_G_F421 TEKKO32_F421 AT32DEV_F421 DARWIN_F421 NEUTRON_F421 AT32SLOTCAR_F421\ - HAKRC_G23_F421 NEUTRON_MINIAIO_F421 FOXEER_F421\ - -HAL_FOLDER_F421 := $(HAL_FOLDER)/F421 - -MCU_F421 := -mcpu=cortex-m4 -mthumb -LDSCRIPT_F421 := $(HAL_FOLDER_F421)/AT32F421x6_FLASH.ld - -SRC_DIR_F421 := \ - $(HAL_FOLDER_F421)/Startup \ - $(HAL_FOLDER_F421)/Src \ - $(HAL_FOLDER_F421)/Drivers/drivers/src - -CFLAGS_F421 := \ - -I$(HAL_FOLDER_F421)/Inc \ - -I$(HAL_FOLDER_F421)/Drivers/drivers/inc \ - -I$(HAL_FOLDER_F421)/Drivers/CMSIS/cm4/core_support \ - -I$(HAL_FOLDER_F421)/Drivers/CMSIS/cm4/device_support - -CFLAGS_F421 += \ - -DAT32F421K8U7 \ - -DUSE_STDPERIPH_DRIVER - - -SRC_F421 := $(foreach dir,$(SRC_DIR_F421),$(wildcard $(dir)/*.[cs])) diff --git a/g071makefile.mk b/g071makefile.mk deleted file mode 100644 index 99fdfbef..00000000 --- a/g071makefile.mk +++ /dev/null @@ -1,36 +0,0 @@ - -TARGETS_G071 := \ - PWM_ENABLE_G071 OPEN_DRAIN_G071 OPEN_DRAIN_B_G071 GEN_64K_G071 DT120_64K_G071 IFLIGHT_BLITZ_G071 \ - NEUTRONRC_G071 AIKON_PRO_G071 TMOTOR_G071 - -HAL_FOLDER_G071 := $(HAL_FOLDER)/g071 - -MCU_G071 := -mcpu=cortex-m0 -mthumb -LDSCRIPT_G071 := $(HAL_FOLDER_G071)/STM32G071GBUX_FLASH.ld - -SRC_DIR_G071 := \ - $(HAL_FOLDER_G071)/Startup \ - $(HAL_FOLDER_G071)/Src \ - $(HAL_FOLDER_G071)/Drivers/STM32G0xx_HAL_Driver/Src - -CFLAGS_G071 := \ - -I$(HAL_FOLDER_G071)/Inc \ - -I$(HAL_FOLDER_G071)/Drivers/STM32G0xx_HAL_Driver/Inc \ - -I$(HAL_FOLDER_G071)/Drivers/CMSIS/Include \ - -I$(HAL_FOLDER_G071)/Drivers/CMSIS/Device/ST/STM32G0xx/Include - -CFLAGS_G071 += \ - -DHSE_VALUE=8000000 \ - -DSTM32G071xx \ - -DHSE_STARTUP_TIMEOUT=100 \ - -DLSE_STARTUP_TIMEOUT=5000 \ - -DLSE_VALUE=32768 \ - -DDATA_CACHE_ENABLE=1 \ - -DINSTRUCTION_CACHE_ENABLE=0 \ - -DVDD_VALUE=3300 \ - -DLSI_VALUE=32000 \ - -DHSI_VALUE=16000000 \ - -DUSE_FULL_LL_DRIVER \ - -DPREFETCH_ENABLE=1 - -SRC_G071 := $(foreach dir,$(SRC_DIR_G071),$(wildcard $(dir)/*.[cs])) diff --git a/gd32makefile.mk b/gd32makefile.mk deleted file mode 100644 index 5f0c1c33..00000000 --- a/gd32makefile.mk +++ /dev/null @@ -1,33 +0,0 @@ - -TARGETS_GD32 := \ - GD32TEST - -HAL_FOLDER_GD32 := $(HAL_FOLDER)/f350 - -MCU_GD32 := -mcpu=cortex-m4 -mthumb -LDSCRIPT_GD32 := $(HAL_FOLDER_GD32)/STM32F302CBTX_FLASH.ld - -SRC_DIR_GD32 := \ - $(HAL_FOLDER_GD32)/Startup \ - $(HAL_FOLDER_GD32)/Src \ - $(HAL_FOLDER_GD32)/Drivers/STM32F3xx_HAL_Driver/Src - -CFLAGS_GD32 += \ - -I$(HAL_FOLDER_GD32)/Inc \ - -I$(HAL_FOLDER_GD32)/Drivers/STM32F3xx_HAL_Driver/Inc \ - -I$(HAL_FOLDER_GD32)/Drivers/CMSIS/Include \ - -I$(HAL_FOLDER_GD32)/Drivers/CMSIS/Device/ST/STM32F3xx/Include - -CFLAGS_GD32 += \ - -DHSE_VALUE=8000000 \ - -DSTM32F302xC \ - -DHSE_STARTUP_TIMEOUT=100 \ - -DLSE_STARTUP_TIMEOUT=5000 \ - -DLSE_VALUE=32768 \ - -DVDD_VALUE=3300 \ - -DLSI_VALUE=32000 \ - -DHSI_VALUE=8000000 \ - -DUSE_FULL_LL_DRIVER \ - -DPREFETCH_ENABLE=1 - -SRC_GD32 := $(foreach dir,$(SRC_DIR_GD32),$(wildcard $(dir)/*.[cs])) diff --git a/make/system-id.mk b/make/system-id.mk deleted file mode 100644 index 1fd42ed4..00000000 --- a/make/system-id.mk +++ /dev/null @@ -1,46 +0,0 @@ -# shared.mk -# -# environment variables common to all operating systems supported by the make system - -# Make sure we know a few things about the architecture -UNAME := $(shell uname) -ARCH := $(shell uname -m) -ifneq (,$(filter $(ARCH), x86_64 amd64)) - X86-64 := 1 - X86_64 := 1 - AMD64 := 1 - ARCHFAMILY := x86_64 -else - ARCHFAMILY := $(ARCH) -endif - -# configure some variables dependent upon what type of system this is - -# Linux -ifeq ($(UNAME), Linux) - OSFAMILY := linux -endif - -# Mac OSX -ifeq ($(UNAME), Darwin) - OSFAMILY := macosx -endif - -# Windows using MinGW shell -ifeq (MINGW, $(findstring MINGW,$(UNAME))) - OSFAMILY := windows - MINGW := 1 -endif - -# Windows using Cygwin shell -ifeq (CYGWIN ,$(findstring CYGWIN,$(UNAME))) - OSFAMILY := windows - CYGWIN := 1 -endif - -# report an error if we couldn't work out what OS this is running on -ifndef OSFAMILY - $(info uname reports $(UNAME)) - $(info uname -m reports $(ARCH)) - $(error failed to detect operating system) -endif diff --git a/make/tools.mk b/make/tools.mk deleted file mode 100644 index 23fa8772..00000000 --- a/make/tools.mk +++ /dev/null @@ -1,319 +0,0 @@ -############################################################### -# -# Installers for tools -# -# NOTE: These are not tied to the default goals -# and must be invoked manually -# -############################################################### - -############################## -# -# Check that environmental variables are sane -# -############################## - -# Set up ARM (STM32) SDK -ARM_SDK_DIR ?= $(TOOLS_DIR)/gcc-arm-none-eabi-10.3-2021.10 -# Checked below, Should match the output of $(shell arm-none-eabi-gcc -dumpversion) -GCC_REQUIRED_VERSION ?= 10.3 - -.PHONY: arm_sdk_version - -arm_sdk_version: - $(V1) $(ARM_SDK_PREFIX)gcc --version - -## arm_sdk_install : Install Arm SDK -.PHONY: arm_sdk_install - - -ARM_SDK_URL_BASE :=https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10 -# source: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads -ifeq ($(OSFAMILY), linux) - ARM_SDK_URL := $(ARM_SDK_URL_BASE)-x86_64-linux.tar.bz2 -endif - -ifeq ($(OSFAMILY), macosx) - ARM_SDK_URL := $(ARM_SDK_URL_BASE)-mac.tar.bz2 -endif - -ifeq ($(OSFAMILY), windows) - ARM_SDK_URL := $(ARM_SDK_URL_BASE)-win32.zip -endif - -ARM_SDK_FILE := $(notdir $(ARM_SDK_URL)) - -SDK_INSTALL_MARKER := $(ARM_SDK_DIR)/bin/arm-none-eabi-gcc-$(GCC_REQUIRED_VERSION) - -# order-only prereq on directory existance: -arm_sdk_install: | $(TOOLS_DIR) - -arm_sdk_install: arm_sdk_download $(SDK_INSTALL_MARKER) - -$(SDK_INSTALL_MARKER): -ifneq ($(OSFAMILY), windows) - # binary only release so just extract it - $(V1) tar -C $(TOOLS_DIR) -xjf "$(DL_DIR)/$(ARM_SDK_FILE)" -else - $(V1) unzip -q -d $(ARM_SDK_DIR) "$(DL_DIR)/$(ARM_SDK_FILE)" -endif - -.PHONY: arm_sdk_download -arm_sdk_download: | $(DL_DIR) -arm_sdk_download: $(DL_DIR)/$(ARM_SDK_FILE) -$(DL_DIR)/$(ARM_SDK_FILE): - # download the source only if it's newer than what we already have - $(V1) curl -L -k -o "$(DL_DIR)/$(ARM_SDK_FILE)" -z "$(DL_DIR)/$(ARM_SDK_FILE)" "$(ARM_SDK_URL)" - - -## arm_sdk_clean : Uninstall Arm SDK -.PHONY: arm_sdk_clean -arm_sdk_clean: - $(V1) [ ! -d "$(ARM_SDK_DIR)" ] || $(RM) -r $(ARM_SDK_DIR) - $(V1) [ ! -d "$(DL_DIR)" ] || $(RM) -r $(DL_DIR) - -.PHONY: openocd_win_install - -openocd_win_install: | $(DL_DIR) $(TOOLS_DIR) -openocd_win_install: OPENOCD_URL := git://git.code.sf.net/p/openocd/code -openocd_win_install: OPENOCD_REV := cf1418e9a85013bbf8dbcc2d2e9985695993d9f4 -openocd_win_install: OPENOCD_OPTIONS := - -ifeq ($(OPENOCD_FTDI), yes) -openocd_win_install: OPENOCD_OPTIONS := $(OPENOCD_OPTIONS) --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=$(FTD2XX_DIR) -endif - -openocd_win_install: openocd_win_clean libusb_win_install ftd2xx_install - # download the source - @echo " DOWNLOAD $(OPENOCD_URL) @ $(OPENOCD_REV)" - $(V1) [ ! -d "$(OPENOCD_BUILD_DIR)" ] || $(RM) -rf "$(OPENOCD_BUILD_DIR)" - $(V1) mkdir -p "$(OPENOCD_BUILD_DIR)" - $(V1) git clone --no-checkout $(OPENOCD_URL) "$(DL_DIR)/openocd-build" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - git checkout -q $(OPENOCD_REV) ; \ - ) - - # apply patches - @echo " PATCH $(OPENOCD_BUILD_DIR)" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - git apply < $(ROOT_DIR)/flight/Project/OpenOCD/0003-freertos-cm4f-fpu-support.patch ; \ - git apply < $(ROOT_DIR)/flight/Project/OpenOCD/0004-st-icdi-disable.patch ; \ - ) - - # build and install - @echo " BUILD $(OPENOCD_WIN_DIR)" - $(V1) mkdir -p "$(OPENOCD_WIN_DIR)" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - ./bootstrap ; \ - ./configure --enable-maintainer-mode --prefix="$(OPENOCD_WIN_DIR)" \ - --build=i686-pc-linux-gnu --host=i586-mingw32msvc \ - CPPFLAGS=-I$(LIBUSB_WIN_DIR)/include \ - LDFLAGS=-L$(LIBUSB_WIN_DIR)/lib/gcc \ - $(OPENOCD_OPTIONS) \ - --disable-werror \ - --enable-stlink ; \ - $(MAKE) ; \ - $(MAKE) install ; \ - ) - - # delete the extracted source when we're done - $(V1) [ ! -d "$(OPENOCD_BUILD_DIR)" ] || $(RM) -rf "$(OPENOCD_BUILD_DIR)" - -.PHONY: openocd_win_clean -openocd_win_clean: - @echo " CLEAN $(OPENOCD_WIN_DIR)" - $(V1) [ ! -d "$(OPENOCD_WIN_DIR)" ] || $(RM) -r "$(OPENOCD_WIN_DIR)" - -# Set up openocd tools -OPENOCD_DIR := $(TOOLS_DIR)/openocd -OPENOCD_WIN_DIR := $(TOOLS_DIR)/openocd_win -OPENOCD_BUILD_DIR := $(DL_DIR)/openocd-build - -.PHONY: openocd_install - -openocd_install: | $(DL_DIR) $(TOOLS_DIR) -openocd_install: OPENOCD_URL := git://git.code.sf.net/p/openocd/code -openocd_install: OPENOCD_TAG := v0.9.0 -openocd_install: OPENOCD_OPTIONS := --enable-maintainer-mode --prefix="$(OPENOCD_DIR)" --enable-buspirate --enable-stlink - -ifeq ($(OPENOCD_FTDI), yes) -openocd_install: OPENOCD_OPTIONS := $(OPENOCD_OPTIONS) --enable-ftdi -endif - -ifeq ($(UNAME), Darwin) -openocd_install: OPENOCD_OPTIONS := $(OPENOCD_OPTIONS) --disable-option-checking -endif - -openocd_install: openocd_clean - # download the source - @echo " DOWNLOAD $(OPENOCD_URL) @ $(OPENOCD_TAG)" - $(V1) [ ! -d "$(OPENOCD_BUILD_DIR)" ] || $(RM) -rf "$(OPENOCD_BUILD_DIR)" - $(V1) mkdir -p "$(OPENOCD_BUILD_DIR)" - $(V1) git clone --no-checkout $(OPENOCD_URL) "$(OPENOCD_BUILD_DIR)" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - git checkout -q tags/$(OPENOCD_TAG) ; \ - ) - - # build and install - @echo " BUILD $(OPENOCD_DIR)" - $(V1) mkdir -p "$(OPENOCD_DIR)" - $(V1) ( \ - cd $(OPENOCD_BUILD_DIR) ; \ - ./bootstrap ; \ - ./configure $(OPENOCD_OPTIONS) ; \ - $(MAKE) ; \ - $(MAKE) install ; \ - ) - - # delete the extracted source when we're done - $(V1) [ ! -d "$(OPENOCD_BUILD_DIR)" ] || $(RM) -rf "$(OPENOCD_BUILD_DIR)" - -.PHONY: openocd_clean -openocd_clean: - @echo " CLEAN $(OPENOCD_DIR)" - $(V1) [ ! -d "$(OPENOCD_DIR)" ] || $(RM) -r "$(OPENOCD_DIR)" - -STM32FLASH_DIR := $(TOOLS_DIR)/stm32flash - -.PHONY: stm32flash_install -stm32flash_install: STM32FLASH_URL := http://stm32flash.googlecode.com/svn/trunk -stm32flash_install: STM32FLASH_REV := 61 -stm32flash_install: stm32flash_clean - # download the source - @echo " DOWNLOAD $(STM32FLASH_URL) @ r$(STM32FLASH_REV)" - $(V1) svn export -q -r "$(STM32FLASH_REV)" "$(STM32FLASH_URL)" "$(STM32FLASH_DIR)" - - # build - @echo " BUILD $(STM32FLASH_DIR)" - $(V1) $(MAKE) --silent -C $(STM32FLASH_DIR) all - -.PHONY: stm32flash_clean -stm32flash_clean: - @echo " CLEAN $(STM32FLASH_DIR)" - $(V1) [ ! -d "$(STM32FLASH_DIR)" ] || $(RM) -r "$(STM32FLASH_DIR)" - -# Set up uncrustify tools -UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.61 -UNCRUSTIFY_BUILD_DIR := $(DL_DIR)/uncrustify - -.PHONY: uncrustify_install -uncrustify_install: | $(DL_DIR) $(TOOLS_DIR) -uncrustify_install: UNCRUSTIFY_URL := http://downloads.sourceforge.net/project/uncrustify/uncrustify/uncrustify-0.61/uncrustify-0.61.tar.gz -uncrustify_install: UNCRUSTIFY_FILE := uncrustify-0.61.tar.gz -uncrustify_install: UNCRUSTIFY_OPTIONS := prefix=$(UNCRUSTIFY_DIR) -uncrustify_install: uncrustify_clean -ifneq ($(OSFAMILY), windows) - @echo " DOWNLOAD $(UNCRUSTIFY_URL)" - $(V1) curl -L -k -o "$(DL_DIR)/$(UNCRUSTIFY_FILE)" "$(UNCRUSTIFY_URL)" -endif - # extract the src - @echo " EXTRACT $(UNCRUSTIFY_FILE)" - $(V1) tar -C $(TOOLS_DIR) -xf "$(DL_DIR)/$(UNCRUSTIFY_FILE)" - - @echo " BUILD $(UNCRUSTIFY_DIR)" - $(V1) ( \ - cd $(UNCRUSTIFY_DIR) ; \ - ./configure --prefix="$(UNCRUSTIFY_DIR)" ; \ - $(MAKE) ; \ - $(MAKE) install ; \ - ) - # delete the extracted source when we're done - $(V1) [ ! -d "$(UNCRUSTIFY_BUILD_DIR)" ] || $(RM) -r "$(UNCRUSTIFY_BUILD_DIR)" - -.PHONY: uncrustify_clean -uncrustify_clean: - @echo " CLEAN $(UNCRUSTIFY_DIR)" - $(V1) [ ! -d "$(UNCRUSTIFY_DIR)" ] || $(RM) -r "$(UNCRUSTIFY_DIR)" - @echo " CLEAN $(UNCRUSTIFY_BUILD_DIR)" - $(V1) [ ! -d "$(UNCRUSTIFY_BUILD_DIR)" ] || $(RM) -r "$(UNCRUSTIFY_BUILD_DIR)" - -# ZIP download URL -zip_install: ZIP_URL := http://pkgs.fedoraproject.org/repo/pkgs/zip/zip30.tar.gz/7b74551e63f8ee6aab6fbc86676c0d37/zip30.tar.gz - -zip_install: ZIP_FILE := $(notdir $(ZIP_URL)) - -ZIP_DIR = $(TOOLS_DIR)/zip30 - -# order-only prereq on directory existance: -zip_install : | $(DL_DIR) $(TOOLS_DIR) -zip_install: zip_clean - $(V1) curl -L -k -o "$(DL_DIR)/$(ZIP_FILE)" "$(ZIP_URL)" - $(V1) tar --force-local -C $(TOOLS_DIR) -xzf "$(DL_DIR)/$(ZIP_FILE)" -ifneq ($(OSFAMILY), windows) - $(V1) cd "$(ZIP_DIR)" && $(MAKE) -f unix/Makefile generic_gcc -else - $(V1) cd "$(ZIP_DIR)" && $(MAKE) -f win32/makefile.gcc -endif - -.PHONY: zip_clean -zip_clean: - $(V1) [ ! -d "$(ZIP_DIR)" ] || $(RM) -rf $(ZIP_DIR) - -############################## -# -# Set up paths to tools -# -############################## - -ifeq ($(shell [ -d "$(ARM_SDK_DIR)" ] && echo "exists"), exists) - ARM_SDK_PREFIX := $(ARM_SDK_DIR)/bin/arm-none-eabi- -else ifeq (,$(findstring _install,$(MAKECMDGOALS))) - GCC_VERSION = $(shell arm-none-eabi-gcc -dumpversion) - ifeq ($(GCC_VERSION),) - $(error **ERROR** arm-none-eabi-gcc not in the PATH. Run 'make arm_sdk_install' to install automatically in the tools folder of this repo) - else ifneq ($(GCC_VERSION), $(GCC_REQUIRED_VERSION)) - $(error **ERROR** your arm-none-eabi-gcc is '$(GCC_VERSION)', but '$(GCC_REQUIRED_VERSION)' is expected. Override with 'GCC_REQUIRED_VERSION' in make/local.mk or run 'make arm_sdk_install' to install the right version automatically in the tools folder of this repo) - endif - - # ARM tookchain is in the path, and the version is what's required. - ARM_SDK_PREFIX ?= arm-none-eabi- -endif - -ifeq ($(shell [ -d "$(ZIP_DIR)" ] && echo "exists"), exists) - export ZIPBIN := $(ZIP_DIR)/zip -else - export ZIPBIN := zip -endif - -ifeq ($(shell [ -d "$(OPENOCD_DIR)" ] && echo "exists"), exists) - OPENOCD := $(OPENOCD_DIR)/bin/openocd -else - # not installed, hope it's in the path... - OPENOCD ?= openocd -endif - -ifeq ($(shell [ -d "$(UNCRUSTIFY_DIR)" ] && echo "exists"), exists) - UNCRUSTIFY := $(UNCRUSTIFY_DIR)/bin/uncrustify -else - # not installed, hope it's in the path... - UNCRUSTIFY ?= uncrustify -endif - -# Google Breakpad -DUMP_SYMBOLS_TOOL := $(TOOLS_DIR)/breakpad/$(OSFAMILY)-$(ARCHFAMILY)/dump_syms -BREAKPAD_URL := http://dronin.tracer.nz/tools/breakpad.zip -BREAKPAD_DL_FILE := $(DL_DIR)/$(notdir $(BREAKPAD_URL)) -BREAKPAD_DIR := $(TOOLS_DIR)/breakpad - -.PHONY: breakpad_install -breakpad_install: | $(DL_DIR) $(TOOLS_DIR) -breakpad_install: breakpad_clean - @echo " DOWNLOAD $(BREAKPAD_URL)" - $(V1) $(V1) curl -L -k -z "$(BREAKPAD_DL_FILE)" -o "$(BREAKPAD_DL_FILE)" "$(BREAKPAD_URL)" - @echo " EXTRACT $(notdir $(BREAKPAD_DL_FILE))" - $(V1) mkdir -p "$(BREAKPAD_DIR)" - $(V1) unzip -q -d $(BREAKPAD_DIR) "$(BREAKPAD_DL_FILE)" -ifeq ($(OSFAMILY), windows) - $(V1) ln -s "$(TOOLS_DIR)/breakpad/$(OSFAMILY)-i686" "$(TOOLS_DIR)/breakpad/$(OSFAMILY)-x86_64" -endif - -.PHONY: breakpad_clean -breakpad_clean: - @echo " CLEAN $(BREAKPAD_DIR)" - $(V1) [ ! -d "$(BREAKPAD_DIR)" ] || $(RM) -rf $(BREAKPAD_DIR) - @echo " CLEAN $(BREAKPAD_DL_FILE)" - $(V1) $(RM) -f $(BREAKPAD_DL_FILE) diff --git a/makefile b/makefile deleted file mode 100644 index c13646fe..00000000 --- a/makefile +++ /dev/null @@ -1,119 +0,0 @@ -QUIET = @ - -# tools -CC = $(ARM_SDK_PREFIX)gcc -CP = $(ARM_SDK_PREFIX)objcopy -ECHO = echo - -# common variables -IDENTIFIER := AM32 - -# Folders -HAL_FOLDER := Mcu -MAIN_SRC_DIR := Src -MAIN_INC_DIR := Inc - -SRC_DIRS_COMMON := $(MAIN_SRC_DIR) - -# Include processor specific makefiles -include f051makefile.mk -include g071makefile.mk -include f031makefile.mk -include f421makefile.mk -include e230makefile.mk -include f415makefile.mk - -# Default MCU type to F051 -MCU_TYPE ?= F051 - -# additional libs -LIBS := -lc -lm -lnosys - -# Compiler options -CFLAGS_COMMON := -DUSE_MAKE -CFLAGS_COMMON += -I$(MAIN_INC_DIR) -O3 -Wall -ffunction-sections -CFLAGS_COMMON += -D$(TARGET) - -# Linker options -LDFLAGS_COMMON := -specs=nano.specs $(LIBS) -Wl,--gc-sections -Wl,--print-memory-usage - -# Working directories -ROOT := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST)))) - -# Search source files -SRC_COMMON := $(foreach dir,$(SRC_DIRS_COMMON),$(wildcard $(dir)/*.[cs])) - -VERSION_MAJOR := $(shell grep "#define VERSION_MAJOR" $(MAIN_SRC_DIR)/main.c | awk '{print $$3}' ) -VERSION_MINOR := $(shell grep "#define VERSION_MINOR" $(MAIN_SRC_DIR)/main.c | awk '{print $$3}' ) - -FIRMWARE_VERSION := $(VERSION_MAJOR).$(VERSION_MINOR) - -TARGET_BASENAME = $(BIN_DIR)/$(IDENTIFIER)_$(TARGET)_$(FIRMWARE_VERSION) - -# Build tools, so we all share the same versions -# import macros common to all supported build systems -include $(ROOT)/make/system-id.mk - -# configure some directories that are relative to wherever ROOT_DIR is located -BIN_DIR := $(ROOT)/obj - -TOOLS_DIR ?= $(ROOT)/tools -DL_DIR := $(ROOT)/downloads - -.PHONY : clean all binary f051 g071 f031 e230 f421 f415 -all : $(TARGETS_F051) $(TARGETS_G071) $(TARGETS_F031) $(TARGETS_E230) $(TARGETS_F421) $(TARGETS_F415) -f051 : $(TARGETS_F051) -g071 : $(TARGETS_G071) -f031 : $(TARGETS_F031) -e230 : $(TARGETS_E230) -f421 : $(TARGETS_F421) -f415 : $(TARGETS_F415) - -clean : - rm -rf $(BIN_DIR)/* - -binary : $(TARGET_BASENAME).bin - @$(ECHO) All done - -$(TARGETS_F051) : - @$(MAKE) -s MCU_TYPE=F051 TARGET=$@ binary - -$(TARGETS_G071) : - @$(MAKE) -s MCU_TYPE=G071 TARGET=$@ binary - -$(TARGETS_F031) : - @$(MAKE) -s MCU_TYPE=F031 TARGET=$@ binary - -$(TARGETS_E230) : - @$(MAKE) -s MCU_TYPE=E230 TARGET=$@ binary - -$(TARGETS_F421) : - @$(MAKE) -s MCU_TYPE=F421 TARGET=$@ binary - -$(TARGETS_F415) : - @$(MAKE) -s MCU_TYPE=F415 TARGET=$@ binary - -# Compile target -$(TARGET_BASENAME).elf: SRC := $(SRC_COMMON) $(SRC_$(MCU_TYPE)) -$(TARGET_BASENAME).elf: CFLAGS := $(MCU_F051) $(CFLAGS_$(MCU_TYPE)) $(CFLAGS_COMMON) -$(TARGET_BASENAME).elf: LDFLAGS := $(LDFLAGS_COMMON) $(LDFLAGS_$(MCU_TYPE)) -T$(LDSCRIPT_$(MCU_TYPE)) -$(TARGET_BASENAME).elf: $(SRC) - @$(ECHO) Compiling $(notdir $@) - $(QUIET)mkdir -p $(dir $@) - $(QUIET)$(CC) $(CFLAGS) $(LDFLAGS) -MMD -MP -MF $(@:.elf=.d) -o $(@) $(SRC) - -# Generate bin and hex files -$(TARGET_BASENAME).bin: $(TARGET_BASENAME).elf - @$(ECHO) Generating $(notdir $@) - $(QUIET)$(CP) -O binary $(<) $@ - $(QUIET)$(CP) $(<) -O ihex $(@:.bin=.hex) - -# mkdirs -$(DL_DIR): - $(QUIET)mkdir -p $@ - -$(TOOLS_DIR): - $(QUIET)mkdir -p $@ - -# include the tools makefile -include $(ROOT)/make/tools.mk