I took me a while to figure out how to flash it because documentation is rare - especially as most information is in Chinese.
Below you will find what you all are searching for.
I am able to flash as well the AI-Thinker A20 chip alone and also the breakout-board.
The A20 has an internal ESP8285 chip. The ESP8285 can communicate with the internal GSM part using AT commands. You need to establish a connection between serial (or software serial) pins of internal ESP8285 and the serial pins of the GSM part (modem), if you want to control GSM login and SIM card within the A20 chip itself.
You can also control the GSM part via AT commands directly from your computer, in my case a RaspberryPi.
Flashing A20's internal ESP8285:
This one can be programmed same way as the ESP8285 on Wemos D1 mini Lite (small difference to ESP8266!!)
So this is how you do it, I hope you guys program a lot so I can copy back
How to flash A20:
In arduino IDE select "generic ESP8285" as board
Baud rate 115200 worked, but not always, so I used 57600.
All dip switches off (in case you have the board and not the chip alone)
Small hint I f you have the A20board: the data pins on the boards USB connector are NOT connected, the USB port is for power only. You need an extra USB/Serial adapter (less than 1$ on Ali express) or any other serial port like on RaspberryPi.
Connections you have to make for flashing the A20:
Wf_RXd to USB/serial adapter RX
Wf_TXd to USB/serial adapter TX
Wf_io0 = low
Wf_RST = high 5kOhm to 3.3V - do not connect it to USB/serial adapter's RST pin if it has one!
Wf_io15 = low
Wf_io2 = high 5kOhm to 3.3V (update: not necessary, but flashing might fail if something like an LED is connected to GPIO2 during flashing procedure!)
Then:
Power on 5V (and 3.3V to the corresponding Pin on A20 chip if you have the chip alone without board) - e.g. use 5V and 3.3V from external USB/serial adapter CH340. For the A20 breakout board you only need to connect +5V.
When flashing is complete, switch Wfio0 to 3.3V high and remove WfRST from high and let it open (last step might be optional but seems to be necessary some times I tried)
Then repower
What about the DIP switches on the board?
A20 GPS GSM Board (breakoutboard) with dip switches:
Dip switches: 2,4 ON: Wfio13 and Wfio15 of A20's internal ESP8285 are connected to the Serial Pins of GPRS part of the A20 Chip to control it with AT commands:
Wfio 13 --> UART_TXD
Wfio15 --> UART_RXD
(This is what you want to enable to control GSM from internal ESP8285)
BE CAREFUL: this means that you use GPIO13 and GPIO15 of ESP8285 for serial communication, you have to do (UPDATE: either SoftwareSerial which works great!) or Serial.swap(); in setup section of your sketch to use the other hardware serial.
Here comes something I dit not figure out yet about the hardware serial ports: ESP8285 should have three hardware serials: Wf_RXD,Wf_TXD and Wf_io13, and as a third hardware serial port Wf_io15 as TX only.
But I was only able to get running the following:
Serial.begin(115200);
Serial1.begin(115200);
Serial.swap();
This results in a serial RX/TX connection to A20 chip to control it with AT commands on Wf_io13 and Wf_io15 (when DIP switches 2 and 4 are ON) and in a serial output on Wf_io04 (TX only). I did not manage to get both bidirectional hardware serials to work at the same time. Serial0.begin(115200); does not work, nor Serial2.begin(115200);
DIP Switches 5 and 6 control whether the GPIO13 and GPIO15 of the ESP8285 are also connected to the pins on the breakoutboard.
GPIO13->Pin "Wfio13" on breakoutboard
GPIO15-> Pin "Wfio15" on breakoutboard
DIP switches 1 and 3 control whether the GPRS serial pins of A20 chip (UART_TXD and UART_RXD on the chip itself) are also connected to the corresponding pins on the breakoutboard (named H_TXD and H_RXD)
In Short: you can switch on all for testing after you have programmed internal ESP8285.
If you want ESP8285 to have NO(!!) onboard contact to GPRS part switch OFF DIP switch 2 and 4.
If you only want ESP8285 to control GPRS part of A20 chip with AT commands by internal ESP8285 but you don't need access to the pins for extra monitoring then you only need to switch ON Dip switch 2 and 4 and leave the others OFF.
If you want to use Wfio13 and Wfio15 of the ESP8285 (for other purpose use of GPIO13 and GPIO15) switch ON Dip switch 5 and 6 so that the pins Wfio13 and Wfio15 on the breakoutboard are connected to ESP8285, and leave OFF Dip switches 2 and 4.
If you want to control GPRS part of the A20 from external source, you need to switch OFF dip switches 2 and 4 and switch ON Dip switches 1 and 3 so that UART_RXD and UART_TXD are connected to the pins U_RXD and U_TXD on the breakoutboard but NOT to ESP8285. At the same time you may also switch ON Dip switches 5 and 6 to use Wfio13 and Wfio15 of ESP8285 for other purposes.
Again: Be sure to switch off DIP switches 2 and 4 during flashing of A20's internal ESP8285 because otherwise there will be flashing failures sometimes when the GSM part sends data on its serial port.