I find a very simple solution.
(1) After building, start the application via debug. The application will be suspended at the first code in main() by a breakpoint.
(2) Start communication in FreeMASTER.
(3) Disable all breakpoints, application begins to run.
Can this solution meet my requirement?