From 1583b482ab9782ddf5c5112b44540e38299456bc Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 19:48:19 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9F=BA=E4=BA=8ESTM32?= =?UTF-8?q?CUBEIDE=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project_cubeide/.cproject | 172 ++++++++++ .../project_cubeide/.project | 53 ++++ .../.settings/language.settings.xml | 25 ++ .../.settings/org.eclipse.cdt.core.prefs | 6 + .../org.eclipse.core.resources.prefs | 2 + .../project_cubeide/Basic.launch | 83 +++++ .../project_cubeide/STM32G070RBTX_FLASH.ld | 185 +++++++++++ .../Startup/startup_stm32g070rbtx.s | 293 ++++++++++++++++++ .../project_mdk}/RTE/_Basic/RTE_Components.h | 0 .../RTE/_Target_1/RTE_Components.h | 0 .../project_mdk}/basic.uvprojx | 9 +- .../user/main.c | 0 .../user/startup_stm32g070xx.s | 0 .../user/stm32g0xx_hal_conf.h | 0 .../user/stm32g0xx_it.c | 0 .../user/stm32g0xx_it.h | 0 .../user/system_stm32g0xx.c | 0 17 files changed, 824 insertions(+), 4 deletions(-) create mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject create mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project create mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/language.settings.xml create mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.cdt.core.prefs create mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.core.resources.prefs create mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Basic.launch create mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/STM32G070RBTX_FLASH.ld create mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Startup/startup_stm32g070rbtx.s rename lesson/ooc/{lesson_02_stm32g070_proj_mdk/project => lesson_02_stm32g070_proj/project_mdk}/RTE/_Basic/RTE_Components.h (100%) rename lesson/ooc/{lesson_02_stm32g070_proj_mdk/project => lesson_02_stm32g070_proj/project_mdk}/RTE/_Target_1/RTE_Components.h (100%) rename lesson/ooc/{lesson_02_stm32g070_proj_mdk/project => lesson_02_stm32g070_proj/project_mdk}/basic.uvprojx (98%) rename lesson/ooc/{lesson_02_stm32g070_proj_mdk => lesson_02_stm32g070_proj}/user/main.c (100%) rename lesson/ooc/{lesson_02_stm32g070_proj_mdk => lesson_02_stm32g070_proj}/user/startup_stm32g070xx.s (100%) rename lesson/ooc/{lesson_02_stm32g070_proj_mdk => lesson_02_stm32g070_proj}/user/stm32g0xx_hal_conf.h (100%) rename lesson/ooc/{lesson_02_stm32g070_proj_mdk => lesson_02_stm32g070_proj}/user/stm32g0xx_it.c (100%) rename lesson/ooc/{lesson_02_stm32g070_proj_mdk => lesson_02_stm32g070_proj}/user/stm32g0xx_it.h (100%) rename lesson/ooc/{lesson_02_stm32g070_proj_mdk => lesson_02_stm32g070_proj}/user/system_stm32g0xx.c (100%) diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject new file mode 100644 index 0000000..0b784a8 --- /dev/null +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project new file mode 100644 index 0000000..faac890 --- /dev/null +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project @@ -0,0 +1,53 @@ + + + Basic + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.st.stm32cube.ide.mcu.MCUProjectNature + org.eclipse.cdt.core.cnature + com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature + com.st.stm32cube.ide.mcu.MCUManagedMakefileProjectNature + com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature + com.st.stm32cube.ide.mcu.MCURootProjectNature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + CMSIS + 2 + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/CMSIS + + + STM32G070 + 2 + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G070 + + + STM32G0xx_HAL_Driver + 2 + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G0xx_HAL_Driver + + + user + 2 + C:/Users/LeoLe/workspace/fireware/elab/lesson/ooc/lesson_02_stm32g070_proj/user + + + diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/language.settings.xml b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/language.settings.xml new file mode 100644 index 0000000..0a8d7fd --- /dev/null +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.cdt.core.prefs b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 0000000..c8ec5df --- /dev/null +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,6 @@ +doxygen/doxygen_new_line_after_brief=true +doxygen/doxygen_use_brief_tag=false +doxygen/doxygen_use_javadoc_tags=true +doxygen/doxygen_use_pre_tag=false +doxygen/doxygen_use_structural_commands=false +eclipse.preferences.version=1 diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.core.resources.prefs b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Basic.launch b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Basic.launch new file mode 100644 index 0000000..ada9a5b --- /dev/null +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Basic.launch @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/STM32G070RBTX_FLASH.ld b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/STM32G070RBTX_FLASH.ld new file mode 100644 index 0000000..7a55b25 --- /dev/null +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/STM32G070RBTX_FLASH.ld @@ -0,0 +1,185 @@ +/* +****************************************************************************** +** +** @file : LinkerScript.ld +** +** @author : Auto-generated by STM32CubeIDE +** +** @brief : Linker script for STM32G070RBTx 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 +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +****************************************************************************** +** @attention +** +** Copyright (c) 2023 STMicroelectronics. +** All rights reserved. +** +** This software is licensed under terms that can be found in the LICENSE file +** in the root directory of this software component. +** If no LICENSE file comes with this software, it is provided AS-IS. +** +****************************************************************************** +*/ + +/* 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 (rx) : ORIGIN = 0x8000000, LENGTH = 128K +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* 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 */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* 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/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Startup/startup_stm32g070rbtx.s b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Startup/startup_stm32g070rbtx.s new file mode 100644 index 0000000..438c64b --- /dev/null +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Startup/startup_stm32g070rbtx.s @@ -0,0 +1,293 @@ +/** + ****************************************************************************** + * @file startup_stm32g070rbtx.s + * @author Auto-generated by STM32CubeIDE + * @brief STM32G070RBTx device 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()). + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +.syntax unified +.cpu cortex-m0plus +.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 + mov sp, r0 /* set stack pointer */ +/* Call the clock system initialization function.*/ + bl SystemInit + +/* 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 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 STM32G070RBTx vector table. 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 + +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 interrupt */ + .word 0 /* Reserved */ + .word RTC_STAMP_IRQHandler /* RTC and TAMP interrupts */ + .word FLASH_IRQHandler /* Flash global interrupt */ + .word RCC_IRQHandler /* RCC global interrupt */ + .word EXTI0_1_IRQHandler /* EXTI line 0 and 1 interrupt */ + .word EXTI2_3_IRQHandler /* EXTI line 2 and 3 interrupt */ + .word EXTI4_15_IRQHandler /* EXTI line 4 to 15 interrupt */ + .word UCPD1_UCPD2_IRQHandler /* UCPD global interrupt */ + .word DMA1_Channel1_IRQHandler /* DMA channel 1 interrupt */ + .word DMA1_Channel2_3_IRQHandler /* DMA channel 2 and 3 interrupts */ + .word DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler /* DMA channel 2 and 3 interrupts */ + .word ADC_IRQHandler /* ADC interrupt (ADC combined with EXTI 17 and 18) */ + .word TIM1_BRK_UP_TRG_COMP_IRQHandler /* TIM1 break, update, trigger */ + .word TIM1_CC_IRQHandler /* TIM1 Capture Compare interrupt */ + .word TIM2_IRQHandler /* TIM2 global interrupt */ + .word TIM3_IRQHandler /* TIM3 global interrupt */ + .word TIM6_DAC_LPTIM1_IRQHandler /* TIM6 + LPTIM1 and DAC global interrupt */ + .word TIM7_LPTIM2_IRQHandler /* TIM7 + LPTIM2 global interrupt */ + .word TIM14_IRQHandler /* TIM14 global interrupt */ + .word TIM15_IRQHandler /* Timer 15 global interrupt */ + .word TIM16_IRQHandler /* TIM16 global interrupt */ + .word TIM17_IRQHandler /* TIM17 global interrupt */ + .word I2C1_IRQHandler /* I2C1 global interrupt */ + .word I2C2_IRQHandler /* I2C2 global interrupt */ + .word SPI1_IRQHandler /* SPI1 global interrupt */ + .word SPI2_IRQHandler /* SPI2 global interrupt */ + .word USART1_IRQHandler /* USART1 global interrupt */ + .word USART2_IRQHandler /* USART2 global interrupt */ + .word USART3_USART4_LPUART1_IRQHandler /* USART3 + USART4 + LPUART1 */ + .word CEC_IRQHandler /* CEC global interrupt */ + .size g_pfnVectors, .-g_pfnVectors + +/******************************************************************************* +* +* 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 RTC_STAMP_IRQHandler + .thumb_set RTC_STAMP_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_UCPD2_IRQHandler + .thumb_set UCPD1_UCPD2_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_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler + .thumb_set DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler,Default_Handler + + .weak ADC_IRQHandler + .thumb_set ADC_IRQHandler,Default_Handler + + .weak TIM1_BRK_UP_TRG_COMP_IRQHandler + .thumb_set TIM1_BRK_UP_TRG_COMP_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_USART4_LPUART1_IRQHandler + .thumb_set USART3_USART4_LPUART1_IRQHandler,Default_Handler + + .weak CEC_IRQHandler + .thumb_set CEC_IRQHandler,Default_Handler + + .weak SystemInit + +/************************ (C) COPYRIGHT STMicroelectonics *****END OF FILE****/ diff --git a/lesson/ooc/lesson_02_stm32g070_proj_mdk/project/RTE/_Basic/RTE_Components.h b/lesson/ooc/lesson_02_stm32g070_proj/project_mdk/RTE/_Basic/RTE_Components.h similarity index 100% rename from lesson/ooc/lesson_02_stm32g070_proj_mdk/project/RTE/_Basic/RTE_Components.h rename to lesson/ooc/lesson_02_stm32g070_proj/project_mdk/RTE/_Basic/RTE_Components.h diff --git a/lesson/ooc/lesson_02_stm32g070_proj_mdk/project/RTE/_Target_1/RTE_Components.h b/lesson/ooc/lesson_02_stm32g070_proj/project_mdk/RTE/_Target_1/RTE_Components.h similarity index 100% rename from lesson/ooc/lesson_02_stm32g070_proj_mdk/project/RTE/_Target_1/RTE_Components.h rename to lesson/ooc/lesson_02_stm32g070_proj/project_mdk/RTE/_Target_1/RTE_Components.h diff --git a/lesson/ooc/lesson_02_stm32g070_proj_mdk/project/basic.uvprojx b/lesson/ooc/lesson_02_stm32g070_proj/project_mdk/basic.uvprojx similarity index 98% rename from lesson/ooc/lesson_02_stm32g070_proj_mdk/project/basic.uvprojx rename to lesson/ooc/lesson_02_stm32g070_proj/project_mdk/basic.uvprojx index 4be9529..6798f10 100644 --- a/lesson/ooc/lesson_02_stm32g070_proj_mdk/project/basic.uvprojx +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_mdk/basic.uvprojx @@ -10,7 +10,7 @@ Basic 0x4 ARM-ADS - 5060960::V5.06 update 7 (build 960)::.\ARMCC + 6210000::V6.21::ARMCLANG 0 @@ -186,6 +186,7 @@ 0 0 0 + 0 0 0 8 @@ -313,7 +314,7 @@ 1 - 1 + 2 0 0 1 @@ -460,8 +461,8 @@ - - + + diff --git a/lesson/ooc/lesson_02_stm32g070_proj_mdk/user/main.c b/lesson/ooc/lesson_02_stm32g070_proj/user/main.c similarity index 100% rename from lesson/ooc/lesson_02_stm32g070_proj_mdk/user/main.c rename to lesson/ooc/lesson_02_stm32g070_proj/user/main.c diff --git a/lesson/ooc/lesson_02_stm32g070_proj_mdk/user/startup_stm32g070xx.s b/lesson/ooc/lesson_02_stm32g070_proj/user/startup_stm32g070xx.s similarity index 100% rename from lesson/ooc/lesson_02_stm32g070_proj_mdk/user/startup_stm32g070xx.s rename to lesson/ooc/lesson_02_stm32g070_proj/user/startup_stm32g070xx.s diff --git a/lesson/ooc/lesson_02_stm32g070_proj_mdk/user/stm32g0xx_hal_conf.h b/lesson/ooc/lesson_02_stm32g070_proj/user/stm32g0xx_hal_conf.h similarity index 100% rename from lesson/ooc/lesson_02_stm32g070_proj_mdk/user/stm32g0xx_hal_conf.h rename to lesson/ooc/lesson_02_stm32g070_proj/user/stm32g0xx_hal_conf.h diff --git a/lesson/ooc/lesson_02_stm32g070_proj_mdk/user/stm32g0xx_it.c b/lesson/ooc/lesson_02_stm32g070_proj/user/stm32g0xx_it.c similarity index 100% rename from lesson/ooc/lesson_02_stm32g070_proj_mdk/user/stm32g0xx_it.c rename to lesson/ooc/lesson_02_stm32g070_proj/user/stm32g0xx_it.c diff --git a/lesson/ooc/lesson_02_stm32g070_proj_mdk/user/stm32g0xx_it.h b/lesson/ooc/lesson_02_stm32g070_proj/user/stm32g0xx_it.h similarity index 100% rename from lesson/ooc/lesson_02_stm32g070_proj_mdk/user/stm32g0xx_it.h rename to lesson/ooc/lesson_02_stm32g070_proj/user/stm32g0xx_it.h diff --git a/lesson/ooc/lesson_02_stm32g070_proj_mdk/user/system_stm32g0xx.c b/lesson/ooc/lesson_02_stm32g070_proj/user/system_stm32g0xx.c similarity index 100% rename from lesson/ooc/lesson_02_stm32g070_proj_mdk/user/system_stm32g0xx.c rename to lesson/ooc/lesson_02_stm32g070_proj/user/system_stm32g0xx.c -- Gitee From 60d8c90c28f16d5dcc1bc9b5942353cd812df6aa Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 21:38:13 +0800 Subject: [PATCH 02/12] =?UTF-8?q?1.=E6=9B=B4=E6=96=B0MDK=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=EF=BC=9A1.1=E7=BC=96=E8=AF=91=E5=99=A8=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=B8=BAAC6=EF=BC=9B1.2=E8=B0=83=E6=95=B4=E4=BA=86C++=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E8=AE=BE=E5=AE=9A=202.=E6=96=B0=E5=A2=9ESTM32CUBEIDE?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/basic.uvprojx | 19 +- .../project_cubeide/.cproject | 214 +++++++++++++ .../project_cubeide/.project | 59 ++++ .../.settings/language.settings.xml | 25 ++ .../org.eclipse.cdt.codan.core.prefs | 76 +++++ .../.settings/org.eclipse.cdt.core.prefs | 6 + .../org.eclipse.core.resources.prefs | 2 + .../project_cubeide/Basic_cpp.launch | 83 +++++ .../project_cubeide/STM32G070RBTX_FLASH.ld | 185 +++++++++++ .../Startup/startup_stm32g070rbtx.s | 293 ++++++++++++++++++ .../lesson_03_ooc_cpp_pin/user/eio_pin.cpp | 6 +- 11 files changed, 956 insertions(+), 12 deletions(-) create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/language.settings.xml create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.cdt.codan.core.prefs create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.cdt.core.prefs create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.core.resources.prefs create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Basic_cpp.launch create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/STM32G070RBTX_FLASH.ld create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Startup/startup_stm32g070rbtx.s diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project/basic.uvprojx b/lesson/ooc/lesson_03_ooc_cpp_pin/project/basic.uvprojx index d7d47a0..ce8e2f8 100644 --- a/lesson/ooc/lesson_03_ooc_cpp_pin/project/basic.uvprojx +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project/basic.uvprojx @@ -10,8 +10,8 @@ Basic 0x4 ARM-ADS - 5060960::V5.06 update 7 (build 960)::.\ARMCC - 0 + 6210000::V6.21::ARMCLANG + 1 STM32G070RBTx @@ -134,11 +134,11 @@ 0 1 1 - -1 + 4096 1 BIN\UL2CM3.DLL - + "" () @@ -186,6 +186,7 @@ 0 0 0 + 0 0 0 8 @@ -313,7 +314,7 @@ 1 - 1 + 2 0 0 1 @@ -322,7 +323,7 @@ 0 0 0 - 2 + 3 0 0 1 @@ -336,7 +337,7 @@ 0 0 - --cpp + -xc++ -std=c++11 USE_HAL_DRIVER,STM32G070xx ..\..\..\..\mcu\stm32g070\STM32G0xx_HAL_Driver\Inc;..\..\..\..\mcu\stm32g070\STM32G070;..\..\..\..\mcu\stm32g070\CMSIS;..\user;..\..\..\..\eLab\common @@ -480,8 +481,8 @@ - - + + diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject new file mode 100644 index 0000000..fdb00cd --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject @@ -0,0 +1,214 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project new file mode 100644 index 0000000..e44c020 --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project @@ -0,0 +1,59 @@ + + + Basic_cpp + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.st.stm32cube.ide.mcu.MCUProjectNature + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature + com.st.stm32cube.ide.mcu.MCUManagedMakefileProjectNature + com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature + com.st.stm32cube.ide.mcu.MCURootProjectNature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + CMSIS + 2 + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/CMSIS + + + STM32G070 + 2 + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G070 + + + STM32G0xx_HAL_Driver + 2 + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G0xx_HAL_Driver + + + common + 2 + C:/Users/LeoLe/workspace/fireware/elab/elab/common + + + user + 2 + C:/Users/LeoLe/workspace/fireware/elab/lesson/ooc/lesson_03_ooc_cpp_pin/user + + + diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/language.settings.xml b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/language.settings.xml new file mode 100644 index 0000000..e80afbf --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.cdt.codan.core.prefs b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.cdt.codan.core.prefs new file mode 100644 index 0000000..3e86936 --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.cdt.codan.core.prefs @@ -0,0 +1,76 @@ +com.st.stm32cube.ide.mcu.ide.oss.source.checker.libnano.problem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Float formatting support\\")"} +eclipse.preferences.version=1 +org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false} +org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"} +org.eclipse.cdt.codan.checkers.localvarreturn=-Warning +org.eclipse.cdt.codan.checkers.localvarreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Returning the address of a local variable\\")"} +org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"} +org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"} +org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false} +org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"} +org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"} +org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"} +org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"} +org.eclipse.cdt.codan.internal.checkers.BlacklistProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.BlacklistProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function or method is blacklisted\\")",blacklist\=>()} +org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"C-Style cast instead of C++ cast\\")",checkMacro\=>true} +org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false,enable_fallthrough_quickfix_param\=>false} +org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"} +org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true} +org.eclipse.cdt.codan.internal.checkers.CopyrightProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.CopyrightProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Lack of copyright information\\")",regex\=>".*Copyright.*"} +org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid 'decltype(auto)' specifier\\")"} +org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.FloatCompareProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.FloatCompareProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Direct float comparison\\")"} +org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Goto statement used\\")"} +org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"} +org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"} +org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"} +org.eclipse.cdt.codan.internal.checkers.MagicNumberProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MagicNumberProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Avoid magic numbers\\")",checkArray\=>true,checkOperatorParen\=>true,exceptions\=>(1,0,-1,2,1.0,0.0,-1.0)} +org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"} +org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.MissCaseProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MissCaseProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing cases in switch\\")"} +org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing default in switch\\")",defaultWithAllEnums\=>false} +org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing reference return value in assignment operator\\")"} +org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing self check in assignment operator\\")"} +org.eclipse.cdt.codan.internal.checkers.MultipleDeclarationsProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MultipleDeclarationsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Multiple variable declaration\\")"} +org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.NoDiscardProblem=Warning +org.eclipse.cdt.codan.internal.checkers.NoDiscardProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return value not evaluated\\")",macro\=>true} +org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"} +org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"} +org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"} +org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"} +org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"} +org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"} +org.eclipse.cdt.codan.internal.checkers.ShallowCopyProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.ShallowCopyProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Miss copy constructor or assignment operator\\")",onlynew\=>false} +org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.StaticVariableInHeaderProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.StaticVariableInHeaderProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Static variable in header file\\")"} +org.eclipse.cdt.codan.internal.checkers.StructuredBindingDeclarationProblem=Error +org.eclipse.cdt.codan.internal.checkers.StructuredBindingDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid structured binding declaration\\")"} +org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false} +org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false} +org.eclipse.cdt.codan.internal.checkers.SymbolShadowingProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.SymbolShadowingProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol shadowing\\")",paramFuncParameters\=>true} +org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")} +org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Using directive in header\\")"} +org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem=-Error +org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Virtual method call in constructor/destructor\\")"} diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.cdt.core.prefs b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 0000000..c8ec5df --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,6 @@ +doxygen/doxygen_new_line_after_brief=true +doxygen/doxygen_use_brief_tag=false +doxygen/doxygen_use_javadoc_tags=true +doxygen/doxygen_use_pre_tag=false +doxygen/doxygen_use_structural_commands=false +eclipse.preferences.version=1 diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.core.resources.prefs b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Basic_cpp.launch b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Basic_cpp.launch new file mode 100644 index 0000000..2fe9c2c --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Basic_cpp.launch @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/STM32G070RBTX_FLASH.ld b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/STM32G070RBTX_FLASH.ld new file mode 100644 index 0000000..7a55b25 --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/STM32G070RBTX_FLASH.ld @@ -0,0 +1,185 @@ +/* +****************************************************************************** +** +** @file : LinkerScript.ld +** +** @author : Auto-generated by STM32CubeIDE +** +** @brief : Linker script for STM32G070RBTx 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 +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +****************************************************************************** +** @attention +** +** Copyright (c) 2023 STMicroelectronics. +** All rights reserved. +** +** This software is licensed under terms that can be found in the LICENSE file +** in the root directory of this software component. +** If no LICENSE file comes with this software, it is provided AS-IS. +** +****************************************************************************** +*/ + +/* 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 (rx) : ORIGIN = 0x8000000, LENGTH = 128K +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* 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 */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* 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/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Startup/startup_stm32g070rbtx.s b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Startup/startup_stm32g070rbtx.s new file mode 100644 index 0000000..438c64b --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Startup/startup_stm32g070rbtx.s @@ -0,0 +1,293 @@ +/** + ****************************************************************************** + * @file startup_stm32g070rbtx.s + * @author Auto-generated by STM32CubeIDE + * @brief STM32G070RBTx device 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()). + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +.syntax unified +.cpu cortex-m0plus +.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 + mov sp, r0 /* set stack pointer */ +/* Call the clock system initialization function.*/ + bl SystemInit + +/* 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 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 STM32G070RBTx vector table. 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 + +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 interrupt */ + .word 0 /* Reserved */ + .word RTC_STAMP_IRQHandler /* RTC and TAMP interrupts */ + .word FLASH_IRQHandler /* Flash global interrupt */ + .word RCC_IRQHandler /* RCC global interrupt */ + .word EXTI0_1_IRQHandler /* EXTI line 0 and 1 interrupt */ + .word EXTI2_3_IRQHandler /* EXTI line 2 and 3 interrupt */ + .word EXTI4_15_IRQHandler /* EXTI line 4 to 15 interrupt */ + .word UCPD1_UCPD2_IRQHandler /* UCPD global interrupt */ + .word DMA1_Channel1_IRQHandler /* DMA channel 1 interrupt */ + .word DMA1_Channel2_3_IRQHandler /* DMA channel 2 and 3 interrupts */ + .word DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler /* DMA channel 2 and 3 interrupts */ + .word ADC_IRQHandler /* ADC interrupt (ADC combined with EXTI 17 and 18) */ + .word TIM1_BRK_UP_TRG_COMP_IRQHandler /* TIM1 break, update, trigger */ + .word TIM1_CC_IRQHandler /* TIM1 Capture Compare interrupt */ + .word TIM2_IRQHandler /* TIM2 global interrupt */ + .word TIM3_IRQHandler /* TIM3 global interrupt */ + .word TIM6_DAC_LPTIM1_IRQHandler /* TIM6 + LPTIM1 and DAC global interrupt */ + .word TIM7_LPTIM2_IRQHandler /* TIM7 + LPTIM2 global interrupt */ + .word TIM14_IRQHandler /* TIM14 global interrupt */ + .word TIM15_IRQHandler /* Timer 15 global interrupt */ + .word TIM16_IRQHandler /* TIM16 global interrupt */ + .word TIM17_IRQHandler /* TIM17 global interrupt */ + .word I2C1_IRQHandler /* I2C1 global interrupt */ + .word I2C2_IRQHandler /* I2C2 global interrupt */ + .word SPI1_IRQHandler /* SPI1 global interrupt */ + .word SPI2_IRQHandler /* SPI2 global interrupt */ + .word USART1_IRQHandler /* USART1 global interrupt */ + .word USART2_IRQHandler /* USART2 global interrupt */ + .word USART3_USART4_LPUART1_IRQHandler /* USART3 + USART4 + LPUART1 */ + .word CEC_IRQHandler /* CEC global interrupt */ + .size g_pfnVectors, .-g_pfnVectors + +/******************************************************************************* +* +* 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 RTC_STAMP_IRQHandler + .thumb_set RTC_STAMP_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_UCPD2_IRQHandler + .thumb_set UCPD1_UCPD2_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_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler + .thumb_set DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler,Default_Handler + + .weak ADC_IRQHandler + .thumb_set ADC_IRQHandler,Default_Handler + + .weak TIM1_BRK_UP_TRG_COMP_IRQHandler + .thumb_set TIM1_BRK_UP_TRG_COMP_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_USART4_LPUART1_IRQHandler + .thumb_set USART3_USART4_LPUART1_IRQHandler,Default_Handler + + .weak CEC_IRQHandler + .thumb_set CEC_IRQHandler,Default_Handler + + .weak SystemInit + +/************************ (C) COPYRIGHT STMicroelectonics *****END OF FILE****/ diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/user/eio_pin.cpp b/lesson/ooc/lesson_03_ooc_cpp_pin/user/eio_pin.cpp index 0f62c41..d2b4bfa 100644 --- a/lesson/ooc/lesson_03_ooc_cpp_pin/user/eio_pin.cpp +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/user/eio_pin.cpp @@ -120,9 +120,9 @@ static bool _check_pin_name_valid(const char *name) goto exit; } - if (!((name[0] < 'A' && name[0] > 'D') && - (name[2] < '0' && name[2] > '1') && - (name[3] < '0' && name[3] > '9'))) + if ((name[0] < 'A' || name[0] > 'D') || + (name[2] < '0' || name[2] > '1') || + (name[3] < '0' || name[3] > '9')) { ret = false; goto exit; -- Gitee From 94b35ade298d26c3ff04f0d6d77470323a825226 Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 22:06:49 +0800 Subject: [PATCH 03/12] =?UTF-8?q?lesson=5F02=20STM32CUBEIDE=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E8=B5=84=E6=BA=90=E9=93=BE=E6=8E=A5=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=BA=E7=9B=B8=E5=AF=B9=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ooc/lesson_02_stm32g070_proj/project_cubeide/.project | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project index faac890..47fc5c5 100644 --- a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project @@ -32,22 +32,22 @@ CMSIS 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/CMSIS + PARENT-4-PROJECT_LOC/mcu/stm32g070/CMSIS STM32G070 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G070 + PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G070 STM32G0xx_HAL_Driver 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G0xx_HAL_Driver + PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G0xx_HAL_Driver user 2 - C:/Users/LeoLe/workspace/fireware/elab/lesson/ooc/lesson_02_stm32g070_proj/user + PARENT-1-PROJECT_LOC/user -- Gitee From 622535e2fd2ecc0aedc913eaf0c0d3ef78a52bc1 Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 22:11:59 +0800 Subject: [PATCH 04/12] =?UTF-8?q?1.project=E4=BF=AE=E6=94=B9project=5Fmdk;?= =?UTF-8?q?=202.STM32CUBEIDE=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=E6=9B=B4=E6=96=B0=E4=B8=BA=E7=9B=B8=E5=AF=B9=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lesson_03_ooc_cpp_pin/project_cubeide/.cproject | 1 + .../ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project | 10 +++++----- .../RTE/_Basic/RTE_Components.h | 0 .../RTE/_Target_1/RTE_Components.h | 0 .../{project => project_mdk}/basic.uvprojx | 0 5 files changed, 6 insertions(+), 5 deletions(-) rename lesson/ooc/lesson_03_ooc_cpp_pin/{project => project_mdk}/RTE/_Basic/RTE_Components.h (100%) rename lesson/ooc/lesson_03_ooc_cpp_pin/{project => project_mdk}/RTE/_Target_1/RTE_Components.h (100%) rename lesson/ooc/lesson_03_ooc_cpp_pin/{project => project_mdk}/basic.uvprojx (100%) diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject index fdb00cd..a541315 100644 --- a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject @@ -211,4 +211,5 @@ + \ No newline at end of file diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project index e44c020..afa7802 100644 --- a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project @@ -33,27 +33,27 @@ CMSIS 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/CMSIS + PARENT-4-PROJECT_LOC/mcu/stm32g070/CMSIS STM32G070 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G070 + PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G070 STM32G0xx_HAL_Driver 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G0xx_HAL_Driver + PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G0xx_HAL_Driver common 2 - C:/Users/LeoLe/workspace/fireware/elab/elab/common + PARENT-4-PROJECT_LOC/elab/common user 2 - C:/Users/LeoLe/workspace/fireware/elab/lesson/ooc/lesson_03_ooc_cpp_pin/user + PARENT-1-PROJECT_LOC/user diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project/RTE/_Basic/RTE_Components.h b/lesson/ooc/lesson_03_ooc_cpp_pin/project_mdk/RTE/_Basic/RTE_Components.h similarity index 100% rename from lesson/ooc/lesson_03_ooc_cpp_pin/project/RTE/_Basic/RTE_Components.h rename to lesson/ooc/lesson_03_ooc_cpp_pin/project_mdk/RTE/_Basic/RTE_Components.h diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project/RTE/_Target_1/RTE_Components.h b/lesson/ooc/lesson_03_ooc_cpp_pin/project_mdk/RTE/_Target_1/RTE_Components.h similarity index 100% rename from lesson/ooc/lesson_03_ooc_cpp_pin/project/RTE/_Target_1/RTE_Components.h rename to lesson/ooc/lesson_03_ooc_cpp_pin/project_mdk/RTE/_Target_1/RTE_Components.h diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project/basic.uvprojx b/lesson/ooc/lesson_03_ooc_cpp_pin/project_mdk/basic.uvprojx similarity index 100% rename from lesson/ooc/lesson_03_ooc_cpp_pin/project/basic.uvprojx rename to lesson/ooc/lesson_03_ooc_cpp_pin/project_mdk/basic.uvprojx -- Gitee From 011a53a008858bd0efb6072a98761d9be8ff4619 Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 22:21:32 +0800 Subject: [PATCH 05/12] =?UTF-8?q?1.project=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E5=90=8D=E4=BF=AE=E6=94=B9=E4=B8=BAproject=5Fmdk;=202.?= =?UTF-8?q?=E6=96=B0=E5=A2=9ESTM32CUBEIDE=E9=A1=B9=E7=9B=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project_cubeide/.cproject | 181 +++++++++++ .../project_cubeide/.project | 58 ++++ .../.settings/language.settings.xml | 25 ++ .../.settings/org.eclipse.cdt.core.prefs | 6 + .../org.eclipse.core.resources.prefs | 2 + .../project_cubeide/Basic.launch | 83 +++++ .../project_cubeide/Basic_Pin.launch | 83 +++++ .../project_cubeide/STM32G070RBTX_FLASH.ld | 185 +++++++++++ .../Startup/startup_stm32g070rbtx.s | 293 ++++++++++++++++++ .../RTE/_Basic/RTE_Components.h | 0 .../RTE/_Target_1/RTE_Components.h | 0 .../{project => project_mdk}/basic.uvprojx | 0 12 files changed, 916 insertions(+) create mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/.cproject create mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project create mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/language.settings.xml create mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/org.eclipse.cdt.core.prefs create mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/org.eclipse.core.resources.prefs create mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/Basic.launch create mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/Basic_Pin.launch create mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/STM32G070RBTX_FLASH.ld create mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/Startup/startup_stm32g070rbtx.s rename lesson/ooc/lesson_04_ooc_pin/{project => project_mdk}/RTE/_Basic/RTE_Components.h (100%) rename lesson/ooc/lesson_04_ooc_pin/{project => project_mdk}/RTE/_Target_1/RTE_Components.h (100%) rename lesson/ooc/lesson_04_ooc_pin/{project => project_mdk}/basic.uvprojx (100%) diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.cproject b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.cproject new file mode 100644 index 0000000..526bd82 --- /dev/null +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.cproject @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project new file mode 100644 index 0000000..c2d15c9 --- /dev/null +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project @@ -0,0 +1,58 @@ + + + Basic_Pin + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.st.stm32cube.ide.mcu.MCUProjectNature + org.eclipse.cdt.core.cnature + com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature + com.st.stm32cube.ide.mcu.MCUManagedMakefileProjectNature + com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature + com.st.stm32cube.ide.mcu.MCURootProjectNature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + CMSIS + 2 + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/CMSIS + + + STM32G070 + 2 + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G070 + + + STM32G0xx_HAL_Driver + 2 + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G0xx_HAL_Driver + + + common + 2 + C:/Users/LeoLe/workspace/fireware/elab/elab/common + + + user + 2 + C:/Users/LeoLe/workspace/fireware/elab/lesson/ooc/lesson_04_ooc_pin/user + + + diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/language.settings.xml b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/language.settings.xml new file mode 100644 index 0000000..0a8d7fd --- /dev/null +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/org.eclipse.cdt.core.prefs b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 0000000..c8ec5df --- /dev/null +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,6 @@ +doxygen/doxygen_new_line_after_brief=true +doxygen/doxygen_use_brief_tag=false +doxygen/doxygen_use_javadoc_tags=true +doxygen/doxygen_use_pre_tag=false +doxygen/doxygen_use_structural_commands=false +eclipse.preferences.version=1 diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/org.eclipse.core.resources.prefs b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Basic.launch b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Basic.launch new file mode 100644 index 0000000..ada9a5b --- /dev/null +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Basic.launch @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Basic_Pin.launch b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Basic_Pin.launch new file mode 100644 index 0000000..d1f59d8 --- /dev/null +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Basic_Pin.launch @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/STM32G070RBTX_FLASH.ld b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/STM32G070RBTX_FLASH.ld new file mode 100644 index 0000000..7a55b25 --- /dev/null +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/STM32G070RBTX_FLASH.ld @@ -0,0 +1,185 @@ +/* +****************************************************************************** +** +** @file : LinkerScript.ld +** +** @author : Auto-generated by STM32CubeIDE +** +** @brief : Linker script for STM32G070RBTx 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 +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +****************************************************************************** +** @attention +** +** Copyright (c) 2023 STMicroelectronics. +** All rights reserved. +** +** This software is licensed under terms that can be found in the LICENSE file +** in the root directory of this software component. +** If no LICENSE file comes with this software, it is provided AS-IS. +** +****************************************************************************** +*/ + +/* 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 (rx) : ORIGIN = 0x8000000, LENGTH = 128K +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* 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 */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* 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/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Startup/startup_stm32g070rbtx.s b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Startup/startup_stm32g070rbtx.s new file mode 100644 index 0000000..438c64b --- /dev/null +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Startup/startup_stm32g070rbtx.s @@ -0,0 +1,293 @@ +/** + ****************************************************************************** + * @file startup_stm32g070rbtx.s + * @author Auto-generated by STM32CubeIDE + * @brief STM32G070RBTx device 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()). + ****************************************************************************** + * @attention + * + * Copyright (c) 2023 STMicroelectronics. + * All rights reserved. + * + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. + * + ****************************************************************************** + */ + +.syntax unified +.cpu cortex-m0plus +.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 + mov sp, r0 /* set stack pointer */ +/* Call the clock system initialization function.*/ + bl SystemInit + +/* 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 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 STM32G070RBTx vector table. 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 + +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 interrupt */ + .word 0 /* Reserved */ + .word RTC_STAMP_IRQHandler /* RTC and TAMP interrupts */ + .word FLASH_IRQHandler /* Flash global interrupt */ + .word RCC_IRQHandler /* RCC global interrupt */ + .word EXTI0_1_IRQHandler /* EXTI line 0 and 1 interrupt */ + .word EXTI2_3_IRQHandler /* EXTI line 2 and 3 interrupt */ + .word EXTI4_15_IRQHandler /* EXTI line 4 to 15 interrupt */ + .word UCPD1_UCPD2_IRQHandler /* UCPD global interrupt */ + .word DMA1_Channel1_IRQHandler /* DMA channel 1 interrupt */ + .word DMA1_Channel2_3_IRQHandler /* DMA channel 2 and 3 interrupts */ + .word DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler /* DMA channel 2 and 3 interrupts */ + .word ADC_IRQHandler /* ADC interrupt (ADC combined with EXTI 17 and 18) */ + .word TIM1_BRK_UP_TRG_COMP_IRQHandler /* TIM1 break, update, trigger */ + .word TIM1_CC_IRQHandler /* TIM1 Capture Compare interrupt */ + .word TIM2_IRQHandler /* TIM2 global interrupt */ + .word TIM3_IRQHandler /* TIM3 global interrupt */ + .word TIM6_DAC_LPTIM1_IRQHandler /* TIM6 + LPTIM1 and DAC global interrupt */ + .word TIM7_LPTIM2_IRQHandler /* TIM7 + LPTIM2 global interrupt */ + .word TIM14_IRQHandler /* TIM14 global interrupt */ + .word TIM15_IRQHandler /* Timer 15 global interrupt */ + .word TIM16_IRQHandler /* TIM16 global interrupt */ + .word TIM17_IRQHandler /* TIM17 global interrupt */ + .word I2C1_IRQHandler /* I2C1 global interrupt */ + .word I2C2_IRQHandler /* I2C2 global interrupt */ + .word SPI1_IRQHandler /* SPI1 global interrupt */ + .word SPI2_IRQHandler /* SPI2 global interrupt */ + .word USART1_IRQHandler /* USART1 global interrupt */ + .word USART2_IRQHandler /* USART2 global interrupt */ + .word USART3_USART4_LPUART1_IRQHandler /* USART3 + USART4 + LPUART1 */ + .word CEC_IRQHandler /* CEC global interrupt */ + .size g_pfnVectors, .-g_pfnVectors + +/******************************************************************************* +* +* 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 RTC_STAMP_IRQHandler + .thumb_set RTC_STAMP_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_UCPD2_IRQHandler + .thumb_set UCPD1_UCPD2_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_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler + .thumb_set DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler,Default_Handler + + .weak ADC_IRQHandler + .thumb_set ADC_IRQHandler,Default_Handler + + .weak TIM1_BRK_UP_TRG_COMP_IRQHandler + .thumb_set TIM1_BRK_UP_TRG_COMP_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_USART4_LPUART1_IRQHandler + .thumb_set USART3_USART4_LPUART1_IRQHandler,Default_Handler + + .weak CEC_IRQHandler + .thumb_set CEC_IRQHandler,Default_Handler + + .weak SystemInit + +/************************ (C) COPYRIGHT STMicroelectonics *****END OF FILE****/ diff --git a/lesson/ooc/lesson_04_ooc_pin/project/RTE/_Basic/RTE_Components.h b/lesson/ooc/lesson_04_ooc_pin/project_mdk/RTE/_Basic/RTE_Components.h similarity index 100% rename from lesson/ooc/lesson_04_ooc_pin/project/RTE/_Basic/RTE_Components.h rename to lesson/ooc/lesson_04_ooc_pin/project_mdk/RTE/_Basic/RTE_Components.h diff --git a/lesson/ooc/lesson_04_ooc_pin/project/RTE/_Target_1/RTE_Components.h b/lesson/ooc/lesson_04_ooc_pin/project_mdk/RTE/_Target_1/RTE_Components.h similarity index 100% rename from lesson/ooc/lesson_04_ooc_pin/project/RTE/_Target_1/RTE_Components.h rename to lesson/ooc/lesson_04_ooc_pin/project_mdk/RTE/_Target_1/RTE_Components.h diff --git a/lesson/ooc/lesson_04_ooc_pin/project/basic.uvprojx b/lesson/ooc/lesson_04_ooc_pin/project_mdk/basic.uvprojx similarity index 100% rename from lesson/ooc/lesson_04_ooc_pin/project/basic.uvprojx rename to lesson/ooc/lesson_04_ooc_pin/project_mdk/basic.uvprojx -- Gitee From 7b5aafeb4145fe04326217a5c9027c5944c40020 Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 22:26:17 +0800 Subject: [PATCH 06/12] =?UTF-8?q?STM32CUBEIDE=E5=B7=A5=E7=A8=8B=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E5=9C=B0=E5=9D=80=E4=BF=AE=E6=94=B9=E4=B8=BA=E7=9B=B8?= =?UTF-8?q?=E5=AF=B9=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project index c2d15c9..3ba11d8 100644 --- a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project @@ -32,27 +32,27 @@ CMSIS 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/CMSIS + PARENT-4-PROJECT_LOC/mcu/stm32g070/CMSIS STM32G070 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G070 + PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G070 STM32G0xx_HAL_Driver 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070/STM32G0xx_HAL_Driver + PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G0xx_HAL_Driver common 2 - C:/Users/LeoLe/workspace/fireware/elab/elab/common + PARENT-4-PROJECT_LOC/elab/common user 2 - C:/Users/LeoLe/workspace/fireware/elab/lesson/ooc/lesson_04_ooc_pin/user + PARENT-1-PROJECT_LOC/user -- Gitee From 308ab207fdb50a724084fb02f0f1b1b0605aed15 Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 23:18:32 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project_cubeide/.cproject | 21 +++-- .../project_cubeide/.project | 14 +--- .../org.eclipse.cdt.codan.core.prefs | 76 +++++++++++++++++++ 3 files changed, 91 insertions(+), 20 deletions(-) create mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.cdt.codan.core.prefs diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject index 0b784a8..275ffd5 100644 --- a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject @@ -36,16 +36,16 @@ @@ -73,10 +73,8 @@ - - - + @@ -168,5 +166,12 @@ - + + + + + + + + \ No newline at end of file diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project index 47fc5c5..0195821 100644 --- a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.project @@ -30,19 +30,9 @@ - CMSIS + stm32g070 2 - PARENT-4-PROJECT_LOC/mcu/stm32g070/CMSIS - - - STM32G070 - 2 - PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G070 - - - STM32G0xx_HAL_Driver - 2 - PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G0xx_HAL_Driver + PARENT-4-PROJECT_LOC/mcu/stm32g070 user diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.cdt.codan.core.prefs b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.cdt.codan.core.prefs new file mode 100644 index 0000000..3e86936 --- /dev/null +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.settings/org.eclipse.cdt.codan.core.prefs @@ -0,0 +1,76 @@ +com.st.stm32cube.ide.mcu.ide.oss.source.checker.libnano.problem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Float formatting support\\")"} +eclipse.preferences.version=1 +org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false} +org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"} +org.eclipse.cdt.codan.checkers.localvarreturn=-Warning +org.eclipse.cdt.codan.checkers.localvarreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Returning the address of a local variable\\")"} +org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"} +org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"} +org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false} +org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"} +org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"} +org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"} +org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"} +org.eclipse.cdt.codan.internal.checkers.BlacklistProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.BlacklistProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function or method is blacklisted\\")",blacklist\=>()} +org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"C-Style cast instead of C++ cast\\")",checkMacro\=>true} +org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false,enable_fallthrough_quickfix_param\=>false} +org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"} +org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true} +org.eclipse.cdt.codan.internal.checkers.CopyrightProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.CopyrightProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Lack of copyright information\\")",regex\=>".*Copyright.*"} +org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid 'decltype(auto)' specifier\\")"} +org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.FloatCompareProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.FloatCompareProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Direct float comparison\\")"} +org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Goto statement used\\")"} +org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"} +org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"} +org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"} +org.eclipse.cdt.codan.internal.checkers.MagicNumberProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MagicNumberProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Avoid magic numbers\\")",checkArray\=>true,checkOperatorParen\=>true,exceptions\=>(1,0,-1,2,1.0,0.0,-1.0)} +org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"} +org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.MissCaseProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MissCaseProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing cases in switch\\")"} +org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing default in switch\\")",defaultWithAllEnums\=>false} +org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing reference return value in assignment operator\\")"} +org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing self check in assignment operator\\")"} +org.eclipse.cdt.codan.internal.checkers.MultipleDeclarationsProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.MultipleDeclarationsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Multiple variable declaration\\")"} +org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.NoDiscardProblem=Warning +org.eclipse.cdt.codan.internal.checkers.NoDiscardProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return value not evaluated\\")",macro\=>true} +org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"} +org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"} +org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"} +org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"} +org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"} +org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"} +org.eclipse.cdt.codan.internal.checkers.ShallowCopyProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.ShallowCopyProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Miss copy constructor or assignment operator\\")",onlynew\=>false} +org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()} +org.eclipse.cdt.codan.internal.checkers.StaticVariableInHeaderProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.StaticVariableInHeaderProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Static variable in header file\\")"} +org.eclipse.cdt.codan.internal.checkers.StructuredBindingDeclarationProblem=Error +org.eclipse.cdt.codan.internal.checkers.StructuredBindingDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid structured binding declaration\\")"} +org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false} +org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false} +org.eclipse.cdt.codan.internal.checkers.SymbolShadowingProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.SymbolShadowingProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol shadowing\\")",paramFuncParameters\=>true} +org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true} +org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")} +org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem=-Warning +org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Using directive in header\\")"} +org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"} +org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem=-Error +org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Virtual method call in constructor/destructor\\")"} -- Gitee From a214572020ed9de42b66e65431600139321917f1 Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 23:38:13 +0800 Subject: [PATCH 08/12] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9STM32CUBEIDE=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84=EF=BC=9B=202.?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=20startup=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project_cubeide/.cproject | 28 +- .../project_cubeide/.project | 18 +- .../Startup/startup_stm32g070rbtx.s | 293 ------------------ 3 files changed, 16 insertions(+), 323 deletions(-) delete mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Startup/startup_stm32g070rbtx.s diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject index a541315..ca02d63 100644 --- a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject @@ -43,11 +43,11 @@ @@ -62,12 +62,12 @@ @@ -90,11 +90,8 @@ - - - - - + + @@ -175,7 +172,6 @@ - diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project index afa7802..2116fa5 100644 --- a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project @@ -31,24 +31,14 @@ - CMSIS + elab 2 - PARENT-4-PROJECT_LOC/mcu/stm32g070/CMSIS + C:/Users/LeoLe/workspace/fireware/elab/elab - STM32G070 + stm32g070 2 - PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G070 - - - STM32G0xx_HAL_Driver - 2 - PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G0xx_HAL_Driver - - - common - 2 - PARENT-4-PROJECT_LOC/elab/common + C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070 user diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Startup/startup_stm32g070rbtx.s b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Startup/startup_stm32g070rbtx.s deleted file mode 100644 index 438c64b..0000000 --- a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/Startup/startup_stm32g070rbtx.s +++ /dev/null @@ -1,293 +0,0 @@ -/** - ****************************************************************************** - * @file startup_stm32g070rbtx.s - * @author Auto-generated by STM32CubeIDE - * @brief STM32G070RBTx device 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()). - ****************************************************************************** - * @attention - * - * Copyright (c) 2023 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ - -.syntax unified -.cpu cortex-m0plus -.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 - mov sp, r0 /* set stack pointer */ -/* Call the clock system initialization function.*/ - bl SystemInit - -/* 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 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 STM32G070RBTx vector table. 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 - -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 interrupt */ - .word 0 /* Reserved */ - .word RTC_STAMP_IRQHandler /* RTC and TAMP interrupts */ - .word FLASH_IRQHandler /* Flash global interrupt */ - .word RCC_IRQHandler /* RCC global interrupt */ - .word EXTI0_1_IRQHandler /* EXTI line 0 and 1 interrupt */ - .word EXTI2_3_IRQHandler /* EXTI line 2 and 3 interrupt */ - .word EXTI4_15_IRQHandler /* EXTI line 4 to 15 interrupt */ - .word UCPD1_UCPD2_IRQHandler /* UCPD global interrupt */ - .word DMA1_Channel1_IRQHandler /* DMA channel 1 interrupt */ - .word DMA1_Channel2_3_IRQHandler /* DMA channel 2 and 3 interrupts */ - .word DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler /* DMA channel 2 and 3 interrupts */ - .word ADC_IRQHandler /* ADC interrupt (ADC combined with EXTI 17 and 18) */ - .word TIM1_BRK_UP_TRG_COMP_IRQHandler /* TIM1 break, update, trigger */ - .word TIM1_CC_IRQHandler /* TIM1 Capture Compare interrupt */ - .word TIM2_IRQHandler /* TIM2 global interrupt */ - .word TIM3_IRQHandler /* TIM3 global interrupt */ - .word TIM6_DAC_LPTIM1_IRQHandler /* TIM6 + LPTIM1 and DAC global interrupt */ - .word TIM7_LPTIM2_IRQHandler /* TIM7 + LPTIM2 global interrupt */ - .word TIM14_IRQHandler /* TIM14 global interrupt */ - .word TIM15_IRQHandler /* Timer 15 global interrupt */ - .word TIM16_IRQHandler /* TIM16 global interrupt */ - .word TIM17_IRQHandler /* TIM17 global interrupt */ - .word I2C1_IRQHandler /* I2C1 global interrupt */ - .word I2C2_IRQHandler /* I2C2 global interrupt */ - .word SPI1_IRQHandler /* SPI1 global interrupt */ - .word SPI2_IRQHandler /* SPI2 global interrupt */ - .word USART1_IRQHandler /* USART1 global interrupt */ - .word USART2_IRQHandler /* USART2 global interrupt */ - .word USART3_USART4_LPUART1_IRQHandler /* USART3 + USART4 + LPUART1 */ - .word CEC_IRQHandler /* CEC global interrupt */ - .size g_pfnVectors, .-g_pfnVectors - -/******************************************************************************* -* -* 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 RTC_STAMP_IRQHandler - .thumb_set RTC_STAMP_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_UCPD2_IRQHandler - .thumb_set UCPD1_UCPD2_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_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler - .thumb_set DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler,Default_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Default_Handler - - .weak TIM1_BRK_UP_TRG_COMP_IRQHandler - .thumb_set TIM1_BRK_UP_TRG_COMP_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_USART4_LPUART1_IRQHandler - .thumb_set USART3_USART4_LPUART1_IRQHandler,Default_Handler - - .weak CEC_IRQHandler - .thumb_set CEC_IRQHandler,Default_Handler - - .weak SystemInit - -/************************ (C) COPYRIGHT STMicroelectonics *****END OF FILE****/ -- Gitee From 10efec55f5c8cc166596d36b426d2b19dfe8eda7 Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 23:40:39 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=20statrup=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project_cubeide/.cproject | 5 +- .../Startup/startup_stm32g070rbtx.s | 293 ------------------ 2 files changed, 2 insertions(+), 296 deletions(-) delete mode 100644 lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Startup/startup_stm32g070rbtx.s diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject index 275ffd5..364cf64 100644 --- a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject +++ b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/.cproject @@ -73,8 +73,7 @@ - - + @@ -144,7 +143,7 @@ - + diff --git a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Startup/startup_stm32g070rbtx.s b/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Startup/startup_stm32g070rbtx.s deleted file mode 100644 index 438c64b..0000000 --- a/lesson/ooc/lesson_02_stm32g070_proj/project_cubeide/Startup/startup_stm32g070rbtx.s +++ /dev/null @@ -1,293 +0,0 @@ -/** - ****************************************************************************** - * @file startup_stm32g070rbtx.s - * @author Auto-generated by STM32CubeIDE - * @brief STM32G070RBTx device 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()). - ****************************************************************************** - * @attention - * - * Copyright (c) 2023 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ - -.syntax unified -.cpu cortex-m0plus -.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 - mov sp, r0 /* set stack pointer */ -/* Call the clock system initialization function.*/ - bl SystemInit - -/* 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 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 STM32G070RBTx vector table. 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 - -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 interrupt */ - .word 0 /* Reserved */ - .word RTC_STAMP_IRQHandler /* RTC and TAMP interrupts */ - .word FLASH_IRQHandler /* Flash global interrupt */ - .word RCC_IRQHandler /* RCC global interrupt */ - .word EXTI0_1_IRQHandler /* EXTI line 0 and 1 interrupt */ - .word EXTI2_3_IRQHandler /* EXTI line 2 and 3 interrupt */ - .word EXTI4_15_IRQHandler /* EXTI line 4 to 15 interrupt */ - .word UCPD1_UCPD2_IRQHandler /* UCPD global interrupt */ - .word DMA1_Channel1_IRQHandler /* DMA channel 1 interrupt */ - .word DMA1_Channel2_3_IRQHandler /* DMA channel 2 and 3 interrupts */ - .word DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler /* DMA channel 2 and 3 interrupts */ - .word ADC_IRQHandler /* ADC interrupt (ADC combined with EXTI 17 and 18) */ - .word TIM1_BRK_UP_TRG_COMP_IRQHandler /* TIM1 break, update, trigger */ - .word TIM1_CC_IRQHandler /* TIM1 Capture Compare interrupt */ - .word TIM2_IRQHandler /* TIM2 global interrupt */ - .word TIM3_IRQHandler /* TIM3 global interrupt */ - .word TIM6_DAC_LPTIM1_IRQHandler /* TIM6 + LPTIM1 and DAC global interrupt */ - .word TIM7_LPTIM2_IRQHandler /* TIM7 + LPTIM2 global interrupt */ - .word TIM14_IRQHandler /* TIM14 global interrupt */ - .word TIM15_IRQHandler /* Timer 15 global interrupt */ - .word TIM16_IRQHandler /* TIM16 global interrupt */ - .word TIM17_IRQHandler /* TIM17 global interrupt */ - .word I2C1_IRQHandler /* I2C1 global interrupt */ - .word I2C2_IRQHandler /* I2C2 global interrupt */ - .word SPI1_IRQHandler /* SPI1 global interrupt */ - .word SPI2_IRQHandler /* SPI2 global interrupt */ - .word USART1_IRQHandler /* USART1 global interrupt */ - .word USART2_IRQHandler /* USART2 global interrupt */ - .word USART3_USART4_LPUART1_IRQHandler /* USART3 + USART4 + LPUART1 */ - .word CEC_IRQHandler /* CEC global interrupt */ - .size g_pfnVectors, .-g_pfnVectors - -/******************************************************************************* -* -* 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 RTC_STAMP_IRQHandler - .thumb_set RTC_STAMP_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_UCPD2_IRQHandler - .thumb_set UCPD1_UCPD2_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_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler - .thumb_set DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler,Default_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Default_Handler - - .weak TIM1_BRK_UP_TRG_COMP_IRQHandler - .thumb_set TIM1_BRK_UP_TRG_COMP_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_USART4_LPUART1_IRQHandler - .thumb_set USART3_USART4_LPUART1_IRQHandler,Default_Handler - - .weak CEC_IRQHandler - .thumb_set CEC_IRQHandler,Default_Handler - - .weak SystemInit - -/************************ (C) COPYRIGHT STMicroelectonics *****END OF FILE****/ -- Gitee From 6f8d9b4a4e21d7eeca3536447ae7ab1f623ab5d6 Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 23:45:06 +0800 Subject: [PATCH 10/12] =?UTF-8?q?STM32CUBEIDE=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E8=B7=AF=E5=BE=84=E6=9B=B4=E6=96=B0=E4=B8=BA?= =?UTF-8?q?=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject | 1 + lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project | 4 ++-- .../.settings/com.st.stm32cube.ide.mcu.sfr.prefs | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/com.st.stm32cube.ide.mcu.sfr.prefs diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject index ca02d63..497ecbc 100644 --- a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.cproject @@ -172,6 +172,7 @@ + diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project index 2116fa5..b3d6517 100644 --- a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.project @@ -33,12 +33,12 @@ elab 2 - C:/Users/LeoLe/workspace/fireware/elab/elab + PARENT-4-PROJECT_LOC/elab stm32g070 2 - C:/Users/LeoLe/workspace/fireware/elab/mcu/stm32g070 + PARENT-4-PROJECT_LOC/mcu/stm32g070 user diff --git a/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/com.st.stm32cube.ide.mcu.sfr.prefs b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/com.st.stm32cube.ide.mcu.sfr.prefs new file mode 100644 index 0000000..3a4a492 --- /dev/null +++ b/lesson/ooc/lesson_03_ooc_cpp_pin/project_cubeide/.settings/com.st.stm32cube.ide.mcu.sfr.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +svd_custom_file_path= +svd_file_path=platform\:/plugin/com.st.stm32cube.ide.mcu.productdb.debug/resources/cmsis/STMicroelectronics_CMSIS_SVD/STM32G070.svd -- Gitee From 71f587e1e72abd267c82cfc9115b1d500bbb7dc5 Mon Sep 17 00:00:00 2001 From: leo leung Date: Sat, 9 Dec 2023 23:54:27 +0800 Subject: [PATCH 11/12] =?UTF-8?q?1.=E6=9B=B4=E6=96=B0STM32CUBEIDE=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=9B=AE=E5=BD=95=E7=BB=93=E6=9E=84=EF=BC=9B=202.?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2startup=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project_cubeide/.cproject | 19 +- .../project_cubeide/.project | 18 +- .../Startup/startup_stm32g070rbtx.s | 293 ------------------ 3 files changed, 12 insertions(+), 318 deletions(-) delete mode 100644 lesson/ooc/lesson_04_ooc_pin/project_cubeide/Startup/startup_stm32g070rbtx.s diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.cproject b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.cproject index 526bd82..7956642 100644 --- a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.cproject +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.cproject @@ -36,18 +36,18 @@ @@ -74,11 +74,8 @@ - - - - - + + @@ -148,7 +145,7 @@ - + diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project index 3ba11d8..bd6945f 100644 --- a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project +++ b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/.project @@ -30,24 +30,14 @@ - CMSIS + elab 2 - PARENT-4-PROJECT_LOC/mcu/stm32g070/CMSIS + PARENT-4-PROJECT_LOC/elab - STM32G070 + stm32g070 2 - PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G070 - - - STM32G0xx_HAL_Driver - 2 - PARENT-4-PROJECT_LOC/mcu/stm32g070/STM32G0xx_HAL_Driver - - - common - 2 - PARENT-4-PROJECT_LOC/elab/common + PARENT-4-PROJECT_LOC/mcu/stm32g070 user diff --git a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Startup/startup_stm32g070rbtx.s b/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Startup/startup_stm32g070rbtx.s deleted file mode 100644 index 438c64b..0000000 --- a/lesson/ooc/lesson_04_ooc_pin/project_cubeide/Startup/startup_stm32g070rbtx.s +++ /dev/null @@ -1,293 +0,0 @@ -/** - ****************************************************************************** - * @file startup_stm32g070rbtx.s - * @author Auto-generated by STM32CubeIDE - * @brief STM32G070RBTx device 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()). - ****************************************************************************** - * @attention - * - * Copyright (c) 2023 STMicroelectronics. - * All rights reserved. - * - * This software is licensed under terms that can be found in the LICENSE file - * in the root directory of this software component. - * If no LICENSE file comes with this software, it is provided AS-IS. - * - ****************************************************************************** - */ - -.syntax unified -.cpu cortex-m0plus -.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 - mov sp, r0 /* set stack pointer */ -/* Call the clock system initialization function.*/ - bl SystemInit - -/* 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 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 STM32G070RBTx vector table. 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 - -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 interrupt */ - .word 0 /* Reserved */ - .word RTC_STAMP_IRQHandler /* RTC and TAMP interrupts */ - .word FLASH_IRQHandler /* Flash global interrupt */ - .word RCC_IRQHandler /* RCC global interrupt */ - .word EXTI0_1_IRQHandler /* EXTI line 0 and 1 interrupt */ - .word EXTI2_3_IRQHandler /* EXTI line 2 and 3 interrupt */ - .word EXTI4_15_IRQHandler /* EXTI line 4 to 15 interrupt */ - .word UCPD1_UCPD2_IRQHandler /* UCPD global interrupt */ - .word DMA1_Channel1_IRQHandler /* DMA channel 1 interrupt */ - .word DMA1_Channel2_3_IRQHandler /* DMA channel 2 and 3 interrupts */ - .word DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler /* DMA channel 2 and 3 interrupts */ - .word ADC_IRQHandler /* ADC interrupt (ADC combined with EXTI 17 and 18) */ - .word TIM1_BRK_UP_TRG_COMP_IRQHandler /* TIM1 break, update, trigger */ - .word TIM1_CC_IRQHandler /* TIM1 Capture Compare interrupt */ - .word TIM2_IRQHandler /* TIM2 global interrupt */ - .word TIM3_IRQHandler /* TIM3 global interrupt */ - .word TIM6_DAC_LPTIM1_IRQHandler /* TIM6 + LPTIM1 and DAC global interrupt */ - .word TIM7_LPTIM2_IRQHandler /* TIM7 + LPTIM2 global interrupt */ - .word TIM14_IRQHandler /* TIM14 global interrupt */ - .word TIM15_IRQHandler /* Timer 15 global interrupt */ - .word TIM16_IRQHandler /* TIM16 global interrupt */ - .word TIM17_IRQHandler /* TIM17 global interrupt */ - .word I2C1_IRQHandler /* I2C1 global interrupt */ - .word I2C2_IRQHandler /* I2C2 global interrupt */ - .word SPI1_IRQHandler /* SPI1 global interrupt */ - .word SPI2_IRQHandler /* SPI2 global interrupt */ - .word USART1_IRQHandler /* USART1 global interrupt */ - .word USART2_IRQHandler /* USART2 global interrupt */ - .word USART3_USART4_LPUART1_IRQHandler /* USART3 + USART4 + LPUART1 */ - .word CEC_IRQHandler /* CEC global interrupt */ - .size g_pfnVectors, .-g_pfnVectors - -/******************************************************************************* -* -* 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 RTC_STAMP_IRQHandler - .thumb_set RTC_STAMP_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_UCPD2_IRQHandler - .thumb_set UCPD1_UCPD2_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_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler - .thumb_set DMA1_Channel4_5_6_7_DMAMUX_DMA2_Channel1_2_3_4_5_IRQHandler,Default_Handler - - .weak ADC_IRQHandler - .thumb_set ADC_IRQHandler,Default_Handler - - .weak TIM1_BRK_UP_TRG_COMP_IRQHandler - .thumb_set TIM1_BRK_UP_TRG_COMP_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_USART4_LPUART1_IRQHandler - .thumb_set USART3_USART4_LPUART1_IRQHandler,Default_Handler - - .weak CEC_IRQHandler - .thumb_set CEC_IRQHandler,Default_Handler - - .weak SystemInit - -/************************ (C) COPYRIGHT STMicroelectonics *****END OF FILE****/ -- Gitee From 20d819a02771197951334609e39948a595d1c34c Mon Sep 17 00:00:00 2001 From: leo leung Date: Sun, 10 Dec 2023 22:44:50 +0800 Subject: [PATCH 12/12] =?UTF-8?q?1.=E4=BF=AE=E6=AD=A3eio=5Fpin=E4=B8=AD?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E9=80=BB=E8=BE=91=EF=BC=9B2.=E6=96=B0?= =?UTF-8?q?=E5=A2=9ESTM32CUBEIDE=E5=B7=A5=E7=A8=8B=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lesson_05_shell/project_cubeide/.cproject | 182 +++++++++++++++ .../lesson_05_shell/project_cubeide/.project | 48 ++++ .../com.st.stm32cube.ide.mcu.sfrview.prefs | 2 + .../.settings/language.settings.xml | 25 +++ .../.settings/org.eclipse.cdt.core.prefs | 6 + .../org.eclipse.core.resources.prefs | 2 + .../project_cubeide/Basic.launch | 83 +++++++ .../project_cubeide/Basic_Pin.launch | 83 +++++++ .../project_cubeide/Basic_Shell Debug.launch | 83 +++++++ .../project_cubeide/STM32G070RBTX_FLASH.ld | 209 ++++++++++++++++++ .../RTE/Compiler/EventRecorderConf.h | 0 .../RTE/_Basic/RTE_Components.h | 0 .../RTE/_Target_1/RTE_Components.h | 0 .../{project => project_mdk}/basic.uvprojx | 1 + lesson/ooc/lesson_05_shell/user/eio_pin.c | 6 +- 15 files changed, 727 insertions(+), 3 deletions(-) create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/.cproject create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/.project create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/.settings/language.settings.xml create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/.settings/org.eclipse.cdt.core.prefs create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/.settings/org.eclipse.core.resources.prefs create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/Basic.launch create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/Basic_Pin.launch create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/Basic_Shell Debug.launch create mode 100644 lesson/ooc/lesson_05_shell/project_cubeide/STM32G070RBTX_FLASH.ld rename lesson/ooc/lesson_05_shell/{project => project_mdk}/RTE/Compiler/EventRecorderConf.h (100%) rename lesson/ooc/lesson_05_shell/{project => project_mdk}/RTE/_Basic/RTE_Components.h (100%) rename lesson/ooc/lesson_05_shell/{project => project_mdk}/RTE/_Target_1/RTE_Components.h (100%) rename lesson/ooc/lesson_05_shell/{project => project_mdk}/basic.uvprojx (99%) diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/.cproject b/lesson/ooc/lesson_05_shell/project_cubeide/.cproject new file mode 100644 index 0000000..ddfe270 --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/.cproject @@ -0,0 +1,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/.project b/lesson/ooc/lesson_05_shell/project_cubeide/.project new file mode 100644 index 0000000..55ff702 --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/.project @@ -0,0 +1,48 @@ + + + Basic_Shell + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + com.st.stm32cube.ide.mcu.MCUProjectNature + org.eclipse.cdt.core.cnature + com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAev2ProjectNature + com.st.stm32cube.ide.mcu.MCUManagedMakefileProjectNature + com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature + com.st.stm32cube.ide.mcu.MCURootProjectNature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + elab + 2 + PARENT-4-PROJECT_LOC/elab + + + stm32g070 + 2 + PARENT-4-PROJECT_LOC/mcu/stm32g070 + + + user + 2 + PARENT-1-PROJECT_LOC/user + + + diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs b/lesson/ooc/lesson_05_shell/project_cubeide/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs new file mode 100644 index 0000000..98a69fc --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/.settings/com.st.stm32cube.ide.mcu.sfrview.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +sfrviewstate={"fFavorites"\:{"fLists"\:{}},"fProperties"\:{"fNodeProperties"\:{}}} diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/.settings/language.settings.xml b/lesson/ooc/lesson_05_shell/project_cubeide/.settings/language.settings.xml new file mode 100644 index 0000000..0a8d7fd --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/.settings/org.eclipse.cdt.core.prefs b/lesson/ooc/lesson_05_shell/project_cubeide/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 0000000..c8ec5df --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,6 @@ +doxygen/doxygen_new_line_after_brief=true +doxygen/doxygen_use_brief_tag=false +doxygen/doxygen_use_javadoc_tags=true +doxygen/doxygen_use_pre_tag=false +doxygen/doxygen_use_structural_commands=false +eclipse.preferences.version=1 diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/.settings/org.eclipse.core.resources.prefs b/lesson/ooc/lesson_05_shell/project_cubeide/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/Basic.launch b/lesson/ooc/lesson_05_shell/project_cubeide/Basic.launch new file mode 100644 index 0000000..ada9a5b --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/Basic.launch @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/Basic_Pin.launch b/lesson/ooc/lesson_05_shell/project_cubeide/Basic_Pin.launch new file mode 100644 index 0000000..d1f59d8 --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/Basic_Pin.launch @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/Basic_Shell Debug.launch b/lesson/ooc/lesson_05_shell/project_cubeide/Basic_Shell Debug.launch new file mode 100644 index 0000000..0b75efe --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/Basic_Shell Debug.launch @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lesson/ooc/lesson_05_shell/project_cubeide/STM32G070RBTX_FLASH.ld b/lesson/ooc/lesson_05_shell/project_cubeide/STM32G070RBTX_FLASH.ld new file mode 100644 index 0000000..f625506 --- /dev/null +++ b/lesson/ooc/lesson_05_shell/project_cubeide/STM32G070RBTX_FLASH.ld @@ -0,0 +1,209 @@ +/* +****************************************************************************** +** +** @file : LinkerScript.ld +** +** @author : Auto-generated by STM32CubeIDE +** +** @brief : Linker script for STM32G070RBTx 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 +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +****************************************************************************** +** @attention +** +** Copyright (c) 2023 STMicroelectronics. +** All rights reserved. +** +** This software is licensed under terms that can be found in the LICENSE file +** in the root directory of this software component. +** If no LICENSE file comes with this software, it is provided AS-IS. +** +****************************************************************************** +*/ + +/* 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 (rx) : ORIGIN = 0x8000000, LENGTH = 128K +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* 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 + + .elab_export : + { + . = ALIGN(4); + KEEP(*(elab_export)) + . = ALIGN(4); + } >FLASH + + /* elab Poll function exporting */ + .expoll : + { + . = ALIGN(4); + KEEP(*(expoll)) + . = ALIGN(4); + } >FLASH + + /* elab shell command exporting*/ + .shellCommand : + { + . = ALIGN(4); + KEEP(*(shellCommand)) + . = 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 */ + *(.RamFunc) /* .RamFunc sections */ + *(.RamFunc*) /* .RamFunc* 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/lesson/ooc/lesson_05_shell/project/RTE/Compiler/EventRecorderConf.h b/lesson/ooc/lesson_05_shell/project_mdk/RTE/Compiler/EventRecorderConf.h similarity index 100% rename from lesson/ooc/lesson_05_shell/project/RTE/Compiler/EventRecorderConf.h rename to lesson/ooc/lesson_05_shell/project_mdk/RTE/Compiler/EventRecorderConf.h diff --git a/lesson/ooc/lesson_05_shell/project/RTE/_Basic/RTE_Components.h b/lesson/ooc/lesson_05_shell/project_mdk/RTE/_Basic/RTE_Components.h similarity index 100% rename from lesson/ooc/lesson_05_shell/project/RTE/_Basic/RTE_Components.h rename to lesson/ooc/lesson_05_shell/project_mdk/RTE/_Basic/RTE_Components.h diff --git a/lesson/ooc/lesson_05_shell/project/RTE/_Target_1/RTE_Components.h b/lesson/ooc/lesson_05_shell/project_mdk/RTE/_Target_1/RTE_Components.h similarity index 100% rename from lesson/ooc/lesson_05_shell/project/RTE/_Target_1/RTE_Components.h rename to lesson/ooc/lesson_05_shell/project_mdk/RTE/_Target_1/RTE_Components.h diff --git a/lesson/ooc/lesson_05_shell/project/basic.uvprojx b/lesson/ooc/lesson_05_shell/project_mdk/basic.uvprojx similarity index 99% rename from lesson/ooc/lesson_05_shell/project/basic.uvprojx rename to lesson/ooc/lesson_05_shell/project_mdk/basic.uvprojx index 2034357..d89df6d 100644 --- a/lesson/ooc/lesson_05_shell/project/basic.uvprojx +++ b/lesson/ooc/lesson_05_shell/project_mdk/basic.uvprojx @@ -186,6 +186,7 @@ 0 0 0 + 0 0 0 8 diff --git a/lesson/ooc/lesson_05_shell/user/eio_pin.c b/lesson/ooc/lesson_05_shell/user/eio_pin.c index ac3a33c..daf0ac2 100644 --- a/lesson/ooc/lesson_05_shell/user/eio_pin.c +++ b/lesson/ooc/lesson_05_shell/user/eio_pin.c @@ -132,9 +132,9 @@ static bool _check_pin_name_valid(const char *name) goto exit; } - if (!((name[0] < 'A' && name[0] > 'D') && - (name[2] < '0' && name[2] > '1') && - (name[3] < '0' && name[3] > '9'))) + if ((name[0] < 'A' || name[0] > 'D') || + (name[2] < '0' || name[2] > '1') || + (name[3] < '0' || name[3] > '9')) { ret = false; goto exit; -- Gitee