Skip to content

[BUG] BIGTREETECH GTR.1_0 mismatched env: names #28315

@Stefanbrits43

Description

@Stefanbrits43

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

While building Marlin 2.1.2.7 for the BigTreeTech GTR v1.0 (STM32F407), there is a naming inconsistency between the Marlin board ID and the PlatformIO environment name that causes a false build failure, even though the hardware and configuration are correct.

Details
Board definition (correct)

In boards.h:

#define BOARD_BTT_GTR_V1_0 5214 // BigTreeTech GTR v1.0 (STM32F407IGT)

In Configuration.h:

#define MOTHERBOARD BOARD_BTT_GTR_V1_0

This is correct and should work.

PlatformIO environment (problematic)

Marlin includes an environment named:

[env:BIGTREE_GTR_V1_0]

However, when this environment is used:

default_envs = BIGTREE_GTR_V1_0

the build fails with:

Error: Build environment 'BIGTREE_GTR_V1_0' is incompatible with BOARD_BTT_GTR_V1_0.
Use one of these environments: BTT_GTR_V1_0, BTT_GTR_V1_0_usb_flash_drive

This happens even though:

The board is correct

The MCU is correct

The PlatformIO board (marlin_BigTree_GTR_v1) is correct

Root Cause

Marlin’s environment compatibility check only allows:

BTT_GTR_V1_0
BTT_GTR_V1_0_usb_flash_drive

for BOARD_BTT_GTR_V1_0, but does not recognize the existing environment:

BIGTREE_GTR_V1_0

This creates a false incompatibility, even though both environment names refer to the same board.

Working Configuration

The build succeeds only when the environment is named:

[env:BTT_GTR_V1_0]
platform = ststm32@~12.1
board = marlin_BigTree_GTR_v1
framework = arduino

and:

default_envs = BTT_GTR_V1_0

Why this is confusing

boards.h uses BOARD_BTT_*

PlatformIO still includes BIGTREE_* environments

The build system rejects BIGTREE_* for this board

Users may try renaming boards or editing core files unnecessarily

This looks like a configuration error to users, but is actually a naming mismatch inside Marlin.

Suggested Fixes (one of the following)

Allow BIGTREE_GTR_V1_0 as a valid environment for BOARD_BTT_GTR_V1_0, or

Remove / deprecate BIGTREE_GTR_V1_0 to avoid confusion, or

Document clearly that only BTT_GTR_V1_0 is valid for this board

Environment

Marlin: 2.1.2.7

Board: BigTreeTech GTR v1.0

MCU: STM32F407

PlatformIO: VS Code + PlatformIO IDE

OS: Windows

Summary

This is not a user configuration error but a naming inconsistency between Marlin board IDs and PlatformIO environments, which causes unnecessary build failures and confusion.

Bug Timeline

No response

Expected behavior

No response

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

Marlin-2.1.2.7

Printer model

GTR V1.0

Electronics

No response

LCD/Controller

No response

Other add-ons

No response

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions