I need to debug an application for an embedded device. A problem with this application might be timing related so I try to decrease the speed of execution on my development machine.
I have a setup which is quite useful but needs a little tweaking for convenience, basically I followed the advice given here:
https://blogs.msdn.microsoft.com/vijaysk/2012/10/26/tools-to-simulate-cpu-memory-disk-load/
Linked in the article there is the tool "CPUSTRES.exe" which generates high CPU usage. To prevent the tool to eat up all my CPU I start it like so (the tool will only run on the 8th core):
START "Stress" /affinity 0x80 /HIGH CPUSTRES.EXE
Then I start the debugging session in the Qt Creator (version 4.1.0). Using the windows task manager I can set the same processor affinity for the application as the stress tool has. Doing so gives me an app that more or less sluggish like on the embedded device but the debugger and all other apps behave nicely.
I find it a little inconvenient to set the affinity in the task manager manually. I want this application always only on the same single core. This is only for debugging purposes, so would not like to change this in code. How can I achieve that?