Open pwlgrzs opened 8 months ago
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?
@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.
did you manage to get it linked with 9.2 GCC?
@CrealityTech could you please comment on this?
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.
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
@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?
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 :)
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?
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 :)
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
Will try it and let you folks now how it ran very soon
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
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)
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.
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
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
make menuconfig like this before compiling.
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
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
hey, @ninja- , could you please leak the prtouch_v2_cm4.c and related files? or advise on how to aquire the same?
Hello,
compliation ends with:
Could you please assist?