Here is the output from the compiler using IDE 1.8.16. A NANO EVERY is attached to the USB. All libraries have been upgraded to current. If #include <RH_ASK.h> is commented out, (//), the test code runs OK. Removing the // and an error is displayed by the compiler. It appears that setBitOrder might have a problem (?). If an "ordinary" NANO is substituted for the EVERY, the test code runs without any problems. The IDE is running in a Windows 7 partition within a MacBook running OS Catalina:
\Mac\Home\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::attachInterrupt()':
\Mac\Home\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:49:25: error: 'virtual void SPIClassMegaAVR::attachInterrupt()' is private within this context
SPI.attachInterrupt();
^
In file included from \Mac\Home\Documents\Arduino\libraries\RadioHead/RadioHead.h:540:0,
from \Mac\Home\Documents\Arduino\libraries\RadioHead/RHGenericSPI.h:10,
from \Mac\Home\Documents\Arduino\libraries\RadioHead/RHHardwareSPI.h:10,
from \Mac\Home\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:7:
C:\Users\xxxxx xxxxxxxxxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.7\libraries\SPI\src/SPI.h:186:15: note: declared private here
inline void attachInterrupt() { SPI0.INTCTRL = (SPI_IE_bm); }
^~~~~~~~~~~~~~~
\Mac\Home\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::detachInterrupt()':
\Mac\Home\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:56:25: error: 'virtual void SPIClassMegaAVR::detachInterrupt()' is private within this context
SPI.detachInterrupt();
^
In file included from \Mac\Home\Documents\Arduino\libraries\RadioHead/RadioHead.h:540:0,
from \Mac\Home\Documents\Arduino\libraries\RadioHead/RHGenericSPI.h:10,
from \Mac\Home\Documents\Arduino\libraries\RadioHead/RHHardwareSPI.h:10,
from \Mac\Home\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:7:
C:\Users\xxxxx xxxxxxxxxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.7\libraries\SPI\src/SPI.h:187:15: note: declared private here
inline void detachInterrupt() { SPI0.INTCTRL &= ~(SPI_IE_bm); }
^~~~~~~~~~~~~~~
\Mac\Home\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp: In member function 'virtual void RHHardwareSPI::begin()':
\Mac\Home\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:92:29: warning: invalid conversion from 'uint8_t {aka unsigned char}' to 'BitOrder' [-fpermissive]
SPI.setBitOrder(bitOrder);
^
In file included from \Mac\Home\Documents\Arduino\libraries\RadioHead/RadioHead.h:540:0,
from \Mac\Home\Documents\Arduino\libraries\RadioHead/RHGenericSPI.h:10,
from \Mac\Home\Documents\Arduino\libraries\RadioHead/RHHardwareSPI.h:10,
from \Mac\Home\Documents\Arduino\libraries\RadioHead\RHHardwareSPI.cpp:7:
C:\Users\xxxxx
xxxxxxxxxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.7\libraries\SPI\src/SPI.h:171:8: note: initializing argument 1 of 'void SPIClassMegaAVR::setBitOrder(BitOrder)'
void setBitOrder(BitOrder order);
^~~~~~~~~~~
exit status 1
Error compiling for board Arduino Nano Every.
Im getting ready to put together a 433 MHz RF network with one transmitter ( with MEGA) and approx 20 receivers (each with NANO EVERY). I dont need the extra ummph an EVERY gives over an ordinary NANO. I could switch to plain NANOs or something smaller like 32U4 Micros which Ive had good success with in the past...but not with an RF application. Im surprised the EVERY has a problem with RadioHead.
Libraries like RadioHead are freeware. Keeping them updated for every new processor on the block demands that someone donate their free time. Eventually, someone might, but there has to be a volunteer and a strong reason to do it.
There is a limit to how much Arduino support code can be made completely portable. There will always be border cases where some custom code has to be written to accommodate the needs of specific systems.
Yes, I agree. Im not sure NANO EVERYs are in that much use or demand. I just happen to have a "few." It would seem from my very limited view that the problem would require a fix involving the arg list/use of setBitOrder. But as with many things, that's probably too simple. Im not impacted by this problem, as I will turn to other Arduinos I have to complete the project. Ive merely
reported what Ive found. I had the impression from many many projects reported on this forum and elsewhere that RadioHead was/is the way to go with RF. Ive seen libraries produced for "Arduinos" that I didnt know existed. I would have thought
someone might have had an interest in producing a working library within RadioHead for NANO EVERY...since it is a genuine Arduino product. This isnt a criticism. I just guessed wrong.
There is project management on Github, but it's optional. So you can probably see who worked on it, but I doubt that anyone was assigned to this or that.
Honestly, I think the fix might actually be quite simple. It's more likely some "gotcha" that was not anticipated, than some deep structural issue.
Was that compiler dump of any value/use to you? Im willing to help with this,
but you or someone else would have to direct me (and YOU get all the credit).
I dont know if that question was serious, but from my previous remarks you should know Im not an experienced developer in OO. I do have a fair knowledge of C and assembly, but not the assembly you might want. My intent of this post was to have someone look at the compiler dump and determine if there is a problem with the function setBitOrder to see if it was used consistently across the platform. Since a NANO has no problems and an EVERY does, I would have thought that fact plus the dump would offer a decent place to look for a "simple" fix. If no simple fix appeared to be in the offing, I'd bag the project as no one in the Arduino community appears to have any use for an EVERY driven by RadioHead. I have no vested interest.