I designed a dev board for the STM8L151F2, and even using an external programmer and external power the STM8 has only been able to be programmed twice. Here's the schematic, everything done in eagle. I've gone over every pin with a multimeter, nothing is bridged and everything is connected to the correct pin. The STM8 is in the right orientation. With the CP2102 it was recognized as a USB device, though never has allowed me to interact with the STM8. Am I making some rookie mistake? All the pins are connected as per the TAC and datasheets descriptions AFAIK
@Tri (Don't have enough rep to comment) I'm working with OP on this. We tried with an official STLinkV2 and some clones, using stm8flash on Linux (and also tried STVP). stm8flash times out, and it appears to not be able to communicate with the STM8L.
I was able to program the MCU on two occasions, and I was able to read the test serial output with a FT232RL (not from the CP2102 though). It seemed like the MCU was intermittently resetting, then I was no longer to program it. Since then, I have not had success with the other 4 test boards we have assembled.
I believe we ruled out power supply ripple as a problem, as we tried powering the MCU with the CP2102's internal LDO, the STLink's 3.3v, and a programmable bench PSU. I also have an STM8L-DISCOVERY board, and the code is working fine, so that eliminates the possibility of accidental software resets/pin remaps/bad fuse settings.