lxf@lxf-Inspiron-15-5510:~/cortex-m/STM32L051K8$ make clean
rm -fR build
lxf@lxf-Inspiron-15-5510:~/cortex-m/STM32L051K8$ make
mkdir build
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/main.d" -Wa,-a,-ad,-alms=build/main.lst Core/Src/main.c -o build/main.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_it.d" -Wa,-a,-ad,-alms=build/stm32l0xx_it.lst Core/Src/stm32l0xx_it.c -o build/stm32l0xx_it.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_msp.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_msp.lst Core/Src/stm32l0xx_hal_msp.c -o build/stm32l0xx_hal_msp.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_tim.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_tim.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_tim.c -o build/stm32l0xx_hal_tim.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_tim_ex.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_tim_ex.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_tim_ex.c -o build/stm32l0xx_hal_tim_ex.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal.c -o build/stm32l0xx_hal.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_i2c.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_i2c.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_i2c.c -o build/stm32l0xx_hal_i2c.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_i2c_ex.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_i2c_ex.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_i2c_ex.c -o build/stm32l0xx_hal_i2c_ex.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_rcc.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_rcc.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_rcc.c -o build/stm32l0xx_hal_rcc.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_rcc_ex.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_rcc_ex.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_rcc_ex.c -o build/stm32l0xx_hal_rcc_ex.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_flash_ramfunc.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_flash_ramfunc.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_flash_ramfunc.c -o build/stm32l0xx_hal_flash_ramfunc.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_flash.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_flash.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_flash.c -o build/stm32l0xx_hal_flash.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_flash_ex.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_flash_ex.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_flash_ex.c -o build/stm32l0xx_hal_flash_ex.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_gpio.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_gpio.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_gpio.c -o build/stm32l0xx_hal_gpio.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_dma.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_dma.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_dma.c -o build/stm32l0xx_hal_dma.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_pwr.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_pwr.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_pwr.c -o build/stm32l0xx_hal_pwr.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_pwr_ex.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_pwr_ex.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_pwr_ex.c -o build/stm32l0xx_hal_pwr_ex.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_cortex.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_cortex.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_cortex.c -o build/stm32l0xx_hal_cortex.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/stm32l0xx_hal_exti.d" -Wa,-a,-ad,-alms=build/stm32l0xx_hal_exti.lst Drivers/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_exti.c -o build/stm32l0xx_hal_exti.o
arm-none-eabi-gcc -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/system_stm32l0xx.d" -Wa,-a,-ad,-alms=build/system_stm32l0xx.lst Core/Src/system_stm32l0xx.c -o build/system_stm32l0xx.o
arm-none-eabi-gcc -x assembler-with-cpp -c -mcpu=cortex-m0plus -mthumb -DUSE_HAL_DRIVER -DSTM32L051xx -ICore/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc -IDrivers/STM32L0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32L0xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"build/startup_stm32l051xx.d" startup_stm32l051xx.s -o build/startup_stm32l051xx.o
arm-none-eabi-gcc build/main.o build/stm32l0xx_it.o build/stm32l0xx_hal_msp.o build/stm32l0xx_hal_tim.o build/stm32l0xx_hal_tim_ex.o build/stm32l0xx_hal.o build/stm32l0xx_hal_i2c.o build/stm32l0xx_hal_i2c_ex.o build/stm32l0xx_hal_rcc.o build/stm32l0xx_hal_rcc_ex.o build/stm32l0xx_hal_flash_ramfunc.o build/stm32l0xx_hal_flash.o build/stm32l0xx_hal_flash_ex.o build/stm32l0xx_hal_gpio.o build/stm32l0xx_hal_dma.o build/stm32l0xx_hal_pwr.o build/stm32l0xx_hal_pwr_ex.o build/stm32l0xx_hal_cortex.o build/stm32l0xx_hal_exti.o build/system_stm32l0xx.o build/startup_stm32l051xx.o -mcpu=cortex-m0plus -mthumb -specs=nano.specs -TSTM32L051K8Ux_FLASH.ld -lc -lm -lnosys -Wl,-Map=build/STM32L051K8.map,--cref -Wl,--gc-sections -o build/STM32L051K8.elf
/home/lxf/toolchain/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/lxf/toolchain/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-closer.o): in function `_close_r':
closer.c:(.text._close_r+0xc): warning: _close is not implemented and will always fail
/home/lxf/toolchain/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/lxf/toolchain/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-lseekr.o): in function `_lseek_r':
lseekr.c:(.text._lseek_r+0x10): warning: _lseek is not implemented and will always fail
/home/lxf/toolchain/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/lxf/toolchain/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-readr.o): in function `_read_r':
readr.c:(.text._read_r+0x10): warning: _read is not implemented and will always fail
/home/lxf/toolchain/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/lxf/toolchain/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp/libc_nano.a(libc_a-writer.o): in function `_write_r':
writer.c:(.text._write_r+0x10): warning: _write is not implemented and will always fail
/home/lxf/toolchain/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: warning: build/STM32L051K8.elf has a LOAD segment with RWX permissions
arm-none-eabi-size build/STM32L051K8.elf
text data bss dec hex filename
3992 20 1572 5584 15d0 build/STM32L051K8.elf
arm-none-eabi-objcopy -O ihex build/STM32L051K8.elf build/STM32L051K8.hex
arm-none-eabi-objcopy -O binary -S build/STM32L051K8.elf build/STM32L051K8.bin