The subject line is not strictly right. I can set breakpoints but not on all of my code. Here is the story so far.
I have written some code for the STM32F0 Discovery board. The code runs both SPI ports as masters, TX only and USART1 for TX and RX. All of these work as required. I am in the process of writing a parser for the RX data from the USART. I have parsed the data using <SP> as the delimiter and am now comparing the first string parsed (a command word) with an array of commands to identify which command function call I need to make. The loop for the compare works fine but the CMD_index (uint16_t) came back as unavailable. I then checked that I have declared it properly and then it comes back with a value of 3616 (0x0e20). Further investigation shows that this is the value found if CMD_index is a pointer set to NULL. At this point I notice an error in the build window telling me that CSTACK is not in the correct range. Further more I cannot set breakpoints on all of my code, only selected parts. If I single step the code the IDE will jump over sections of code that it should stop at.
At this point I was getting frustrated so I decided to get back to a clean version of the code. My code started life as the SysTick example. I copied off my code, re-named the complete examples directory and downloaded a new copy from ST. I then run up the SysTick code to check all is OK. Satisfied with that I then copied my code (main.c and main.h) over the SysTick code and did a Rebuild All. I now do not get any issues with CSTACK but I still can only set breakpoints on some of my code.
Any ideas, anyone?