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

Add FLY_SUPER8 and FLY_D8 board #27580

Open
wants to merge 5 commits into
base: bugfix-2.1.x
Choose a base branch
from

Conversation

Fly3DTeam
Copy link

@Fly3DTeam Fly3DTeam commented Dec 10, 2024

Submitting a Pull Request
Added marlin support for FLY_D5,FLY_DP5 ,FLY_D7 ,FLY_D8 ,FLY_D8_PRO,FLY_SUPER8 ,FLY_SUPER8_PRO ,FLY_CDY3
Description
Below are links to motherboard information.
FLY_D5 :https://mellow.klipper.cn/docs/category/fly-d5
FLY_DP5 :https://mellow.klipper.cn/docs/ProductDoc/MainBoard/fly-d/fly-dp5/
FLY_D7 :https://mellow.klipper.cn/docs/ProductDoc/MainBoard/fly-d/fly-d7/
FLY_D8 :https://mellow.klipper.cn/docs/ProductDoc/MainBoard/fly-d/fly-d8-f407/
FLY_D8_PRO :https://mellow.klipper.cn/docs/ProductDoc/MainBoard/fly-d/fly-d8-h723/
FLY_SUPER8 :https://mellow.klipper.cn/docs/ProductDoc/MainBoard/fly-super/fly-super8/
FLY_SUPER8_PRO : https://mellow.klipper.cn/docs/ProductDoc/MainBoard/fly-super/fly-super8-pro/
FLY_CDY3:https://mellow.klipper.cn/docs/ProductDoc/MainBoard/fly-cdy/fly-cdy-v3/

Related Issues
D5/DP5/D7, Currently, the UART mode of TMC cannot be used.

@rondlh
Copy link
Contributor

rondlh commented Dec 15, 2024

@Fly3DTeam Why are you not adding the Fly D8 Pro?

add FLY_D5,  FLY_DP5,  FLY_D7,  FLY_D8_PRO,  FLY_SUPER8_PRO,  FLY_CDY_3 BOARD
@Fly3DTeam
Copy link
Author

@Fly3DTeam Why are you not adding the Fly D8 Pro?

Added

@Fly3DTeam
Copy link
Author

D5/DP5/D7, Currently, the UART mode of TMC cannot be used.

@rondlh
Copy link
Contributor

rondlh commented Dec 21, 2024

@Fly3DTeam Why are you not adding the Fly D8 Pro?

Added

That's great, well done. It's probably best for most users to link to the English pages.

The schematic given for the Fly D8 Pro (STM32H723) is wrong, it's the schematic of the D8 (STM32F407).
https://mellow.klipper.cn/en/docs/ProductDoc/MainBoard/fly-d/fly-d8-h723/schematic
D8 Pro Wrong Schematic

@rondlh
Copy link
Contributor

rondlh commented Dec 21, 2024

I had a quick look at the D9 Pro pinout, it seems correct except for the temperature section:

// Temperature Sensors
#define TEMP_0_PIN                          PC2   // Analog Input
#define TEMP_1_PIN                          PC3   // Analog Input
#define TEMP_2_PIN                          PC5   // Analog Input
#define TEMP_BED_PIN                        PB0   // Analog Input

#define TEMP_3_PIN                          PC3   // Analog Input
#define TEMP_4_PIN                          PC5   // Analog Input

You could also add the FDCAN pins:

#define FDCAN_RX           PB8
#define FDCAN_TX           PB9

You can define the driver UART and SPI pins like this:

#define X_STEP_PIN                          PE5
#define X_DIR_PIN                           PA8
#define X_ENABLE_PIN                        PA15
#if AXIS_HAS_SPI(X)
  #define X_CS_PIN                          PC9
#endif
#if AXIS_HAS_UART(X)
  #define X_SERIAL_RX_PIN                   PC9
  #define X_SERIAL_RX_PIN       X_SERIAL_TX_PIN
#endif

Is there a bootloader to flash the Marlin firmware via a USB stick in one of the USB ports?
Most boards can flash via a onboard SD Card slot, but the D8 Pro doesn't have one, using the onboard USB port would be even more user friendly.

@Fly3DTeam
Copy link
Author

I had a quick look at the D9 Pro pinout, it seems correct except for the temperature section:

// Temperature Sensors
#define TEMP_0_PIN                          PC2   // Analog Input
#define TEMP_1_PIN                          PC3   // Analog Input
#define TEMP_2_PIN                          PC5   // Analog Input
#define TEMP_BED_PIN                        PB0   // Analog Input

#define TEMP_3_PIN                          PC3   // Analog Input
#define TEMP_4_PIN                          PC5   // Analog Input

You could also add the FDCAN pins:

#define FDCAN_RX           PB8
#define FDCAN_TX           PB9

You can define the driver UART and SPI pins like this:

#define X_STEP_PIN                          PE5
#define X_DIR_PIN                           PA8
#define X_ENABLE_PIN                        PA15
#if AXIS_HAS_SPI(X)
  #define X_CS_PIN                          PC9
#endif
#if AXIS_HAS_UART(X)
  #define X_SERIAL_RX_PIN                   PC9
  #define X_SERIAL_RX_PIN       X_SERIAL_TX_PIN
#endif

Is there a bootloader to flash the Marlin firmware via a USB stick in one of the USB ports? Most boards can flash via a onboard SD Card slot, but the D8 Pro doesn't have one, using the onboard USB port would be even more user friendly.

A schematic diagram shared by D8 and D8PRO. Because the 100-pin chip of F4 is slightly different from that of H7, please refer to the pin diagram in the documentation manual.
The USB-A port on the D8 motherboard has no function in Marlin.
D8 can only be burned using the DFU of typr-c.

@rondlh
Copy link
Contributor

rondlh commented Dec 23, 2024

A schematic diagram shared by D8 and D8PRO. Because the 100-pin chip of F4 is slightly different from that of H7, please refer to the pin diagram in the documentation manual.
The USB-A port on the D8 motherboard has no function in Marlin.
D8 can only be burned using the DFU of typr-c.

Ok, thanks for the reply, DFU will always work, USB firmware flashing would be very appreciated by many users.

I see a few issues in the variant board definition.
Flashing Marlin will overwrite the Catapult bootloader, that's not needed. Marlin could be loaded at 0x08020000, and let Catapult jump to it.

board_build.offset          = 0x20000
board_upload.offset_address = 0x08020000

and enable the FDCAN port (add to build_flags):
-DHAL_FDCAN_MODULE_ENABLED
I also noticed that lots of devices are disabled in PeripheralPins.c. Marlin needs this information to find the devices as defined in the pins definition. By disabling the devices the capabilities of the board are reduced. FDCAN, I2C and Ethernet are completely disabled, and there is only one USART enabled, which is LPUART1. LPUART1 is not accessibly by the DMA1/2 controllers, so the DMA serial features will not work. It would be nice if all devices that are accessible on the board, and are not conflicting with the hardware could be accessed.

@rondlh
Copy link
Contributor

rondlh commented Dec 24, 2024

The given pinout for D8 Pro EXT1 and EXT2 connectors seem to be wrong.
https://mellow.klipper.cn/en/assets/images/pin-91312b3636a6305d33dccc17255c8191.webp

How about this:
EXT1 EXT2 Fly D8 PRO STM32H723
(FLY D8 PRO EXT1 EXT2 PINOUT)

So I guess the FLY D8 pinout is also wrong:
https://mellow.klipper.cn/en/assets/images/pin-ae9c179d27d60ed7f9611392a65abd59.webp

@rondlh
Copy link
Contributor

rondlh commented Jan 6, 2025

I tried to compile Marlin based on the provided files for the Fly D8 Pro and Fly Super 8 Pro. Both configurations cannot compile.
Have these configurations been tested?

@Fly3DTeam
Copy link
Author

I tried to compile Marlin based on the provided files for the Fly D8 Pro and Fly Super 8 Pro. Both configurations cannot compile. Have these configurations been tested?

image

@rondlh
Copy link
Contributor

rondlh commented Jan 7, 2025

I tried to compile Marlin based on the provided files for the Fly D8 Pro and Fly Super 8 Pro. Both configurations cannot compile. Have these configurations been tested?

image

I set the serial ports correctly before compilation, that is not the cause of the compilation error.
Also the previously mentioned peripheral issues have not been fixed, so even if the code compiles, the board cannot work properly. This needs more testing.

Thanks for correcting the EXP port pinouts. Unfortunately the D8 PRO EXP1 still has an obvious mistake, at least if I check it on a D8 Pro V1.1, perhaps it's correct for a V1.0 board.

Copy link
Contributor

@rondlh rondlh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Fly D8 Pro configuration does not work well, it needs actual testing. Compilation doesn't work, even when the compilation issues are fixed the configuration has clear issues related to the device configuration and available peripherals.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting out almost all devices makes them inaccessible for Marlin, like for example the CAN bus and serial ports.
With this configuration only the LPUART1 serial port is available, which will not work with feature like SERIAL_DMA.
It recommend to leave all devices that do no have hardware conflicts on the board enabled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The D8 Pro configuration does not work well. Lot's of issues, needs testing...

@rondlh
Copy link
Contributor

rondlh commented Jan 9, 2025

D5/DP5/D7, Currently, the UART mode of TMC cannot be used.

Does the SPI mode for TMC work?

What's the reason UART mode for TMC doesn't work?

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.

4 participants