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

No rule to make target 'out/src/prtouch_v2.o' #1

Open
pwlgrzs opened this issue Jan 10, 2024 · 25 comments
Open

No rule to make target 'out/src/prtouch_v2.o' #1

pwlgrzs opened this issue Jan 10, 2024 · 25 comments

Comments

@pwlgrzs
Copy link

pwlgrzs commented Jan 10, 2024

Hello,

compliation ends with:

Version: V1.1.0.12-0-ga63fb1a-dirty-20240110_095629-klipper
make: *** No rule to make target 'out/src/prtouch_v2.o', needed by 'out/klipper.                                                                                                                                                             elf'.  Stop.

Could you please assist?

@felipejfc
Copy link

felipejfc commented Jan 10, 2024

Trying to compile for SE and hitting the same problem

Trying to compile to GD32 I get a different error:

make
  Linking out/klipper.elf
lto1: fatal error: bytecode stream in file 'out/src/prtouch_v2.o' generated with GCC compiler older than 10.0
compilation terminated.
lto-wrapper: fatal error: arm-none-eabi-gcc returned 1 exit status
compilation terminated.
collect2: fatal error: lto-wrapper returned 1 exit status
compilation terminated.
make: *** [Makefile:109: out/klipper.elf] Erro 1
make: ** Apagando arquivo 'out/klipper.elf'

can you provide compilation instructions?

@0xD34D
Copy link

0xD34D commented Jan 11, 2024

@felipejfc what creality needs to do is stop including binary blobs and add the source files for prtouch_v2. On top of this, the object files they include were built with an older version of gcc (9.2) making it impossible to link in if you are using a more up to date toolchain.

They're violating the GPLv3 license of klipper by doing this.

@felipejfc
Copy link

did you manage to get it linked with 9.2 GCC?

@pwlgrzs
Copy link
Author

pwlgrzs commented Jan 11, 2024

@CrealityTech could you please comment on this?

@0xD34D
Copy link

0xD34D commented Jan 13, 2024

did you manage to get it linked with 9.2 GCC?

I got further but didn't dig any deeper. Ideally no one should have to jump through such hoops to build this.

I'm also skeptical of the binary python blob in klippy/extras working correctly once the MCU stuff is ironed out.

@CrealityTech
Copy link
Member

check prtouch_v2.o with command "strings ./prtouch_v2_xx.o | grep GCC" xx:can CM3/CM4/cm23 etg.
config your system gcc versionwith check gcc version and compile

@0xD34D
Copy link

0xD34D commented Jan 15, 2024

@CrealityTech wouldn't it be easier to update this repo with the C source files for prtouch_v2 so it will "just" compile and be more compliant with the GPLv3 license of klipper in the process?

@felipejfc
Copy link

felipejfc commented Jan 15, 2024

thanks for the tip @CrealityTech managed to compile by doing the following:
edit dockerfile in scripts folder to use ubuntu 20.04, build the image, install srecord sudo apt install srecord, build!
now trying to figure out what config I should use for the V3 SE. any hint?

EDIT

think I got it. compile once and it will fail with the error of no make rule for prtouch binary file. copy src/prtouch_v2_cm3.o to out/src/prtouch_v2.o and compile again. it will successfully link :)

@ninja-
Copy link

ninja- commented Jan 17, 2024

CrealityOfficial/K1_Series_Klipper@fe15c60

@ninja-
Copy link

ninja- commented Jan 17, 2024

you can replace extras/prtouch_v2.py with above and get rid of prtouch_v2.c files I believe. I can leak the original z_compensate.py as well so it can work without blobs.

@CrealityTech will you stop violating GPL license please?

@felipejfc
Copy link

thank you for that @ninja-. would really appreciate the one for z_compensate as it's the only missing piece for me to get this thing working :)

@ninja-
Copy link

ninja- commented Jan 17, 2024

@ninja-
Copy link

ninja- commented Jan 17, 2024

I am not sure if it's up to date to KE standards though. But I am sure it runs 3v3 SE fine. I had a problem that automatic Z offset on my 3v3 KE, calibration returns few milimeters higher value than nebula pad. I couldn't get to the bottom of it, the config values were all correct and it was running this version of z_compensate

@felipejfc
Copy link

Will try it and let you folks now how it ran very soon

@felipejfc
Copy link

managed to compile but cant start machine. log:

[INFO] 2024-01-17 13:31:12,437 [root] [gcode_move:init:26] self.variable_safe_z = 0
[INFO] 2024-01-17 13:31:13,165 [root] [extruder:init:174] Extruder max_extrude_ratio=2.078758
[INFO] 2024-01-17 13:31:13,169 [root] [serialhdl:connect_uart:184] mcu 'mcu': Starting serial connect
[INFO] 2024-01-17 13:31:13,172 [root] [reactor:_dispatch_loop:340] _dispatch_loop current nice = 0
[INFO] 2024-01-17 13:31:13,172 [root] [webhooks:set_client_info:202] webhooks client 281473132969840: New connection
[INFO] 2024-01-17 13:31:13,173 [root] [webhooks:set_client_info:202] webhooks client 281473132969840: Client info {'program': 'Moonraker', 'version': 'v0.8.0-247-g3008a13'}
[INFO] 2024-01-17 13:31:13,326 [root] [serialhdl:_bg_thread:42] mcu 'mcu': nice process failed
[INFO] 2024-01-17 13:31:13,327 [root] [reactor:_dispatch_loop:340] _dispatch_loop current nice = 0
[WARNING] 2024-01-17 13:31:13,880 [root] [serialhdl:handle_default:304] mcu 'mcu': got {'count': 141, 'sum': 180211, 'sumsq': 1218134, '#name': 'stats', '#sent_time': 672720.684514652, '#receive_time': 672720.687356152}
[INFO] 2024-01-17 13:31:14,202 [root] [mcu:_mcu_identify:823] Loaded MCU 'mcu' 129 commands (?-20240115_151824-964cec0ba502 / gcc: (15:9-2019-q4-0ubuntu1) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599] binutils: (2.34-4ubuntu1+13ubuntu1) 2.34)
MCU 'mcu' config: ADC_MAX=4095 BUS_PINS_i2c1=PB6,PB7 BUS_PINS_i2c1a=PB8,PB9 BUS_PINS_i2c2=PB10,PB11 BUS_PINS_spi1=PA6,PA7,PA5 BUS_PINS_spi1a=PB4,PB5,PB3 BUS_PINS_spi2=PB14,PB15,PB13 BUS_PINS_spi3=PB4,PB5,PB3 CLOCK_FREQ=72000000 MCU=stm32f103xe PWM_MAX=255 RECEIVE_WINDOW=192 RESERVE_PINS_serial=PA10,PA9 SERIAL_BAUD=250000 STATS_SUMSQ_BASE=256 STEPPER_BOTH_EDGE=1 build_machine_uid=Jan 15 202415:18:09
[INFO] 2024-01-17 13:31:14,202 [root] [temperature_mcu:_mcu_identify:85] mcu_temperature 'mcu' nominal base=357.558140 slope=-767.441860
[ERROR] 2024-01-17 13:31:14,207 [root] [klippy:_connect:248] Unhandled exception during connect
Traceback (most recent call last):
File "/home/felipe/Ender-3_V3_KE_Klipper/klippy/klippy.py", line 198, in _connect
cb()
File "/home/felipe/Ender-3_V3_KE_Klipper/klippy/mcu.py", line 761, in _connect
self._send_config(None)
File "/home/felipe/Ender-3_V3_KE_Klipper/klippy/mcu.py", line 691, in _send_config
cb()
File "/home/felipe/Ender-3_V3_KE_Klipper/klippy/mcu.py", line 73, in _build_config
self._trdispatch_mcu = ffi_main.gc(ffi_lib.trdispatch_mcu_alloc(
OverflowError: can't convert negative number to unsigned

@zekromisblack
Copy link

zekromisblack commented Jan 25, 2024

I am not sure if it's up to date to KE standards though. But I am sure it runs 3v3 SE fine. I had a problem that automatic Z offset on my 3v3 KE, calibration returns few milimeters higher value than nebula pad. I couldn't get to the bottom of it, the config values were all correct and it was running this version of z_compensate

may i suggest making your own repo with your changes
i personally have a ender v3se and figuring out how to get klipper on it is a pain in the neck (i mean i can get it running but auto z offset is a major thing for me)
include source for the firmware + configuration, thanks in advanced!
(side note i doubt we would get a better firmware source from creality themselves so we may as well document and store our own changes)

@0xD34D
Copy link

0xD34D commented Jan 25, 2024

may i suggest making your own repo with your changes

There's always this https://github.com/0xD34D/klipper_ender3_v3_se
I reworked what little source creality provided and have auto Z-offset working on my fork 😉. It uses V1 of prtouch, since that at least had sufficient source code available.

@zekromisblack
Copy link

may i suggest making your own repo with your changes

There's always this https://github.com/0xD34D/klipper_ender3_v3_se I reworked what little source creality provided and have auto Z-offset working on my fork 😉. It uses V1 of prtouch, since that at least had sufficient source code available.

yeah i'm aware of it, i made issue #7 on your config repo, but i had to discontinue using it due to some weird software bugs and some bed damage

@felipejfc
Copy link

Had some problems too. Yesterday I almost trashed by printer when prtouch sensor failed, or some software bug, not sure, and when doing z offset calculation with prtouch it started to go down against the bed super hard. I had to emergency stop the printer and recalibrate afterwards

@Taylor6693
Copy link

make menuconfig like this before compiling.

@Taylor6693
Copy link

20240201-212132

@felipejfc
Copy link

20240201-212132

Will this work on the v3 se for connection using the usb-c port? In contrast, right now I'm using 28kb boot loader and USART1 PA10/PA9

@0xD34D
Copy link

0xD34D commented Feb 1, 2024

Will this work on the v3 se for connection using the usb-c port? In contrast, right now I'm using 28kb boot loader and USART1 PA10/PA9

To use the serial port from USB-C you need to use PA9/PA10. You should be able to change that in the menu config

@Vardhamann
Copy link

hey, @ninja- , could you please leak the prtouch_v2_cm4.c and related files? or advise on how to aquire the same?

@NiXTheDev
Copy link

NiXTheDev commented Feb 17, 2025

Heya, could i get some help with the newest klipper?, those files don't seem to work for me coming up with "Duplicate chip name 'probe'" when placed into the newest klipper/klippy/extras

Seen @ninja- and @Taylor6693 being quite the help for others, hope i can bother you two as well

Also help flashing a newer klipper(than what is provided with the nebula pad) onto KE would be very appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants