I have to port a C++ Win32 console application to WEC7. After I fixed some build and link errors I was able to create an executable that runs on the target. But I could not debug that application with Visual Studio, because the breakpoints were not hit, although the corresponding lines were definitly executed.
To further investigate my problem I created 2 new projects:
Win32 project
Win32 Smart Device project
Both include the following code:
#include "stdio.h"
void main(void)
{
int i=0;
while(1)
{
printf("i=%d\n",i);
i++;
}
}
At this point I can debug both projects, one running on my notebook at Windows 7 and one running at my target on WEC7. Now I have changed the platform solution from project 1 (Win32 project) to my target:
copied settings from Win32 platform
set Debug Information Format from 4 to /Zi (no idea where the 4 came from)
added some WEC7 Preprocessor Definitions
deployed the programm to the target and it works fine (the counter is printed in the console), no difference to project 2
tried to debug the program, but the breakpoints at the counter and the printf were not hit
I checked the following settings:
Solution Configuration set to Debug
Optimization is Disabled
Generate Debug Info set to Yes
compared the command line of the linker between project 1 (my "converted" version) and project 2 (Win32 Smart Device project), but they are identical -> Update: Actually they were not identical at all. Don't know what I compared the first time, but after I updated the settings it worked fine.
I have installed the following Visual Studio Updates:
SP1
Windows Embedded Compact 7 ATL Update for Visual Studio 2008 SP1 (http://support.microsoft.com/kb/2483802/de)
Visual Studio 2008 update for Windows Embedded Compact 7 (http://support.microsoft.com/kb/2483802/de)
Do I need to change a specific setting? Or do I need to change my approach?
I have mostly done model based software design (Mathworks Embedded Coder, dSPACE Targetlink), so I not familiar with Visual Studio and WEC7 specific characteristics. I would very much appreciate any help.
This solved my Problem:
There were several differences and after I cleaned them up, my project worked fine.
Thx @brightstar
There are several Updates for VS2008 to make it Debug on Windows Embedded Compact 7. Did you install them?
For example there is http://www.microsoft.com/en-us/download/details.aspx?id=11935