-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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] #define PINS_DEBUGGING does not compile for SKR mini e3 V3.0 #23386
Comments
This is being worked on: #22896 |
This is not something that is being looked into in #22896 |
Oh! I thought you were patching pins debugging on STM32, which would include this board. |
only on boards I have access to, I don't have access to a STM32G0B1RE to be able to check it |
I use maple for development on these boards, then once im done with debugging functions test if it still works ok on stm32. |
I have this board (STM32G0B1RE). Is there anything I can do to help test m43 fix? :) |
Hi @ellensp (and @thisiskeithb ) Here is what I did:
I also did
But those were not the correct files.. Made the following changes:
As I said, Marlin now compiles with M43 enabled! Hope this helps. |
Print job finished, firmware updated. Sent M43. It looks like it works. There are a couple of strange characters on the terminal window (using Octoprint) for some of the pins... Unused pins I guess? Here is the output...
|
Same issue for the BTT SKR 3 |
For the BTT SKR 3 (which I have also and is also having the same problem using v2.1.1 (Bug fix)) I checked "buildroot\share\PlatformIO\variants\MARLIN_H743Vx\variant_MARLIN_STM32H743VX.h", which I think is the correct file that it would be pulling from and the NUM_ANALOG_FIRST is not defined. I am assuming that the changes in pinsDebug.h are there in this branch and therefore the variant file is the only thing that needs updating. I dont however know what to put in there... what is that value supposed to be? in the variant.h file for Marlin BTT E3 RRF, it is set to 35, I'm happy to set this to something and try it. any suggestions as to how to determine the right value? I guess also (based on Ediee's earlier comment), should I also check that the NUM_ANALOG_INPUTS and NUM_DIGITAL_PINS are correct? (and if so, how do I check those?) OR... am I totally going in the wrong direction? |
In case it helps, here is the schematic: https://github.com/bigtreetech/SKR-3/blob/master/Hardware%20(SKR%203%20EZ)/BIGTREETECH%20SKR%203%20EZ%20V1.0-SCH.pdf |
I just swapped out my Creality board for an SKR Mini E3 V3.0 and ran into this compile issue. I've mostly gotten it working but could use some input on a submittable version. It seems obvious that NUM_ANALOG_FIRST should be the pin # of the first analog input. So I set mine to PIN_A0 but that is set to PNUM_ANALOG_BASE which might be a better value. BTW, the value is set to 0xc0/192 from platformio.
With that I could compile and issue M43 but the analog pins were missing from the output. It looks like at least VALID_PIN() was not written expecting there to be a hole between NUM_DIGITAL_PINS and NUM_ANALOG_FIRST. So I made this change:
Are those analog #define's I used valid values for all STM32 variants? With that, I can see my analog pins now:
I'm not sure what those 2 last items are yet. I only know that pins_xref[] is returning Pin 1 for both which isn't a valid pin. Perhaps its as simple as digital pins need to be reduced from 62 to 60. |
Resolves issue MarlinFirmware#23386 by adding missing NUM_ANALOG_FIRST. Updates VALID_PIN so analog pins starting at 0xc0; which is great than NUM_PINS_TOTAL; are not filtered out of M43 output. Updates "M42 P" output to start at P0 instead of P4. First 11 analog pins are printed correctly but A11 is incorrectly shown as P19 instead of P26.
Resolves issue MarlinFirmware#23386 by adding missing NUM_ANALOG_FIRST. Updates VALID_PIN so analog pins starting at 0xc0; which is great than NUM_PINS_TOTAL; are not filtered out of M43 output. Updates "M42 P" output to start at P0 instead of P4. First 11 analog pins are printed correctly but A11 is incorrectly shown as P19 instead of P26.
Resolves issue MarlinFirmware#23386 by adding missing NUM_ANALOG_FIRST. Updates VALID_PIN so analog pins starting at 0xc0; which is great than NUM_PINS_TOTAL; are not filtered out of M43 output. Updates "M42 P" output to start at P0 instead of P4. First 11 analog pins are printed correctly but A11 is incorrectly shown as P19 instead of P26.
Fixed in #24748 |
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. |
Did you test the latest
bugfix-2.0.x
code?Yes, and the problem still exists.
Bug Description
When moving to a new SKR mini V3.0 the VS Code stopped compiling with following errors:
Compiling .pio\build\STM32G0B1RE_btt\src\src\gcode\control\M17_M18_M84.cpp.o
In file included from Marlin\src\gcode\config../../pins/pinsDebug.h:170,
from Marlin\src\gcode\config\M43.cpp:29:
Marlin\src\gcode\config../../pins/../HAL/STM32/pinsDebug.h: In function 'int8_t digital_pin_to_analog_pin(pin_t)':
Marlin\src\gcode\config../../pins/../HAL/STM32/pinsDebug.h:164:14: error: 'NUM_ANALOG_FIRST' was not declared in this scope; did you mean 'PNUM_ANALOG_BASE'?
164 | Ard_num -= NUM_ANALOG_FIRST;
| ^~~~~~~~~~~~~~~~
| PNUM_ANALOG_BASE
Compiling .pio\build\STM32G0B1RE_btt\src\src\gcode\control\M211.cpp.o
Compiling .pio\build\STM32G0B1RE_btt\src\src\gcode\control\M400.cpp.o
*** [.pio\build\STM32G0B1RE_btt\src\src\gcode\config\M43.cpp.o] Error 1
I tried the latest marlin and the Bigtreetech fork https://github.com/bigtreetech/Marlin/tree/SKR-mini-E3-V3.0-G0B1
I use the Auto Build marlin Panel
Bug Timeline
since using SKR Mini V3.0
Expected behavior
Succesfull Firmware Compile
Actual behavior
FAILED
Steps to Reproduce
1.having #define PINS_DEBUGGING in configuration_adv.h enabled
2. Compile Marlin using ABM Panel in VS Code in the STM32G0B1RE_BTT environment
Version of Marlin Firmware
bugfix-2.0.x
Printer model
Ender 3 Pro
Electronics
BTT SKR mini e3 V3.0
Add-ons
No response
Bed Leveling
No response
Your Slicer
No response
Host Software
No response
Additional information & file uploads
No response
The text was updated successfully, but these errors were encountered: