Closed xieliwei closed 1 year ago
Since the added feature is not available in prebuilt binaries (I certainly don't intend to pre-build them - I already prebuild hundreds of binaries....), and there are comparatively few people who would use it. so it doesn't have as high a bar as other changes.
Have you confirmed that normal tinyAVRs still build and generate binary identical output (if it's not identical, we need to understand why, and verify that it's not a problem.
confirmed generated binaries under normal circumstances are identical
I've added an option to enable RS485 mode 1 on the UART so that the XDIR pin can be used to control an external RS485 transceiver. Unlikely to be useful if you have more than one device on the network, but great for remotely flashing hard-to-access devices that you would otherwise need to physically get to.
With a suitable USB RS485 cable that automatically drives the bus without fancy RTS signaling, everything works (avrdude/Arduino upload) without any additional modification. You will of course need to figure out how to enter the bootloader remotely.
This change increases the bootloader size by an additional instruction to set the XDIR pin to output. For BIGBOOT, it also embeds the RS485 parameter.