This project focuses on 8052 development on Linux using Megawin chips.
They are accurately defined in REG_MG82F6D17.h.
The well written Python script can be used to convert any Keil header file to SDCC.
On Linux Wine Megawin Serial Programmer COM_ISP8 available from Megawin 8051 Support works well.
UART0 is used for programming the chips. For 20 pin MG82F6D17AT20, pins 13 and 14 are used. RXD connects to TXD and vice versa.
USB TXD ----> RXD0
USB RXD <---- TXD0
Repower the DUT (device under test) when the programmer is waiting for a new connection. On boot, the device boots into serial programming which communicates with the waiting programmer. On absence of a programmer, it continues to boot normally.