cancel
Showing results for 
Search instead for 
Did you mean: 

SMT8S007 - Debugging OK, but Programmed Code doesnt run?

dsalgueiro
Associate
Posted on April 04, 2014 at 05:15

Hello,

I have been able to develop an STM8S007 project with STVD and cosmic C.  I have been able to test the project with no compile errors etc.

When I use STVP to program the .S19 file into the chip, everything programs OK and verifies OK.

When I remove the ST-LINK/V2 from my PCB and turn the power on I find that the STM8 seems like its not running.

Why would my code run when debugging but not when flashed?  Any ideas on how to troubleshoot this?
1 REPLY 1
Stm32User
Associate II
Posted on April 08, 2014 at 10:25

Check the basics first, power, reset line and clock.

Make sure that your code is built for the target mcu.

Check compiler options for debug and release build.

Change the code to light an led at the start so you can see if it is executing any code. If it is move the code along until the led doesn't light so you can see how far execution continues and where the problem is.