Skip to content

Conversation

@ellensp
Copy link
Contributor

@ellensp ellensp commented Aug 1, 2021

Description

Ender 6 example configs give a build error when using env:STM32F103RET6_creality_maple

"Marlin\src\lcd\extui\dgus\DGUSScreenHandler.cpp:562:13: note: in expansion of macro 'sprintf_P'
sprintf_P(buf, PSTR("M303 E-1 C5 S70 U1"));"

The maple implementation of sprintf_P seems to expect a variable always.
So changed code to use a variable ie sprintf_P(buf, PSTR("M303 E%d C5 S70 U1"),-1);

Requirements

Ender 6 Configs, env:STM32F103RET6_creality_maple

Benefits

Now compiles on Env's

Configurations

https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.0.x/config/examples/Creality/Ender-6

Related Issues

Issue #21274

@thinkyhead
Copy link
Member

Simply using strcpy_P is the correct solution.

@thinkyhead thinkyhead merged commit 7110c45 into MarlinFirmware:bugfix-2.0.x Aug 1, 2021
@ellensp ellensp deleted the issue-#21274 branch August 1, 2021 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants