'embeded/Cortex-M3 STM'에 해당되는 글 38건

  1. 2025.08.08 stm32 cpp
  2. 2025.07.29 stm32 eeprom emulation
  3. 2025.07.28 stm32f103ret flash program / erase 테스트
  4. 2025.07.21 HAL_FLASH_Program
  5. 2025.07.21 stm32cubeide build analyzer
  6. 2025.06.30 stm32 wwdg, iwdg 차이
  7. 2025.06.27 stm32f wwdg iwdg 그리고 stop mode
  8. 2025.06.18 stm32 cubeide ioc gen
  9. 2025.06.18 stm32 uart tx dma
  10. 2025.06.05 stm32 pwm 주파수 계산
embeded/Cortex-M3 STM2025. 8. 8. 23:35

오.. c만 되는줄 알았는데 cpp가 되네?

그나저나 crt0.a 인가 말고 그럼 어떤 cpp runtime을 링크하려나?

 

[링크 : https://igotit.tistory.com/m/entry/STM32CubeIDE-임베디드-코드에서-C-클래스-활용]

 

 

+

2025.08.12

생성시에 C++로 해줘도 된다.

 

아직 main.c 일 때

16:01:47 **** Build of configuration Debug for project cpptest ****
make -j8 all 
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o"
arm-none-eabi-gcc -mcpu=cortex-m3 -g3 -DDEBUG -c -x assembler-with-cpp -MMD -MP -MF"Core/Startup/startup_stm32f103retx.d" -MT"Core/Startup/startup_stm32f103retx.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Startup/startup_stm32f103retx.o" "../Core/Startup/startup_stm32f103retx.s"
arm-none-eabi-gcc "../Core/Src/main.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/main.o"
arm-none-eabi-gcc "../Core/Src/stm32f1xx_hal_msp.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/stm32f1xx_hal_msp.d" -MT"Core/Src/stm32f1xx_hal_msp.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/stm32f1xx_hal_msp.o"
arm-none-eabi-gcc "../Core/Src/stm32f1xx_it.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/stm32f1xx_it.d" -MT"Core/Src/stm32f1xx_it.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/stm32f1xx_it.o"
arm-none-eabi-gcc "../Core/Src/syscalls.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/syscalls.d" -MT"Core/Src/syscalls.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/syscalls.o"
arm-none-eabi-gcc "../Core/Src/sysmem.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/sysmem.d" -MT"Core/Src/sysmem.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/sysmem.o"
arm-none-eabi-gcc "../Core/Src/system_stm32f1xx.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/system_stm32f1xx.d" -MT"Core/Src/system_stm32f1xx.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/system_stm32f1xx.o"
arm-none-eabi-g++ -o "cpptest.elf" @"objects.list"   -mcpu=cortex-m3 -T"/home/user/STM32CubeIDE/workspace_1.15.0_cpp/cpptest/STM32F103RETX_FLASH.ld" --specs=nosys.specs -Wl,-Map="cpptest.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
Finished building target: cpptest.elf
 
arm-none-eabi-size  cpptest.elf 
arm-none-eabi-objdump -h -S cpptest.elf  > "cpptest.list"
   text    data     bss     dec     hex filename
   3728      12    1572    5312    14c0 cpptest.elf
Finished building: default.size.stdout
 
Finished building: cpptest.list
 

16:01:48 Build Finished. 0 errors, 0 warnings. (took 1s.50ms)

 

STM32F103RETX_FLASH.ld

/*
******************************************************************************
**
** @file        : LinkerScript.ld
**
** @author      : Auto-generated by STM32CubeIDE
**
** @brief       : Linker script for STM32F103RETx Device from STM32F1 series
**                      512KBytes FLASH
**                      64KBytes 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) 2025 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 = 64K
  FLASH    (rx)    : ORIGIN = 0x8000000,   LENGTH = 512K
}

/* 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 (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
  {
    . = ALIGN(4);
    *(.ARM.extab* .gnu.linkonce.armextab.*)
    . = ALIGN(4);
  } >FLASH

  .ARM (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
  {
    . = ALIGN(4);
    __exidx_start = .;
    *(.ARM.exidx*)
    __exidx_end = .;
    . = ALIGN(4);
  } >FLASH

  .preinit_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
  {
    . = ALIGN(4);
    PROVIDE_HIDDEN (__preinit_array_start = .);
    KEEP (*(.preinit_array*))
    PROVIDE_HIDDEN (__preinit_array_end = .);
    . = ALIGN(4);
  } >FLASH

  .init_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
  {
    . = ALIGN(4);
    PROVIDE_HIDDEN (__init_array_start = .);
    KEEP (*(SORT(.init_array.*)))
    KEEP (*(.init_array*))
    PROVIDE_HIDDEN (__init_array_end = .);
    . = ALIGN(4);
  } >FLASH

  .fini_array (READONLY) : /* The "READONLY" keyword is only supported in GCC11 and later, remove it if using GCC10 or earlier. */
  {
    . = 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) }
}

 

 

$ arm-linux-gnueabihf-readelf -a cpptest.elf
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x8000361
  Start of program headers:          52 (bytes into file)
  Start of section headers:          706172 (bytes into file)
  Flags:                             0x5000200, Version5 EABI, soft-float ABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         3
  Size of section headers:           40 (bytes)
  Number of section headers:         26
  Section header string table index: 25

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .isr_vector       PROGBITS        08000000 001000 0001e4 00   A  0   0  1
  [ 2] .text             PROGBITS        080001e4 0011e4 000c80 00  AX  0   0  4
  [ 3] .rodata           PROGBITS        08000e64 001e64 000024 00   A  0   0  4
  [ 4] .ARM.extab        PROGBITS        08000e88 00200c 000000 00   W  0   0  1
  [ 5] .ARM              PROGBITS        08000e88 00200c 000000 00   W  0   0  1
  [ 6] .preinit_array    PREINIT_ARRAY   08000e88 00200c 000000 04  WA  0   0  1
  [ 7] .init_array       INIT_ARRAY      08000e88 001e88 000004 04   A  0   0  4
  [ 8] .fini_array       FINI_ARRAY      08000e8c 001e8c 000004 04   A  0   0  4
  [ 9] .data             PROGBITS        20000000 002000 00000c 00  WA  0   0  4
  [10] .bss              NOBITS          2000000c 00200c 000020 00  WA  0   0  4
  [11] ._user_heap_stack NOBITS          2000002c 00202c 000604 00  WA  0   0  1
  [12] .ARM.attributes   ARM_ATTRIBUTES  00000000 00200c 000029 00      0   0  1
  [13] .debug_info       PROGBITS        00000000 002035 00217c 00      0   0  1
  [14] .debug_abbrev     PROGBITS        00000000 0041b1 000ba6 00      0   0  1
  [15] .debug_aranges    PROGBITS        00000000 004d58 000370 00      0   0  8
  [16] .debug_rnglists   PROGBITS        00000000 0050c8 000272 00      0   0  1
  [17] .debug_macro      PROGBITS        00000000 00533a 0176f5 00      0   0  1
  [18] .debug_line       PROGBITS        00000000 01ca2f 003a17 00      0   0  1
  [19] .debug_str        PROGBITS        00000000 020446 089bcc 01  MS  0   0  1
  [20] .comment          PROGBITS        00000000 0aa012 000043 01  MS  0   0  1
  [21] .debug_frame      PROGBITS        00000000 0aa058 000bbc 00      0   0  4
  [22] .debug_line_str   PROGBITS        00000000 0aac14 000066 01  MS  0   0  1
  [23] .symtab           SYMTAB          00000000 0aac7c 000f40 10     24 134  4
  [24] .strtab           STRTAB          00000000 0abbbc 0009a3 00      0   0  1
  [25] .shstrtab         STRTAB          00000000 0ac55f 00011c 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  D (mbind), y (purecode), p (processor specific)

There are no section groups in this file.

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x001000 0x08000000 0x08000000 0x00e90 0x00e90 R E 0x1000
  LOAD           0x002000 0x20000000 0x08000e90 0x0000c 0x0002c RW  0x1000
  LOAD           0x00002c 0x2000002c 0x08000e9c 0x00000 0x00604 RW  0x1000

 Section to Segment mapping:
  Segment Sections...
   00     .isr_vector .text .rodata .init_array .fini_array 
   01     .data .bss 
   02     ._user_heap_stack 

There is no dynamic section in this file.

There are no relocations in this file.

There are no unwind sections in this file.

Symbol table '.symtab' contains 244 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 08000000     0 SECTION LOCAL  DEFAULT    1 .isr_vector
     2: 080001e4     0 SECTION LOCAL  DEFAULT    2 .text
     3: 08000e64     0 SECTION LOCAL  DEFAULT    3 .rodata
     4: 08000e88     0 SECTION LOCAL  DEFAULT    4 .ARM.extab
     5: 08000e88     0 SECTION LOCAL  DEFAULT    5 .ARM
     6: 08000e88     0 SECTION LOCAL  DEFAULT    6 .preinit_array
     7: 08000e88     0 SECTION LOCAL  DEFAULT    7 .init_array
     8: 08000e8c     0 SECTION LOCAL  DEFAULT    8 .fini_array
     9: 20000000     0 SECTION LOCAL  DEFAULT    9 .data
    10: 2000000c     0 SECTION LOCAL  DEFAULT   10 .bss
    11: 2000002c     0 SECTION LOCAL  DEFAULT   11 ._user_heap_stack
    12: 00000000     0 SECTION LOCAL  DEFAULT   12 .ARM.attributes
    13: 00000000     0 SECTION LOCAL  DEFAULT   13 .debug_info
    14: 00000000     0 SECTION LOCAL  DEFAULT   14 .debug_abbrev
    15: 00000000     0 SECTION LOCAL  DEFAULT   15 .debug_aranges
    16: 00000000     0 SECTION LOCAL  DEFAULT   16 .debug_rnglists
    17: 00000000     0 SECTION LOCAL  DEFAULT   17 .debug_macro
    18: 00000000     0 SECTION LOCAL  DEFAULT   18 .debug_line
    19: 00000000     0 SECTION LOCAL  DEFAULT   19 .debug_str
    20: 00000000     0 SECTION LOCAL  DEFAULT   20 .comment
    21: 00000000     0 SECTION LOCAL  DEFAULT   21 .debug_frame
    22: 00000000     0 SECTION LOCAL  DEFAULT   22 .debug_line_str
    23: 00000000     0 FILE    LOCAL  DEFAULT  ABS startup_stm32f10[...]
    24: f1e0f85f     0 NOTYPE  LOCAL  DEFAULT  ABS BootRAM
    25: 08000360     0 NOTYPE  LOCAL  DEFAULT    2 $t
    26: 08000374     0 NOTYPE  LOCAL  DEFAULT    2 LoopCopyDataInit
    27: 0800036e     0 NOTYPE  LOCAL  DEFAULT    2 CopyDataInit
    28: 08000386     0 NOTYPE  LOCAL  DEFAULT    2 LoopFillZerobss
    29: 08000382     0 NOTYPE  LOCAL  DEFAULT    2 FillZerobss
    30: 080003a8     0 NOTYPE  LOCAL  DEFAULT    2 Infinite_Loop
    31: 080003a8     0 NOTYPE  LOCAL  DEFAULT    2 $t
    32: 08000394     0 NOTYPE  LOCAL  DEFAULT    2 $d
    33: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtbegin.o
    34: 08000e4c     0 OBJECT  LOCAL  DEFAULT    2 __EH_FRAME_BEGIN__
    35: 080001e4     0 NOTYPE  LOCAL  DEFAULT    2 $t
    36: 080001e5     0 FUNC    LOCAL  DEFAULT    2 __do_global_dtors_aux
    37: 080001fc     0 NOTYPE  LOCAL  DEFAULT    2 $d
    38: 2000000c     1 NOTYPE  LOCAL  DEFAULT   10 completed.1
    39: 08000e8c     0 NOTYPE  LOCAL  DEFAULT    8 $d
    40: 08000e8c     0 OBJECT  LOCAL  DEFAULT    8 __do_global_dtor[...]
    41: 08000208     0 NOTYPE  LOCAL  DEFAULT    2 $t
    42: 08000209     0 FUNC    LOCAL  DEFAULT    2 frame_dummy
    43: 08000218     0 NOTYPE  LOCAL  DEFAULT    2 $d
    44: 20000010    24 NOTYPE  LOCAL  DEFAULT   10 object.0
    45: 08000e88     0 NOTYPE  LOCAL  DEFAULT    7 $d
    46: 08000e88     0 OBJECT  LOCAL  DEFAULT    7 __frame_dummy_in[...]
    47: 2000000c     0 NOTYPE  LOCAL  DEFAULT   10 $d
    48: 00000000     0 FILE    LOCAL  DEFAULT  ABS main.c
    49: 08000224     0 NOTYPE  LOCAL  DEFAULT    2 $t
    50: 08000234     0 NOTYPE  LOCAL  DEFAULT    2 $t
    51: 080002aa     0 NOTYPE  LOCAL  DEFAULT    2 $t
    52: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_hal_msp.c
    53: 080002b8     0 NOTYPE  LOCAL  DEFAULT    2 $t
    54: 080002f8     0 NOTYPE  LOCAL  DEFAULT    2 $d
    55: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_it.c
    56: 080002fc     0 NOTYPE  LOCAL  DEFAULT    2 $t
    57: 08000304     0 NOTYPE  LOCAL  DEFAULT    2 $t
    58: 0800030c     0 NOTYPE  LOCAL  DEFAULT    2 $t
    59: 08000314     0 NOTYPE  LOCAL  DEFAULT    2 $t
    60: 0800031c     0 NOTYPE  LOCAL  DEFAULT    2 $t
    61: 08000324     0 NOTYPE  LOCAL  DEFAULT    2 $t
    62: 08000330     0 NOTYPE  LOCAL  DEFAULT    2 $t
    63: 0800033c     0 NOTYPE  LOCAL  DEFAULT    2 $t
    64: 08000348     0 NOTYPE  LOCAL  DEFAULT    2 $t
    65: 00000000     0 FILE    LOCAL  DEFAULT  ABS system_stm32f1xx.c
    66: 20000000     0 NOTYPE  LOCAL  DEFAULT    9 $d
    67: 08000e64     0 NOTYPE  LOCAL  DEFAULT    3 $d
    68: 08000354     0 NOTYPE  LOCAL  DEFAULT    2 $t
    69: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_hal.c
    70: 20000028     0 NOTYPE  LOCAL  DEFAULT   10 $d
    71: 20000004     0 NOTYPE  LOCAL  DEFAULT    9 $d
    72: 080003ac     0 NOTYPE  LOCAL  DEFAULT    2 $t
    73: 080003d4     0 NOTYPE  LOCAL  DEFAULT    2 $d
    74: 080003d8     0 NOTYPE  LOCAL  DEFAULT    2 $t
    75: 0800042c     0 NOTYPE  LOCAL  DEFAULT    2 $d
    76: 08000438     0 NOTYPE  LOCAL  DEFAULT    2 $t
    77: 08000454     0 NOTYPE  LOCAL  DEFAULT    2 $d
    78: 0800045c     0 NOTYPE  LOCAL  DEFAULT    2 $t
    79: 0800046c     0 NOTYPE  LOCAL  DEFAULT    2 $d
    80: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_hal_co[...]
    81: 08000470     0 NOTYPE  LOCAL  DEFAULT    2 $t
    82: 08000471    72 FUNC    LOCAL  DEFAULT    2 __NVIC_SetPriori[...]
    83: 080004b4     0 NOTYPE  LOCAL  DEFAULT    2 $d
    84: 080004b8     0 NOTYPE  LOCAL  DEFAULT    2 $t
    85: 080004b9    28 FUNC    LOCAL  DEFAULT    2 __NVIC_GetPriori[...]
    86: 080004d0     0 NOTYPE  LOCAL  DEFAULT    2 $d
    87: 080004d4     0 NOTYPE  LOCAL  DEFAULT    2 $t
    88: 080004d5    84 FUNC    LOCAL  DEFAULT    2 __NVIC_SetPriority
    89: 08000520     0 NOTYPE  LOCAL  DEFAULT    2 $d
    90: 08000528     0 NOTYPE  LOCAL  DEFAULT    2 $t
    91: 08000529   100 FUNC    LOCAL  DEFAULT    2 NVIC_EncodePriority
    92: 0800058c     0 NOTYPE  LOCAL  DEFAULT    2 $t
    93: 0800058d    68 FUNC    LOCAL  DEFAULT    2 SysTick_Config
    94: 080005cc     0 NOTYPE  LOCAL  DEFAULT    2 $d
    95: 080005d0     0 NOTYPE  LOCAL  DEFAULT    2 $t
    96: 080005e6     0 NOTYPE  LOCAL  DEFAULT    2 $t
    97: 0800061e     0 NOTYPE  LOCAL  DEFAULT    2 $t
    98: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_hal_rcc.c
    99: 08000638     0 NOTYPE  LOCAL  DEFAULT    2 $t
   100: 08000db9    60 FUNC    LOCAL  DEFAULT    2 RCC_Delay
   101: 080008a4     0 NOTYPE  LOCAL  DEFAULT    2 $d
   102: 080008b0     0 NOTYPE  LOCAL  DEFAULT    2 $t
   103: 08000afc     0 NOTYPE  LOCAL  DEFAULT    2 $d
   104: 08000b08     0 NOTYPE  LOCAL  DEFAULT    2 $t
   105: 08000b38     0 NOTYPE  LOCAL  DEFAULT    2 $d
   106: 08000b3c     0 NOTYPE  LOCAL  DEFAULT    2 $t
   107: 08000cfc     0 NOTYPE  LOCAL  DEFAULT    2 $d
   108: 08000d10     0 NOTYPE  LOCAL  DEFAULT    2 $t
   109: 08000da4     0 NOTYPE  LOCAL  DEFAULT    2 $d
   110: 08000e74    16 OBJECT  LOCAL  DEFAULT    3 aPLLMULFactorTable.1
   111: 08000e84     2 OBJECT  LOCAL  DEFAULT    3 aPredivFactorTable.0
   112: 08000db8     0 NOTYPE  LOCAL  DEFAULT    2 $t
   113: 08000dec     0 NOTYPE  LOCAL  DEFAULT    2 $d
   114: 08000e74     0 NOTYPE  LOCAL  DEFAULT    3 $d
   115: 08000e84     0 NOTYPE  LOCAL  DEFAULT    3 $d
   116: 00000000     0 FILE    LOCAL  DEFAULT  ABS libc_a-memset.o
   117: 08000df4     0 NOTYPE  LOCAL  DEFAULT    2 $t
   118: 00000000     0 FILE    LOCAL  DEFAULT  ABS libc_a-init.o
   119: 08000e04     0 NOTYPE  LOCAL  DEFAULT    2 $t
   120: 08000e3c     0 NOTYPE  LOCAL  DEFAULT    2 $d
   121: 00000000     0 FILE    LOCAL  DEFAULT  ABS crti.o
   122: 08000e4c     0 NOTYPE  LOCAL  DEFAULT    2 $t
   123: 08000e58     0 NOTYPE  LOCAL  DEFAULT    2 $t
   124: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtn.o
   125: 08000e50     0 NOTYPE  LOCAL  DEFAULT    2 $t
   126: 08000e5c     0 NOTYPE  LOCAL  DEFAULT    2 $t
   127: 00000000     0 FILE    LOCAL  DEFAULT  ABS 
   128: 08000e8c     0 NOTYPE  LOCAL  DEFAULT    7 __init_array_end
   129: 08000e88     0 NOTYPE  LOCAL  DEFAULT    6 __preinit_array_end
   130: 08000e88     0 NOTYPE  LOCAL  DEFAULT    7 __init_array_start
   131: 08000e88     0 NOTYPE  LOCAL  DEFAULT    6 __preinit_array_start
   132: 08000000     0 NOTYPE  LOCAL  DEFAULT    1 $d
   133: 20000008     0 NOTYPE  LOCAL  DEFAULT    9 $d
   134: 080003a9     2 FUNC    WEAK   DEFAULT    2 RTC_Alarm_IRQHandler
   135: 080003a9     2 FUNC    WEAK   DEFAULT    2 EXTI2_IRQHandler
   136: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM8_TRG_COM_IRQ[...]
   137: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM8_CC_IRQHandler
   138: 08000331    12 FUNC    GLOBAL DEFAULT    2 DebugMon_Handler
   139: 080005e7    56 FUNC    GLOBAL DEFAULT    2 HAL_NVIC_SetPriority
   140: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM1_CC_IRQHandler
   141: 08000305     8 FUNC    GLOBAL DEFAULT    2 HardFault_Handler
   142: 00000400     0 NOTYPE  GLOBAL DEFAULT  ABS _Min_Stack_Size
   143: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM6_IRQHandler
   144: 08000349    12 FUNC    GLOBAL DEFAULT    2 SysTick_Handler
   145: 080003a9     2 FUNC    WEAK   DEFAULT    2 PVD_IRQHandler
   146: 080003a9     2 FUNC    WEAK   DEFAULT    2 SDIO_IRQHandler
   147: 08000e90     0 NOTYPE  GLOBAL DEFAULT  ABS _sidata
   148: 0800033d    12 FUNC    GLOBAL DEFAULT    2 PendSV_Handler
   149: 080002fd     8 FUNC    GLOBAL DEFAULT    2 NMI_Handler
   150: 08000e88     0 NOTYPE  GLOBAL DEFAULT    5 __exidx_end
   151: 080003a9     2 FUNC    WEAK   DEFAULT    2 EXTI3_IRQHandler
   152: 08000d11   168 FUNC    GLOBAL DEFAULT    2 HAL_RCC_GetSysCl[...]
   153: 080002b9    68 FUNC    GLOBAL DEFAULT    2 HAL_MspInit
   154: 08000e64     0 NOTYPE  GLOBAL DEFAULT    2 _etext
   155: 2000000c     0 NOTYPE  GLOBAL DEFAULT   10 _sbss
   156: 080003a9     2 FUNC    WEAK   DEFAULT    2 EXTI0_IRQHandler
   157: 080003a9     2 FUNC    WEAK   DEFAULT    2 I2C2_EV_IRQHandler
   158: 20000000     4 OBJECT  GLOBAL DEFAULT    9 SystemCoreClock
   159: 20000008     1 OBJECT  GLOBAL DEFAULT    9 uwTickFreq
   160: 0800031d     8 FUNC    GLOBAL DEFAULT    2 UsageFault_Handler
   161: 080003a9     2 FUNC    WEAK   DEFAULT    2 ADC1_2_IRQHandler
   162: 2000000c     0 NOTYPE  GLOBAL DEFAULT   10 __bss_start__
   163: 20000000     0 NOTYPE  GLOBAL DEFAULT    9 _sdata
   164: 080003a9     2 FUNC    WEAK   DEFAULT    2 SPI1_IRQHandler
   165: 080003a9     2 FUNC    WEAK   DEFAULT    2 TAMPER_IRQHandler
   166: 20000028     4 OBJECT  GLOBAL DEFAULT   10 uwTick
   167: 08000235   118 FUNC    GLOBAL DEFAULT    2 SystemClock_Config
   168: 0800061f    24 FUNC    GLOBAL DEFAULT    2 HAL_SYSTICK_Config
   169: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM8_UP_IRQHandler
   170: 08000e88     0 NOTYPE  GLOBAL DEFAULT    5 __exidx_start
   171: 08000e05    72 FUNC    GLOBAL DEFAULT    2 __libc_init_array
   172: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA2_Channel2_IR[...]
   173: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel4_IR[...]
   174: 08000e4d     0 FUNC    GLOBAL DEFAULT    2 _init
   175: 080003a9     2 FUNC    WEAK   DEFAULT    2 USART3_IRQHandler
   176: 080003a9     2 FUNC    WEAK   DEFAULT    2 RTC_IRQHandler
   177: 2000002c     0 NOTYPE  GLOBAL DEFAULT   10 _ebss
   178: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel7_IR[...]
   179: 08000361    52 FUNC    WEAK   DEFAULT    2 Reset_Handler
   180: 080003a9     2 FUNC    WEAK   DEFAULT    2 CAN1_RX1_IRQHandler
   181: 080003a9     2 FUNC    WEAK   DEFAULT    2 UART5_IRQHandler
   182: 080003a9     2 FUNC    WEAK   DEFAULT    2 ADC3_IRQHandler
   183: 20000004     4 OBJECT  GLOBAL DEFAULT    9 uwTickPrio
   184: 080003ad    44 FUNC    GLOBAL DEFAULT    2 HAL_Init
   185: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM4_IRQHandler
   186: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA2_Channel1_IR[...]
   187: 080003a9     2 FUNC    WEAK   DEFAULT    2 I2C1_EV_IRQHandler
   188: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel6_IR[...]
   189: 080003a9     2 FUNC    WEAK   DEFAULT    2 UART4_IRQHandler
   190: 2000002c     0 NOTYPE  GLOBAL DEFAULT   10 __bss_end__
   191: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM3_IRQHandler
   192: 080003a9     2 FUNC    WEAK   DEFAULT    2 RCC_IRQHandler
   193: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM1_TRG_COM_IRQ[...]
   194: 00000200     0 NOTYPE  GLOBAL DEFAULT  ABS _Min_Heap_Size
   195: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel1_IR[...]
   196: 080003a8     2 NOTYPE  GLOBAL DEFAULT    2 Default_Handler
   197: 08000e64    16 OBJECT  GLOBAL DEFAULT    3 AHBPrescTable
   198: 080003a9     2 FUNC    WEAK   DEFAULT    2 EXTI15_10_IRQHandler
   199: 08000b3d   468 FUNC    GLOBAL DEFAULT    2 HAL_RCC_ClockConfig
   200: 080005d1    22 FUNC    GLOBAL DEFAULT    2 HAL_NVIC_SetPrio[...]
   201: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM7_IRQHandler
   202: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM5_IRQHandler
   203: 080003a9     2 FUNC    WEAK   DEFAULT    2 EXTI9_5_IRQHandler
   204: 0800045d    20 FUNC    WEAK   DEFAULT    2 HAL_GetTick
   205: 080003a9     2 FUNC    WEAK   DEFAULT    2 SPI2_IRQHandler
   206: 08000df5    16 FUNC    GLOBAL DEFAULT    2 memset
   207: 0800030d     8 FUNC    GLOBAL DEFAULT    2 MemManage_Handler
   208: 08000225    16 FUNC    GLOBAL DEFAULT    2 main
   209: 08000325    12 FUNC    GLOBAL DEFAULT    2 SVC_Handler
   210: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel5_IR[...]
   211: 080003a9     2 FUNC    WEAK   DEFAULT    2 EXTI4_IRQHandler
   212: 080003a9     2 FUNC    WEAK   DEFAULT    2 USB_LP_CAN1_RX0_[...]
   213: 08000355    12 FUNC    GLOBAL DEFAULT    2 SystemInit
   214: 08000e59     0 FUNC    GLOBAL DEFAULT    2 _fini
   215: 080003a9     2 FUNC    WEAK   DEFAULT    2 USB_HP_CAN1_TX_I[...]
   216: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel3_IR[...]
   217: 080003d9    96 FUNC    WEAK   DEFAULT    2 HAL_InitTick
   218: 080003a9     2 FUNC    WEAK   DEFAULT    2 FSMC_IRQHandler
   219: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM1_UP_IRQHandler
   220: 08000439    36 FUNC    WEAK   DEFAULT    2 HAL_IncTick
   221: 080003a9     2 FUNC    WEAK   DEFAULT    2 WWDG_IRQHandler
   222: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM2_IRQHandler
   223: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM1_BRK_IRQHandler
   224: 20010000     0 NOTYPE  GLOBAL DEFAULT    1 _estack
   225: 080003a9     2 FUNC    WEAK   DEFAULT    2 EXTI1_IRQHandler
   226: 2000000c     0 NOTYPE  GLOBAL DEFAULT    9 _edata
   227: 20000030     0 NOTYPE  GLOBAL DEFAULT   11 _end
   228: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA2_Channel4_5_[...]
   229: 080003a9     2 FUNC    WEAK   DEFAULT    2 USART2_IRQHandler
   230: 08000639  1284 FUNC    GLOBAL DEFAULT    2 HAL_RCC_OscConfig
   231: 08000000     0 OBJECT  GLOBAL DEFAULT    1 g_pfnVectors
   232: 080003a9     2 FUNC    WEAK   DEFAULT    2 I2C2_ER_IRQHandler
   233: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel2_IR[...]
   234: 080003a9     2 FUNC    WEAK   DEFAULT    2 TIM8_BRK_IRQHandler
   235: 080003a9     2 FUNC    WEAK   DEFAULT    2 CAN1_SCE_IRQHandler
   236: 080003a9     2 FUNC    WEAK   DEFAULT    2 FLASH_IRQHandler
   237: 08000315     8 FUNC    GLOBAL DEFAULT    2 BusFault_Handler
   238: 080003a9     2 FUNC    WEAK   DEFAULT    2 USART1_IRQHandler
   239: 080003a9     2 FUNC    WEAK   DEFAULT    2 SPI3_IRQHandler
   240: 080003a9     2 FUNC    WEAK   DEFAULT    2 I2C1_ER_IRQHandler
   241: 080003a9     2 FUNC    WEAK   DEFAULT    2 USBWakeUp_IRQHandler
   242: 080003a9     2 FUNC    WEAK   DEFAULT    2 DMA2_Channel3_IR[...]
   243: 080002ab    12 FUNC    GLOBAL DEFAULT    2 Error_Handler

No version information found in this file.
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-M"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Microcontroller
  Tag_THUMB_ISA_use: Thumb-2
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte

 

Core/Startup/startup_stm32f103retx.s

Reset_Handler:

/* 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
  bx lr
.size Reset_Handler, .-Reset_Handler

 

.text.__libc_init_array
                0x08000e04       0x48 /opt/st/stm32cubeide_1.16.0/plugins/cohttp://m.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.linux64_1.0.200.202406132123/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libc_nano.a(libc_a-init.o)
                0x08000e04                __libc_init_array

 

Core/Src/system_stm32f1xx.c

void SystemInit (void)
{
#if defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F101xG) || defined(STM32F103xE) || defined(STM32F103xG)
  #ifdef DATA_IN_ExtSRAM
    SystemInit_ExtMemCtl(); 
  #endif /* DATA_IN_ExtSRAM */
#endif 

  /* Configure the Vector Table location -------------------------------------*/
#if defined(USER_VECT_TAB_ADDRESS)
  SCB->VTOR = VECT_TAB_BASE_ADDRESS | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM. */
#endif /* USER_VECT_TAB_ADDRESS */
}

 

---------------------

16:16:42 **** Build of configuration Debug for project cpptest ****
make -j8 all 
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_cortex.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_dma.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_exti.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_gpio_ex.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.o"
arm-none-eabi-gcc "../Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.d" -MT"Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc_ex.o"
arm-none-eabi-gcc -mcpu=cortex-m3 -g3 -DDEBUG -c -x assembler-with-cpp -MMD -MP -MF"Core/Startup/startup_stm32f103retx.d" -MT"Core/Startup/startup_stm32f103retx.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Startup/startup_stm32f103retx.o" "../Core/Startup/startup_stm32f103retx.s"
arm-none-eabi-g++ "../Core/Src/main.cpp" -mcpu=cortex-m3 -std=gnu++14 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -fno-exceptions -fno-rtti -fno-use-cxa-atexit -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/main.d" -MT"Core/Src/main.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/main.o"
arm-none-eabi-gcc "../Core/Src/stm32f1xx_hal_msp.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/stm32f1xx_hal_msp.d" -MT"Core/Src/stm32f1xx_hal_msp.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/stm32f1xx_hal_msp.o"
arm-none-eabi-gcc "../Core/Src/stm32f1xx_it.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/stm32f1xx_it.d" -MT"Core/Src/stm32f1xx_it.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/stm32f1xx_it.o"
arm-none-eabi-gcc "../Core/Src/syscalls.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/syscalls.d" -MT"Core/Src/syscalls.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/syscalls.o"
arm-none-eabi-gcc "../Core/Src/sysmem.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/sysmem.d" -MT"Core/Src/sysmem.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/sysmem.o"
arm-none-eabi-gcc "../Core/Src/system_stm32f1xx.c" -mcpu=cortex-m3 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32F103xE -c -I../Core/Inc -I../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy -I../Drivers/STM32F1xx_HAL_Driver/Inc -I../Drivers/CMSIS/Device/ST/STM32F1xx/Include -I../Drivers/CMSIS/Include -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -fcyclomatic-complexity -MMD -MP -MF"Core/Src/system_stm32f1xx.d" -MT"Core/Src/system_stm32f1xx.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "Core/Src/system_stm32f1xx.o"
arm-none-eabi-g++ -o "cpptest.elf" @"objects.list"   -mcpu=cortex-m3 -T"/home/user/STM32CubeIDE/workspace_1.15.0_cpp/cpptest/STM32F103RETX_FLASH.ld" --specs=nosys.specs -Wl,-Map="cpptest.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group
Finished building target: cpptest.elf
 
arm-none-eabi-size  cpptest.elf 
arm-none-eabi-objdump -h -S cpptest.elf  > "cpptest.list"
   text    data     bss     dec     hex filename
   3748      12    1572    5332    14d4 cpptest.elf
Finished building: default.size.stdout
 
Finished building: cpptest.list
 

16:16:43 Build Finished. 0 errors, 0 warnings. (took 796ms)

 

main.c 일때 비해 용량이 늘었...나?

arm-none-eabi-objdump -h -S cpptest.elf  > "cpptest.list"
   text    data     bss     dec     hex filename
   3728      12    1572    5312    14c0 cpptest.elf
Finished building: default.size.stdout

 

main.cpp가 되고 나서 마지막 두줄이 생겼다?

$ arm-linux-gnueabihf-readelf -a cpptest.elf
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x8000375
  Start of program headers:          52 (bytes into file)
  Start of section headers:          714648 (bytes into file)
  Flags:                             0x5000200, Version5 EABI, soft-float ABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         3
  Size of section headers:           40 (bytes)
  Number of section headers:         26
  Section header string table index: 25

Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            00000000 000000 000000 00      0   0  0
  [ 1] .isr_vector       PROGBITS        08000000 001000 0001e4 00   A  0   0  1
  [ 2] .text             PROGBITS        080001e4 0011e4 000c94 00  AX  0   0  4
  [ 3] .rodata           PROGBITS        08000e78 001e78 000024 00   A  0   0  4
  [ 4] .ARM.extab        PROGBITS        08000e9c 00200c 000000 00   W  0   0  1
  [ 5] .ARM              PROGBITS        08000e9c 00200c 000000 00   W  0   0  1
  [ 6] .preinit_array    PREINIT_ARRAY   08000e9c 00200c 000000 04  WA  0   0  1
  [ 7] .init_array       INIT_ARRAY      08000e9c 001e9c 000004 04   A  0   0  4
  [ 8] .fini_array       FINI_ARRAY      08000ea0 001ea0 000004 04   A  0   0  4
  [ 9] .data             PROGBITS        20000000 002000 00000c 00  WA  0   0  4
  [10] .bss              NOBITS          2000000c 00200c 000020 00  WA  0   0  4
  [11] ._user_heap_stack NOBITS          2000002c 00202c 000604 00  WA  0   0  1
  [12] .ARM.attributes   ARM_ATTRIBUTES  00000000 00200c 000029 00      0   0  1
  [13] .debug_info       PROGBITS        00000000 002035 002195 00      0   0  1
  [14] .debug_abbrev     PROGBITS        00000000 0041ca 000ba7 00      0   0  1
  [15] .debug_aranges    PROGBITS        00000000 004d78 000370 00      0   0  8
  [16] .debug_rnglists   PROGBITS        00000000 0050e8 000273 00      0   0  1
  [17] .debug_macro      PROGBITS        00000000 00535b 019149 00      0   0  1
  [18] .debug_line       PROGBITS        00000000 01e4a4 003a21 00      0   0  1
  [19] .debug_str        PROGBITS        00000000 021ec5 08a262 01  MS  0   0  1
  [20] .comment          PROGBITS        00000000 0ac127 000043 01  MS  0   0  1
  [21] .debug_frame      PROGBITS        00000000 0ac16c 000bbc 00      0   0  4
  [22] .debug_line_str   PROGBITS        00000000 0acd28 000066 01  MS  0   0  1
  [23] .symtab           SYMTAB          00000000 0acd90 000f40 10     24 134  4
  [24] .strtab           STRTAB          00000000 0adcd0 0009aa 00      0   0  1
  [25] .shstrtab         STRTAB          00000000 0ae67a 00011c 00      0   0  1
Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
  L (link order), O (extra OS processing required), G (group), T (TLS),
  C (compressed), x (unknown), o (OS specific), E (exclude),
  D (mbind), y (purecode), p (processor specific)

There are no section groups in this file.

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x001000 0x08000000 0x08000000 0x00ea4 0x00ea4 R E 0x1000
  LOAD           0x002000 0x20000000 0x08000ea4 0x0000c 0x0002c RW  0x1000
  LOAD           0x00002c 0x2000002c 0x08000eb0 0x00000 0x00604 RW  0x1000

 Section to Segment mapping:
  Segment Sections...
   00     .isr_vector .text .rodata .init_array .fini_array 
   01     .data .bss 
   02     ._user_heap_stack 

There is no dynamic section in this file.

There are no relocations in this file.

There are no unwind sections in this file.

Symbol table '.symtab' contains 244 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 08000000     0 SECTION LOCAL  DEFAULT    1 .isr_vector
     2: 080001e4     0 SECTION LOCAL  DEFAULT    2 .text
     3: 08000e78     0 SECTION LOCAL  DEFAULT    3 .rodata
     4: 08000e9c     0 SECTION LOCAL  DEFAULT    4 .ARM.extab
     5: 08000e9c     0 SECTION LOCAL  DEFAULT    5 .ARM
     6: 08000e9c     0 SECTION LOCAL  DEFAULT    6 .preinit_array
     7: 08000e9c     0 SECTION LOCAL  DEFAULT    7 .init_array
     8: 08000ea0     0 SECTION LOCAL  DEFAULT    8 .fini_array
     9: 20000000     0 SECTION LOCAL  DEFAULT    9 .data
    10: 2000000c     0 SECTION LOCAL  DEFAULT   10 .bss
    11: 2000002c     0 SECTION LOCAL  DEFAULT   11 ._user_heap_stack
    12: 00000000     0 SECTION LOCAL  DEFAULT   12 .ARM.attributes
    13: 00000000     0 SECTION LOCAL  DEFAULT   13 .debug_info
    14: 00000000     0 SECTION LOCAL  DEFAULT   14 .debug_abbrev
    15: 00000000     0 SECTION LOCAL  DEFAULT   15 .debug_aranges
    16: 00000000     0 SECTION LOCAL  DEFAULT   16 .debug_rnglists
    17: 00000000     0 SECTION LOCAL  DEFAULT   17 .debug_macro
    18: 00000000     0 SECTION LOCAL  DEFAULT   18 .debug_line
    19: 00000000     0 SECTION LOCAL  DEFAULT   19 .debug_str
    20: 00000000     0 SECTION LOCAL  DEFAULT   20 .comment
    21: 00000000     0 SECTION LOCAL  DEFAULT   21 .debug_frame
    22: 00000000     0 SECTION LOCAL  DEFAULT   22 .debug_line_str
    23: 00000000     0 FILE    LOCAL  DEFAULT  ABS startup_stm32f10[...]
    24: f1e0f85f     0 NOTYPE  LOCAL  DEFAULT  ABS BootRAM
    25: 08000374     0 NOTYPE  LOCAL  DEFAULT    2 $t
    26: 08000388     0 NOTYPE  LOCAL  DEFAULT    2 LoopCopyDataInit
    27: 08000382     0 NOTYPE  LOCAL  DEFAULT    2 CopyDataInit
    28: 0800039a     0 NOTYPE  LOCAL  DEFAULT    2 LoopFillZerobss
    29: 08000396     0 NOTYPE  LOCAL  DEFAULT    2 FillZerobss
    30: 080003bc     0 NOTYPE  LOCAL  DEFAULT    2 Infinite_Loop
    31: 080003bc     0 NOTYPE  LOCAL  DEFAULT    2 $t
    32: 080003a8     0 NOTYPE  LOCAL  DEFAULT    2 $d
    33: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtbegin.o
    34: 08000e60     0 OBJECT  LOCAL  DEFAULT    2 __EH_FRAME_BEGIN__
    35: 080001e4     0 NOTYPE  LOCAL  DEFAULT    2 $t
    36: 080001e5     0 FUNC    LOCAL  DEFAULT    2 __do_global_dtors_aux
    37: 080001fc     0 NOTYPE  LOCAL  DEFAULT    2 $d
    38: 2000000c     1 NOTYPE  LOCAL  DEFAULT   10 completed.1
    39: 08000ea0     0 NOTYPE  LOCAL  DEFAULT    8 $d
    40: 08000ea0     0 OBJECT  LOCAL  DEFAULT    8 __do_global_dtor[...]
    41: 08000208     0 NOTYPE  LOCAL  DEFAULT    2 $t
    42: 08000209     0 FUNC    LOCAL  DEFAULT    2 frame_dummy
    43: 08000218     0 NOTYPE  LOCAL  DEFAULT    2 $d
    44: 20000010    24 NOTYPE  LOCAL  DEFAULT   10 object.0
    45: 08000e9c     0 NOTYPE  LOCAL  DEFAULT    7 $d
    46: 08000e9c     0 OBJECT  LOCAL  DEFAULT    7 __frame_dummy_in[...]
    47: 2000000c     0 NOTYPE  LOCAL  DEFAULT   10 $d
    48: 00000000     0 FILE    LOCAL  DEFAULT  ABS main.cpp
    49: 08000224     0 NOTYPE  LOCAL  DEFAULT    2 $t
    50: 08000234     0 NOTYPE  LOCAL  DEFAULT    2 $t
    51: 080002be     0 NOTYPE  LOCAL  DEFAULT    2 $t
    52: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_hal_msp.c
    53: 080002cc     0 NOTYPE  LOCAL  DEFAULT    2 $t
    54: 0800030c     0 NOTYPE  LOCAL  DEFAULT    2 $d
    55: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_it.c
    56: 08000310     0 NOTYPE  LOCAL  DEFAULT    2 $t
    57: 08000318     0 NOTYPE  LOCAL  DEFAULT    2 $t
    58: 08000320     0 NOTYPE  LOCAL  DEFAULT    2 $t
    59: 08000328     0 NOTYPE  LOCAL  DEFAULT    2 $t
    60: 08000330     0 NOTYPE  LOCAL  DEFAULT    2 $t
    61: 08000338     0 NOTYPE  LOCAL  DEFAULT    2 $t
    62: 08000344     0 NOTYPE  LOCAL  DEFAULT    2 $t
    63: 08000350     0 NOTYPE  LOCAL  DEFAULT    2 $t
    64: 0800035c     0 NOTYPE  LOCAL  DEFAULT    2 $t
    65: 00000000     0 FILE    LOCAL  DEFAULT  ABS system_stm32f1xx.c
    66: 20000000     0 NOTYPE  LOCAL  DEFAULT    9 $d
    67: 08000e78     0 NOTYPE  LOCAL  DEFAULT    3 $d
    68: 08000368     0 NOTYPE  LOCAL  DEFAULT    2 $t
    69: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_hal.c
    70: 20000028     0 NOTYPE  LOCAL  DEFAULT   10 $d
    71: 20000004     0 NOTYPE  LOCAL  DEFAULT    9 $d
    72: 080003c0     0 NOTYPE  LOCAL  DEFAULT    2 $t
    73: 080003e8     0 NOTYPE  LOCAL  DEFAULT    2 $d
    74: 080003ec     0 NOTYPE  LOCAL  DEFAULT    2 $t
    75: 08000440     0 NOTYPE  LOCAL  DEFAULT    2 $d
    76: 0800044c     0 NOTYPE  LOCAL  DEFAULT    2 $t
    77: 08000468     0 NOTYPE  LOCAL  DEFAULT    2 $d
    78: 08000470     0 NOTYPE  LOCAL  DEFAULT    2 $t
    79: 08000480     0 NOTYPE  LOCAL  DEFAULT    2 $d
    80: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_hal_co[...]
    81: 08000484     0 NOTYPE  LOCAL  DEFAULT    2 $t
    82: 08000485    72 FUNC    LOCAL  DEFAULT    2 __NVIC_SetPriori[...]
    83: 080004c8     0 NOTYPE  LOCAL  DEFAULT    2 $d
    84: 080004cc     0 NOTYPE  LOCAL  DEFAULT    2 $t
    85: 080004cd    28 FUNC    LOCAL  DEFAULT    2 __NVIC_GetPriori[...]
    86: 080004e4     0 NOTYPE  LOCAL  DEFAULT    2 $d
    87: 080004e8     0 NOTYPE  LOCAL  DEFAULT    2 $t
    88: 080004e9    84 FUNC    LOCAL  DEFAULT    2 __NVIC_SetPriority
    89: 08000534     0 NOTYPE  LOCAL  DEFAULT    2 $d
    90: 0800053c     0 NOTYPE  LOCAL  DEFAULT    2 $t
    91: 0800053d   100 FUNC    LOCAL  DEFAULT    2 NVIC_EncodePriority
    92: 080005a0     0 NOTYPE  LOCAL  DEFAULT    2 $t
    93: 080005a1    68 FUNC    LOCAL  DEFAULT    2 SysTick_Config
    94: 080005e0     0 NOTYPE  LOCAL  DEFAULT    2 $d
    95: 080005e4     0 NOTYPE  LOCAL  DEFAULT    2 $t
    96: 080005fa     0 NOTYPE  LOCAL  DEFAULT    2 $t
    97: 08000632     0 NOTYPE  LOCAL  DEFAULT    2 $t
    98: 00000000     0 FILE    LOCAL  DEFAULT  ABS stm32f1xx_hal_rcc.c
    99: 0800064c     0 NOTYPE  LOCAL  DEFAULT    2 $t
   100: 08000dcd    60 FUNC    LOCAL  DEFAULT    2 RCC_Delay
   101: 080008b8     0 NOTYPE  LOCAL  DEFAULT    2 $d
   102: 080008c4     0 NOTYPE  LOCAL  DEFAULT    2 $t
   103: 08000b10     0 NOTYPE  LOCAL  DEFAULT    2 $d
   104: 08000b1c     0 NOTYPE  LOCAL  DEFAULT    2 $t
   105: 08000b4c     0 NOTYPE  LOCAL  DEFAULT    2 $d
   106: 08000b50     0 NOTYPE  LOCAL  DEFAULT    2 $t
   107: 08000d10     0 NOTYPE  LOCAL  DEFAULT    2 $d
   108: 08000d24     0 NOTYPE  LOCAL  DEFAULT    2 $t
   109: 08000db8     0 NOTYPE  LOCAL  DEFAULT    2 $d
   110: 08000e88    16 OBJECT  LOCAL  DEFAULT    3 aPLLMULFactorTable.1
   111: 08000e98     2 OBJECT  LOCAL  DEFAULT    3 aPredivFactorTable.0
   112: 08000dcc     0 NOTYPE  LOCAL  DEFAULT    2 $t
   113: 08000e00     0 NOTYPE  LOCAL  DEFAULT    2 $d
   114: 08000e88     0 NOTYPE  LOCAL  DEFAULT    3 $d
   115: 08000e98     0 NOTYPE  LOCAL  DEFAULT    3 $d
   116: 00000000     0 FILE    LOCAL  DEFAULT  ABS libc_a-memset.o
   117: 08000e08     0 NOTYPE  LOCAL  DEFAULT    2 $t
   118: 00000000     0 FILE    LOCAL  DEFAULT  ABS libc_a-init.o
   119: 08000e18     0 NOTYPE  LOCAL  DEFAULT    2 $t
   120: 08000e50     0 NOTYPE  LOCAL  DEFAULT    2 $d
   121: 00000000     0 FILE    LOCAL  DEFAULT  ABS crti.o
   122: 08000e60     0 NOTYPE  LOCAL  DEFAULT    2 $t
   123: 08000e6c     0 NOTYPE  LOCAL  DEFAULT    2 $t
   124: 00000000     0 FILE    LOCAL  DEFAULT  ABS crtn.o
   125: 08000e64     0 NOTYPE  LOCAL  DEFAULT    2 $t
   126: 08000e70     0 NOTYPE  LOCAL  DEFAULT    2 $t
   127: 00000000     0 FILE    LOCAL  DEFAULT  ABS 
   128: 08000ea0     0 NOTYPE  LOCAL  DEFAULT    7 __init_array_end
   129: 08000e9c     0 NOTYPE  LOCAL  DEFAULT    6 __preinit_array_end
   130: 08000e9c     0 NOTYPE  LOCAL  DEFAULT    7 __init_array_start
   131: 08000e9c     0 NOTYPE  LOCAL  DEFAULT    6 __preinit_array_start
   132: 08000000     0 NOTYPE  LOCAL  DEFAULT    1 $d
   133: 20000008     0 NOTYPE  LOCAL  DEFAULT    9 $d
   134: 080003bd     2 FUNC    WEAK   DEFAULT    2 RTC_Alarm_IRQHandler
   135: 080003bd     2 FUNC    WEAK   DEFAULT    2 EXTI2_IRQHandler
   136: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM8_TRG_COM_IRQ[...]
   137: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM8_CC_IRQHandler
   138: 08000345    12 FUNC    GLOBAL DEFAULT    2 DebugMon_Handler
   139: 080005fb    56 FUNC    GLOBAL DEFAULT    2 HAL_NVIC_SetPriority
   140: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM1_CC_IRQHandler
   141: 08000319     8 FUNC    GLOBAL DEFAULT    2 HardFault_Handler
   142: 00000400     0 NOTYPE  GLOBAL DEFAULT  ABS _Min_Stack_Size
   143: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM6_IRQHandler
   144: 0800035d    12 FUNC    GLOBAL DEFAULT    2 SysTick_Handler
   145: 080003bd     2 FUNC    WEAK   DEFAULT    2 PVD_IRQHandler
   146: 080003bd     2 FUNC    WEAK   DEFAULT    2 SDIO_IRQHandler
   147: 08000ea4     0 NOTYPE  GLOBAL DEFAULT  ABS _sidata
   148: 08000351    12 FUNC    GLOBAL DEFAULT    2 PendSV_Handler
   149: 08000311     8 FUNC    GLOBAL DEFAULT    2 NMI_Handler
   150: 08000e9c     0 NOTYPE  GLOBAL DEFAULT    5 __exidx_end
   151: 080003bd     2 FUNC    WEAK   DEFAULT    2 EXTI3_IRQHandler
   152: 08000d25   168 FUNC    GLOBAL DEFAULT    2 HAL_RCC_GetSysCl[...]
   153: 080002cd    68 FUNC    GLOBAL DEFAULT    2 HAL_MspInit
   154: 08000e78     0 NOTYPE  GLOBAL DEFAULT    2 _etext
   155: 2000000c     0 NOTYPE  GLOBAL DEFAULT   10 _sbss
   156: 080003bd     2 FUNC    WEAK   DEFAULT    2 EXTI0_IRQHandler
   157: 080003bd     2 FUNC    WEAK   DEFAULT    2 I2C2_EV_IRQHandler
   158: 20000000     4 OBJECT  GLOBAL DEFAULT    9 SystemCoreClock
   159: 20000008     1 OBJECT  GLOBAL DEFAULT    9 uwTickFreq
   160: 08000331     8 FUNC    GLOBAL DEFAULT    2 UsageFault_Handler
   161: 080003bd     2 FUNC    WEAK   DEFAULT    2 ADC1_2_IRQHandler
   162: 2000000c     0 NOTYPE  GLOBAL DEFAULT   10 __bss_start__
   163: 20000000     0 NOTYPE  GLOBAL DEFAULT    9 _sdata
   164: 080003bd     2 FUNC    WEAK   DEFAULT    2 SPI1_IRQHandler
   165: 080003bd     2 FUNC    WEAK   DEFAULT    2 TAMPER_IRQHandler
   166: 20000028     4 OBJECT  GLOBAL DEFAULT   10 uwTick
   167: 08000633    24 FUNC    GLOBAL DEFAULT    2 HAL_SYSTICK_Config
   168: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM8_UP_IRQHandler
   169: 08000e9c     0 NOTYPE  GLOBAL DEFAULT    5 __exidx_start
   170: 08000e19    72 FUNC    GLOBAL DEFAULT    2 __libc_init_array
   171: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA2_Channel2_IR[...]
   172: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel4_IR[...]
   173: 08000e61     0 FUNC    GLOBAL DEFAULT    2 _init
   174: 080003bd     2 FUNC    WEAK   DEFAULT    2 USART3_IRQHandler
   175: 080003bd     2 FUNC    WEAK   DEFAULT    2 RTC_IRQHandler
   176: 2000002c     0 NOTYPE  GLOBAL DEFAULT   10 _ebss
   177: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel7_IR[...]
   178: 08000375    52 FUNC    WEAK   DEFAULT    2 Reset_Handler
   179: 080003bd     2 FUNC    WEAK   DEFAULT    2 CAN1_RX1_IRQHandler
   180: 080003bd     2 FUNC    WEAK   DEFAULT    2 UART5_IRQHandler
   181: 080003bd     2 FUNC    WEAK   DEFAULT    2 ADC3_IRQHandler
   182: 20000004     4 OBJECT  GLOBAL DEFAULT    9 uwTickPrio
   183: 080003c1    44 FUNC    GLOBAL DEFAULT    2 HAL_Init
   184: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM4_IRQHandler
   185: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA2_Channel1_IR[...]
   186: 080003bd     2 FUNC    WEAK   DEFAULT    2 I2C1_EV_IRQHandler
   187: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel6_IR[...]
   188: 080003bd     2 FUNC    WEAK   DEFAULT    2 UART4_IRQHandler
   189: 2000002c     0 NOTYPE  GLOBAL DEFAULT   10 __bss_end__
   190: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM3_IRQHandler
   191: 080003bd     2 FUNC    WEAK   DEFAULT    2 RCC_IRQHandler
   192: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM1_TRG_COM_IRQ[...]
   193: 00000200     0 NOTYPE  GLOBAL DEFAULT  ABS _Min_Heap_Size
   194: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel1_IR[...]
   195: 080003bc     2 NOTYPE  GLOBAL DEFAULT    2 Default_Handler
   196: 08000e78    16 OBJECT  GLOBAL DEFAULT    3 AHBPrescTable
   197: 080003bd     2 FUNC    WEAK   DEFAULT    2 EXTI15_10_IRQHandler
   198: 08000b51   468 FUNC    GLOBAL DEFAULT    2 HAL_RCC_ClockConfig
   199: 080005e5    22 FUNC    GLOBAL DEFAULT    2 HAL_NVIC_SetPrio[...]
   200: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM7_IRQHandler
   201: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM5_IRQHandler
   202: 080003bd     2 FUNC    WEAK   DEFAULT    2 EXTI9_5_IRQHandler
   203: 08000471    20 FUNC    WEAK   DEFAULT    2 HAL_GetTick
   204: 080003bd     2 FUNC    WEAK   DEFAULT    2 SPI2_IRQHandler
   205: 08000e09    16 FUNC    GLOBAL DEFAULT    2 memset
   206: 08000321     8 FUNC    GLOBAL DEFAULT    2 MemManage_Handler
   207: 08000225    16 FUNC    GLOBAL DEFAULT    2 main
   208: 08000339    12 FUNC    GLOBAL DEFAULT    2 SVC_Handler
   209: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel5_IR[...]
   210: 080003bd     2 FUNC    WEAK   DEFAULT    2 EXTI4_IRQHandler
   211: 080003bd     2 FUNC    WEAK   DEFAULT    2 USB_LP_CAN1_RX0_[...]
   212: 08000369    12 FUNC    GLOBAL DEFAULT    2 SystemInit
   213: 08000e6d     0 FUNC    GLOBAL DEFAULT    2 _fini
   214: 080003bd     2 FUNC    WEAK   DEFAULT    2 USB_HP_CAN1_TX_I[...]
   215: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel3_IR[...]
   216: 080003ed    96 FUNC    WEAK   DEFAULT    2 HAL_InitTick
   217: 080003bd     2 FUNC    WEAK   DEFAULT    2 FSMC_IRQHandler
   218: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM1_UP_IRQHandler
   219: 0800044d    36 FUNC    WEAK   DEFAULT    2 HAL_IncTick
   220: 080003bd     2 FUNC    WEAK   DEFAULT    2 WWDG_IRQHandler
   221: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM2_IRQHandler
   222: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM1_BRK_IRQHandler
   223: 20010000     0 NOTYPE  GLOBAL DEFAULT    1 _estack
   224: 080003bd     2 FUNC    WEAK   DEFAULT    2 EXTI1_IRQHandler
   225: 2000000c     0 NOTYPE  GLOBAL DEFAULT    9 _edata
   226: 20000030     0 NOTYPE  GLOBAL DEFAULT   11 _end
   227: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA2_Channel4_5_[...]
   228: 080003bd     2 FUNC    WEAK   DEFAULT    2 USART2_IRQHandler
   229: 0800064d  1284 FUNC    GLOBAL DEFAULT    2 HAL_RCC_OscConfig
   230: 08000000     0 OBJECT  GLOBAL DEFAULT    1 g_pfnVectors
   231: 08000235   138 FUNC    GLOBAL DEFAULT    2 _Z18SystemClock_[...]
   232: 080003bd     2 FUNC    WEAK   DEFAULT    2 I2C2_ER_IRQHandler
   233: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA1_Channel2_IR[...]
   234: 080003bd     2 FUNC    WEAK   DEFAULT    2 TIM8_BRK_IRQHandler
   235: 080003bd     2 FUNC    WEAK   DEFAULT    2 CAN1_SCE_IRQHandler
   236: 080003bd     2 FUNC    WEAK   DEFAULT    2 FLASH_IRQHandler
   237: 08000329     8 FUNC    GLOBAL DEFAULT    2 BusFault_Handler
   238: 080003bd     2 FUNC    WEAK   DEFAULT    2 USART1_IRQHandler
   239: 080003bd     2 FUNC    WEAK   DEFAULT    2 SPI3_IRQHandler
   240: 080003bd     2 FUNC    WEAK   DEFAULT    2 I2C1_ER_IRQHandler
   241: 080003bd     2 FUNC    WEAK   DEFAULT    2 USBWakeUp_IRQHandler
   242: 080003bd     2 FUNC    WEAK   DEFAULT    2 DMA2_Channel3_IR[...]
   243: 080002bf    12 FUNC    GLOBAL DEFAULT    2 Error_Handler

No version information found in this file.
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-M"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Microcontroller
  Tag_THUMB_ISA_use: Thumb-2
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_enum_size: small
  Tag_CPU_unaligned_access: v6

 

맹글링 되면서 이름이 바뀌었을 뿐 크게 달라지는 건 없는 것 같다.

main.c main.cpp
__bss_end__
__exidx_start
__libc_init_array
_ebss
_edata
_end
_estack
_fini
_init
_Min_Heap_Size

ADC3_IRQHandler
AHBPrescTable
BusFault_Handler
CAN1_RX1_IRQHandler
CAN1_SCE_IRQHandler
Default_Handler
DMA1_Channel1_IR[...]
DMA1_Channel2_IR[...]
DMA1_Channel3_IR[...]
DMA1_Channel4_IR[...]
DMA1_Channel5_IR[...]
DMA1_Channel6_IR[...]
DMA1_Channel7_IR[...]
DMA2_Channel1_IR[...]
DMA2_Channel2_IR[...]
DMA2_Channel3_IR[...]
DMA2_Channel4_5_[...]
Error_Handler
EXTI1_IRQHandler
EXTI15_10_IRQHandler
EXTI4_IRQHandler
EXTI9_5_IRQHandler
FLASH_IRQHandler
FSMC_IRQHandler
g_pfnVectors
HAL_GetTick
HAL_IncTick
HAL_Init
HAL_InitTick
HAL_NVIC_SetPrio[...]
HAL_RCC_ClockConfig
HAL_RCC_OscConfig
HAL_SYSTICK_Config
I2C1_ER_IRQHandler
I2C1_EV_IRQHandler
I2C2_ER_IRQHandler
main
MemManage_Handler
memset
RCC_IRQHandler
Reset_Handler
RTC_IRQHandler
SPI2_IRQHandler
SPI3_IRQHandler
SVC_Handler
SystemClock_Config
SystemInit
TIM1_BRK_IRQHandler
TIM1_TRG_COM_IRQ[...]
TIM1_UP_IRQHandler
TIM2_IRQHandler
TIM3_IRQHandler
TIM4_IRQHandler
TIM5_IRQHandler
TIM7_IRQHandler
TIM8_BRK_IRQHandler
TIM8_UP_IRQHandler
UART4_IRQHandler
UART5_IRQHandler
USART1_IRQHandler
USART2_IRQHandler
USART3_IRQHandler
USB_HP_CAN1_TX_I[...]
USB_LP_CAN1_RX0_[...]
USBWakeUp_IRQHandler
uwTickPrio
WWDG_IRQHandler
__bss_end__
__exidx_start
__libc_init_array
_ebss
_edata
_end
_estack
_fini
_init
_Min_Heap_Size
_Z18SystemClock_[...]
ADC3_IRQHandler
AHBPrescTable
BusFault_Handler
CAN1_RX1_IRQHandler
CAN1_SCE_IRQHandler
Default_Handler
DMA1_Channel1_IR[...]
DMA1_Channel2_IR[...]
DMA1_Channel3_IR[...]
DMA1_Channel4_IR[...]
DMA1_Channel5_IR[...]
DMA1_Channel6_IR[...]
DMA1_Channel7_IR[...]
DMA2_Channel1_IR[...]
DMA2_Channel2_IR[...]
DMA2_Channel3_IR[...]
DMA2_Channel4_5_[...]
Error_Handler
EXTI1_IRQHandler
EXTI15_10_IRQHandler
EXTI4_IRQHandler
EXTI9_5_IRQHandler
FLASH_IRQHandler
FSMC_IRQHandler
g_pfnVectors
HAL_GetTick
HAL_IncTick
HAL_Init
HAL_InitTick
HAL_NVIC_SetPrio[...]
HAL_RCC_ClockConfig
HAL_RCC_OscConfig
HAL_SYSTICK_Config
I2C1_ER_IRQHandler
I2C1_EV_IRQHandler
I2C2_ER_IRQHandler
main
MemManage_Handler
memset
RCC_IRQHandler
Reset_Handler
RTC_IRQHandler
SPI2_IRQHandler
SPI3_IRQHandler
SVC_Handler

SystemInit
TIM1_BRK_IRQHandler
TIM1_TRG_COM_IRQ[...]
TIM1_UP_IRQHandler
TIM2_IRQHandler
TIM3_IRQHandler
TIM4_IRQHandler
TIM5_IRQHandler
TIM7_IRQHandler
TIM8_BRK_IRQHandler
TIM8_UP_IRQHandler
UART4_IRQHandler
UART5_IRQHandler
USART1_IRQHandler
USART2_IRQHandler
USART3_IRQHandler
USB_HP_CAN1_TX_I[...]
USB_LP_CAN1_RX0_[...]
USBWakeUp_IRQHandler
uwTickPrio
WWDG_IRQHandler

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 eeprom emulation  (0) 2025.07.29
stm32f103ret flash program / erase 테스트  (0) 2025.07.28
HAL_FLASH_Program  (0) 2025.07.21
stm32cubeide build analyzer  (0) 2025.07.21
stm32 wwdg, iwdg 차이  (0) 2025.06.30
Posted by 구차니
embeded/Cortex-M3 STM2025. 7. 29. 17:51

X-CUBE-EEPROM 이 stm32f103 프로젝트에서 안보여서 찾아보는데

어...라... 왜 F만 빠져있냐 =_=

[링크 : https://www.st.com/resource/en/application_note/an4894-how-to-use-eeprom-emulation-on-stm32-mcus-stmicroelectronics.pdf]
[링크 : https://www.st.com/en/embedded-software/x-cube-eeprom.html]

[링크 : https://m.blog.naver.com/chcbaram/223153496808] << STM32G

 

STM32C0 series, STM32G0 series, STM32G4 series, STM32H5 series, STM32L4 series, STM32L4+ series, STM32L5 series, STM32U0 series, STM32U3 series, STM32U5 series, STM32WB series, STM32WL series

Reference documents
EEPROM emulation solutions and application notes are available for other STM32 series as listed below.
[1] Application note STM32F0 series EEPROM emulation in STM32F0xx microcontrollers (AN4061)
[2] Application note STM32F1 series EEPROM emulation in STM32F10x microcontrollers (AN2594)
[3] Application note STM32F2 series EEPROM emulation in STM32F2xx microcontrollers (AN3390)
[4] Application note STM32F3 series EEPROM emulation in STM32F30x/STM32F31x STM32F37x/STM32F38x
microcontrollers (AN4056)
[5] Application note STM32F4 series EEPROM emulation in STM32F40x/STM32F41x microcontrollers (AN3969)
[6] Application note Building wireless applications with STM32WB series microcontrollers (AN5289)
[7] Reference manual STM32H563/H573 and STM32H562 Arm®-based 32-bit MCUs (RM0481)







● eeprom.c: it contains C code for the following project routines:
EE_Init()
EE_Format()
EE_FindValidPage()
EE_VerifyPageFullWriteVariable()
EE_ReadVariable()
EE_PageTransfer()
EE_WriteVariable()
● eeprom.h: it contains the routine prototypes and some declarations

[링크 : https://www.st.com/resource/en/application_note/an2594-eeprom-emulation-in-stm32f10x-microcontrollers-stmicroelectronics.pdf]

 

가입 후 아래 링크에서 다운로드 받아야 사용할 수 있나 보다.

대충 봐서는 2개의 섹터를 오가면서 write 하는 듯. wear leveling 등은 구현이 안되어 있을 것 같네

[링크 : https://www.st.com/en/embedded-software/stsw-stm32010.html]

 

 

 

 

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 cpp  (0) 2025.08.08
stm32f103ret flash program / erase 테스트  (0) 2025.07.28
HAL_FLASH_Program  (0) 2025.07.21
stm32cubeide build analyzer  (0) 2025.07.21
stm32 wwdg, iwdg 차이  (0) 2025.06.30
Posted by 구차니
embeded/Cortex-M3 STM2025. 7. 28. 15:12

몇개 참조했는데 그냥 결국에는 맨땅에 헤딩해서 대충 구현.. -_ㅠ

[링크 : https://blog.naver.com/eziya76/220988141146]

 

1. HAL_Flash_Program() 호출 전에 해당 섹터는 HAL_FlashEx_Erase()를 불러서 지워져 있는 상태여야 함

STM32Cubeprogrammer로 보면 전부 0xFFFFFF 라서 그냥 바로 쓰면 되겠네? 싶어서

HAL_Flash_Unlock() 이후 바로  HAL_Flash_Program() 호출해서 쓰니 Hard Fault 발생 -_-

찾아봐도 별 도움되는건 없어서, 결국에는 지우고 새로 쓰니 문제 없이 되었는데

[링크 : https://community.st.com/t5/stm32-mcus-products/hal-flash-program-triggers-hardfault-exception/td-p/684669]

 

다시 안지우고 쓰려고 하면 아까처럼 hard fault는 안뜨고

HAL_Flash_Program() 의 리턴값이 HAL_ERROR(1)로 뜰 뿐 문제가 없다. 머지?

 

 

아래는 쓰는데 성공한 예제

 

2. 섹터 지우는건 빠른데, 쓰는건 느리다(word)

아래 코드에서 32MHz로 작동중인데,

Erase는 2msec 이내로 끝났고

Write는 2048 Byte, 1 섹터를 가득 채우는건데 65 msec 미만으로 소요되었다.

tick1 1
tick2 64

 

3. 16bit 32bit write 속도가 다르다.

함수 호출 횟수 차이인진 모르겠으나 WORD 에서 HALFWORD로 바꾸고 쓰기 횟수를 2배로 늘려주니

    ret = HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD, addr, data);


무려(?) 3msec가 느려졌다.

tick1 1
tick2 67

 

3. HAL_FLASH_Unlock() / HAL_FLASH_Lock()

플래시를 unlock 하지 않고 erase / program 하면 실제로 써지거나 지워지지 않지만 HAL_OK로 리턴된다.

이게 머야 -_-

 

소스코드

void flash_test()
{
  HAL_StatusTypeDef ret;
  uint32_t addr = FLASH_BASE + 0x0007F800;
  int data = 0;

  HAL_FLASH_Unlock();

  FLASH_EraseInitTypeDef eraseDef;
eraseDef.TypeErase = FLASH_TYPEERASE_PAGES;
eraseDef.Banks = 1;
eraseDef.PageAddress = 0x807F800;
eraseDef.NbPages = 1;

  uint32_t ret_era = 0;
  uint32_t tick = HAL_GetTick();
  HAL_FLASHEx_Erase(&eraseDef, &ret_era);
  uint32_t tick2 = HAL_GetTick();

  printf("tick1 %d\r\n",tick2-tick);

  tick = HAL_GetTick();
  for(int idx = 0; idx < 512; idx++)
  {
    ret = HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, addr, data);
    if(ret != HAL_OK)
    {
      printf("ret[%x]\r\n", ret);
      break;
    }
    // else
    // {
    //   printf("%X [%X] ok\r\n", FLASH_BASE + addr * 4, data);
    // }

    addr += 4;
    data += 4;
  }
  tick2 = HAL_GetTick();
  printf("tick2 %d\r\n",tick2-tick);

  HAL_FLASH_Lock();
}

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 cpp  (0) 2025.08.08
stm32 eeprom emulation  (0) 2025.07.29
HAL_FLASH_Program  (0) 2025.07.21
stm32cubeide build analyzer  (0) 2025.07.21
stm32 wwdg, iwdg 차이  (0) 2025.06.30
Posted by 구차니
embeded/Cortex-M3 STM2025. 7. 21. 16:40

특이한 건 블럭단위가 아니라는 것과 program은 있어도 Erase나 Read 함수가 안보인다는 점.

// stm32f1xx_hal_flash.h
HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t Address, uint64_t Data);
HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t Address, uint64_t Data);

HAL_StatusTypeDef HAL_FLASH_Unlock(void);
HAL_StatusTypeDef HAL_FLASH_Lock(void);
HAL_StatusTypeDef HAL_FLASH_OB_Unlock(void);
HAL_StatusTypeDef HAL_FLASH_OB_Lock(void);

// stm32f1xx_hal_flash_ex.h
HAL_StatusTypeDef  HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
HAL_StatusTypeDef  HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);

HAL_StatusTypeDef  HAL_FLASHEx_OBErase(void);
HAL_StatusTypeDef  HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
void               HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
uint32_t           HAL_FLASHEx_OBGetUserData(uint32_t DATAAdress);

[링크 : https://blog.naver.com/eziya76/220988141146]

[링크 : https://selpman.tistory.com/287]

 

음.. 플래시 영역은 0x0800 0000 으로 지정되어 있으니 거기서 부터 512KB (= 0x0008 0000)

인 0x0807 FFFF 까지 읽어보면 되려나

 

 

STM32F103RET 니까 아래 조건이려나

/* High Density */
#if (defined(STM32F100xE) || defined(STM32F101xE) || defined(STM32F103xE))
#define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= FLASH_BASE) && (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x200U) ? \
                                           ((ADDRESS) <= FLASH_BANK1_END) :  (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x180U) ? \
                                           ((ADDRESS) <= 0x0805FFFFU) :  ((ADDRESS) <= 0x0803FFFFU))))

#endif /* STM32F100xE || STM32F101xE || STM32F103xE */

 

그런데 STM32CubeProgrammer로 확인해보니

512KB 맞고 sector는 0에서 255까지 256개 * 2KB

 

Write Protect는 0에서 31 까지 총 32개.. 8개 섹터당 1개의 write protect 인가

 

 



 

 

2.4.2 Write protection
In high-density and connectivity line devices, from page 0 to page 61, write protection is implemented with a granularity of two pages at a time. The remaining memory block (from page 62 to page 255 in high-density devices, and from page 62 to page 127 in connectivity line devices) is write-protected at once.

0~61 까지는 2개씩 해서 총 31개 write protect로 상세하게 제어되고

62~255까지 퉁쳐서 1개,

합계 32개의 write protect로 제어된다.

[링크 : https://www.st.com/resource/en/programming_manual/pm0075-stm32f10xxx-flash-memory-microcontrollers-stmicroelectronics.pdf]

 

Depending on the selected boot mode, main Flash memory, system memory or SRAM is accessible as follows:
 Boot from main Flash memory: the main Flash memory is aliased in the boot memory space (0x0000 0000), but still accessible from its original memory space (0x800 0000). In other words, the Flash memory contents can be accessed starting from address 0x0000 0000 or 0x800 0000.
 Boot from system memory: the system memory is aliased in the boot memory space (0x0000 0000), but still accessible from its original memory space (0x1FFF B000 in connectivity line devices, 0x1FFF F000 in other devices).
 Boot from the embedded SRAM: SRAM is accessible only at address 0x2000 0000.

Embedded boot loader
The embedded boot loader is located in the System memory, programmed by ST during production. It is used to reprogram the Flash memory with one of the available serial interfaces:
 In low-, medium- and high-density devices the bootoader is activated through the USART1 interface.
 In XL-density devices the boot loader is activated through the following interfaces: USART1 or USART2 (remapped).
 In connectivity line devices the boot loader can be activated through one of the following interfaces: USART1, USART2 (remapped), CAN2 (remapped) or USB OTG FS in Device mode (DFU: device firmware upgrade).

[링크 : https://www.st.com/resource/en/reference_manual/rm0008-stm32f101xx-stm32f102xx-stm32f103xx-stm32f105xx-and-stm32f107xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 eeprom emulation  (0) 2025.07.29
stm32f103ret flash program / erase 테스트  (0) 2025.07.28
stm32cubeide build analyzer  (0) 2025.07.21
stm32 wwdg, iwdg 차이  (0) 2025.06.30
stm32f wwdg iwdg 그리고 stop mode  (0) 2025.06.27
Posted by 구차니
embeded/Cortex-M3 STM2025. 7. 21. 15:35

크게 도움이 되는 기능은 아니지만 왜 안나오나 해서 찾아보니

windows - preference - STM32Cube - Build views settings 에서

on request 에서 auto로 바꾸어 주면 된다.

[링크 : https://eteo.tistory.com/846]

 

정책변경인진 모르겠지만 위 글을 참고하면 1.15.x~ 이후는 auto가 아니게 된 듯.

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32f103ret flash program / erase 테스트  (0) 2025.07.28
HAL_FLASH_Program  (0) 2025.07.21
stm32 wwdg, iwdg 차이  (0) 2025.06.30
stm32f wwdg iwdg 그리고 stop mode  (0) 2025.06.27
stm32 cubeide ioc gen  (0) 2025.06.18
Posted by 구차니
embeded/Cortex-M3 STM2025. 6. 30. 11:17

iwdg는 내부 rc 클럭으로 작동을 하는 부분으로 stop이나 standby 모드에서도 작동한다.

즉, 절전모드 하려면 iwdg는 조금은 더 주의 깊게 설정해야 한다는 의미인데...

 

wwdg 는 window 라서 특정 시간대에만 와치독을 리셋할 수 있게 한다.

너무 빠르게 리셋해도 전체 시스템이 리셋되고, 너무 늦어도 리셋된다.

작동 시간이 일정하다면 wwdg를 쓰면 될 것 같기한데...

 

Independent watchdog
The independent watchdog is based on a 12-bit downcounter and 8-bit prescaler. It is clocked from an independent 40 kHz internal RC and as it operates independently of the main clock, it can operate in Stop and Standby modes. It can be used either as a watchdog to reset the device when a problem occurs, or as a free-running timer for application timeout management. It is hardware- or software-configurable through the option bytes. The counter can be frozen in debug mode.

Window watchdog
The window watchdog is based on a 7-bit downcounter that can be set as free-running. It can be used as a watchdog to reset the device when a problem occurs. It is clocked from the main clock. It has an early warning interrupt capability and the counter can be frozen in debug mode.

[링크 : https://www.st.com/resource/en/datasheet/stm32f103c8.pdf]

 

 

 

[링크 : https://pineenergy.tistory.com/138]

[링크 : https://electronics.stackexchange.com/questions/123080/independent-watchdog-iwdg-or-window-watchdog-wwdg]

[링크 : https://community.st.com/t5/stm32-mcus-products/iwdg-vs-wwdg/td-p/451732]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

HAL_FLASH_Program  (0) 2025.07.21
stm32cubeide build analyzer  (0) 2025.07.21
stm32f wwdg iwdg 그리고 stop mode  (0) 2025.06.27
stm32 cubeide ioc gen  (0) 2025.06.18
stm32 uart tx dma  (0) 2025.06.18
Posted by 구차니
embeded/Cortex-M3 STM2025. 6. 27. 17:27

iwdg가 wdg_sw 설정되는줄 알았는데.. iwdg가 software랑 hardware로 나눠지는 듯.. 찾아봐야겠네

 

Option Byte는 아래의 api를 통해 접근할수 있고

HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit)

 

UserConfig 변수내에 bit 단위로 설정되도록 되어있다.

typedef struct
{
uint32_t OptionType; /*!< OptionType: Option byte to be configured.
This parameter can be a value of @ref FLASHEx_OB_Type */

uint32_t WRPState; /*!< WRPState: Write protection activation or deactivation.
This parameter can be a value of @ref FLASHEx_OB_WRP_State */

uint32_t WRPPage; /*!< WRPPage: specifies the page(s) to be write protected
This parameter can be a value of @ref FLASHEx_OB_Write_Protection */

uint32_t Banks; /*!< Select banks for WRP activation/deactivation of all sectors.
This parameter must be a value of @ref FLASHEx_Banks */
 
uint8_t RDPLevel; /*!< RDPLevel: Set the read protection level..
This parameter can be a value of @ref FLASHEx_OB_Read_Protection */

#if defined(FLASH_BANK2_END)
uint8_t USERConfig; /*!< USERConfig: Program the FLASH User Option Byte:
IWDG / STOP / STDBY / BOOT1
This parameter can be a combination of @ref FLASHEx_OB_IWatchdog, @ref FLASHEx_OB_nRST_STOP,
@ref FLASHEx_OB_nRST_STDBY, @ref FLASHEx_OB_BOOT1 */
#else
uint8_t USERConfig; /*!< USERConfig: Program the FLASH User Option Byte:
IWDG / STOP / STDBY
This parameter can be a combination of @ref FLASHEx_OB_IWatchdog, @ref FLASHEx_OB_nRST_STOP,
@ref FLASHEx_OB_nRST_STDBY */
#endif /* FLASH_BANK2_END */

uint32_t DATAAddress; /*!< DATAAddress: Address of the option byte DATA to be programmed
This parameter can be a value of @ref FLASHEx_OB_Data_Address */
 
uint8_t DATAData; /*!< DATAData: Data to be stored in the option byte DATA
This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFF */
} FLASH_OBProgramInitTypeDef;

 

STOP 모드 들어가면 리셋걸리지 않게 하려면 해당 OB로 설정해주어야 하나..

/** @defgroup FLASHEx_OB_IWatchdog Option Byte IWatchdog
* @{
*/
#define OB_IWDG_SW ((uint16_t)0x0001) /*!< Software IWDG selected */
#define OB_IWDG_HW ((uint16_t)0x0000) /*!< Hardware IWDG selected */
/**
* @}
*/

/** @defgroup FLASHEx_OB_nRST_STOP Option Byte nRST STOP
* @{
*/
#define OB_STOP_NO_RST ((uint16_t)0x0002) /*!< No reset generated when entering in STOP */
#define OB_STOP_RST ((uint16_t)0x0000) /*!< Reset generated when entering in STOP */
/**
* @}
*/

/** @defgroup FLASHEx_OB_nRST_STDBY Option Byte nRST STDBY
* @{
*/
#define OB_STDBY_NO_RST ((uint16_t)0x0004) /*!< No reset generated when entering in STANDBY */
#define OB_STDBY_RST ((uint16_t)0x0000) /*!< Reset generated when entering in STANDBY */

 

HAL_FLASHEx_OBGetConfig()
HAL_FLASH_OB_Unlock()
HAL_FLASH_Unlock()
HAL_FLASH_OB_Launch()

[링크 : https://blog.naver.com/eziya76/220988141146]

[링크 : https://community.st.com/t5/stm32-mcus/how-to-program-stm32-option-bytes-with-the-hal-api/ta-p/49660]

 

IWDG는 option byte에 설정 가능 - 설정하면 리부팅 필요 혹은 강제로 리부팅됨

[링크 : https://m.blog.naver.com/kim1417/221461254045]

[링크 : https://pineenergy.tistory.com/138]

 

The Independent watchdog can not be stopped in any processor mode. You have to wake up regularly to reload the watchdog. What you can do is change the prescaler to maximum so the watchdog is counting slowly.
IWDG will only be stopped if you disconnect the controller from the power supply.

[링크 : https://stackoverflow.com/questions/53334571/disabling-stm32-hal-iwdg-or-wwdg-watchdog-before-stop-mode]

 

stm32g 의 경우인데 f에 없는 플래그가 존재한다.

[링크 : https://community.st.com/t5/stm32-mcus-products/iwdg-disable-during-sleep-stop/td-p/95106]

 

+

2025.07.31

stm32f1xx_hal.h 에서 찾은 건데..

FREEZE 로 된걸 해주면 stp 모드에서 동결되려나? 그런데 debug mode 래서 언제 쓸수 있는지 찾아봐야 할 듯.

/**
* @brief WWDG Peripherals Debug mode
*/
#define __HAL_DBGMCU_FREEZE_WWDG() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_WWDG_STOP)
#define __HAL_DBGMCU_UNFREEZE_WWDG() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_WWDG_STOP)

/**
* @brief IWDG Peripherals Debug mode
*/
#define __HAL_DBGMCU_FREEZE_IWDG() SET_BIT(DBGMCU->CR, DBGMCU_CR_DBG_IWDG_STOP)
#define __HAL_DBGMCU_UNFREEZE_IWDG() CLEAR_BIT(DBGMCU->CR, DBGMCU_CR_DBG_IWDG_STOP)

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32cubeide build analyzer  (0) 2025.07.21
stm32 wwdg, iwdg 차이  (0) 2025.06.30
stm32 cubeide ioc gen  (0) 2025.06.18
stm32 uart tx dma  (0) 2025.06.18
stm32 pwm 주파수 계산  (0) 2025.06.05
Posted by 구차니
embeded/Cortex-M3 STM2025. 6. 18. 11:11

실수로 자동으로 물어보는걸 꺼버렸더니.. 귀찮아졌다.

일단 ioc 수정 후, 저장, 우클릭 generate code

 

근데 상단에 톱니바퀴가 동일한 기능..

 

[링크 : https://blog.naver.com/chandong83/222863872771]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 wwdg, iwdg 차이  (0) 2025.06.30
stm32f wwdg iwdg 그리고 stop mode  (0) 2025.06.27
stm32 uart tx dma  (0) 2025.06.18
stm32 pwm 주파수 계산  (0) 2025.06.05
stm32 timer로 gpio 토글하기  (0) 2025.06.05
Posted by 구차니
embeded/Cortex-M3 STM2025. 6. 18. 11:09

stm32 에서 uart tx를 dma로 구현하기

 

connectivity - usart 에서

DMA Settings에서 Add

 

TX를 DMA로 할거니까 USART1_TX를 선택

 

uart니까 우선순위가 높을 이유도 없으니 그냥 기본으로 하고, 바이트 단위로 증가가 기본 설정으로 잡힌다.

 

DMA 인터럽트와 usart 인터럽트를 활성화 하고

 

보내는 함수 자체는 별로 차이가 없긴한데,

_DMA가 붙은 녀석을 이용해서 버퍼가 차면 비울만큼 전송하도록 명령을 보내고

HAL_StatusTypeDef HAL_UART_Transmit(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size, uint32_t Timeout)
HAL_StatusTypeDef HAL_UART_Transmit_DMA(UART_HandleTypeDef *huart, const uint8_t *pData, uint16_t Size)

 

TX 완료시에는 인터럽트가 뜨도록 해서 추가로 전송할지 정도만 구현하면 된다.

void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)
{
}

 

[링크  https://blog.naver.com/chandong83/222863872771]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32f wwdg iwdg 그리고 stop mode  (0) 2025.06.27
stm32 cubeide ioc gen  (0) 2025.06.18
stm32 pwm 주파수 계산  (0) 2025.06.05
stm32 timer로 gpio 토글하기  (0) 2025.06.05
stm32 pwm interrupt  (0) 2025.06.02
Posted by 구차니
embeded/Cortex-M3 STM2025. 6. 5. 21:08

귀찮아서 50% duty로 하면 아래와 같이 계산하면 된다.

mcu 클럭을 기준으로 period 값을 변수로 넣어 되긴 한데...

  int mcu_clk = 8000000; // 8M Hz
  int freq_calc = mcu_clk / (freq * 10);

  TIM_OC_InitTypeDef sConfigOC = {0};
      htim3.Instance = TIM3;
      htim3.Init.Prescaler = freq_calc - 1;  // PSC - 20k
      htim3.Init.Period = 10-1; // ARR? - 4k
      sConfigOC.Pulse = 5-1;  // CCR

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 cubeide ioc gen  (0) 2025.06.18
stm32 uart tx dma  (0) 2025.06.18
stm32 timer로 gpio 토글하기  (0) 2025.06.05
stm32 pwm interrupt  (0) 2025.06.02
stm32 stop mode - main thread  (0) 2025.05.29
Posted by 구차니