• 大小: 10.94MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-21
  • 语言: 其他
  • 标签: rt-thread  lwip  netconn  

资源简介

在STM32F407IG开发板上使用最新的rt-thread 3.1.1和LWIP 2.0.2,开发板当服务器,电脑当客户端,客户端发送数据,服务器收到了全部返回。连续长时间收发数据无问题

资源截图

代码片段和文件信息

import os

# toolchains options
ARCH=‘arm‘
CPU=‘cortex-m4‘
CROSS_TOOL=‘keil‘

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  = r‘E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin‘
elif CROSS_TOOL == ‘keil‘:
    PLATFORM  = ‘armcc‘
    EXEC_PATH  = r‘C:/Keil‘
elif CROSS_TOOL == ‘iar‘:
    print(‘================ERROR============================‘)
    print(‘Not support iar yet!‘)
    print(‘=================================================‘)
    exit(0)

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

BUILD = ‘debug‘
STM32_TYPE = ‘STM32F4XX‘

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-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections‘
    CFLAGS = DEVICE + ‘ -g -Wall -DSTM32F407ZG -DSTM32F4XX -DUSE_STDPERIPH_DRIVER -D__ASSEMBLY__ -D__FPU_USED‘
    AFLAGS = ‘ -c‘ + DEVICE + ‘ -x assembler-with-cpp -Wa-mimplicit-it=thumb ‘
    LFLAGS = DEVICE + ‘ -lm -lgcc -lc‘ + ‘ -nostartfiles -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 = ‘ --cpu=cortex-m4.fp‘
    CFLAGS = DEVICE + ‘ --apcs=interwork -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx‘
    AFLAGS = DEVICE
    LFLAGS = DEVICE + ‘ --info sizes --info totals --info unused --info veneers --list rtthread-stm32.map --scatter stm32_rom.sct‘

    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_STDPERIPH_DRIVER‘ + ‘ -D STM32F10X_HD‘

    CFLAGS = DEVICE
    CFLAGS += ‘ --diag_suppress Pa050‘
    CFLAGS += ‘ --no_cse‘ 
    CFLAGS += ‘ --no_unroll‘ 
    CFLAGS += ‘ --no_inline‘ 
    CFLAGS += ‘ --no_code_motion‘ 
    CFLAGS += ‘ --n

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        501  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\.gitattributes

    .......       243  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\.gitignore

    .......      5999  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\.travis.yml

     文件        616  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\AUTHORS

     文件      10060  2018-11-01 10:49  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\.config

     文件       9997  2018-11-01 10:48  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\.config.old

     文件     482511  2018-11-01 10:16  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\.sconsign.dblite

     文件       2963  2018-11-02 16:36  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\applications\main.c

    .......       269  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\applications\SConscript

     文件        462  2018-11-01 10:15  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\cconfig.h

     文件       2851  2017-11-21 16:21  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\DebugConfig\rt-thread_stm32f4xx_STM32F407VG.dbgconf

     文件       2851  2017-11-21 16:21  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\DebugConfig\rt-thread_stm32f4xx_STM32F407ZGTx.dbgconf

    .......      2471  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\board.c

    .......      1731  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\board.h

    .......      3584  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\drv_hwtimer.c

    .......       101  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\drv_hwtimer.h

     文件      25376  2018-11-01 14:15  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\gpio.c

    .......       296  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\gpio.h

    .......       368  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\Kconfig

    .......       415  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\SConscript

    .......      3764  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\stm32f4xx_conf.h

     文件     151262  2018-11-01 18:06  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\stm32f4xx_eth.c

    .......     98705  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\stm32f4xx_eth.h

    .......      3211  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\stm32f4xx_it.c

    .......      6358  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\stm32f4_rtc.c

    .......       347  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\stm32f4_rtc.h

     文件      21629  2018-11-01 16:39  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\usart.c

    .......       471  2018-10-31 17:55  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\drivers\usart.h

     文件        339  2018-11-01 18:06  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\EventRecorderStub.scvd

     文件     892293  2018-11-01 18:27  rt-thread3.1.1-lwip2.0.2\bsp\stm32f40x\JlinkLog.txt

............此处省略2906个文件信息

评论

共有 条评论