I have got this working.This is step by step what I did
I updated the st-link driver.
Then used CUBE IDE from ST to burn some code to see if that was working
Then started KEIL Studio and connected the board and clicked the Run button.That did not work
Then ejected the board and reconnected again ,but this time clicked the Debug project button.That worked.
Then ejected the board and now clicked the Run button and that worked.Tried today morning and it is working.
The same thing was done with STM32 Nucleo board and even that started working.
The settings in the preferences are as per your screen shot which existed even when the boards were not working,
I would appreciate if you could give me a fool-proof procedure to ensure flash download and debug that will work as we are planning to get many similar boards and use this IDE for training our students.
I am facing a similar issue with Cypress CY8CPROTO-062-4343W board which was working earlier but has stopped after the update.Screenshot of the error is attached .