rt-thread-official/bsp/stm32f411-nucleo
chenchaoqun@rt-thread.com 87b407ff18 【修改】.config 中RT_SERIAL_USING_DMA选项 2018-12-17 09:53:44 +08:00
..
Libraries [BSP][stm32f411-nucleo] Add GCC support. 2018-05-29 10:19:27 +08:00
applications [license] Change the license to Apache 2018-10-16 14:18:50 +08:00
drivers [stm32 drv usart] 修复串口发送第一个字节丢失的问题。| Fixed a problem where the first byte of a serial port was lost. 2018-12-06 15:04:36 +08:00
.config 【修改】.config 中RT_SERIAL_USING_DMA选项 2018-12-17 09:53:44 +08:00
Kconfig [BSP][stm32f411-nucleo] Add ARCH type and change for module & lwP. 2018-06-10 18:00:49 +08:00
README.md [BSP][stm32f411-nucleo] Update README.md file. 2018-05-29 10:26:54 +08:00
SConscript [bsp] rename bsp name from stm32f411re to stm32f411-nucleo 2016-01-25 16:10:54 +08:00
SConstruct update SConscript: support scons 3. 2018-02-06 20:07:28 +08:00
generate_IAR_project.bat [bsp] rename bsp name from stm32f411re to stm32f411-nucleo 2016-01-25 16:10:54 +08:00
generate_Keil_project.bat [bsp] rename bsp name from stm32f411re to stm32f411-nucleo 2016-01-25 16:10:54 +08:00
project.ewp [BSP] Update project files 2017-12-31 21:45:32 +08:00
project.eww [bsp] rename bsp name from stm32f411re to stm32f411-nucleo 2016-01-25 16:10:54 +08:00
project.uvoptx [BSP][stm32f411-nucleo] Add GCC support. 2018-05-29 10:19:27 +08:00
project.uvprojx [BSP][stm32f411-nucleo] Add GCC support. 2018-05-29 10:19:27 +08:00
rtconfig.h 【串口】宏定义对应增加 2018-12-17 09:38:53 +08:00
rtconfig.py [bsp] support get compiler path by environment variables for IAR 2018-04-07 15:43:45 +08:00
stm32_rom.icf [BSP] Fix component initialization functions may be not sequential storage on ROM when used for IAR linker. 2017-07-27 13:58:07 +08:00
stm32_rom.ld [BSP][stm32f411-nucleo] Add ARCH type and change for module & lwP. 2018-06-10 18:00:49 +08:00
stm32_rom.sct [bsp] rename bsp name from stm32f411re to stm32f411-nucleo 2016-01-25 16:10:54 +08:00
template.emProject [Tools] Add a draft project generator for SES. 2018-11-21 01:04:16 +08:00
template.ewp [bsp] rename bsp name from stm32f411re to stm32f411-nucleo 2016-01-25 16:10:54 +08:00
template.eww [bsp] rename bsp name from stm32f411re to stm32f411-nucleo 2016-01-25 16:10:54 +08:00
template.uvoptx [bsp] rename bsp name from stm32f411re to stm32f411-nucleo 2016-01-25 16:10:54 +08:00
template.uvprojx [bsp] rename bsp name from stm32f411re to stm32f411-nucleo 2016-01-25 16:10:54 +08:00

README.md

STM32L476-nucleo 板级支持包

1. 简介

STM32F411-nucleo 是由意法半导体推出的搭载Cortex-M4内核的高性能微控制器开发板包括如下硬件特性

硬件 描述
芯片型号 STM32F411RE
CPU Cortex-M4
主频 100MHz
Flash 512kB
SRAM 128KB

stm32f411

2. 编译说明

环境 说明
PC操作系统 Linux/MacOS/Windows
编译器 arm-none-eabi-gcc version 6.3.1 20170620 (release)/armcc/
构建工具 scons/mdk5
依赖软件环境 Env工具/(MDK或arm-none-eabi-gcc)/git/调试器驱动
  1. 下载源码
    git clone https://github.com/RT-Thread/rt-thread.git
  1. 配置工程并准备env
  • Windows

RT-Thread官网下载ENV工具包

  • Linux/Mac
    cd rt-thread/bsp/stm32l476-nucleo
    scons --menuconfig
    source ~/.env/env.sh
    pkgs --upgrade
  1. 生成工程(Mac/Linux下请跳过此步骤)
  • Windows MDK5
    scons --target=mdk5 -s
  1. 编译
  • Windows

使用MDK或IAR请参见对应教程。Windows下使用ENV工具已经携带GNU GCC工具链只需要在console下在bsp/stm32f411-nucleo目录下使用

    scons

即可编译成功。

  • Linux/MAC

请使用以下指令设置gcc路径

    export RTT_EXEC_PATH=[GCC路径]

而后在rt-thread/bsp/stm32f411-nucleo目录下使用

    scons

即可编译成功。

GNU GCC编译成功会在最后有如下类似信息显示

    LINK rtthread-stm32f411.elf
    arm-none-eabi-objcopy -O binary rtthread-stm32f411.elf rtthread.bin
    arm-none-eabi-size rtthread-stm32f411.elf
    text    data     bss     dec     hex filename
    55916     208    2456   58580    e4d4 rtthread-stm32f411.elf
    scons: done building targets.

并产生rtthread-stm32f411.elf、rtthread.bin文件。其中rtthread.bin为二进制固件

3. 烧写及执行

对于STM32F411-Nucleo开发板在Windows上可以直接把rtthread.bin文件拖到U盘中实现烧写。在Linux下请查找Linux下如何使用 ST-Link 的教程。

注: 如果需要使用Keil MDK来调试GNU GCC编译后的映像文件可以在编译出rt-thread/bsp/stm32f411-nucleo/rtthread-stm32f411.elf后,把这个文件改名成rtthread-stm32f4xx.axf 并放置于build目录下。然后在Keil MDK工程配置的Debug页中Run to main()选项拿掉,然后直接点击下载或调试即可进行调试(千万别再编译这个工程)。

3.1 运行结果

如果编译 & 烧写无误会在串口2上看到RT-Thread的启动logo信息

 \ | /
- RT -     Thread Operating System
 / | \     3.0.4 build May 29 2018
 2006 - 2018 Copyright by rt-thread team
msh >

4. 驱动支持情况及计划

驱动 支持情况 备注
UART 支持 UART2

4.1 IO在板级支持包中的映射情况

IO号 板级包中的定义
PA2 USART2 TX
PA3 USART2 RX

5. menuconfig Bsp菜单详解

选项 解释
Using UART2 开启串口2设备名为"uart2"