OS: Windows 10 x64
Version: STM32Cube V1.0 - 4.20.0
IDE: Coocox CoIDE 1.7.8
I noticed that after regenerating the code I just couldn't access the board, messages like "Please, connnect the cable" or "Board was not found" started prompting after downloading others code to the board. The only way to restore the access was using STLink Utility (Holding the reset button (Black button,RST, in the board) and erasing all the memory).
However, this issue also happened when checking the option to Create peripheral separate pairs in .c and .h, something like that, this time the code blocks the access just after the download.
In both cases the code keeps running but you cannot debug, reset or download new ones.
After some trial and error, comparing the good code with the evil one, I could solve this changing the following file:
SRC folder ==> stm32f1xx_hal_msp.c
Look for __HAL_AFIO_REMAP_SWJ_DISABLE(); and just delete this line.