EasyManua.ls Logo

STC micro STC8A8K64D4 Series - Page 871

Default Icon
901 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
STC8A8K64D4 Series Manual
- 855 -
Appendix N Use a third-party application program to
call the STC release project program to download the
ISP of the MCU
The release project program generated by STC's ISP download software is an executable EXE format file. The
user can directly double-click the released project program to run it for ISP download, or call the release project program
in a third-party application for ISP download. Two methods of calling are introduced below.
Simple call
In the third-party application, it is only a simple process of creating and publishing the project program. All other
download operations are carried out in the publishing project program. The third-party application only needs to wait
for the completion of the publishing project program and clean the scene.
VC code
BOOL IspProcess()
{
// define related variables
STARTUPINFO si;
PROCESS_INFORMATION pi;
CString path;
// Full path of publishing project program
path = _T("D:\\Work\\Upgrade.exe");
// variable initialization
memset(&si, 0, sizeof(STARTUPINFO));
memset(&pi, 0, sizeof(PROCESS_INFORMATION));
// Set startup variables
si.cb = sizeof(STARTUPINFO);
GetStartupInfo(&si);
si.wShowWindow = SW_SHOWNORMAL;
si.dwFlags = STARTF_USESHOWWINDOW;
// Create Publish Project Program Process
if (CreateProcess(NULL, (LPTSTR)(LPCTSTR)path, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
{
// Wait for the publish project program operation to complete
// Since the main process will be blocked here, it is recommended to create a new working process and wait in the worker
process
WaitForSingleObject(pi.hProcess,INFINITE);

Table of Contents

Related product manuals