Skip to content

Conversation

@poopoopoo87
Copy link

modified: README.txt
new file: scripts/flash_stm32_usb_dfu.ps1

	new file:   Deployment_Log.txt
	new file:   README.txt
	new file:   Test_Results.txt
	new file:   config/manta_m4p_v2_enderv3.cfg
	modified:   Deployment_Log.txt
	modified:   README.txt
	scripts/flash_stm32_usb_dfu.ps1
	modified:   README.txt
	new file:   scripts/flash_stm32_usb_dfu.ps1
Copilot AI review requested due to automatic review settings October 28, 2025 22:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds complete documentation and configuration for deploying Klipper firmware to a BTT Manta M4P v2.0 board with an Ender 3 V3 printer setup. The changes introduce flashing scripts, configuration files, deployment tracking, and a comprehensive guide for reproducible firmware builds and deployment.

Key Changes:

  • PowerShell script for automated Windows-based firmware flashing via USB DFU
  • Printer configuration file for Manta M4P v2.0 with Ender 3 V3 hardware
  • Documentation files for deployment tracking, testing protocols, and comprehensive setup guide

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 22 comments.

Show a summary per file
File Description
scripts/flash_stm32_usb_dfu.ps1 PowerShell automation script for flashing firmware via STM32CubeProgrammer CLI
config/manta_m4p_v2_enderv3.cfg Klipper printer configuration using alias-based pin naming for Manta M4P v2.0
Test_Results.txt Test plan template for hardware validation
README.txt Comprehensive deployment guide with build instructions and troubleshooting
Deployment_Log.txt Firmware deployment tracking with version and checksum information
CHANGELOG.txt Change history documenting the additions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +17 to +19
step_pin: MOTOR0_STEP
dir_pin: MOTOR0_DIR
enable_pin: !MOTOR0_EN
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The configuration uses alias names (e.g., MOTOR0_STEP, MOTOR0_DIR, MOTOR0_EN) that are never defined. These aliases need to be defined in a [board_pins] section mapping them to actual STM32G0B1 pins, or the actual pin names should be used directly. Based on the existing generic-bigtreetech-manta-m4p.cfg, MOTOR0_STEP should be PC6, MOTOR0_DIR should be PA14, and MOTOR0_EN should be PC7.

Copilot uses AI. Check for mistakes.
position_max: 235

[tmc2209 stepper_x]
uart_pin: MOTOR0_UART
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The alias MOTOR0_UART is undefined. Based on the existing generic-bigtreetech-manta-m4p.cfg, the UART pin for the X motor (motor 0) should be PB12.

Suggested change
uart_pin: MOTOR0_UART
uart_pin: PB12

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +36
step_pin: MOTOR1_STEP
dir_pin: MOTOR1_DIR
enable_pin: !MOTOR1_EN
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The aliases MOTOR1_STEP, MOTOR1_DIR, and MOTOR1_EN are undefined. Based on the existing board configuration, these should be PB10, PB2, and PB11 respectively.

Copilot uses AI. Check for mistakes.
position_max: 235

[tmc2209 stepper_y]
uart_pin: MOTOR1_UART
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The alias MOTOR1_UART is undefined. Based on the existing board configuration, this should be PC10.

Suggested change
uart_pin: MOTOR1_UART
uart_pin: PC10

Copilot uses AI. Check for mistakes.
Comment on lines +51 to +53
step_pin: MOTOR2_STEP
dir_pin: MOTOR2_DIR
enable_pin: !MOTOR2_EN
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The aliases MOTOR2_STEP, MOTOR2_DIR, and MOTOR2_EN are undefined. Based on the existing board configuration, these should be PB0, PC5, and PB1 respectively.

Copilot uses AI. Check for mistakes.
heater_temp: 50.0

[bltouch]
sensor_pin: PROBE_SIGNAL
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The alias PROBE_SIGNAL is undefined. Based on the existing board configuration, this should be PC14.

Suggested change
sensor_pin: PROBE_SIGNAL
sensor_pin: PC14

Copilot uses AI. Check for mistakes.

[bltouch]
sensor_pin: PROBE_SIGNAL
control_pin: PROBE_SERVO
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The alias PROBE_SERVO is undefined. Based on the existing board configuration, this should be PA1.

Copilot uses AI. Check for mistakes.
microsteps: 16
endstop_pin: ^X_STOP
position_endstop: 0
position_min: 0
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

The position_min: 0 setting may prevent homing adjustments. Consider setting this to a small negative value (e.g., -5) to allow for Z-offset calibration with the BLTouch probe, which is configured with offsets at lines 105-107.

Copilot uses AI. Check for mistakes.

Prereqs:
- Install STM32CubeProgrammer (includes STM32_Programmer_CLI.exe)
- Board in DFU mode (BOOT0+RST per WINDOWS_FLASHING.md)
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Reference to WINDOWS_FLASHING.md that doesn't exist in the repository. This should either reference an existing documentation file (e.g., README.txt which contains the DFU instructions on line 42-47) or the non-existent file should be created.

Suggested change
- Board in DFU mode (BOOT0+RST per WINDOWS_FLASHING.md)
- Board in DFU mode (BOOT0+RST per README.txt lines 42-47)

Copilot uses AI. Check for mistakes.
- Driver issues: install STM32CubeProgrammer or use Zadig WinUSB for DFU.
- Wrong offset: confirm `.config` bootloader and start address alignment.
- Serial mismatch: always use `/dev/serial/by-id/...` not `/dev/tty*`.
- Verification: `out/klipper.bin.sha256` contains the SHA256 of the built firmware (generated via `certutil`). Use it to validate the binary before flashing and for post-flash integrity checks.
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Line 68 has inconsistent indentation - it starts with | followed by a space and dash, while other lines use just a dash. This should be - Verification: to match the formatting of lines 64-67.

Suggested change
- Verification: `out/klipper.bin.sha256` contains the SHA256 of the built firmware (generated via `certutil`). Use it to validate the binary before flashing and for post-flash integrity checks.
- Verification: `out/klipper.bin.sha256` contains the SHA256 of the built firmware (generated via `certutil`). Use it to validate the binary before flashing and for post-flash integrity checks.

Copilot uses AI. Check for mistakes.
@JamesH1978
Copy link
Collaborator

I am not sure what this the intent of this is? the klipper repo does not include printer and non-stock equipment configs, let alone AI generated code and deployment guides. This would be better suited on a creality specific forum where it can be targeted to the proper intended use base. As this stands it wont be considered for inclusion.

Thanks
James

@JamesH1978 JamesH1978 added the not mainline Wont merge into master branch label Nov 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not mainline Wont merge into master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants