Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linuxspi with patched avrdude #633

Open
martynwheeler opened this issue May 3, 2020 · 0 comments
Open

linuxspi with patched avrdude #633

martynwheeler opened this issue May 3, 2020 · 0 comments

Comments

@martynwheeler
Copy link

Hi,

I have a patched version of avrdude with linuxspi. The latest patch uses the format:

avrdude -c linuxspi -P /dev/spidev:/dev/gpiochip[:resetpin]

this fails on make ispload due to the way the get_isp_port variable is handled.

I have a workaround by changing:

# Returns the ISP port (first wildcard expansion) if it exists, otherwise it errors.
get_isp_port = $(if $(wildcard $(ISP_PORT)),$(firstword $(wildcard $(ISP_PORT))),$(if $(findstring Xusb,X$(ISP_PORT)),$(ISP_PORT),$(error ISP port $(ISP_PORT) not found!)))

to:

# Returns the ISP port (first wildcard expansion) if it exists, otherwise it errors.
get_isp_port = $(if $(wildcard $(ISP_PORT)),$(firstword $(wildcard $(ISP_PORT))),$(if $(findstring Xusb,X$(ISP_PORT)),$(ISP_PORT),$(error ISP port $(ISP_PORT) not found!)))

# append :/dev/gpiochip to isp_port
ifeq ($(strip $(ISP_PROG)),$(filter $(ISP_PROG), linuxspi))
        get_isp_port := $(strip $(get_isp_port)):$(strip $(ISP_GPIO))
endif

could this be added to the next release please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant