rt-thread-official/bsp/stm32l476-nucleo
yangjie caba8a7d11 [bsp][stm32 hal drv_gpio]If there is no pull-up or pull-down outside, there will be problems with just setting "GPIO_InitStruct.Pull = GPIO_NOPULL". 2018-12-13 10:33:46 +08:00
..
Libraries [Bsp][stm32l476-nucleo]fix compile args in gcc rename driver filename update hal version update kconfig 2018-05-17 11:38:51 +08:00
applications [license] Change the license to Apache 2018-10-16 14:18:50 +08:00
drivers [bsp][stm32 hal drv_gpio]If there is no pull-up or pull-down outside, there will be problems with just setting "GPIO_InitStruct.Pull = GPIO_NOPULL". 2018-12-13 10:33:46 +08:00
.config [bsp][stm32l476-nucleo] support "scons --target=mdk" 2018-08-06 14:44:05 +08:00
Kconfig [bsp][stm32l476-nucleo] change default RTT_DIR to ../.. 2018-08-06 14:20:17 +08:00
README.md [Bsp][STM32L476-nucleo]fix readme.md 2018-05-18 20:22:03 +08:00
SConscript [bsp] add new bsp for stm32l476-nucleo 2017-07-05 18:17:16 +08:00
SConstruct update SConscript: support scons 3. 2018-02-06 20:07:28 +08:00
project.uvoptx [bsp][stm32l476-nucleo] support "scons --target=mdk" 2018-08-06 14:44:05 +08:00
project.uvprojx [bsp][stm32l476-nucleo] support "scons --target=mdk" 2018-08-06 14:44:05 +08:00
rtconfig.h [bsp][stm32l476-nucleo] support "scons --target=mdk" 2018-08-06 14:44:05 +08:00
rtconfig.py [bsp][stm32l476-nucleo] support "scons --target=mdk" 2018-08-06 14:44:05 +08:00
stm32_rom.ld [Bsp][stm32l476-nucleo]fix compile args in gcc rename driver filename update hal version update kconfig 2018-05-17 11:38:51 +08:00
stm32_rom.sct [Bsp][stm32l476-nucleo]fix compile args in gcc rename driver filename update hal version update kconfig 2018-05-17 11:38:51 +08:00
template.uvprojx [Bsp][stm32l476-nucleo]fix compile args in gcc rename driver filename update hal version update kconfig 2018-05-17 11:38:51 +08:00

README.md

STM32L476-nucleo 板级支持包

1. 简介

STM32L476-nucleo 是由意法半导体推出的搭载Cortex-M4内核的高性能低功耗单片机的开发板 包括如下硬件特性:

硬件 描述
芯片型号 STM32L476RGT6
CPU Cortex-M4
主频 80MHz
Flash 1MB
SRAM 96K + 32K

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

Linux/Mac

    cd rt-thread/bsp/stm32l476-nucleo
    scons --menuconfig
    source ~/.env/env.sh
    pkgs --upgrade

Windows

RT-Thread官网下载ENV工具包

  1. 生成工程(Mac/Linux下请跳过此步骤)

Windows MDK5*

    scons --target=mdk5 -s

*该板级支持包不支持生成mdk4的工程

  1. 编译

使用MDK或IAR请参见对应教程

Windows arm-none-eabi-gcc 使用以下指令设置gcc路径

    SET RTT_EXEC_PATH=[GCC路径]

Linux/Mac arm-none-eabi-gcc 使用以下指令设置gcc路径

    export RTT_EXEC_PATH=[GCC路径]

编译Windows/Linux/Mac arm-none-eabi-gcc

    scons -j4

出现下列信息即为编译成功

    LINK rtthread-stm32l476.elf
    arm-none-eabi-objcopy -O binary rtthread-stm32l476.elf rtthread.bin
    arm-none-eabi-size rtthread-stm32l476.elf
    text    data     bss     dec     hex filename
    41596     356    1456   43408    a990 rtthread-stm32l476.elf
    scons: done building targets.

如果编译正确无误会产生rtthread-stm32l476.elf、rtthread.bin文件。其中rtthread.bin为二进制固件

3. 烧写及执行

烧写可以使用仿真器 ISP等多种方式 此处不再赘述

3.1 运行结果

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

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

*默认串口

4. 驱动支持情况及计划

驱动 支持情况 备注
UART 支持 UART1/2/3/4/5/LPUART1
GPIO 支持 /

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

IO号 板级包中的定义
PC0 LPUART1_RX
PC1 LPUART1_TX
PA9 USART1 TX
PA10 USART1 RX
PA2 USART2 TX
PA3 USART2 RX
PC4 USART3_TX
PC5 USART3_RX
PA0 USART4_TX
PA1 USART4_RX
PC12 UART5 TX
PD2 UART5 RX

5. menuconfig Bsp菜单详解

选项 解释
using uart1 开启串口1串口1的设备名为"uart1"
using uart2 开启串口2串口1的设备名为"uart2"
using uart3 开启串口3串口1的设备名为"uart3"
using uart4 开启串口4串口1的设备名为"uart4"
using uart5 开启串口5串口1的设备名为"uart5"
using lpuart1 开启低功耗串口1低功耗串口1的设备名为"lpuart1"

*部分选项需要在RT-Thread组件菜单中开启对应的设备框架才能显示。

6. 联系人信息

维护人: uestczyh222 < lymz@foxmail.com >