Skip to content

Commit 6897bba

Browse files
authored
Merge branch 'main' into has-bitclock
2 parents ebc2dda + ad15fc8 commit 6897bba

15 files changed

+491
-436
lines changed

src/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,27 @@ endif()
9090
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
9191
set(DEFAULT_PAR_PORT "/dev/parport0")
9292
set(DEFAULT_SER_PORT "/dev/ttyS0")
93+
set(DEFAULT_SPI_PORT "/dev/spidev0.0:/dev/gpiochip0")
9394
set(DEFAULT_LINUXGPIO_PORT "gpiochip0")
9495
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
9596
set(DEFAULT_PAR_PORT "/dev/ppi0")
9697
set(DEFAULT_SER_PORT "/dev/cuad0")
98+
set(DEFAULT_SPI_PORT "unknown")
9799
set(DEFAULT_LINUXGPIO_PORT "unknown")
98100
elseif (CMAKE_SYSTEM_NAME STREQUAL "Solaris")
99101
set(DEFAULT_PAR_PORT "/dev/printers/0")
100102
set(DEFAULT_SER_PORT "/dev/term/a")
103+
set(DEFAULT_SPI_PORT "unknown")
101104
set(DEFAULT_LINUXGPIO_PORT "unknown")
102105
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
103106
set(DEFAULT_PAR_PORT "lpt1")
104107
set(DEFAULT_SER_PORT "com1")
108+
set(DEFAULT_SPI_PORT "unknown")
105109
set(DEFAULT_LINUXGPIO_PORT "unknown")
106110
else()
107111
set(DEFAULT_PAR_PORT "unknown")
108112
set(DEFAULT_SER_PORT "unknown")
113+
set(DEFAULT_SPI_PORT "unknown")
109114
set(DEFAULT_LINUXGPIO_PORT "unknown")
110115
endif()
111116

@@ -147,6 +152,7 @@ add_custom_command(
147152
-D HAVE_LINUXGPIO=$<BOOL:${HAVE_LINUXGPIO}>
148153
-D DEFAULT_PAR_PORT=${DEFAULT_PAR_PORT}
149154
-D DEFAULT_SER_PORT=${DEFAULT_SER_PORT}
155+
-D DEFAULT_SPI_PORT=${DEFAULT_SPI_PORT}
150156
-D DEFAULT_LINUXGPIO_PORT=${DEFAULT_LINUXGPIO_PORT}
151157
-P "${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake"
152158
DEPENDS avrdude.conf.in

src/avrdude.1

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,15 @@ need to be specified to
328328
.It Fl p \-part Ar partname
329329
This option specifies the MCU connected to the programmer. The MCU
330330
descriptions are read from the config file. To see a list of currently
331-
supported MCUs use ? as partname, which will print the part ids and official
332-
part names. In connection with -v, this will also print a list of variant
333-
part names followed by an optional colon, the package code and some
334-
absolute maximum ratings. The part id, their official part name, any of
335-
the full variant part names or their initial part up to a dash can be used
336-
to specify a part with the -p option. If -p ? is specified with a specific
337-
programmer, see -c below, then only those parts are output that the
338-
programmer expects to be able to handle, together with the programming
331+
supported MCUs use ? as partname, which will print the part ids and
332+
official part names. Depending on the used shell, ? may need to be quoted
333+
as in "?" or \\?. In connection with -v, this will also print a list of
334+
variant part names followed by an optional colon, the package code and
335+
some absolute maximum ratings. The part id, their official part name, any
336+
of the full variant part names or their initial part up to a dash can be
337+
used to specify a part with the -p option. If -p ? is specified with a
338+
specific programmer, see -c below, then only those parts are output that
339+
the programmer expects to be able to handle, together with the programming
339340
interface(s) that can be used in that combination. In reality there can be
340341
deviations from this list, particularly if programming is directly via a
341342
bootloader.
@@ -415,15 +416,15 @@ keyword in your
415416
.Pa ${HOME}/.config/avrdude/avrdude.rc
416417
or
417418
.Pa ${HOME}/.avrduderc
418-
file to assign a default programmer to keep from having to specify
419-
this option on every invocation.
420-
A full list of all supported programmers is output to the terminal
421-
by using ? as programmer-id.
422-
If -c ? is specified with a specific part, see
423-
-p above, then only those programmers are output that expect
424-
to be able to handle this part, together with the programming interface(s) that can be
425-
used in that combination. In reality there can be deviations from this list,
426-
particularly if programming is directly via a bootloader.
419+
file to assign a default programmer to keep from having to specify this
420+
option on every invocation. A full list of all supported programmers is
421+
output to the terminal by using ? as programmer-id. Depending on the used
422+
shell, ? may need to be quoted as in "?" or \\?. If -c ? is specified with
423+
a specific part, see -p above, then only those programmers are output that
424+
expect to be able to handle this part, together with the programming
425+
interface(s) that can be used in that combination. In reality there can be
426+
deviations from this list, particularly if programming is directly via a
427+
bootloader.
427428
.It Fl c \-programmer Ar wildcard/flags
428429
Run developer options for programmers that are matched by wildcard. Whilst
429430
their main use is for developers some flags can be of utility for users, e.g.,
@@ -634,7 +635,8 @@ or
634635
To see a list of currently plugged-in serial ports use -P ?s. In order to
635636
see a list of all possible serial adapters known to
636637
.Nm
637-
use -P ?sa.
638+
use -P ?sa. Depending on the used shell, ? may need to be quoted as in "?"
639+
or \\?.
638640
.Pp
639641
On Win32 operating systems, the parallel ports are referred to as lpt1
640642
through lpt3, referring to the addresses 0x378, 0x278, and 0x3BC,
@@ -2098,8 +2100,9 @@ Show help menu and exit.
20982100
.El
20992101
.El
21002102
.Ss Programmers accepting exitspec parameter
2101-
Currently, only the flip2, linuxspi, linuxgpio, raspberry_pi_gpio and old school parallel
2102-
port programmers such as stk200 and dapa support exitspec parameter.
2103+
Currently, only the flip2, linuxspi, linuxgpio, raspberry_pi_gpio,
2104+
pickit4_mplab, pickit5 and old-school parallel port programmers such as
2105+
stk200 and dapa support exitspec parameter.
21032106
These let the user decide in which state the programmer pins after ended programming session.
21042107
Multiple exitspec options can be separated with commas.
21052108
.Bl -tag -offset indent -width indent
@@ -2152,6 +2155,13 @@ This option will leave the 8 data pins on the parallel port active.
21522155
This option will leave the 8 data pins on the parallel port inactive.
21532156
.Pq \&i. \&e. Em low
21542157
.El
2158+
.It Ar Pickit 4 (MPLAB)
2159+
.It Ar Pickit 5
2160+
.Bl -tag -offset indent -width indent
2161+
.It Ar vcc
2162+
This option will leave the power supply from the programmer enabled after
2163+
avrdude finished the operation. Disabled by default.
2164+
.El
21552165
.El
21562166
.Sh FILES
21572167
.Bl -tag -offset indent -width /dev/ppi0XXX

src/configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,36 +500,43 @@ case $target in
500500
i[[3456]]86-*-linux*|x86_64-*-linux*)
501501
DEFAULT_PAR_PORT="/dev/parport0"
502502
DEFAULT_SER_PORT="/dev/ttyS0"
503+
DEFAULT_SPI_PORT="/dev/spidev0.0:/dev/gpiochip0"
503504
DEFAULT_LINUXGPIO_PORT="gpiochip0"
504505
;;
505506
*-*-linux*)
506507
DEFAULT_PAR_PORT="unknown"
507508
DEFAULT_SER_PORT="/dev/ttyS0"
509+
DEFAULT_SPI_PORT="/dev/spidev0.0:/dev/gpiochip0"
508510
DEFAULT_LINUXGPIO_PORT="gpiochip0"
509511
;;
510512
i[[3456]]86-*-*freebsd*|amd64-*-*freebsd*)
511513
DEFAULT_PAR_PORT="/dev/ppi0"
512514
DEFAULT_SER_PORT="/dev/cuad0"
515+
DEFAULT_SPI_PORT="unknown"
513516
DEFAULT_LINUXGPIO_PORT="unknown"
514517
;;
515518
*-*-*freebsd*)
516519
DEFAULT_PAR_PORT="unknown"
517520
DEFAULT_SER_PORT="/dev/cuad0"
521+
DEFAULT_SPI_PORT="unknown"
518522
DEFAULT_LINUXGPIO_PORT="unknown"
519523
;;
520524
*-*-solaris*)
521525
DEFAULT_PAR_PORT="/dev/printers/0"
522526
DEFAULT_SER_PORT="/dev/term/a"
527+
DEFAULT_SPI_PORT="unknown"
523528
DEFAULT_LINUXGPIO_PORT="unknown"
524529
;;
525530
*-*-msdos* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
526531
DEFAULT_PAR_PORT="lpt1"
527532
DEFAULT_SER_PORT="com1"
533+
DEFAULT_SPI_PORT="unknown"
528534
DEFAULT_LINUXGPIO_PORT="unknown"
529535
;;
530536
*)
531537
DEFAULT_PAR_PORT="unknown"
532538
DEFAULT_SER_PORT="unknown"
539+
DEFAULT_SPI_PORT="unknown"
533540
DEFAULT_LINUXGPIO_PORT="unknown"
534541
;;
535542
esac
@@ -556,6 +563,9 @@ else
556563
confsubst="-e /^@HAVE_PARPORT_BEGIN@/,/^@HAVE_PARPORT_END@/d"
557564
fi
558565

566+
AC_MSG_CHECKING([for SPI device])
567+
AC_MSG_RESULT([$DEFAULT_SPI_PORT])
568+
AC_SUBST([DEFAULT_SPI_PORT])
559569

560570
if test "x$enabled_linuxgpio" = xyes; then
561571
AC_MSG_CHECKING([for default linuxgpio port])

0 commit comments

Comments
 (0)