shadow578 / Marlin-H32

Marlin for HC32F460 based printers (now in upstream)
http://marlinfw.org
GNU General Public License v3.0
13 stars 7 forks source link

[BUG] undefined reference to `gpio_set_mode` - ProUI #36

Closed classicrocker883 closed 1 year ago

classicrocker883 commented 1 year ago

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

Yes, and the problem still exists.

Bug Description

I know this isn't exactly this repo with the issue, however it is more to do with the framework library for the HC32F460 with mriscoc's ProUI - PROUI_EX

with with the PROUI_EX enabled, and filament runout sensor enabled, it produces this error

.platformio/packages/toolchain-gccarmnoneeabi/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: Marlin/lib/proui\libproui.a(proui.cpp.o): in function `ProUIClass::SetRunoutState(unsigned long)':
proui.cpp:(.text._ZN10ProUIClass14SetRunoutStateEm+0xc): undefined reference to `gpio_set_mode'

there is no issue or error when using STMF1 framework like compiling for the other Aquila boards or ender 3.

it only happens when compiling for HC32.

im not able to open the libproui.a - proui.cpp file and change it, so i am wondering if its possible to adjust the HC32 ddl.

the STMF1 version of this function has 3 parameters like so void gpio_set_mode(gpio_dev *dev, uint8 pin, gpio_pin_mode mode)

HC32 is void gpio_set_mode(uint8 pin, uint8_t mode)

im not sure what to do from here besides leaving the filament sensor disabled.

Bug Timeline

No response

Expected behavior

No response

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

newest

Printer model

No response

Electronics

No response

Add-ons

No response

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

Additional information & file uploads

No response

classicrocker883 commented 1 year ago

well i supposed i "fixed" it, I disabled #define INIT_RUNOUT_PIN(N) ProEx.SetRunoutState(FIL_RUNOUT##N##_PIN) in runout.h, however I do not know if defining init_runout_pin to the non-prouiex code has a negative effect.

I just get a successful compile and thats all i know.