In some other topic installing PSoC Programmer helped the problem like this.
How about trying install PSoC Programmer?
This morning I encountered a quite similar situation with my CY8CKIT-149.
After struggling a while, I noticed that I was playing with the EZ-BLE,
so SW4 was set to EZ-BLE position.
Although this may not apply to your case,
but trying to switch SW4 of CY8CKIT-145 to PSoC 4 position
may affect the situation.
Almost a couple of weeks has passed since you posted this question.
I hope that you have figured out how to do it and have proceeded,
so that you did not have to come back here again.
But just in case you are still stopping there,
as I could use CY8CKIT-145 today, I tried to trace your steps.
Before starting, please make sure that
(1) You have downloaded and installed and updated PSoC Creator v4.2
(2) You have installed PSoC Programmer (Mine is 3.28.3, there may be newer version available)
(3) You have downloaded and installed CY8CKIT14540XXSetupOnlyPackage_RevSA.exe from
(4) SW4 (SWD SELECT) is in the PSoC 4000S position
I created a project tracing your step, and drew schematic as below,
the point is it has only 1 Digital Output (LED)
The pin assignment is
As I noted in the schematic, BLUE LED connected to the PSoC 4000S is connected via P2
Then edited main.c (except comment lines, I traced your code)
I compiled the program using menu Build > Clean and Build <project_name>
The project was built without problem
Then I selected the debug target by Menu Debug > Select Debug Target...
I selected PSoC 4000S CY8C4045AZI-S413 then selected [ OK / Connect ]
Then to start the debugger, I selected the "Debug" icon
After loading the binary to the device, the debugger started
Starting the program by selecting by selecting "Resume Execution" Icon.
At this point, I could observe that the BLUE LED on the board is blinking.
Please note, to be in the safer side, I did not use "Function Keys" such as F5 etc,
as they could be configured differently for each PC system.