- Deprecated:
- Use CConfigurationController/COptionController and CSessionCtrl instead.
This class can be used for downloading executables to the target.
#include <CLoaderController.h>
|
void | addToDownloadList (CDownloadConfigurationSPtr downloadConfig, CLoaderController::DownloadListType listType, const std::string &fileName, const std::string &cmdLineOptions) |
|
void | addToDownloadList (CLoaderController::DownloadListType listType, const std::string &fileName, bool isAbsolutePath, const std::string &options) |
|
void | clearDownloadList (CLoaderController::DownloadListType listType) |
|
| CLoaderController (std::shared_ptr< ConnectionMgr > connectionMgr) |
|
int | download () |
|
int | downloadFromList (CLoaderController::DownloadListType listType, const std::string &fileName, bool isRealTime) |
|
int | downloadFromList (CLoaderController::DownloadListType listType, int fileIndex, bool isRealTime) |
|
int | downloadWithoutCode () |
|
const DownloadListVector | getDownloadList (CLoaderController::DownloadListType listType, bool isAbsolutePath) |
|
int | removeFromDownloadList (CLoaderController::DownloadListType listType, int fileIndex) |
|
int | targetDownload (CDownloadConfiguration::DownloadFileFormats format, const std::string &fileName) |
| This is a specialized version of the more general method targetDownload(CDownloadConfigurationSPtr , const std::string &, const std::string &). More...
|
|
int | targetDownload (CDownloadConfigurationSPtr downloadConfig, const std::string &fileName, const std::string &cmdLineOptions) |
| This method downloads a file in winIDEA's target file list (see Debug / Configure Session / SoCs / Edit / Target Files) without resetting the target and initializing emulation. More...
|
|
void | verifyDownload () |
| Verifies download. More...
|
|
◆ DownloadListType
Identifies which download list to use.
Enumerator |
---|
DLIST_PRIMARY | use the Program Files download list
|
DLIST_TARGET | use the Target Files download list
|
◆ CLoaderController()
isys::CLoaderController::CLoaderController |
( |
std::shared_ptr< ConnectionMgr > |
connectionMgr | ) |
|
- Deprecated:
- Use CConfigurationController/COptionController and CSessionCtrl instead.
Instantiates object.
- Parameters
-
connectionMgr | class which maintains connection to winIDEA. Connection must be established before this call. |
◆ addToDownloadList() [1/2]
- Deprecated:
- Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.
Adds a file to download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit).
- Parameters
-
downloadConfig | download configuration |
listType | selects main or target download list in winIDEA |
fileName | the file to be downloaded |
cmdLineOptions | command line options for download. These options contain settings from the winIDEA advanced download options dialog (Debug / Configure Session / SoCs / Edit / Target Files / Edit / Advanced). To see how to format this string, set the options manually in winIDEA, and then call getDownloadList() and print the options attribute of the returned items. |
Python example: test_add_to_download_list.py
◆ addToDownloadList() [2/2]
void isys::CLoaderController::addToDownloadList |
( |
CLoaderController::DownloadListType |
listType, |
|
|
const std::string & |
fileName, |
|
|
bool |
isAbsolutePath, |
|
|
const std::string & |
options |
|
) |
| |
- Deprecated:
- Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.
Adds a file to download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit).
- Parameters
-
listType | selects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit) |
fileName | name of the file to add |
isAbsolutePath | if true, the specified path is not converted into a workspace relative path |
options | command line options for download. These options contain settings from the winIDEA advanced download options dialog (Debug / Configure Session / SoCs / Edit / Target Files / Edit / Advanced). To see how to format this string, set the options manually in winIDEA, and then call getDownloadList() and print the options attribute of the returned items. |
Python example: test_add_to_download_list.py
◆ clearDownloadList()
- Deprecated:
- Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.
Removes all files from the specified download list.
- Parameters
-
listType | selects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit) |
Python example: test_clear_download_list.py
◆ download()
int isys::CLoaderController::download |
( |
| ) |
|
- Deprecated:
- Use CSessionCtrl::begin_program instead. See examples in Session Control section of the documentation.
Downloads executables to the target. The download files are defined in winIDEA, Debug / Configure Session / SoCs / Edit / Program Files. This method resets the target.
- Returns
- S_OK in case of success, S_FALSE in case of warning (but successful download).
- Exceptions
-
IOException | in case of an error |
Note: this method is superseded by CSessionCtrl::begin_program
◆ downloadFromList() [1/2]
- Deprecated:
- Will not be replaced.
Downloads a file from winIDEA's download list.
- Parameters
-
listType | selects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit) |
fileName | name of the file to download |
isRealTime | if true, real-time access is performed. |
- Returns
- S_OK in case of success, S_FALSE in case of warning (but successful download).
- Exceptions
-
IOException | in case of an error |
◆ downloadFromList() [2/2]
- Deprecated:
- Will not be replaced.
Downloads a file from winIDEA's download list.
- Parameters
-
listType | selects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit) |
fileIndex | index of the file in the list |
isRealTime | if true, real-time access is performed. |
- Returns
- S_OK in case of success, S_FALSE in case of warning (but successful download).
- Exceptions
-
IOException | in case of an error |
◆ downloadWithoutCode()
int isys::CLoaderController::downloadWithoutCode |
( |
| ) |
|
- Deprecated:
- Use CSessionCtrl::begin_reset instead. See examples in Session Control section of the documentation.
Download without code - initialize target and load symbols. The download files are defined in winIDEA, Debug / Configure Session / SoCs / Edit / Program Files.
- Returns
- S_OK in case of success, S_FALSE in case of warning (but successful download).
- Exceptions
-
IOException | in case of an error |
Note: this method is superseded by CSessionCtrl::begin_reset
◆ getDownloadList()
- Deprecated:
- Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.
Gets list of files to be downloaded from winIDEA.
- Parameters
-
listType | selects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit) |
isAbsolutePath | if true, absolute paths are returned |
- Exceptions
-
IOException | in case of an error |
Python example: test_get_download_list.py
◆ removeFromDownloadList()
- Deprecated:
- Use CConfigurationController/COptionController and CSessionCtrl instead. See python example.
Removes the file at the given index from the list.
- Parameters
-
listType | selects main or target download list in winIDEA (see dialog Debug / Configure Session / SoCs / Edit) |
fileIndex | index of file to be removed from the list. |
- Returns
- S_FALSE if there is no file at the given index.
Python example: test_remove_from_download_list.py
◆ targetDownload() [1/2]
This is a specialized version of the more general method targetDownload(CDownloadConfigurationSPtr , const std::string &, const std::string &).
It downloads code and symbols, memory area is not used, no real-time access. It is equivalent to the following code snippet:
CDownloadConfiguration downloadConfig;
downloadConfig.setCodeOffset(0).setSymbolsOffset(0).setDownloadFileFormat(format);
loader.targetDownload(downloadConfig, fileName, "");
- Parameters
-
format | format of the download file |
fileName | the file to be downloaded |
- Returns
- S_OK in case of success, S_FALSE in case of warning (but successful download).
- Exceptions
-
IOException | in case of an error |
◆ targetDownload() [2/2]
int isys::CLoaderController::targetDownload |
( |
CDownloadConfigurationSPtr |
downloadConfig, |
|
|
const std::string & |
fileName, |
|
|
const std::string & |
cmdLineOptions |
|
) |
| |
This method downloads a file in winIDEA's target file list (see Debug / Configure Session / SoCs / Edit / Target Files) without resetting the target and initializing emulation.
- Parameters
-
downloadConfig | download configuration |
fileName | the file to be downloaded |
cmdLineOptions | command line options for download. These options contain settings from the winIDEA advanced download options dialog (Debug / Configure Session / SoCs / Edit / Target Files / Edit / Advanced). To see how to format this string, set the options manually in winIDEA, and then call getDownloadList() and print the options attribute of the returned items. |
- Returns
- S_OK in case of success, S_FALSE in case of warning (but successful download).
- Exceptions
-
IOException | in case of an error |
◆ verifyDownload()
void isys::CLoaderController::verifyDownload |
( |
| ) |
|
Verifies download.
- Exceptions
-
IOException | if verification can not be performed |
IllegalStateException | if verification detects error in download |