본문으로 건너뛰기

RS232 펌웨어 컴파일

컴파일 시작

펌웨어 컴파일 간단 가이드

주의사항

  • 네트워크: 상위 컴퓨터(라즈베리파이 등)가 인터넷에 연결되어 있는지 확인하세요.
  • 로그인 방식: 반드시 SSH를 통해 네트워크로 로그인하고, 시리얼 포트는 비활성화하세요.
  • 입력기: 키보드를 영문 반각 모드로 유지하세요.

SSH 로그인 및 사용자 전환

MobaXterm, PuTTY 등의 도구를 사용하여 상위 컴퓨터에 SSH로 로그인하세요.

사용자 전환:

  • 일반 시스템(라즈베리파이 공식 시스템 등)
    root 사용을 금지하며, 일반 사용자로 전환해야 합니다:
    su <사용자명>
  • FLY 상위 컴퓨터(FlyOS-FAST 시스템)
    root 사용자 로그인만 지원합니다(비밀번호: mellow).

펌웨어 컴파일 작업 가이드

Klipper 펌웨어 구성 인터페이스에서는 키보드 조작만 지원하며, 마우스는 사용할 수 없습니다.

기능
↑ / ↓커서를 위아래로 이동하여 메뉴 항목 선택
Enter / 스페이스바선택 확인, 옵션 체크 또는 하위 메뉴 진입
ESC상위 메뉴로 돌아가기
Q구성 인터페이스 종료
Y종료 시 메시지가 나타나면 Y를 눌러 구성 저장

펌웨어 컴파일 시작하기

아래에서는 펌웨어를 컴파일하는 방법을 설명합니다:

  1. SSH에 연결한 후 다음 명령어를 입력하고 Enter 키를 누릅니다:

    cd ~/klipper && rm -rf ~/klipper/.config && rm -rf ~/klipper/out && make menuconfig

    여기서 rm -rf ~/klipper/.config && rm -rf ~/klipper/out은 이전 컴파일 구성과 펌웨어를 삭제하는 데 사용됩니다; make menuconfig는 Klipper 펌웨어 구성 인터페이스를 여는 데 사용됩니다.

  2. 아래 순서대로 항목별로 설정하며, 각 항목을 완료한 후 다음 항목을 진행합니다.

    1启用 Enable extra low-level configuration options
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    2Micro-controller Architecture 选择 Raspberry Pi RP2040/RP235x
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    3Processor model 选择 rp2040
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    4Bootloader offset 选择 No bootloader
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    5Flash chip 选择 W25Q080 with CLKDIV 2
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    6Communication Interface 选择 UART0 on GPIO0/GPIO1
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    7Baud rate for serial port 设置为 250000
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    8启用 Optimize stepper code for 'step on both edges'
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    9GPIO pins to set at micro-controller startup 设置为 !gpio5,!gpio19,!gpio24
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    10GPIO state at micro-controller startup 选择 Not set

    此项是 FLYOS-Klipper 功能。通常保持 Not set;如需设置全部 GPIO 的启动状态,请先阅读 GPIO 启动状态使用说明

    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    11Q 键退出配置界面
    (Top)
    Klipper Firmware Configuration
    [*] Enable extra low-level configuration options
    Micro-controller Architecture (Raspberry Pi RP2040/RP235x) --->
    Processor model (rp2040) --->
    Bootloader offset (No bootloader) --->
    Flash chip (W25Q080 with CLKDIV 2) --->
    Communication Interface (UART0 on GPIO0/GPIO1) --->
    (250000) Baud rate for serial port
    [*] Optimize stepper code for 'step on both edges'
    (!gpio5,!gpio19,!gpio24) GPIO pins to set at micro-controller startup
    GPIO state at micro-controller startup (Not set) --->
    12出现 Save configuration 时按 Y 保存配置
    Quit
    Save configuration?
    (Y)es(N)o(C)ancel
  3. 위의 마지막 두 단계를 완료한 후 Q를 눌러 구성 인터페이스를 종료하고, Y를 눌러 구성을 저장합니다.

  4. 명령줄로 돌아간 후 다음 명령어를 입력하고 Enter 키를 눌러 컴파일을 시작합니다:

    make -j4
    root@flyos-11e5f8 ~/klipper # make -j4
    Compiling out/src/generic/timer_irq.o
    Compiling out/src/rp2040/bootrom.o
    Compiling out/src/rp2040/serial.o
    Compiling out/src/generic/serial_irq.o
    Compiling out/src/rp2040/hard_pwm.o
    Compiling out/src/rp2040/spi.o
    Compiling out/src/rp2040/i2c.o
    Preprocessing out/src/rp2040/rpxxxx_link.ld
    Building out/compile_time_request.o
    Version: XXXX
    Linking out/klipper.elf
    Creating uf2 file out/klipper.uf2

    终端末尾出现 Linking out/klipper.elf Creating uf2 file out/klipper.uf2,即表示编译成功。 实际编译时,部分 Compiling 行和 Version 会随 Klipper 与系统版本变化。

플래싱 모드 진입

왼쪽이 RESET 버튼, 오른쪽이 BOOT 버튼입니다.

  • 툴 보드가 완전히 전원이 차단된 상태에서 BOOT 버튼을 누른 채로, 데이터 전송 기능이 있는 Type-C 케이블을 사용하여 툴 보드호스트 컴퓨터의 USB 포트에 연결합니다. 호스트 컴퓨터에 올바르게 연결되면 BOOT 버튼을 놓습니다.
    Loading...

펌웨어 플래싱

  • 현재 도구 보드는 펌웨어 굽기 모드에 있으며, ".uf2" 확장자를 가진 펌웨어만 구울 수 있습니다.

  • 아래 명령어를 통해 도구 보드에 펌웨어를 굽습니다.

    cd && cd ~/klipper/
    make flash FLASH_DEVICE=2e8a:0003

    호스트 시스템을 처음 설치한 후 처음으로 굽기를 수행하는 경우, 아래 그림의 빨간색 원 안에 표시된 것과 같은 일부 빨간색 알림이 나타날 수 있습니다. 이는 정상적인 현상이며 오류가 아닙니다.

    Loading...

펌웨어가 시작되었는지 확인

  • 펌웨어가 정상적으로 시작되면 LED가 켜집니다.
    Loading...
Loading...