-
Notifications
You must be signed in to change notification settings - Fork 145
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
add extended parameter "disable_no_sc" for linuxspi programmer #1100
Conversation
Thank you for this PR @s-wakaba! It is certainly competently coded. And it's good to see more SoCs covered! I don't have an OrangePi (or a NanoPi for that matter) so cannot check, but here is a question: Is there a way to detect at compile-time whether |
This enables both linuxspi and linuxgpio for |
I think the change to As for And indeed it is not defined for AllWinner ARM SoCs (linux-sunxi). So I agree that a compiler-time flag should be used. |
Thank you for positive comments. I don't know how to detect the In addition, some softwares (typically Arduino IDE) include compiled avrdude. I think it's difficult for these distributers to prepare packages for each SoCs. An explicit option has a little merit that the user know that the SPI CS pin outputs meaningless signals and it shouldn't be used. I'll try to use |
|
Brilliant, thanks. OK, we can go with the suggestion of the extended parameter. I like the fact that your code makes the user aware of the extended parameter and how to use it. I have pushed a change onto your code which lowers this message from conditioned to While I was at it I also changed the style of error messages of the existing linuxspi.c to match style. I hope that's OK. Please review and test. |
@s-wakaba Also wondering whether it should rather be
ie, |
@stefanrueger Thank you for agreeing to my proposal! In the case of using If you update the entire |
The choice is between
Please could you test the changes using strerror(). As there are quite a few PRs ready to go I might merge this soon with others. Thank you! |
The current version of AVRDUDE cannot be used as "linuxspi programmer" on linux systems running on Allwinner SoCs which are used for some Raspberry Pi like singleboard computers (e.g. OrangePi, NanoPi). The reason is failure of "ioctl()" system call to set SPI_NO_CS option to the SPI device descriptor. This patch adds "disablbe_no_cs" extended parameter for linuxspi programmer to suppress this system call failure.
In addition, "build.sh" is also modified since the "uname -m" command returns "aarch*" instead of "arm*" as architecture name for these SoCs.