Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Kconfig « rp2040 « src - github.com/Klipper3d/klipper.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 69b1cd58e77f692e1ad9767095a52706e2a18b78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Kconfig settings for STM32 processors

if MACH_RP2040

config RP2040_SELECT
    bool
    default y
    select HAVE_GPIO
    select HAVE_GPIO_ADC
    select HAVE_GPIO_SPI
    select HAVE_GPIO_I2C
    select HAVE_GPIO_BITBANGING
    select HAVE_STRICT_TIMING
    select HAVE_CHIPID
    select HAVE_GPIO_HARD_PWM
    select HAVE_STEPPER_BOTH_EDGE

config BOARD_DIRECTORY
    string
    default "rp2040"

config MCU
    string
    default "rp2040"

config CLOCK_FREQ
    int
    default 12000000

config FLASH_SIZE
    hex
    default 0x200000

config FLASH_BOOT_ADDRESS
    hex
    default 0x10000100 # Stage2 binary starts at 0x10000000

config RAM_START
    hex
    default 0x20000000

config RAM_SIZE
    hex
    default 0x42000

config STACK_SIZE
    int
    default 512


######################################################################
# Bootloader options
######################################################################

config RP2040_HAVE_STAGE2
    bool
config RP2040_HAVE_BOOTLOADER
    bool
    default y if !RP2040_HAVE_STAGE2

choice
    prompt "Bootloader offset"
    config RP2040_FLASH_START_0100
        bool "No bootloader"
        select RP2040_HAVE_STAGE2
    config RP2040_FLASH_START_4000
        bool "16KiB bootloader"
endchoice
config FLASH_START
    hex
    default 0x10004000 if RP2040_FLASH_START_4000
    default 0x10000100

choice
    prompt "Flash chip" if LOW_LEVEL_OPTIONS && RP2040_HAVE_STAGE2
    config RP2040_FLASH_W25Q080
        bool "W25Q080 with CLKDIV 2"
    config RP2040_FLASH_GENERIC_03
        bool "GENERIC_03H with CLKDIV 4"
endchoice

config RP2040_STAGE2_FILE
    string
    default "boot2_generic_03h.S" if RP2040_FLASH_GENERIC_03
    default "boot2_w25q080.S"

config RP2040_STAGE2_CLKDIV
    int
    default 4 if RP2040_FLASH_GENERIC_03
    default 2


######################################################################
# Communication inteface
######################################################################

choice
    prompt "Communication interface"
    config RP2040_USB
        bool "USB"
        select USBSERIAL
    config RP2040_SERIAL_UART0
        bool "Serial (on UART0 GPIO1/GPIO0)"
        select SERIAL
    config RP2040_CANBUS
        bool "CAN bus"
        select CANSERIAL
    config RP2040_USBCANBUS
        bool "USB to CAN bus bridge"
        select USBCANBUS
endchoice

config RP2040_CANBUS_GPIO_RX
    int "CAN RX gpio number" if CANBUS
    default 4
    range 0 29

config RP2040_CANBUS_GPIO_TX
    int "CAN TX gpio number" if CANBUS
    default 5
    range 0 29

endif