资源简介

rtthread stm32f1xx hal bsp 支持bootloader源代码,偏移地址为0x4000。 https://blog.csdn.net/Mooney_yuan/article/details/83030695

资源截图

代码片段和文件信息

import os

# toolchains options
ARCH=‘arm‘
CPU=‘cortex-m3‘
CROSS_TOOL=‘gcc‘

if os.getenv(‘RTT_CC‘):
CROSS_TOOL = os.getenv(‘RTT_CC‘)


# cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path for example CodeSourcery Keil MDK IAR

if  CROSS_TOOL == ‘gcc‘:
PLATFORM  = ‘gcc‘
EXEC_PATH  = ‘/usr/local/gcc-arm-none-eabi-5_4-2016q3/bin/‘
elif CROSS_TOOL == ‘keil‘:
PLATFORM  = ‘armcc‘
EXEC_PATH  = ‘C:/Keilv5‘
elif CROSS_TOOL == ‘iar‘:
PLATFORM  = ‘iar‘
EXEC_PATH  = ‘C:/Program Files/IAR Systems/embedded Workbench 6.0 Evaluation‘

if os.getenv(‘RTT_EXEC_PATH‘):
EXEC_PATH = os.getenv(‘RTT_EXEC_PATH‘)

BUILD = ‘debug‘

if PLATFORM == ‘gcc‘:
    # toolchains
    PREFIX = ‘arm-none-eabi-‘
    CC = PREFIX + ‘gcc‘
    AS = PREFIX + ‘gcc‘
    AR = PREFIX + ‘ar‘
    link = PREFIX + ‘gcc‘
    TARGET_EXT = ‘elf‘
    SIZE = PREFIX + ‘size‘
    OBJDUMP = PREFIX + ‘objdump‘
    OBJCPY = PREFIX + ‘objcopy‘

    DEVICE = ‘ -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections‘
    CFLAGS = DEVICE
    AFLAGS = ‘ -c‘ + DEVICE + ‘ -x assembler-with-cpp‘
    LFLAGS = DEVICE + ‘ -Wl--gc-sections-Map=rtthread-stm32.map-cref-uReset_Handler -T stm32_rom.ld‘

    CPATH = ‘‘
    LPATH = ‘‘

    if BUILD == ‘debug‘:
        CFLAGS += ‘ -O0 -gdwarf-2‘
        AFLAGS += ‘ -gdwarf-2‘
    else:
        CFLAGS += ‘ -O2‘

    POST_ACTION = OBJCPY + ‘ -O binary $TARGET rtthread.bin\n‘ + SIZE + ‘ $TARGET \n‘

elif PLATFORM == ‘armcc‘:
    # toolchains
    CC = ‘armcc‘
    AS = ‘armasm‘
    AR = ‘armar‘
    link = ‘armlink‘
    TARGET_EXT = ‘axf‘

    DEVICE = ‘ --device DARMSTM‘
    CFLAGS = DEVICE + ‘ --apcs=interwork‘
    AFLAGS = DEVICE
    LFLAGS = DEVICE + ‘ --info sizes --info totals --info unused --info veneers --list rtthread-stm32.map --scatter stm32_rom.sct‘

    CFLAGS += ‘ --c99‘
    CFLAGS += ‘ -I‘ + EXEC_PATH + ‘/ARM/RV31/INC‘
    LFLAGS += ‘ --libpath ‘ + EXEC_PATH + ‘/ARM/RV31/LIB‘

    EXEC_PATH += ‘/arm/bin40/‘

    if BUILD == ‘debug‘:
        CFLAGS += ‘ -g -O0‘
        AFLAGS += ‘ -g‘
    else:
        CFLAGS += ‘ -O2‘

    POST_ACTION = ‘fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET‘

elif PLATFORM == ‘iar‘:
    # toolchains
    CC = ‘iccarm‘
    AS = ‘iasmarm‘
    AR = ‘iarchive‘
    link = ‘ilinkarm‘
    TARGET_EXT = ‘out‘

    DEVICE = ‘ -D USE_HAL_DRIVER‘

    CFLAGS = DEVICE
    CFLAGS += ‘ --diag_suppress Pa050‘
    CFLAGS += ‘ --no_cse‘ 
    CFLAGS += ‘ --no_unroll‘ 
    CFLAGS += ‘ --no_inline‘ 
    CFLAGS += ‘ --no_code_motion‘ 
    CFLAGS += ‘ --no_tbaa‘ 
    CFLAGS += ‘ --no_clustering‘ 
    CFLAGS += ‘ --no_scheduling‘ 
    CFLAGS += ‘ --debug‘ 
    CFLAGS += ‘ --endian=little‘ 
    CFLAGS += ‘ --cpu=Cortex-M3‘ 
    CFLAGS += ‘ -e‘ 
    CFLAGS += ‘ --fpu=None‘
    CFLAGS += ‘ --dlib_config “‘ + EXEC_PATH + ‘/arm/INC/c/DLib_Config_Normal.h“‘    
    CFLAGS += ‘ -Ol‘    
    CFLAGS

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-10-12 18:55  rt-thread-stm32f10x-HAL\
     文件        8490  2018-05-09 15:36  rt-thread-stm32f10x-HAL\.config
     目录           0  2018-10-12 18:52  rt-thread-stm32f10x-HAL\DebugConfig\
     文件        6956  2015-12-10 17:06  rt-thread-stm32f10x-HAL\DebugConfig\rtthread-stm32_STM32F103ZE_1.0.0.dbgconf
     文件        6956  2015-12-10 17:06  rt-thread-stm32f10x-HAL\DebugConfig\rtthread-stm32_STM32F103ZF_1.0.0.dbgconf
     文件      355165  2018-10-12 18:54  rt-thread-stm32f10x-HAL\JlinkLog.txt
     文件         671  2018-10-12 18:53  rt-thread-stm32f10x-HAL\JlinkSettings.ini
     文件        4889  2018-05-08 11:12  rt-thread-stm32f10x-HAL\Kconfig
     目录           0  2018-10-12 18:52  rt-thread-stm32f10x-HAL\Libraries\
     目录           0  2018-10-12 18:52  rt-thread-stm32f10x-HAL\Libraries\CMSIS\
     目录           0  2018-10-12 18:52  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\
     目录           0  2018-10-12 18:52  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\
     目录           0  2018-10-12 18:52  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\
     目录           0  2018-10-12 18:52  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\
     文件      499383  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f100xb.h
     文件      544592  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f100xe.h
     文件      450054  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f101x6.h
     文件      460427  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f101xb.h
     文件      538241  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f101xe.h
     文件      553283  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f101xg.h
     文件      542782  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f102x6.h
     文件      552388  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f102xb.h
     文件      874443  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f103x6.h
     文件      884820  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f103xb.h
     文件      971857  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f103xe.h
     文件      985951  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f103xg.h
     文件     1261488  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f105xc.h
     文件     1342323  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f107xc.h
     文件        8788  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\stm32f1xx.h
     文件        3337  2018-05-08 10:04  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Include\system_stm32f1xx.h
     目录           0  2018-10-12 18:52  rt-thread-stm32f10x-HAL\Libraries\CMSIS\Device\ST\STM32F1xx\Source\
............此处省略658个文件信息

评论

共有 条评论