I succeeded in Upload onto my Nano by just claiming it was an ATmega168P - see platformio.ini extract below
[env:ATmega168P]
platform = atmelavr
board = ATmega168P
framework = arduino
Import worked a dream
* Executing task in folder Nano_test: C:\Users\Peter\.platformio\penv\Scripts\platformio.exe run --target upload
Processing ATmega168P (platform: atmelavr; board: ATmega168P; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/ATmega168P.html
PLATFORM: Atmel AVR (3.4.0) > ATmega168P/PA
HARDWARE: ATMEGA168P 16MHz, 1KB RAM, 16KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES:
- framework-arduino-avr-minicore @ 2.1.3
- tool-avrdude @ 1.60300.200527 (6.3.0)
- toolchain-atmelavr @ 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 9 compatible libraries
Scanning dependencies...
Dependency Graph
|-- TinyHead
| |-- SPI @ 1.0
Building in release mode
Checking size .pio\build\ATmega168P\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [===== ] 52.5% (used 538 bytes from 1024 bytes)
Flash: [==== ] 43.8% (used 6952 bytes from 15872 bytes)
Configuring upload protocol...
AVAILABLE: custom
CURRENT: upload_protocol = custom
Uploading .pio\build\ATmega168P\firmware.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x1e940b (probably m168p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file ".pio\build\ATmega168P\firmware.hex"
avrdude: writing flash (6952 bytes):
Writing | ################################################## | 100% 7.66s
avrdude: 6952 bytes of flash written
avrdude: verifying flash memory against .pio\build\ATmega168P\firmware.hex:
avrdude: load data flash data from input file .pio\build\ATmega168P\firmware.hex:
avrdude: input file .pio\build\ATmega168P\firmware.hex contains 6952 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 4.28s
avrdude: verifying ...
avrdude: 6952 bytes of flash verified
avrdude: safemode: Fuses OK (E:F8, H:DD, L:FF)
avrdude done. Thank you.
=============================================== [SUCCESS] Took 16.21 seconds =============================================== * Terminal will be reused by tasks, press any key to close it.
But does it work with my RF unit? - yeah! it does. I’m going to have a go with a Pro Mini next - not so much onboard stuff to power with a battery.
Thanks for all your help. I’m going to flag this as ‘solution’ and conclude that ATtiny85 are not the best MCU to work with the RH_ASK library.