Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Compiling M43 on invalid conversion #14894

Closed
JohnnyTheOne opened this issue Aug 9, 2019 · 6 comments
Closed

[BUG] Compiling M43 on invalid conversion #14894

JohnnyTheOne opened this issue Aug 9, 2019 · 6 comments

Comments

@JohnnyTheOne
Copy link
Contributor

Issue Compiling M43 on SKR PRO
get this error message
<command-line>:0:0: note: this is the location of the previous definition In file included from Marlin\src\gcode\config\../../pins/../HAL/HAL_STM32/pinsDebug.h:28:0, from Marlin\src\gcode\config\../../pins/pinsDebug.h:101, from Marlin\src\gcode\config\M43.cpp:29: Marlin\src\gcode\config\../../pins/../HAL/HAL_STM32/pinsDebug_STM32duino.h: In function 'void port_print(pin_t)': Marlin\src\gcode\config\../../pins/../HAL/HAL_STM32/pinsDebug_STM32duino.h:192:38: error: invalid conversion from 'const char*' to 'char*' [-fpermissive] char * const ppa = pin_xref[Index].Port_pin_alpha; ^~~~~~~~~~~~~~ *** [.pio\build\BIGTREE_SKR_PRO\src\src\gcode\config\M43.cpp.o] Error 1

@tpruvot
Copy link
Contributor

tpruvot commented Aug 9, 2019

@Bob-the-Kuhn @GMagician ....

@GMagician
Copy link
Contributor

GMagician commented Aug 9, 2019

const char * is different from char * const one is pointer const and other is data const (not sure if correct order) but I dont' know how pin_xref[Index].Port_pin_alpha is defined.
...is this the doubt?

@Patag
Copy link

Patag commented Aug 9, 2019

Fixed here by replacing
char * const ppa = pin_xref[Index].Port_pin_alpha;
by
const char * ppa = pin_xref[Index].Port_pin_alpha;

in Marlin-bugfix-2.0.x\Marlin\src\HAL\HAL_STM32\pinsDebug_STM32duino.h

@JohnnyTheOne
Copy link
Contributor Author

Patag, it works thanks

JohnnyTheOne added a commit to JohnnyTheOne/MarlinJTO that referenced this issue Aug 9, 2019
[BUG] Compiling M43 on invalid conversion MarlinFirmware#14894
@GMagician
Copy link
Contributor

Please close

@github-actions
Copy link

github-actions bot commented Jul 4, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants