231 Commits

Author SHA1 Message Date
Kevin O'Connor
dd69900b99 lib: Add stm32g4 system definition files
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-19 14:55:00 -04:00
Kevin O'Connor
3f84643130 stm32: Minor organizational change to Makefile
This better matches the Klipper stm32 Makefile layout.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-19 14:55:00 -04:00
Eric Callahan
bc1ecea7f7 flashtool: handle situation where software version is not reported
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-31 05:29:03 -04:00
Eric Callahan
418b43b0fa flashtool: usb bootloader request fix
Open the usb device with the O_NOCTTY flag.  This prevents
a SIGHUP signal from killing the flashtool process if the
bootloader request results in a hangup event.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-31 05:29:03 -04:00
FrY Sennberg
b734c57d3e stm32 CAN: restricted PH13/14 CAN to stm32h743
Signed-off-by:  Christoph Frei <fryakatkop@gmail.com>
2025-03-27 19:26:44 -04:00
FrY Sennberg
8c86fe02c1 stm32 CAN: Added PH13/14 CAN pin option
Added the option to select PH13/PH14 as CAN pins.

Signed-off-by:  Christoph Frei <fryakatkop@gmail.com>
2025-03-27 19:26:44 -04:00
Eric Callahan
291c5da31a
flashtool: can bridge uuid detection fix
Handle exceptions if the conversion from USB serial number
to uuid fails for can bridge devices.  Abort detection as the
can bridge device cannot be flashed in one step.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-15 10:59:29 -04:00
Eric Callahan
604b7e5a7d
flashtool: fix mcu_type decoding
SIgned-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-06 05:23:14 -05:00
Eric Callahan
28b873de75 flashtool: improve bootloader wait method
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-05 16:35:33 -05:00
Eric Callahan
e171665710
docs: add status request documentation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-05 10:42:26 -05:00
Eric Callahan
6c836fc898 flashtool: don't allow MCU mismatches
Raise a FlashError if Katapult's MCU does not match the
MCU detected in klipper.bin.  If a user wants to flash a  binary
built for a different they can rename klipper.bin, which will
bypass detection.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-05 06:19:44 -05:00
Eric Callahan
b22330e917 flashtool: support USB-CAN bridge detection
This enables single step flashing for Klipper devices
configured as a USB-CAN bridge.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-05 06:19:44 -05:00
Eric Callahan
40b22bdf6e flashtool: add support for status requests
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-03-04 16:44:30 -05:00
Eric Callahan
5e11a9a905 readme: document USB/UART bootloader requests
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 15:25:51 -05:00
Eric Callahan
2005ca5b13 flashtool: prime usb connections with double buffering
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 15:02:21 -05:00
Eric Callahan
542b6a8519 flashtool: support usb/serial bootloader requests
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 15:02:21 -05:00
Eric Callahan
dd8b0a0c9a flashtool: add binary mcu detection
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 12:34:49 -05:00
Eric Callahan
a8de2feab7 flashtool: support busy acknowledgements
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 12:34:42 -05:00
Eric Callahan
318d13a812
lib: silence pico "old-style-definition" warnings
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-24 06:38:20 -05:00
Eric Callahan
25a23cd420
rp2040: modify flash rule
Use the "withclear" version of the katapult uf2 file when
 executing "make flash".

 Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-12-18 05:12:48 -05:00
Kevin O'Connor
aa37e30b71 rp2040: Add rp2350 specific mechanism for checking for double reset tap
It appears the rp2350 disables SRAM power when the RUN pin is pulled
low.  As a result, one can not store a code in regular memory to
detect if the RUN pin is pulled low multiple times.

Add a new CONFIG_HAVE_BOARD_CHECK_DOUBLE_RESET mechanism to allow the
board code to override the standard double reset checking code.
Implement an rp2350 specific check that uses the chip's POWMAN
chip_reset field to store/check a double reset condition.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2024-12-17 19:27:43 -05:00
Kevin O'Connor
c0014efc4a rp2040: Resynchronize with upstream Klipper code and support rp2350 chips
Synchronize with the latest Klipper code.  This pulls in the latest
lib/ files (needed to use the pico-sdk v2.0.0 version).  It updates to
latest can2040 code (needed for pico-sdk v2.0.0 support).  It
implements USB double buffering (as is now done in Klipper).  It adds
in support for additional UART pins (as is now done in Klipper).  It
adds support for rp2350 chips.

This replaces the execute in ram code previously implemented in
Katapult with the execute in ram code that is now standard in Klipper.

The CONFIG_RP2040_ADD_BOOT_SIGNATURE kconfig symbol was removed and
the build now always produces a katapult.withclear.uf2 file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2024-12-17 19:27:43 -05:00
Ella Fox
081918ad76 stm32/Kconfig: Add option for 32MHz crystals
Certain STM32 Nucleo development boards (eg. F429Zi) come pre-installed with a 32MHz quartz crystal, which is now exposed as an option when selecting STM32 chips.

Signed-off-by: Ella Fox <ella@fox.gal>
2024-10-24 05:22:27 -04:00
Eric Callahan
90eb71b610
flashtool: fix CAN bootloader request
Introduce a delay before exiting when requesting the bootloader.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-09-09 10:55:30 -04:00
Eric Callahan
772817b4a3
build: sync Makefile with Klipper
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-09-04 06:34:57 -04:00
Eric Callahan
10abb2a086
flashtool: increase default read timeout
Signed-off-by:  Eric Callahan <arksine.code@gmail.com
2024-09-03 15:24:48 -04:00
Eric Callahan
730fde48ab flashtool: use recommended asyncio entry point
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-24 06:26:19 -04:00
Eric Callahan
7de954b916 flashtool: add serial device validation
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-24 06:26:19 -04:00
bigtreetech
42909f8a0d stm32: dfu-util "make flash" rules for stm32 mcu
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
2024-08-24 06:25:21 -04:00
Eric Callahan
562fc2fafb
stm32: enable PB5/PB6 pins for STM32G0B1 CAN
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-08 07:49:09 -04:00
Eric Callahan
4a1532ef24 flashcmd: add support for reporting software version
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-06 19:41:37 -04:00
Eric Callahan
3f28ae2641 flashtool: update stale can errors
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-06 19:41:37 -04:00
Eric Callahan
3e3ca24beb stm32: sync low level code with klipper
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-06 19:40:09 -04:00
Eric Callahan
49e93194a4 build: fix build on newer versions of gcc
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-08-06 19:40:09 -04:00
Eric Callahan
3e23332eb1
build: use 1000000 canbus bitrate default
This matches the default recommended by Klipper.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-10 18:17:37 -05:00
Eric Callahan
0601062acc
flashtool: add some delay after resetting CAN nodes
The previous UUID verification step introduce a delay that allowed
nodes time to reboot before a node ID was assigned.  Reintroduce a
1 second delay.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2024-02-10 18:17:37 -05:00
Luke Harrison
6a7ca81e4f stm32g0.c: Disable UCPD on boot
The UCPD is not used with Katapult but it can result in unexpected behaviour on certain pins due to the internal pull resistors unless disabled.

Signed-off-by: Luke Harrison looxonline@gmail.com
2024-01-29 16:51:47 -05:00
Eric Callahan
ec4df2e45a
readme: add deployer warning
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-12-15 12:20:40 -05:00
Diana
3855b34e94 module: stm32, sync fdcan with upstream klipper code
Syncs the stm32 fdcan and Kconfig to enable BTT U2C and PB12/PB13 FDCAN2 support STM32G0B1 with boards such as the BTT E3EZ.

Signed-off-by: Diana Moore <dmoore@xn4p4lm.com>
2023-12-15 12:18:18 -05:00
Eric Callahan
0ac72fc2c6
readme: note proper query usage
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-08-28 10:19:52 -04:00
Eric Callahan
13b61caf58
flashtool: remove UUID verification step
When multiple nodes are on the network the UUID query
can result in transmit errors, as multiple nodes with the
same ID will attempt to respond.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-08-28 06:23:38 -04:00
Eric Callahan
abd154526d
build: create legacy binaries
To help transition users relying on exisiting tutorials copy
katapult.bin and katapult.uf2 to canboot.bin and canboot.uf2
respectively.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-08-01 06:53:10 -04:00
Eric Callahan
817a6656cb
scripts: create flash_can.py relative symbolic link
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-08-01 06:08:09 -04:00
Eric Callahan
5e10bc035b
readme: replace stale references to flash_can.py
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-31 13:59:16 -04:00
Eric Callahan
a6944d8354
readme: add note about existing references to CanBoot
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-31 12:45:08 -04:00
Eric Callahan
e9655732cd
usb_cdc: change USB manufacturer to katapult
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
2023-07-31 06:09:14 -04:00
Eric Callahan
4527de65b9
flashtool: rename from flash_can.py
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-31 05:55:20 -04:00
Eric Callahan
540b4159d9
flash_can: update to reference Katapult
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-30 17:00:05 -04:00
Eric Callahan
35a9bde44a
protocol: rename references from CanBoot to Katapult
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-30 15:22:10 -04:00
Eric Callahan
ba1be7f3eb
readme: rename references from CanBoot to Katapult
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2023-07-30 10:36:29 -04:00