Closed crabdancing closed 8 months ago
Seems like you are using an outdated config.
Can you please rerun klipper-genconf
and try again?
How does it look outdated? I tried rerunning with klipper-genconf
from a recent nixpkgs, with the same settings (ATMEGA1284, with everything else set to default), and it gave me what looks to be basically the same thing:
# CONFIG_LOW_LEVEL_OPTIONS is not set
CONFIG_MACH_AVR=y
# CONFIG_MACH_ATSAM is not set
# CONFIG_MACH_ATSAMD is not set
# CONFIG_MACH_LPC176X is not set
# CONFIG_MACH_STM32 is not set
# CONFIG_MACH_HC32F460 is not set
# CONFIG_MACH_RP2040 is not set
# CONFIG_MACH_PRU is not set
# CONFIG_MACH_AR100 is not set
# CONFIG_MACH_LINUX is not set
# CONFIG_MACH_SIMU is not set
CONFIG_AVR_SELECT=y
CONFIG_BOARD_DIRECTORY="avr"
# CONFIG_MACH_atmega2560 is not set
# CONFIG_MACH_atmega1280 is not set
# CONFIG_MACH_at90usb1286 is not set
# CONFIG_MACH_at90usb646 is not set
# CONFIG_MACH_atmega32u4 is not set
CONFIG_MACH_atmega1284p=y
# CONFIG_MACH_atmega644p is not set
# CONFIG_MACH_atmega328p is not set
# CONFIG_MACH_atmega328 is not set
# CONFIG_MACH_atmega168 is not set
CONFIG_MCU="atmega1284p"
CONFIG_AVRDUDE_PROTOCOL="arduino"
CONFIG_CLOCK_FREQ=16000000
CONFIG_AVR_CLKPR=-1
CONFIG_AVR_STACK_SIZE=256
CONFIG_AVR_WATCHDOG=y
CONFIG_SERIAL=y
CONFIG_SERIAL_BAUD_U2X=y
CONFIG_SERIAL_PORT=0
CONFIG_SERIAL_BAUD=250000
CONFIG_USB_VENDOR_ID=0x1d50
CONFIG_USB_DEVICE_ID=0x614e
CONFIG_USB_SERIAL_NUMBER="12345"
CONFIG_CANBUS_FREQUENCY=500000
CONFIG_HAVE_GPIO=y
CONFIG_HAVE_GPIO_ADC=y
CONFIG_HAVE_GPIO_SPI=y
CONFIG_HAVE_GPIO_I2C=y
CONFIG_HAVE_GPIO_HARD_PWM=y
CONFIG_HAVE_GPIO_BITBANGING=y
CONFIG_HAVE_STRICT_TIMING=y
CONFIG_INLINE_STEPPER_HACK=y
Edit: diff shows the output to have not changed since the last time this utility was run.
Edit 2: tried with klipper-genconf from a recent master version of nixpkgs, (8cfef6986adfb599ba379ae53c9f5631ecd2fd9c) with the same result.
When I run klipper-genconf
for ATMEGA1284
I get:
# CONFIG_LOW_LEVEL_OPTIONS is not set
CONFIG_MACH_AVR=y
# CONFIG_MACH_ATSAM is not set
# CONFIG_MACH_ATSAMD is not set
# CONFIG_MACH_LPC176X is not set
# CONFIG_MACH_STM32 is not set
# CONFIG_MACH_HC32F460 is not set
# CONFIG_MACH_RP2040 is not set
# CONFIG_MACH_PRU is not set
# CONFIG_MACH_AR100 is not set
# CONFIG_MACH_LINUX is not set
# CONFIG_MACH_SIMU is not set
CONFIG_AVR_SELECT=y
CONFIG_BOARD_DIRECTORY="avr"
# CONFIG_MACH_atmega2560 is not set
# CONFIG_MACH_atmega1280 is not set
# CONFIG_MACH_at90usb1286 is not set
# CONFIG_MACH_at90usb646 is not set
# CONFIG_MACH_atmega32u4 is not set
CONFIG_MACH_atmega1284p=y
# CONFIG_MACH_atmega644p is not set
# CONFIG_MACH_atmega328p is not set
# CONFIG_MACH_atmega328 is not set
# CONFIG_MACH_atmega168 is not set
CONFIG_MCU="atmega1284p"
CONFIG_AVRDUDE_PROTOCOL="arduino"
CONFIG_CLOCK_FREQ=16000000
CONFIG_AVR_CLKPR=-1
CONFIG_AVR_STACK_SIZE=256
CONFIG_AVR_WATCHDOG=y
CONFIG_SERIAL=y
CONFIG_SERIAL_BAUD_U2X=y
CONFIG_SERIAL_PORT=0
CONFIG_SERIAL_BAUD=250000
CONFIG_USB_VENDOR_ID=0x1d50
CONFIG_USB_DEVICE_ID=0x614e
CONFIG_USB_SERIAL_NUMBER="12345"
CONFIG_WANT_GPIO_BITBANGING=y
CONFIG_WANT_DISPLAYS=y
CONFIG_WANT_SENSORS=y
CONFIG_WANT_LIS2DW=y
CONFIG_WANT_SOFTWARE_I2C=y
CONFIG_WANT_SOFTWARE_SPI=y
CONFIG_CANBUS_FREQUENCY=1000000
CONFIG_HAVE_GPIO=y
CONFIG_HAVE_GPIO_ADC=y
CONFIG_HAVE_GPIO_SPI=y
CONFIG_HAVE_GPIO_I2C=y
CONFIG_HAVE_GPIO_HARD_PWM=y
CONFIG_HAVE_STRICT_TIMING=y
CONFIG_INLINE_STEPPER_HACK=y
Your config is missing those new CONFIG_WANT_
values. It's strange, that you don't have these values if you are on a recent version. I tried it on your mentioned commit with nix shell nixpkgs/8cfef69#klipper-genconf
and this generated the expected config as well.
OH. Yeah. So, that's totally my fault. Looks like I accidentally added the version pinning to my global overlays (all nixpkgs versions) instead of just the default one, and that propagated down my entire system derivation & dispatch system. Whoopsie. I guess the bug was too reproducible across all my systems for me to notice! :P
On another note, thank you for that nix shell nixpkgs/8cfef69#klipper-genconf
command you mentioned. I wasn't aware build/shell/run
would work against nixpkgs
like that. For some reason, when heading with github:
gives the following:
nix build github:nixpkgs/8cfef69#klipper-genconf
error:
… while fetching the input 'github:nixpkgs/8cfef69'
error: unable to download 'https://api.github.com/repos/nixpkgs/8cfef69/commits/HEAD': HTTP error 404
response body:
{
"message": "Not Found",
"documentation_url": "https://docs.github.com/rest/commits/commits#get-a-commit"
}
Super weird.
If you add github:
to the flake reference, you need to specify owner and repository.
In this case, the correct command is nix build github:NixOS/nixpkgs/8cfef69#klipper-genconf
.
For more information about the syntax: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake.html#url-like-syntax
Oh, whoops! Thanks :)
Describe the bug
When building for an AVR-based 3D printer,
klipper-firmware
fails, throwing an error during linking stage:Steps To Reproduce
Attempt to build
klipper-firmware
with the followingklipper.cfg
passed in forfirmwareConfig
:Expected behavior
The expression should build successfully for Ender 3v2 (board 1.1.4).
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Notify maintainers
@vtuan10
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Priorities
Add a :+1: reaction to issues you find important.