@@ -242,6 +242,24 @@ struct ContextTypesItem {
242242 BoolMap missingTargetTypes;
243243};
244244
245+ /* *
246+ * @brief debugger type
247+ * name of debug configuration
248+ * brief description
249+ * debug protocol (jtag or swd)
250+ * debug clock speed
251+ * debug configuration file
252+ * start pname
253+ */
254+ struct DebuggerType {
255+ std::string name;
256+ std::string info;
257+ std::string protocol;
258+ std::optional<unsigned long long > clock;
259+ std::string dbgconf;
260+ std::string startPname;
261+ };
262+
245263/* *
246264 * @brief project context item containing
247265 * pointer to csolution,
@@ -297,9 +315,10 @@ struct ContextTypesItem {
297315 * vector of device books
298316 * vector of board books
299317 * additional memory
300- * debuggers
318+ * debugger
301319 * default dbgconf
302- * loads
320+ * images
321+ * selected target-set
303322*/
304323struct ContextItem {
305324 CdefaultItem* cdefault = nullptr ;
@@ -362,9 +381,10 @@ struct ContextItem {
362381 std::vector<BookItem> deviceBooks;
363382 std::vector<BookItem> boardBooks;
364383 std::vector<MemoryItem> memory;
365- std::vector<DebuggerItem> debuggers ;
384+ DebuggerType debugger ;
366385 std::pair<std::string, RteFileInstance*> dbgconf;
367- std::vector<LoadItem> loads;
386+ std::vector<ImageItem> images;
387+ std::string targetSet;
368388};
369389
370390/* *
@@ -486,6 +506,14 @@ class ProjMgrWorker {
486506 */
487507 bool ListContexts (std::vector<std::string>& contexts, const std::string& filter = RteUtils::EMPTY_STRING, const bool ymlOrder = false );
488508
509+ /* *
510+ * @brief list target-sets
511+ * @param reference to list of target-sets
512+ * @param filter words to filter results
513+ * @return true if executed successfully
514+ */
515+ bool ListTargetSets (std::vector<std::string>& targetSets, const std::string& filter = RteUtils::EMPTY_STRING);
516+
489517 /* *
490518 * @brief list generators of a given context
491519 * @param reference to list of generators
@@ -662,12 +690,14 @@ class ProjMgrWorker {
662690 /* *
663691 * @brief parse context selection
664692 * @param contexts pattern (wildcards are allowed)
665- * @param context replacement pattern (wildcards are allowed)
693+ * @param check cbuildset flag (default false)
694+ * @param active target-set (default empty)
666695 * @return true if executed successfully
667696 */
668697 bool ParseContextSelection (
669698 const std::vector<std::string>& contextSelection,
670- const bool checkCbuildSet = false );
699+ const bool checkCbuildSet = false ,
700+ const std::string activeTargetSet = std::string());
671701
672702 /* *
673703 * @brief get the list of selected contexts
@@ -832,6 +862,8 @@ class ProjMgrWorker {
832862 StrVec m_selectableCompilers;
833863 bool m_undefCompiler = false ;
834864 std::map<std::string, FileNode> m_missingFiles;
865+ std::string m_activeTargetType;
866+ TargetSetItem m_activeTargetSet;
835867
836868 bool LoadPacks (ContextItem& context);
837869 bool CheckMissingPackRequirements (const std::string& contextName);
@@ -859,7 +891,7 @@ class ProjMgrWorker {
859891 bool ProcessConfigFiles (ContextItem& context);
860892 bool ProcessComponentFiles (ContextItem& context);
861893 bool ProcessDebuggers (ContextItem& context);
862- bool ProcessLoads (ContextItem& context);
894+ bool ProcessImages (ContextItem& context);
863895 bool ProcessExecutes (ContextItem& context, bool solutionLevel = false );
864896 bool ProcessGroups (ContextItem& context);
865897 bool ProcessSequencesRelatives (ContextItem& context, bool rerun);
@@ -941,6 +973,8 @@ class ProjMgrWorker {
941973 StrVec CollectSelectableCompilers ();
942974 void ProcessTmpDir (std::string& tmpdir, const std::string& base);
943975 bool IsCreatedByExecute (const std::string file, const std::string dir);
976+ bool ParseTargetSetContextSelection (const std::string& activeTargetSet);
977+ bool GetActiveTargetSet (const std::string& activeTargetSet);
944978};
945979
946980#endif // PROJMGRWORKER_H
0 commit comments