2008-02-18 10:15 PM
Cosmic C doesnt step into some code parts
2008-02-17 10:33 PM
hi!
I have a problem with my STVD7 using Cosmic C. As i just started to work with my ST7 i only want to write a kind of ''hello world'' programm - really simple. it looks like this: #include ''ST7521R9.h'' void peripherals_init () { PBDDR = 0xFF; //Port B output PBDR = 0x0; //Clear Port B } void main() { peripherals_init(); for (;;) { PBDR = 0xFF //activate all LED's connected to Port B } } now the problem is following: when i first started the programm it worked, and the LED went on. then i wanted to expand the code a little, and all of a sudden it didn't work anymore. so i reset the code to the version above, but it still didn't work. when i step through the code, it enters main, then the peripherals_init() function and then it only reads the first line (PBDDR = 0xFF) but steps over the second line. it also never enters the for - construct. when i put a breakpoint to these lines, the program tells me that the breakpoint is in an empty line that doesnt contain code. what did i do wrong? has anyone experienced a similar problem? thanks for your help! sebastian2008-02-18 07:51 PM
2008-02-18 10:15 PM
i closed the STVD7, opend it again and loaded one of the examplecodes. this one worked and i changed the example-code to my program which again worked. so now the problem is solved, all LED's blinking as if i it were christmas *g*
thanks though for your reply! sebastian