Mike_python小 发表于 2023-1-24 10:54:03

有无用mac开发stm32的同学

有无用mac开发stm32的同学

不会配置环境,在网上找的也都是片面的,如果有的话想请教一下怎么配置环境

元豪 发表于 2023-1-24 19:59:25

我觉得还是不要发在吹水阁比较好

人造人 发表于 2023-1-24 22:46:52

累死我了,花了一天的时间弄这个,^_^
我用的开发板是正点原子的探索者STM32F407ZGT6
用的archlinux操作系统,mac应该也和linux的配置方法差不多吧
使用了arm-none-eabi-gcc 和 arm-none-eabi-binutils,用来编译代码,最终得到 .ihx 文件
下载程序用的stlink
调试程序使用 arm-none-eabi-gdb + openocd

sh-5.1$ pacman -Qi arm-none-eabi-gcc arm-none-eabi-gdb arm-none-eabi-newlib arm-none-eabi-binutils stlink openocd
Name            : arm-none-eabi-gcc
Version         : 12.2.0-1
Description   : The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target
Architecture    : x86_64
URL             : https://gcc.gnu.org/
Licenses      : GPLLGPLFDL
Groups          : None
Provides      : None
Depends On      : arm-none-eabi-binutilszliblibmpclibislzstd
Optional Deps   : arm-none-eabi-newlib: Standard C library optimized for embedded systems
Required By   : None
Optional For    : None
Conflicts With: None
Replaces      : None
Installed Size: 1278.89 MiB
Packager      : Anatol Pomozov <anatol.pomozov@gmail.com>
Build Date      : Sun 21 Aug 2022 07:45:47 AM CST
Install Date    : Tue 24 Jan 2023 12:21:18 PM CST
Install Reason: Explicitly installed
Install Script: No
Validated By    : Signature

Name            : arm-none-eabi-gdb
Version         : 12.1-3
Description   : The GNU Debugger for the ARM EABI (bare-metal) target
Architecture    : x86_64
URL             : https://www.gnu.org/software/gdb/
Licenses      : GPL3
Groups          : None
Provides      : None
Depends On      : xzncursesexpatpythonguilegdb-commonmpfrlibelfsource-highlight
Optional Deps   : stlink: for debugging over STLINK
Required By   : None
Optional For    : None
Conflicts With: None
Replaces      : None
Installed Size: 8.05 MiB
Packager      : Evangelos Foutras <foutrelis@archlinux.org>
Build Date      : Fri 11 Nov 2022 09:55:17 PM CST
Install Date    : Tue 24 Jan 2023 12:21:18 PM CST
Install Reason: Explicitly installed
Install Script: No
Validated By    : Signature

Name            : arm-none-eabi-newlib
Version         : 4.2.0.20211231-1
Description   : A C standard library implementation intended for use on embedded systems (ARM bare metal)
Architecture    : any
URL             : https://www.sourceware.org/newlib/
Licenses      : BSD
Groups          : None
Provides      : None
Depends On      : None
Optional Deps   : None
Required By   : None
Optional For    : arm-none-eabi-gcc
Conflicts With: None
Replaces      : None
Installed Size: 251.26 MiB
Packager      : Anatol Pomozov <anatol.pomozov@gmail.com>
Build Date      : Sat 23 Apr 2022 05:28:23 AM CST
Install Date    : Tue 24 Jan 2023 12:21:19 PM CST
Install Reason: Explicitly installed
Install Script: No
Validated By    : Signature

Name            : arm-none-eabi-binutils
Version         : 2.39-2
Description   : A set of programs to assemble and manipulate binary and object files for the ARM EABI (bare-metal)
                  target
Architecture    : x86_64
URL             : https://www.gnu.org/software/binutils/
Licenses      : GPL
Groups          : None
Provides      : None
Depends On      : zliblibelf
Optional Deps   : None
Required By   : arm-none-eabi-gcc
Optional For    : None
Conflicts With: None
Replaces      : None
Installed Size: 18.58 MiB
Packager      : kpcyrd <kpcyrd@archlinux.org>
Build Date      : Tue 15 Nov 2022 06:31:36 AM CST
Install Date    : Tue 24 Jan 2023 12:21:15 PM CST
Install Reason: Explicitly installed
Install Script: No
Validated By    : Signature

Name            : stlink
Version         : 1.7.0-1
Description   : Firmware programmer for STM32 STLINK v1/v2 protocol
Architecture    : x86_64
URL             : https://github.com/texane/stlink
Licenses      : BSD
Groups          : None
Provides      : None
Depends On      : libusb
Optional Deps   : gtk3: GUI application
Required By   : None
Optional For    : arm-none-eabi-gdb
Conflicts With: None
Replaces      : None
Installed Size: 364.47 KiB
Packager      : Filipe Laíns <lains@archlinux.org>
Build Date      : Mon 17 May 2021 12:26:55 AM CST
Install Date    : Tue 24 Jan 2023 12:27:31 PM CST
Install Reason: Explicitly installed
Install Script: Yes
Validated By    : Signature

Name            : openocd
Version         : 1:0.11.0-2
Description   : Debugging, in-system programming and boundary-scan testing for embedded target devices
Architecture    : x86_64
URL             : http://openocd.org
Licenses      : GPL
Groups          : None
Provides      : None
Depends On      : libftdi-compatlibusb-compathidapilibudev.so
Optional Deps   : None
Required By   : None
Optional For    : None
Conflicts With: None
Replaces      : None
Installed Size: 4.97 MiB
Packager      : David Runge <dvzrv@archlinux.org>
Build Date      : Sat 23 Apr 2022 06:16:16 AM CST
Install Date    : Tue 24 Jan 2023 07:46:55 PM CST
Install Reason: Explicitly installed
Install Script: No
Validated By    : Signature

sh-5.1$


sh-5.1$ pwd
/tmp/all
sh-5.1$ ls
includelibMakefile        srcstm32f4xx_conf.h
sh-5.1$ tree
.
├── include
│   ├── core_cm4.h
│   ├── core_cm4_simd.h
│   ├── core_cmFunc.h
│   ├── core_cmInstr.h
│   ├── misc.h
│   ├── stm32f4xx_adc.h
│   ├── stm32f4xx_can.h
│   ├── stm32f4xx_crc.h
│   ├── stm32f4xx_cryp.h
│   ├── stm32f4xx_dac.h
│   ├── stm32f4xx_dbgmcu.h
│   ├── stm32f4xx_dcmi.h
│   ├── stm32f4xx_dma2d.h
│   ├── stm32f4xx_dma.h
│   ├── stm32f4xx_exti.h
│   ├── stm32f4xx_flash.h
│   ├── stm32f4xx_flash_ramfunc.h
│   ├── stm32f4xx_fmc.h
│   ├── stm32f4xx_fsmc.h
│   ├── stm32f4xx_gpio.h
│   ├── stm32f4xx.h
│   ├── stm32f4xx_hash.h
│   ├── stm32f4xx_i2c.h
│   ├── stm32f4xx_iwdg.h
│   ├── stm32f4xx_ltdc.h
│   ├── stm32f4xx_pwr.h
│   ├── stm32f4xx_rcc.h
│   ├── stm32f4xx_rng.h
│   ├── stm32f4xx_rtc.h
│   ├── stm32f4xx_sai.h
│   ├── stm32f4xx_sdio.h
│   ├── stm32f4xx_spi.h
│   ├── stm32f4xx_syscfg.h
│   ├── stm32f4xx_tim.h
│   ├── stm32f4xx_usart.h
│   ├── stm32f4xx_wwdg.h
│   └── system_stm32f4xx.h
├── lib
│   ├── Makefile
│   ├── misc.c
│   ├── stm32f4xx_adc.c
│   ├── stm32f4xx_can.c
│   ├── stm32f4xx_crc.c
│   ├── stm32f4xx_cryp_aes.c
│   ├── stm32f4xx_cryp.c
│   ├── stm32f4xx_cryp_des.c
│   ├── stm32f4xx_cryp_tdes.c
│   ├── stm32f4xx_dac.c
│   ├── stm32f4xx_dbgmcu.c
│   ├── stm32f4xx_dcmi.c
│   ├── stm32f4xx_dma2d.c
│   ├── stm32f4xx_dma.c
│   ├── stm32f4xx_exti.c
│   ├── stm32f4xx_flash.c
│   ├── stm32f4xx_flash_ramfunc.c
│   ├── stm32f4xx_fmc.c
│   ├── stm32f4xx_fsmc.c
│   ├── stm32f4xx_gpio.c
│   ├── stm32f4xx_hash.c
│   ├── stm32f4xx_hash_md5.c
│   ├── stm32f4xx_hash_sha1.c
│   ├── stm32f4xx_i2c.c
│   ├── stm32f4xx_iwdg.c
│   ├── stm32f4xx_ltdc.c
│   ├── stm32f4xx_pwr.c
│   ├── stm32f4xx_rcc.c
│   ├── stm32f4xx_rng.c
│   ├── stm32f4xx_rtc.c
│   ├── stm32f4xx_sai.c
│   ├── stm32f4xx_sdio.c
│   ├── stm32f4xx_spi.c
│   ├── stm32f4xx_syscfg.c
│   ├── stm32f4xx_tim.c
│   ├── stm32f4xx_usart.c
│   ├── stm32f4xx_wwdg.c
│   └── system_stm32f4xx.c
├── Makefile
├── src
│   ├── main.c
│   ├── Makefile
│   ├── startup_stm32f40_41xxx.s
│   └── stm32_flash.ld
└── stm32f4xx_conf.h

4 directories, 81 files
sh-5.1$ ls
includelibMakefile        srcstm32f4xx_conf.h
sh-5.1$ cat stm32f4xx_conf.h
#ifndef _STM32F4XX_CONF_H_
#define _STM32F4XX_CONF_H_

// 暂时没有参数检查,这个之后再说
#define assert_param(expr) ((void)0)

#endif
sh-5.1$ cat Makefile
GDB = arm-none-eabi-gdb
SUBDIR = lib src
OCDDIR = /usr/share/openocd
COMMAND_ID = $(shell echo $!)

all clean:
        for i in $(SUBDIR); do $(MAKE) -C $$i $@; done

download: all
        sudo st-flash --format ihex write src/main.ihx
sh-5.1$ ls
includelibMakefile        srcstm32f4xx_conf.h
sh-5.1$ ls include/
core_cm4.h       stm32f4xx_cryp.h    stm32f4xx_flash_ramfunc.h        stm32f4xx_ltdc.hstm32f4xx_syscfg.h
core_cm4_simd.hstm32f4xx_dac.h   stm32f4xx_fmc.h                stm32f4xx_pwr.h   stm32f4xx_tim.h
core_cmFunc.h       stm32f4xx_dbgmcu.hstm32f4xx_fsmc.h                stm32f4xx_rcc.h   stm32f4xx_usart.h
core_cmInstr.h       stm32f4xx_dcmi.h    stm32f4xx_gpio.h                stm32f4xx_rng.h   stm32f4xx_wwdg.h
misc.h               stm32f4xx_dma2d.h   stm32f4xx.h                stm32f4xx_rtc.h   system_stm32f4xx.h
stm32f4xx_adc.hstm32f4xx_dma.h   stm32f4xx_hash.h                stm32f4xx_sai.h
stm32f4xx_can.hstm32f4xx_exti.h    stm32f4xx_i2c.h                stm32f4xx_sdio.h
stm32f4xx_crc.hstm32f4xx_flash.h   stm32f4xx_iwdg.h                stm32f4xx_spi.h
sh-5.1$ ls lib
Makefile              stm32f4xx_cryp_tdes.cstm32f4xx_flash_ramfunc.c        stm32f4xx_iwdg.cstm32f4xx_spi.c
misc.c                      stm32f4xx_dac.c             stm32f4xx_fmc.c                stm32f4xx_ltdc.cstm32f4xx_syscfg.c
stm32f4xx_adc.c       stm32f4xx_dbgmcu.c   stm32f4xx_fsmc.c                stm32f4xx_pwr.c   stm32f4xx_tim.c
stm32f4xx_can.c       stm32f4xx_dcmi.c             stm32f4xx_gpio.c                stm32f4xx_rcc.c   stm32f4xx_usart.c
stm32f4xx_crc.c       stm32f4xx_dma2d.c      stm32f4xx_hash.c                stm32f4xx_rng.c   stm32f4xx_wwdg.c
stm32f4xx_cryp_aes.cstm32f4xx_dma.c             stm32f4xx_hash_md5.c        stm32f4xx_rtc.c   system_stm32f4xx.c
stm32f4xx_cryp.c      stm32f4xx_exti.c             stm32f4xx_hash_sha1.c        stm32f4xx_sai.c
stm32f4xx_cryp_des.cstm32f4xx_flash.c      stm32f4xx_i2c.c                stm32f4xx_sdio.c
sh-5.1$ cat lib/Makefile
CC = arm-none-eabi-gcc
AR = arm-none-eabi-ar
CFLAGS = -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER
ARFLAGS = -crs
OBJS = misc.o stm32f4xx_adc.o stm32f4xx_can.o stm32f4xx_crc.o stm32f4xx_cryp_aes.o stm32f4xx_cryp.o \
           stm32f4xx_cryp_des.o stm32f4xx_cryp_tdes.o stm32f4xx_dac.o stm32f4xx_dbgmcu.o stm32f4xx_dcmi.o \
           stm32f4xx_dma2d.o stm32f4xx_dma.o stm32f4xx_exti.o stm32f4xx_flash.o stm32f4xx_flash_ramfunc.o \
           stm32f4xx_fsmc.o stm32f4xx_gpio.o stm32f4xx_hash.o stm32f4xx_hash_md5.o stm32f4xx_hash_sha1.o \
           stm32f4xx_i2c.o stm32f4xx_iwdg.o stm32f4xx_ltdc.o stm32f4xx_pwr.o stm32f4xx_rcc.o stm32f4xx_rng.o \
           stm32f4xx_rtc.o stm32f4xx_sai.o stm32f4xx_sdio.o stm32f4xx_spi.o stm32f4xx_syscfg.o stm32f4xx_tim.o \
           stm32f4xx_usart.o stm32f4xx_wwdg.o system_stm32f4xx.o

all: libstm32.a

libstm32.a: $(OBJS)
        $(AR) $(ARFLAGS) $@ $^

clean:
        $(RM) *.o libstm32.a
sh-5.1$ ls
includelibMakefile        srcstm32f4xx_conf.h
sh-5.1$ ls src
main.c        Makefilestartup_stm32f40_41xxx.sstm32_flash.ld
sh-5.1$ cat src/main.c
#include <stm32f4xx.h>
#include <stm32f4xx_rcc.h>
#include <stm32f4xx_gpio.h>

void main(void) {
    RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOF, ENABLE);
    GPIO_InitTypeDef GPIO_InitStructure = {0};
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9 | GPIO_Pin_10;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
    GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
    GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
    GPIO_Init(GPIOF, &GPIO_InitStructure);

    while(1) {
      GPIO_ResetBits(GPIOF, GPIO_Pin_9);
      GPIO_ResetBits(GPIOF, GPIO_Pin_10);
      for(unsigned long i = 0; i < 1000000; ++i);
      GPIO_SetBits(GPIOF, GPIO_Pin_9);
      GPIO_SetBits(GPIOF, GPIO_Pin_10);
      for(unsigned long i = 0; i < 1000000; ++i);
    }
}
sh-5.1$ cat src/Makefile
CC = arm-none-eabi-gcc
LD = arm-none-eabi-ld
OBJCOPY = arm-none-eabi-objcopy
CFLAGS = -g -Wall -Wno-main -mthumb -mcpu=cortex-m4 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER
LDFLAGS = -T stm32_flash.ld -L ../lib -L /usr/arm-none-eabi/lib -L /usr/lib/gcc/arm-none-eabi/12.2.0 \
                  /usr/lib/gcc/arm-none-eabi/12.2.0/crti.o /usr/lib/gcc/arm-none-eabi/12.2.0/crtn.o
OBJS = startup_stm32f40_41xxx.o main.o
LIBS = -lc -lstm32

all: main.ihx

main.ihx: main.elf
        $(OBJCOPY) -O ihex $< $@

main.elf: $(OBJS)
        $(LD) $(LDFLAGS) -o $@ $^ $(LIBS)

startup_stm32f40_41xxx.o: startup_stm32f40_41xxx.s
        $(CC) $(CFLAGS) -c -o $@ $^

clean:
        $(RM) *.o main.elf main.ihx
sh-5.1$ ls
includelibMakefile        srcstm32f4xx_conf.h
sh-5.1$ make
for i in lib src; do make -C $i all; done
make: Entering directory '/tmp/all/lib'
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o misc.o misc.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_adc.o stm32f4xx_adc.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_can.o stm32f4xx_can.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_crc.o stm32f4xx_crc.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_cryp_aes.o stm32f4xx_cryp_aes.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_cryp.o stm32f4xx_cryp.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_cryp_des.o stm32f4xx_cryp_des.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_cryp_tdes.o stm32f4xx_cryp_tdes.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_dac.o stm32f4xx_dac.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_dbgmcu.o stm32f4xx_dbgmcu.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_dcmi.o stm32f4xx_dcmi.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_dma2d.o stm32f4xx_dma2d.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_dma.o stm32f4xx_dma.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_exti.o stm32f4xx_exti.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_flash.o stm32f4xx_flash.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_flash_ramfunc.o stm32f4xx_flash_ramfunc.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_fsmc.o stm32f4xx_fsmc.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_gpio.o stm32f4xx_gpio.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_hash.o stm32f4xx_hash.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_hash_md5.o stm32f4xx_hash_md5.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_hash_sha1.o stm32f4xx_hash_sha1.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_i2c.o stm32f4xx_i2c.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_iwdg.o stm32f4xx_iwdg.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_ltdc.o stm32f4xx_ltdc.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_pwr.o stm32f4xx_pwr.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_rcc.o stm32f4xx_rcc.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_rng.o stm32f4xx_rng.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_rtc.o stm32f4xx_rtc.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_sai.o stm32f4xx_sai.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_sdio.o stm32f4xx_sdio.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_spi.o stm32f4xx_spi.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_syscfg.o stm32f4xx_syscfg.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_tim.o stm32f4xx_tim.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_usart.o stm32f4xx_usart.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o stm32f4xx_wwdg.o stm32f4xx_wwdg.c
arm-none-eabi-gcc -g -Wall -mthumb -mcpu=cortex-m3 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o system_stm32f4xx.o system_stm32f4xx.c
arm-none-eabi-ar -crs libstm32.a misc.o stm32f4xx_adc.o stm32f4xx_can.o stm32f4xx_crc.o stm32f4xx_cryp_aes.o stm32f4xx_cryp.o stm32f4xx_cryp_des.o stm32f4xx_cryp_tdes.o stm32f4xx_dac.o stm32f4xx_dbgmcu.o stm32f4xx_dcmi.o stm32f4xx_dma2d.o stm32f4xx_dma.o stm32f4xx_exti.o stm32f4xx_flash.o stm32f4xx_flash_ramfunc.o stm32f4xx_fsmc.o stm32f4xx_gpio.o stm32f4xx_hash.o stm32f4xx_hash_md5.o stm32f4xx_hash_sha1.o stm32f4xx_i2c.o stm32f4xx_iwdg.o stm32f4xx_ltdc.o stm32f4xx_pwr.o stm32f4xx_rcc.o stm32f4xx_rng.o stm32f4xx_rtc.o stm32f4xx_sai.o stm32f4xx_sdio.o stm32f4xx_spi.o stm32f4xx_syscfg.o stm32f4xx_tim.o stm32f4xx_usart.o stm32f4xx_wwdg.o system_stm32f4xx.o
make: Leaving directory '/tmp/all/lib'
make: Entering directory '/tmp/all/src'
arm-none-eabi-gcc -g -Wall -Wno-main -mthumb -mcpu=cortex-m4 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER -c -o startup_stm32f40_41xxx.o startup_stm32f40_41xxx.s
arm-none-eabi-gcc -g -Wall -Wno-main -mthumb -mcpu=cortex-m4 -I .. -I ../include -D STM32F40_41xxx -D USE_STDPERIPH_DRIVER   -c -o main.o main.c
arm-none-eabi-ld -T stm32_flash.ld -L ../lib -L /usr/arm-none-eabi/lib -L /usr/lib/gcc/arm-none-eabi/12.2.0 /usr/lib/gcc/arm-none-eabi/12.2.0/crti.o /usr/lib/gcc/arm-none-eabi/12.2.0/crtn.o -o main.elf startup_stm32f40_41xxx.o main.o -lc -lstm32
arm-none-eabi-objcopy -O ihex main.elf main.ihx
make: Leaving directory '/tmp/all/src'
sh-5.1$ ls
includelibMakefile        srcstm32f4xx_conf.h
sh-5.1$ ls lib
libstm32.a              stm32f4xx_cryp.o             stm32f4xx_flash.c                stm32f4xx_i2c.c   stm32f4xx_sai.o
Makefile              stm32f4xx_cryp_tdes.cstm32f4xx_flash.o                stm32f4xx_i2c.o   stm32f4xx_sdio.c
misc.c                      stm32f4xx_cryp_tdes.ostm32f4xx_flash_ramfunc.c        stm32f4xx_iwdg.cstm32f4xx_sdio.o
misc.o                      stm32f4xx_dac.c             stm32f4xx_flash_ramfunc.o        stm32f4xx_iwdg.ostm32f4xx_spi.c
stm32f4xx_adc.c       stm32f4xx_dac.o             stm32f4xx_fmc.c                stm32f4xx_ltdc.cstm32f4xx_spi.o
stm32f4xx_adc.o       stm32f4xx_dbgmcu.c   stm32f4xx_fsmc.c                stm32f4xx_ltdc.ostm32f4xx_syscfg.c
stm32f4xx_can.c       stm32f4xx_dbgmcu.o   stm32f4xx_fsmc.o                stm32f4xx_pwr.c   stm32f4xx_syscfg.o
stm32f4xx_can.o       stm32f4xx_dcmi.c             stm32f4xx_gpio.c                stm32f4xx_pwr.o   stm32f4xx_tim.c
stm32f4xx_crc.c       stm32f4xx_dcmi.o             stm32f4xx_gpio.o                stm32f4xx_rcc.c   stm32f4xx_tim.o
stm32f4xx_crc.o       stm32f4xx_dma2d.c      stm32f4xx_hash.c                stm32f4xx_rcc.o   stm32f4xx_usart.c
stm32f4xx_cryp_aes.cstm32f4xx_dma2d.o      stm32f4xx_hash_md5.c        stm32f4xx_rng.c   stm32f4xx_usart.o
stm32f4xx_cryp_aes.ostm32f4xx_dma.c             stm32f4xx_hash_md5.o        stm32f4xx_rng.o   stm32f4xx_wwdg.c
stm32f4xx_cryp.c      stm32f4xx_dma.o             stm32f4xx_hash.o                stm32f4xx_rtc.c   stm32f4xx_wwdg.o
stm32f4xx_cryp_des.cstm32f4xx_exti.c             stm32f4xx_hash_sha1.c        stm32f4xx_rtc.o   system_stm32f4xx.c
stm32f4xx_cryp_des.ostm32f4xx_exti.o             stm32f4xx_hash_sha1.o        stm32f4xx_sai.c   system_stm32f4xx.o
sh-5.1$ ls src
main.c        main.elfmain.ihxmain.oMakefilestartup_stm32f40_41xxx.o        startup_stm32f40_41xxx.sstm32_flash.ld
sh-5.1$ file lib/libstm32.a
lib/libstm32.a: current ar archive
sh-5.1$ du -bsh lib/libstm32.a
426K        lib/libstm32.a
sh-5.1$ file src/main.elf
src/main.elf: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped
sh-5.1$ du -bsh src/main.elf
159K        src/main.elf
sh-5.1$ file src/main.ihx
src/main.ihx: ASCII text, with CRLF line terminators
sh-5.1$ du -bsh src/main.ihx
17K        src/main.ihx
sh-5.1$ cat src/main.ihx
:020000040800F2
:10000000FFFF0120AD150008F5150008F5150008E3
:10001000F5150008F5150008F515000800000000AA
:10002000000000000000000000000000F5150008BE
:10003000F515000800000000F5150008F51500088A
:10004000F5150008F5150008F5150008F515000868
:10005000F5150008F5150008F5150008F515000858
:10006000F5150008F5150008F5150008F515000848
:10007000F5150008F5150008F5150008F515000838
:10008000F5150008F5150008F5150008F515000828
:10009000F5150008F5150008F5150008F515000818
:1000A000F5150008F5150008F5150008F515000808
:1000B000F5150008F5150008F5150008F5150008F8
:1000C000F5150008F5150008F5150008F5150008E8
:1000D000F5150008F5150008F5150008F5150008D8
:1000E000F5150008F5150008F5150008F5150008C8
:1000F000F5150008F5150008F5150008F5150008B8
:10010000F5150008F5150008F5150008F5150008A7
:10011000F5150008F5150008F5150008F515000897
:10012000F5150008F5150008F5150008F515000887
:10013000F5150008F5150008F5150008F515000877
:10014000F5150008F5150008F5150008F515000867
:10015000F5150008F5150008F5150008F515000857
:10016000F5150008F5150008F5150008F515000847
:10017000F5150008F5150008F5150008F515000837
:08018000F5150008F515000853
:10018800B0160008000000202400002024000020F1
:100198002400002080B584B000AF0121202000F0A9
:1001A80063FE3B4600221A605A604FF4C0633B600E
:1001B80001233B710023BB7103237B710123FB7176
:1001C8003B461946154800F0DFF84FF40071134814
:1001D80000F0FAF94FF48061104800F0F5F90023B7
:1001E800FB6002E0FB680133FB60FB680C4A93424A
:1001F800F8D94FF40071094800F0D8F94FF480613C
:10020800064800F0D3F90023BB6002E0BB68013365
:10021800BB60BB68024A9342F8D9D6E70014024093
:100228003F420F0080B582B000AF78607B684B4AD0
:10023800934208D10121012000F0ACFE00210120E9
:1002480000F0A8FE86E07B68454A934208D1012168
:10025800022000F09FFE0021022000F09BFE79E0C2
:100268007B68404A934208D10121042000F092FEA5
:100278000021042000F08EFE6CE07B683A4A93422D
:1002880008D10121082000F085FE0021082000F097
:1002980081FE5FE07B68354A934208D10121102036
:1002A80000F078FE0021102000F074FE52E07B6818
:1002B8002F4A934208D10121202000F06BFE002133
:1002C800202000F067FE45E07B682A4A934208D167
:1002D8000121402000F05EFE0021402000F05AFE7F
:1002E80038E07B68244A934208D10121802000F03D
:1002F80051FE0021802000F04DFE2BE07B681F4A54
:1003080093420AD101214FF4807000F043FE00218E
:100318004FF4807000F03EFE1CE07B68184A934260
:100328000AD101214FF4007000F034FE00214FF48F
:10033800007000F02FFE0DE07B68124A934209D14D
:1003480001214FF4806000F025FE00214FF4806009
:1003580000F020FE00BF0837BD4680BD0000024007
:100368000004024000080240000C02400010024055
:100378000014024000180240001C02400020024005
:10038800002402400028024080B487B000AF7860A3
:10039800396000237B6100233B610023FB6000235D
:1003A8007B6176E001227B6902FA03F33B613B68DB
:1003B8001B683A691340FB60FA683B699A4265D149
:1003C8007B681A687B695B00032101FA03F3DB434E
:1003D8001A407B681A607B681A683B681B79194663
:1003E8007B695B0001FA03F31A437B681A603B6878
:1003F8001B79012B03D03B681B79022B2ED17B681C
:100408009A687B695B00032101FA03F3DB431A4016
:100418007B689A607B689A683B685B7919467B6958
:100428005B0001FA03F31A437B689A607B685A6899
:100438007B699BB2194601238B40DB431A407B68DA
:100448005A607B685B683A68927911467A6992B219
:1004580001FA02F292B21A437B685A607B68DA6842
:100468007B699BB25B00032101FA03F3DB431A406B
:100478007B68DA607B68DA683B68DB7919467B69F8
:100488005B0001FA03F31A437B68DA607B69013386
:100498007B617B690F2B85D900BF00BF1C37BD4628
:1004A80080BC704780B483B000AF78607B684FF63B
:1004B800FF721A607B6800221A717B6800225A71E9
:1004C8007B6800229A717B680022DA7100BF0C37C2
:1004D800BD4680BC704780B485B000AF78600B46DD
:1004E8007B804FF48033FB607A88FB681343FB60A2
:1004F800FA687B68DA617A887B68DA61FA687B680F
:10050800DA617B68DB69FB607B68DB69FB6000BFE5
:100518001437BD4680BC704780B485B000AF7860A2
:100528000B467B800023FB737B681A697B8813402A
:10053800002B02D00123FB7301E00023FB73FB7B3C
:1005480018461437BD4680BC704780B483B000AFEE
:1005580078607B681B699BB218460C37BD4680BC27
:10056800704780B485B000AF78600B467B8000236D
:10057800FB737B685A697B881340002B02D00123E8
:10058800FB7301E00023FB73FB7B18461437BD4661
:1005980080BC704780B483B000AF78607B685B69CB
:1005A8009BB218460C37BD4680BC704780B483B0F8
:1005B80000AF78600B467B807B687A881A8300BF1F
:1005C8000C37BD4680BC704780B483B000AF7860FC
:1005D8000B467B807B687A885A8300BF0C37BD4600
:1005E80080BC704780B483B000AF78600B467B80D6
:1005F80013467B707B78002B03D07B687A881A833C
:1006080002E07B687A885A8300BF0C37BD4680BCFD
:10061800704780B483B000AF78600B467B807A88DF
:100628007B685A6100BF0C37BD4680BC704780B4F8
:1006380083B000AF78600B467B807B685A697B8803
:100648005A407B685A6100BF0C37BD4680BC704772
:1006580080B485B000AF78600B467B8013467B7012
:100668000023FB600023BB607A787B8803F00703D4
:100678009B0002FA03F3FB607B88DB089BB21A46F7
:100688007B68083253F822207B8803F007039B001D
:100698000F2101FA03F3DB437988C90889B20846B8
:1006A80002EA03017B6800F1080243F822107B8804
:1006B800DB089BB21A467B68083253F82230FA6886
:1006C8001343BB607B88DB089BB21A467B68083201
:1006D800B96843F8221000BF1437BD4680BC704784
:1006E80080B400AF164B1B68154A43F00103136032
:1006F800134B00229A60124B1B68114A23F0A8532F
:1007080023F4102313600E4B0E4A5A600C4B0E4A0A
:10071800C3F884200A4B0D4AC3F88820084B1B688D
:10072800074A23F480231360054B0022DA60044B48
:100738000022C3F88C2000BFBD4680BC704700BFB4
:10074800003802401030002400300020003000241F
:1007580080B483B000AF0346FB71054B00221A70CA
:10076800034AFB79137000BF0C37BD4680BC704745
:100778000238024080B582B000AF00233B600023FE
:10078800FB710023BB71312000F072FD0346BB7181
:100798003B6801333B603B68B3F5A04F02D0BB799F
:1007A800002BF0D0312000F063FD0346002B02D06F
:1007B8000123FB7101E00023FB71FB791846083720
:1007C800BD4680BD80B485B000AF0346FB710023F1
:1007D800FB600A4B1B68FB60FB6823F0F803FB60B7
:1007E800FB79DB00FA681343FB60044AFB6813607B
:1007F80000BF1437BD4680BC704700BF00380240B8
:1008080080B483B000AF0346FB71044AFB791360E0
:1008180000BF0C37BD4680BC704700BF0000474290
:1008280080B483B000AF0346FB710C4B00221A70F2
:100838000A4B00221A70FB79012B02D0042B04D03A
:1008480007E0064B01221A7003E0044B05221A70D8
:1008580000BF00BF0C37BD4680BC704770380240EF
:1008680080B483B000AF0346FB71044AFB79136080
:1008780000BF0C37BD4680BC704700BF800E4742A2
:1008880080B485B000AFF860B9607A603B607B687F
:100898009A01BB681A433B685B08013B1B041A4377
:1008A800FB681A43BB691B06034913434B6000BF2F
:1008B8001437BD4680BC70470038024080B483B00E
:1008C80000AF0346FB71044AFB79136000BF0C3785
:1008D800BD4680BC704700BF6000474280B483B00B
:1008E80000AF786039607B689A013B681B07044950
:1008F8001343C1F8843000BF0C37BD4680BC704735
:100908000038024080B483B000AF0346FB71044A4C
:10091800FB79136000BF0C37BD4680BC704700BF31
:100928006800474280B485B000AFF860B9607A606B
:10093800FB689A01BB681B061A437B681B070449BE
:100948001343C1F8883000BF1437BD4680BC7047D8
:100958000038024080B483B000AF0346FB71044AFC
:10096800FB79136000BF0C37BD4680BC704700BFE1
:100978007000474280B483B000AF0346FB71044A5D
:10098800FB79136000BF0C37BD4680BC704700BFC1
:100998004C00474280B485B000AF786039600023CE
:1009A800FB600A4B9B68FB60FB6823F0EC63FB6011
:1009B8007A683B681343FA681343FB60034AFB6891
:1009C800936000BF1437BD4680BC704700380240B2
:1009D80080B485B000AF786039600023FB600A4BB3
:1009E8009B68FB60FB6823F07843FB607A683B6890
:1009F8001343FA681343FB60034AFB68936000BF24
:100A08001437BD4680BC70470038024080B485B0BA
:100A180000AF78600023FB60094B9B68FB60FB68B4
:100A280023F00303FB60FA687B681343FB60044A06
:100A3800FB68936000BF1437BD4680BC704700BF99
:100A48000038024080B400AF044B9B68DBB203F06F
:100A58000C03DBB21846BD4680BC70470038024024
:100A680080B485B000AF78600023FB60094B9B68B9
:100A7800FB60FB6823F0F003FB60FA687B681343B4
:100A8800FB60044AFB68936000BF1437BD4680BC16
:100A9800704700BF0038024080B485B000AF78606E
:100AA8000023FB60094B9B68FB60FB6823F4E05361
:100AB800FB60FA687B681343FB60044AFB68936039
:100AC80000BF1437BD4680BC704700BF00380240E5
:100AD80080B485B000AF78600023FB60094B9B6849
:100AE800FB60FB6823F46043FB607B68DB00FA680B
:100AF8001343FB60034AFB68936000BF1437BD468D
:100B080080BC70470038024080B489B000AF78607C
:100B18000023BB6100237B610023FB6102233B614F
:100B28000023FB600223BB604A4B9B6803F00C0365
:100B3800BB61BB69082B11D0BB69082B44D8BB69C2
:100B4800002B03D0BB69042B04D03DE07B68424AEC
:100B58001A603DE07B68414A1A6039E03D4B5B68AA
:100B68009B0D03F00103FB603A4B5B6803F03F0306
:100B7800BB60FB68002B0CD0384ABB68B2FBF3F3B0
:100B8800344A52689209C2F3080202FB03F3FB617C
:100B98000BE0314ABB68B2FBF3F32E4A5268920964
:100BA800C2F3080202FB03F3FB612A4B5B681B0CD0
:100BB80003F0030301335B003B61FA693B69B2FB55
:100BC800F3F27B681A6003E07B68234A1A6000BF6F
:100BD800204B9B6803F0F003BB61BB691B09BB6139
:100BE8001F4ABB6913441B78DBB27B617B681A68B8
:100BF8007B69DA407B685A60164B9B6803F4E053C4
:100C0800BB61BB699B0ABB61154ABB6913441B786E
:100C1800DBB27B617B685A687B69DA407B689A60E3
:100C28000C4B9B6803F46043BB61BB695B0BBB6106
:100C38000B4ABB6913441B78DBB27B617B685A683B
:100C48007B69DA407B68DA6000BF2437BD4680BC28
:100C5800704700BF003802400024F40040787D014E
:100C68000000002080B485B000AF78600023FB60EE
:100C78007B6803F44073B3F5407F11D10F4B9B6839
:100C8800FB60FB6823F4F813FB607B6823F0704378
:100C980023F44073FA681343FB60084AFB689360C7
:100CA800064B1A6F7B68C3F30B03044913430B67A6
:100CB80000BF1437BD4680BC704700BF00380240F3
:100CC80080B483B000AF0346FB71044AFB7913601C
:100CD80000BF0C37BD4680BC704700BF3C0E474282
:100CE80080B483B000AF0346FB71044AFB791360FC
:100CF80000BF0C37BD4680BC704700BF400E47425E
:100D080080B483B000AF7860034A7B68136000BF8B
:100D18000C37BD4680BC70475C01474280B485B043
:100D280000AF78600023FB600A4BD3F88C30FB607F
:100D3800FB6823F01F03FB607B68013BFA681343E1
:100D4800FB60044AFB68C2F88C3000BF1437BD460C
:100D580080BC70470038024080B485B000AF78602E
:100D68000023FB600B4BD3F88C30FB60FB6823F44B
:100D7800F853FB607B68013B1B02FA681343FB6076
:100D8800044AFB68C2F88C3000BF1437BD4680BCEB
:100D9800704700BF0038024080B485B000AF78606B
:100DA8000023FB600A4BD3F88C30FB60FB6823F40C
:100DB8004013FB60FA687B681343FB60044AFB68D6
:100DC800C2F88C3000BF1437BD4680BC704700BFE6
:100DD8000038024080B485B000AF78600023FB6023
:100DE8000A4BD3F88C30FB60FB6823F44003FB60AC
:100DF800FA687B681343FB60044AFB68C2F88C30CE
:100E080000BF1437BD4680BC704700BF00380240A1
:100E180080B485B000AF78600023FB600A4BD3F83C
:100E28008C30FB60FB6823F44033FB60FA687B6816
:100E38001343FB60044AFB68C2F88C3000BF1437C8
:100E4800BD4680BC704700BF0038024080B483B004
:100E580000AF7860034A7B68136000BF0C37BD465B
:100E680080BC7047E011474280B483B000AF78601F
:100E78000B46FB70FB78002B06D0094B1A6B084910
:100E88007B6813430B6306E0054B1A6B7B68DB43F7
:100E9800034913400B6300BF0C37BD4680BC704745
:100EA8000038024080B483B000AF78600B46FB7016
:100EB800FB78002B06D0094B5A6B08497B68134313
:100EC8004B6306E0054B5A6B7B68DB4303491340D1
:100ED8004B6300BF0C37BD4680BC704700380240EA
:100EE80080B483B000AF78600B46FB70FB78002BB2
:100EF80006D0094B9A6B08497B6813438B6306E05D
:100F0800054B9A6B7B68DB43034913408B6300BF37
:100F18000C37BD4680BC70470038024080B483B0AF
:100F280000AF78600B46FB70FB78002B06D0094BAE
:100F38001A6C08497B6813430B6406E0054B1A6C6E
:100F48007B68DB43034913400B6400BF0C37BD4685
:100F580080BC70470038024080B483B000AF78602E
:100F68000B46FB70FB78002B06D0094B5A6C0849DE
:100F78007B6813434B6406E0054B5A6C7B68DB4384
:100F8800034913404B6400BF0C37BD4680BC704713
:100F98000038024080B483B000AF78600B46FB7025
:100FA800FB78002B06D0094B1A6908497B68134364
:100FB8000B6106E0054B1A697B68DB430349134064
:100FC8000B6100BF0C37BD4680BC7047003802403B
:100FD80080B483B000AF78600B46FB70FB78002BC1
:100FE80006D0094B5A6908497B6813434B6106E0F0
:100FF800054B5A697B68DB43034913404B6100BFCB
:101008000C37BD4680BC70470038024080B483B0BE
:1010180000AF78600B46FB70FB78002B06D0094BBD
:101028009A6908497B6813438B6106E0054B9A6906
:101038007B68DB43034913408B6100BF0C37BD4617
:1010480080BC70470038024080B483B000AF78603D
:101058000B46FB70FB78002B06D0094B1A6A08492F
:101068007B6813430B6206E0054B1A6A7B68DB4317
:10107800034913400B6200BF0C37BD4680BC704764
:101088000038024080B483B000AF78600B46FB7034
:10109800FB78002B06D0094B5A6A08497B68134332
:1010A8004B6206E0054B5A6A7B68DB4303491340F1
:1010B8004B6200BF0C37BD4680BC70470038024009
:1010C80080B483B000AF78600B46FB70FB78002BD0
:1010D80006D0094B1A6D08497B6813430B6506E077
:1010E800054B1A6D7B68DB43034913400B6500BF52
:1010F8000C37BD4680BC70470038024080B483B0CE
:1011080000AF78600B46FB70FB78002B06D0094BCC
:101118005A6D08497B6813434B6506E0054B5A6DC9
:101128007B68DB43034913404B6500BF0C37BD4662
:1011380080BC70470038024080B483B000AF78604C
:101148000B46FB70FB78002B06D0094B9A6D0849BB
:101158007B6813438B6506E0054B9A6D7B68DB4320
:10116800034913408B6500BF0C37BD4680BC7047F0
:101178000038024080B483B000AF78600B46FB7043
:10118800FB78002B06D0094B1A6E08497B6813437D
:101198000B6606E0054B1A6E7B68DB430349134078
:1011A8000B6600BF0C37BD4680BC70470038024054
:1011B80080B483B000AF78600B46FB70FB78002BDF
:1011C80006D0094B5A6E08497B6813434B6606E004
:1011D800054B5A6E7B68DB43034913404B6600BFDF
:1011E8000C37BD4680BC70470038024080B483B0DD
:1011F80000AF0346FB71FB79012B06D1084B1B6F2F
:10120800074A43F00803136705E0054B1B6F044AC0
:1012180023F00803136700BF0C37BD4680BC704736
:101228000038024080B483B000AF03460A46FB7121
:101238001346BB71BB79002B08D00C4B1B78DAB274
:101248000A49FB791343DBB20B7009E0074B1B78A3
:10125800DAB2FB79DB43DBB204491340DBB20B7033
:1012680000BF0C37BD4680BC704700BF0D38024038
:1012780080B487B000AF0346FB710023FB600023F6
:101288007B610023FB74FB795B09DBB2FB60FB68C5
:10129800012B03D1124B1B687B6109E0FB68022B11
:1012A80003D10F4B1B6F7B6102E00D4B5B6F7B61C2
:1012B800FB7903F01F03FB607A69FB6822FA03F3EA
:1012C80003F00103002B02D00123FB7401E000238B
:1012D800FB74FB7C18461C37BD4680BC704700BFBA
:1012E8000038024080B400AF044B5B6F034A43F000
:1012F8008073536700BFBD4680BC7047003802400A
:1013080080B485B000AF0346FB710023FB73084B24
:10131800DA68FB791340002B02D00123FB7301E04C
:101328000023FB73FB7B18461437BD4680BC70470F
:101338000038024080B483B000AF0346FB71044A12
:10134800FB79137000BF0C37BD4680BC704700BFE7
:101358000E38024080B500AF124B1B68114A43F0AB
:10136800010313600F4B00229A600E4B1B680D4A55
:1013780023F0847323F4803313600A4B0A4A5A60BB
:10138800084B1B68074A23F480231360054B00228F
:10139800DA6000F08DF8054B4FF000629A6000BFEC
:1013A80080BD00BF003802401030002400ED00E08E
:1013B80080B487B000AF00233B6100237B61022328
:1013C800FB600023BB6002237B60344B9B6803F007
:1013D8000C033B613B69082B11D03B69082B44D8AF
:1013E8003B69002B03D03B69042B04D03DE02C4B18
:1013F8002C4A1A603DE02A4B2B4A1A6039E0274BE9
:101408005B689B0D03F00103BB60244B5B6803F032
:101418003F037B60BB68002B0CD0234A7B68B2FB80
:10142800F3F31E4A52689209C2F3080202FB03F35F
:101438007B610BE01B4A7B68B2FBF3F3174A5268E7
:101448009209C2F3080202FB03F37B61134B5B684A
:101458001B0C03F0030301335B00FB607A69FB6834
:10146800B2FBF3F30E4A136003E00D4B0D4A1A600A
:1014780000BF0A4B9B681B0903F00F030B4AD35CA0
:10148800DBB23B61064B1A683B6922FA03F3044A54
:10149800136000BF1C37BD4680BC7047003802404F
:1014A800100000200024F40040787D011400002082
:1014B80080B483B000AF00237B6000233B60354BD2
:1014C8001B68344A43F480331360324B1B6803F4BF
:1014D80000333B607B6801337B603B68002B03D1A2
:1014E8007B68B3F5A04FF0D12A4B1B6803F4003397
:1014F800002B02D001233B6001E000233B603B68E6
:10150800012B42D1234B1B6C224A43F080531364B6
:10151800214B1B68204A43F4404313601D4B1D4A6E
:101528009B6893601B4B9B681A4A43F40043936083
:10153800184B9B68174A43F4A0539360154B174AFE
:101548005A60144B1B68134A43F08073136000BF42
:10155800104B1B6803F00073002BF9D0104B40F2BE
:1015680005721A600B4B9B680A4A23F003039360C9
:10157800084B9B68074A43F00203936000BF054B82
:101588009B6803F00C03082BF9D100BF0C37BD464C
:1015980080BC704700380240007000401954400772
:1015A800003C0240002103E00B4B5B5843500431E0
:1015B8000A480B4B42189A42F6D30A4A02E0002323
:1015C80042F8043B084B9A42F9D3FFF7C3FE00F0F8
:1015D8000FF8FEF7DFFD7047B01600080000002086
:1015E800240000202400002024000020FEE7000042
:1015F80070402DE96C609FE56C509FE5056046E002
:101608004661B0E10700000A0040A0E3045045E24B
:101618000430B5E5014084E20FE0A0E113FF2FE1BB
:10162800040056E1F9FFFF1A40609FE540509FE52E
:10163800056046E00F0000EB4661B0E10700000AD4
:101648000040A0E3045045E20430B5E5014084E2DF
:101658000FE0A0E113FF2FE1040056E1F9FFFF1AA4
:101668007040BDE81EFF2FE1B0160008B016000854
:10167800B0160008B01600080DC0A0E1F8DF2DE98B
:1016880004B04CE228D04BE2F06F9DE81EFF2FE13A
:101698000DC0A0E1F8DF2DE904B04CE228D04BE200
:0816A800F06F9DE81EFF2FE129
:1016B00000000000010203040102030406070809F8
:1016C000007A030A00000000000000000102030489
:0416D00006070809F8
:04000005080015AD2D
:00000001FF
sh-5.1$


include和lib目录下面的文件是从ST官方的固件库里复制的,因为我买了开发板,光盘里面带了这个库,我直接用的这个,没有去官方下载,不知道现在还能不能下载到了,应该可以吧
src目录下面的这两个文件也是从固件库复制的 startup_stm32f40_41xxx.sstm32_flash.ld

最后发个最终效果图片吧,论坛限制发不了视频
其实就是两个灯不停的亮灭





论坛传不了tar,那就再用zip包一下
sh-5.1$ tar -cf all.tar all
sh-5.1$ zip all.tar.zip all.tar
adding: all.tar (deflated 83%)
sh-5.1$


人造人 发表于 2023-1-24 22:55:18

格式炸了,在我这边是对齐的
不管了,就这样了,^_^

人造人 发表于 2023-1-24 23:00:08

参考:
https://www.zhihu.com/question/290869986
https://zhuanlan.zhihu.com/p/367227567#:~:text=linux%E4%B8%8B%E6%AF%94%E8%BE%83%E5%B8%B8%E7%94%A8%E7%9A%84%E5%8D%95%E7%89%87%E6%9C%BA%E8%B0%83%E8%AF%95%E5%B7%A5%E5%85%B7%E6%9C%89OpenOCD%EF%BC%8C%E4%B8%80%E4%B8%AA%E5%BC%80%E6%BA%90%E7%9A%84%E7%89%87%E4%B8%8A%E7%B3%BB%E7%BB%9F%E8%B0%83%E8%AF%95%E5%B9%B3%E5%8F%B0%EF%BC%8C%E4%BE%9D%E8%B5%96%E7%9A%84%E7%A1%AC%E4%BB%B6%E8%B0%83%E8%AF%95%E5%99%A8%E5%B8%B8%E8%A7%81%E7%9A%84%E5%B0%B1%E6%98%AFJ-Link,%E3%80%81ST-Link%E7%AD%89%EF%BC%8C%E5%85%B6%E5%AE%9EJ-Link%20%EF%BC%8CST-Link%E6%9C%AC%E8%BA%AB%E9%83%BD%E5%8F%AF%E4%BB%A5%E5%AE%9E%E7%8E%B0%E4%BB%A3%E7%A0%81%E7%9A%84%E7%83%A7%E5%86%99%E3%80%81%E8%BF%9C%E7%A8%8B%E8%B0%83%E8%AF%95%EF%BC%8C%E4%B8%8D%E8%BF%87%E5%91%BD%E4%BB%A4%E4%B8%8D%E7%BB%9F%E4%B8%80%EF%BC%8C%E9%80%9A%E8%BF%87OpenOCD%E8%BF%99%E4%B8%AA%E5%B9%B3%E5%8F%B0%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%AE%A4%E4%B8%BA%E5%B0%B1%E6%B2%A1%E6%9C%89%E7%89%A9%E7%90%86%E8%BF%9E%E6%8E%A5%E7%9A%84%E5%B7%AE%E5%BC%82%E4%BA%86%E3%80%82
页: [1]
查看完整版本: 有无用mac开发stm32的同学