Commit Graph

2594 Commits

Author SHA1 Message Date
Sebastian Kuzminsky
bfb795551c avrdude.conf: move raspberry_pi_gpio reset, add prog_modes, reformat
This makes the raspberry_pi_gpio programmer work on older Pis with the
smaller 26-pin GPIO header.

Updates based on code review by Hans (MCUdude).
2023-03-16 08:53:02 -06:00
Sebastian Kuzminsky
5abbefe63b add a new conntype for linuxgpio
This also adds a default linuxgpio port ("gpiochip0"), and adds a
programmer to the avrdude.conf file using linuxgpio from the Raspberry
Pi GPIO port.
2023-03-16 08:53:02 -06:00
Sebastian Kuzminsky
3b93eccfb5 gpiod: find gpio lines by port ("gpiochipN") and offset (pin number)
Before this commit, linuxgpio-gpiod used `gpiod_line_find()` to find
gpio lines by name, and would construct the gpio name by appending the
requested gpio number to the string "GPIO".  This had the advantage
that it didn't have to specify the gpiochip to use, since gpio names are
globally unique in gpiod-land.  But it has the severe drawback that only
gpios whose name begins with "GPIO" could be used.

This commit changes that to use `gpiod_line_get()` instead, which takes
a gpiochip name (the avrdude "port") and an "offset" (the pin number on
that chip).  This lets it use any available gpio line, no matter what
name libgpiod assigned it.
2023-03-16 08:53:02 -06:00
Sebastian Kuzminsky
cffd3c976a linuxgpio: add optional libgpiod support
The "linuxgpio" backend will now try both the old sysfs and new (since
Linux 4.8) libgpiod interface to access gpio pins.  If libgpiod works
it will use that, if it does not work it will fall back to the old
sysfs interface.

The libgpiod code is compiled in if libgpiod is available at build time,
and compiled out otherwise.
2023-03-16 08:53:02 -06:00
Sebastian Kuzminsky
a7bf91c86d cmake: find & use libgpiod 2023-03-16 08:53:00 -06:00
Sebastian Kuzminsky
0ff4192248 linuxgpio: rename all internal functions and variables to include "sysfs"
This commit renames the internal functions and variables of the linuxgpio
pin driver to include "sysfs", to indicate that they're referring to
the older sysfs interface.

The following commits will add libgpiod support to the linuxgpio pin
driver, and autoselect between them.
2023-03-15 18:38:51 -06:00
Stefan Rueger
4019edf60d Update NEWS 2023-03-04 17:25:59 +00:00
Stefan Rueger
579927f020 Merge pull request #1308 from djacobow/dgj/extend_max_pin_number
extend max pin number to 1000
2023-03-04 17:19:34 +00:00
Stefan Rueger
cdaeb6423d Merge pull request #1301 from mariusgreuel/pr-build_sh-cmake-fix
build.sh: For compatibility with old CMake versions, use old syntax to generate build system
2023-03-04 17:19:02 +00:00
Stefan Rueger
ea938153cb Merge pull request #1294 from mariusgreuel/pr-hid-detection
CMake: Remove LIB_LIBHID from configuration is favor of hard-coding it
2023-03-04 17:15:31 +00:00
Stefan Rueger
1995ca6868 Merge pull request #1286 from MCUdude/xplainedmini-suffer
Add `extra_features` to easily identify a programmers special abilities
2023-03-04 17:11:08 +00:00
Stefan Rueger
4a47b10a41 Merge pull request #1285 from mariusgreuel/pr-verbal-cmake-options
CMake: Convert verbal switches into boolean expressions
2023-03-04 17:09:49 +00:00
Dave Jacobowitz
eb7c3ef95d extend max pin number to 1000
Some embedded computers with GPIO are using very
large pin numbers. For example, the pins on the
LePotato SBC use numbers in the 400's.

Extending this max value makes is possible for
users to make custom avrdude.conf additions that
use this pins.

Le Potato board:

https://libre.computer/products/aml-s905x-cc/

Le Potato pin numbering reference:
https://docs.google.com/spreadsheets/d/1U3z0Gb8HUEfCIMkvqzmhMpJfzRqjPXq7mFLC-hvbKlE
2023-03-02 17:00:13 -08:00
Marius Greuel
488da2642a build.sh: For compatibility with old CMake versions, use old syntax to generate build system 2023-02-04 17:54:18 +01:00
mcuee
dd7b359d6b Merge pull request #1297 from mcuee/revert_pr1280
Revert PR https://github.com/avrdudes/avrdude/pull/1280
2023-01-31 10:00:28 +08:00
mcuee
b00a768b18 Revert PR https://github.com/avrdudes/avrdude/pull/1280
This will fix issue https://github.com/avrdudes/avrdude/issues/1296
2023-01-30 21:11:36 +08:00
MCUdude
911aa04ffa Add HAS_VTARG_READ
This can be used to determine if a programmer is able to read the target voltage or not
2023-01-29 21:20:50 +01:00
MCUdude
89abc1375b Print info message when target power switch is off 2023-01-29 20:26:01 +01:00
Marius Greuel
7ebe5da8c5 GitHub build action: Remove CMAKE_BUILD_TYPE from msvc job to silence warning 2023-01-20 20:50:45 +01:00
Marius Greuel
61dccf4ad1 CMake: Add ncurses library when readline is present 2023-01-20 20:42:12 +01:00
Marius Greuel
c98a49bfcd CMake: Remove LIB_LIBHID from configuration 2023-01-20 20:41:36 +01:00
MCUdude
d02e82edac rename matches() to str_starts()
The function never checked for an actual match anyways
2023-01-15 16:43:29 +01:00
MCUdude
f7ed26cb67 Minor improvement based on feedback from @stefanrueger 2023-01-15 16:43:29 +01:00
MCUdude
eede6f9ff0 Fix typo 2023-01-15 16:43:28 +01:00
MCUdude
f4563e19b8 Update docs 2023-01-15 16:43:27 +01:00
MCUdude
3083183ab4 Fix typo 2023-01-14 22:08:40 +01:00
MCUdude
960375e593 Add corrections found by -c*/s 2023-01-14 22:08:36 +01:00
MCUdude
6b3dcf83b7 Merge main branch
had to deal with a merge confilict due to PR #1282
2023-01-14 19:23:57 +01:00
Marius Greuel
909276733d CMake: Convert verbal switches into boolean expressions 2023-01-14 19:17:34 +01:00
Stefan Rueger
5ec72e240b Update News 2023-01-14 14:46:17 +00:00
Stefan Rueger
347ecadae9 Merge pull request #1282 from stefanrueger/grammar
Reduce complexity of grammar
2023-01-14 14:36:20 +00:00
Stefan Rueger
7e5bfdeff0 Merge pull request #1277 from stefanrueger/silence
Silence gcc compiler warnings
2023-01-14 14:35:11 +00:00
Stefan Rueger
b89b79d332 Merge pull request #1276 from mcuee/document_fix
Fix documentation for avrftdi pin numbers to start with 0
2023-01-14 14:34:03 +00:00
Stefan Rueger
65686c7fed Merge pull request #1273 from stefanrueger/stk500_value_polling
Only send write flash cmd to STK500v2 programmers if page not empty
2023-01-14 14:29:59 +00:00
Stefan Rueger
a3b7072b7d Merge pull request #1272 from stefanrueger/mode_memdelay
Correct memory mode, delay and readback for classic parts
2023-01-14 14:29:19 +00:00
Stefan Rueger
1fa34c58a7 Print warnings for deprecated grammar use 2023-01-13 23:34:28 +00:00
Stefan Rueger
09c4b670c7 Shift simple part/memory components from grammar to config.c table 2023-01-13 23:34:18 +00:00
MCUdude
3eeba45d0a add -xsuffer and -xvtarg_switch to the docs 2023-01-13 22:18:22 +01:00
MCUdude
78d762b051 Add alterive id's to jtag3 compatible programmers 2023-01-13 20:56:24 +01:00
MCUdude
cb5f5956fc STK600 also has adjustable target power 2023-01-13 20:47:52 +01:00
mcuee
9cf4f55b87 Merge pull request #1280 from mcuee/configure_ac_readline
Update configure.ac to reflect HAVE_READLINE statue
2023-01-13 13:29:31 +08:00
mcuee
b3a29917b0 Merge pull request #1279 from mcuee/configure_ac_update
Update configure.ac for MinGW build
2023-01-13 13:29:14 +08:00
mcuee
6595f53425 Update configure.ac to reflect HAVE_READLINE statue 2023-01-13 11:05:16 +08:00
Stefan Rueger
0ae6c6543b Shift simple programmer components from grammar to config.c table 2023-01-12 23:59:45 +00:00
Stefan Rueger
f9c5c0cfbc Silence sign-cpmpare warnings in pickit2.c 2023-01-12 14:09:38 +00:00
mcuee
a22d379c03 Update configure.ac for MinGW build
Fix avrdudes#957.
Even though we are only supporting CMake build now, the fix is simple enough and not affecting CMake.
2023-01-12 21:06:36 +08:00
Stefan Rueger
22f9bc5260 Enable -Wextra -Wno-unused-parameter by default for gcc 2023-01-12 00:01:46 +00:00
Stefan Rueger
6088c9b98f Silence sign-compare warning in avr910.c 2023-01-11 23:55:07 +00:00
Stefan Rueger
e349cd1f6b Silence sign-compare warning in buterfly.c 2023-01-11 23:52:59 +00:00
Stefan Rueger
7ad5289d66 Silence sign-compare warnings in dfu.c 2023-01-11 23:50:26 +00:00