Other

项目介绍

grblHAL/STM32F4xx 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 Other 许可证,目前获得 150 个 Star、143 次 Fork。

仓库全名
grblHAL/STM32F4xx
开源许可证
Other
Star 数
150
Fork 数
143
未关闭 Issue
43

README 摘要

STM32F4xx grblHAL driver A grblHAL driver for the STM32F401xC, STM32F407xx, STM32F411xE and STM32F446xx ARM processors. Loosely based on code from robomechs 6-AXIS-USBCNC-GRBL port, updated for STM32CubeIDE and the latest STM HAL drivers where appropriate. Quickstart This driver can be built with the Web Builder. Alternatively it can be built with the STM32CubeIDE or PlatformIO. For additional information on howto…

完整内容见 GitHub 原始 README 或本页 。

常见问题

STM32F4xx 用什么语言开发?

主要使用 C 编写,采用 Other 许可证,目前有 150 个 Star。

STM32F4xx 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 STM32F4xx 的源码?

可以直接克隆仓库:git clone https://github.com/grblHAL/STM32F4xx.git;安装与运行步骤见仓库 README。

STM32F4xx 最近还在维护吗?

仓库最近一次更新为 6月3日,当前有 43 个未关闭 Issue;Star 数为 150,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

grblHAL driver for ST STM32F4xx (Nucleo-64, Blackpill)

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
586
价值分
145
活跃状态
活跃

语言占比

Assembly
C
Linker Script
Python
Smarty

README

STM32F4xx grblHAL driver

A grblHAL driver for the STM32F401xC, STM32F407xx, STM32F411xE and STM32F446xx ARM processors.

Loosely based on code from robomechs 6-AXIS-USBCNC-GRBL port, updated for STM32CubeIDE and the latest STM HAL drivers where appropriate.

Quickstart

This driver can be built with the Web Builder. Alternatively it can be built with the STM32CubeIDE or PlatformIO.
For additional information on howto import the project, configure the driver and compile the firmware, see the Wiki-page compiling grblHAL.

If PlatformIO is used to build the driver the community provided and maintained platformio.ini can be used.

Note 注意

The .ini file generated by the Web Builder can be used as a reference when modifying platformio.ini when the provided file is not up to date. See this link.

To use install PlatformIO Core and then:

# Clone this repository
git clone --recurse-submodules https://github.com/grblHAL/STM32F4xx.git
cd STM32F4xx

# List available environments:
pio run --list-targets

# Pick an environment name (left column) matching your board variant and kick off the build with:
pio run --environment nucleo_f411re_protoneer

# To build firmware for all supported board variants, simply skip the `--environment` option:
pio run

# For e.g. Nucleo boards you can upload the firmware (via USB) using the built-in ST-Link programmer:
pio run -e nucleo_f411re_protoneer --target upload

# For help with PlatformIO, try using `-h`:
pio run -h
pio -h

The built firmware is stored inside directories named .pio/build/<env name>/, as firmware.elf (executable) or firmware.bin (binary image).

If the board exposes a USB mass storage device or has a microSD card, simply copy the firmware.bin to the root of this filesystem and reset the board.

If you want to customize the build, take a look at platformio.ini where you can uncomment/customize additional build_flags and lib_deps in the [common] or [env:some_board_variant] sections.

Also see Inc/my_machine.h but beware that settings in this file are ignored by PlatformIO (via the -D OVERRIDE_MY_MACHINE= build flag). If they’re not already present in the platformio.ini file, you will need to add them to the build_flags option in the appropriate section.

Note 注意

As of Sep, 2021, the PlatformIO environments for the BigTreeTech SKR boards remain untested and might not work. Feel free to drop a note of your success or failure with these boards on https://github.com/grblHAL/STM32F4xx/issues.

Changelog

2021-19-09: Added build option to build a BTT SKR 2 bootloader compatible binary.

This can be built by selecting Release F407 8MHz 32K Bootloader from the build tool dropdown.

[!NOTE] A build configuration for a debug version has not been added as a programmer/debugger is required and flashing a “normal” debug build is usually appropriate when debugging. This overwrites the bootloader that later has to be restored if a bootloader version is to be flashed again. Alternatively a build configuration has to be added or modified to set the vector table offset by adding the symbol VECT_TAB_OFFSET with value 0x8008000 and configuring it to use the correct loader script.

Bootloader binaries for the SKR2 board can be found here. Be aware that the Bootloader_and_Firmware folder contains Marlin firmware, not grblHAL.

2021-08-10: Added support for BTT SKR 2, this is based on a STM32F407 processor with a 8MHz crystal.

2021-05-28: Added support for BTT SKR PRO, this is based on a STM32F407 processor with a 25MHz crystal.

Building grblHAL with Eclipse

Available driver options can be found here.

Select the processor to build for from the build tool dropdown to build. The .bin created file can be found in the folder with the same name as the menu name when the build is completed.
Config

Build configuration Targets Linker script
Release F401 Blackpill F401 Blackpill STM32F401CCUX_FLASH.ld
Release F407 25MHz BT SKR PRO STM32F407VGTX_FLASH.ld
Release F407 8MHz BTT SKR 2.0, STM32F407 Discovery STM32F407VGTX_FLASH.ld
Release F407 8MHz 32K Bootloader BTT SKR 2.0 STM32F407VGTX_BL32K_FLASH.ld
Release F411 Blackpill F411 Blackpill STM32F411CEUX_FLASH.ld
Release F411 Nucleo64 NUCLEO-F446RE STM32F411CEUX_FLASH.ld
Release F446 8 MHz Generic STM32F446RETX_FLASH.ld
Release F446 Nucleo64 NUCLEO-F446RE STM32F446RETX_FLASH.ld

If the oscillator frequency is different from the default 25 MHz then add the symbol HSE_VALUE and set the value to the frequency in Hz. E.g. 8000000 for 8 Mhz.

A method for flashing the Nucleo F411 and Nucleo F446 is to drop the .bin file on the NODE_F4xxRE flash drive. Note that the file can be dragged from the IDE Project Explorer.

NOTE: Internal flash page for parameters is not at the end of the flash memory due to size restrictions. This means each firmware upgrade will erase any saved parameters.


If compiling for debugging, edit symbols in project properties C/C++ General > Paths and Symbols > Symbols to match your processor/board.

Remove symbols starting with STM32F4, starting with NUCLEO_F4 and HSE_VALUE. Then add symbols:

STM32F401
  • Add STM32F401xC.
STM32F407
  • Add STM32F407xx.
STM32F411
STM32F446

See also

CNC breakout boards:

Minimal breakout for Blackpill by avizienis.

CNC breakout for Nucleo-64 by Terje Io.


2025-06-27

评论

暂无评论