Skip to content

Commit 24bcdbd

Browse files
authored
Merge branch 'main' into support-for-tiarmclang-toolchain
2 parents 5ed4c60 + a181b9f commit 24bcdbd

File tree

5 files changed

+31
-17
lines changed

5 files changed

+31
-17
lines changed

.github/workflows/buildmgr.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ jobs:
365365
submodules: true
366366

367367
- name: Cache ARM GCC
368-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
368+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
369369
with:
370370
key: "${{ matrix.arm_gcc_install_base }}/${{ matrix.installer_name }}"
371371
path: ${{ matrix.installer_name }}
@@ -388,7 +388,7 @@ jobs:
388388
unzip -o $Env:installer_name
389389
390390
- name: Cache CMSIS Pack
391-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
391+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
392392
env:
393393
CACHE_NAME: cmsis_pack
394394
with:
@@ -514,7 +514,7 @@ jobs:
514514
run: mkdir build
515515

516516
- name: Cache ARM GCC
517-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
517+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
518518
with:
519519
key: "${{ env.arm_gcc_install_base }}/${{ env.installer_name }}"
520520
path: ${{ env.installer_name }}
@@ -525,7 +525,7 @@ jobs:
525525
tar -xvf ${{ env.installer_name }}
526526
527527
- name: Cache CMSIS Pack
528-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
528+
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
529529
env:
530530
CACHE_NAME: cmsis_pack
531531
with:

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
submodules: true
4040

4141
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
42+
uses: github/codeql-action/init@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
4343
with:
4444
languages: cpp
4545
queries: security-and-quality
@@ -55,4 +55,4 @@ jobs:
5555
working-directory: ./build
5656

5757
- name: Perform CodeQL Analysis
58-
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
58+
uses: github/codeql-action/analyze@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ jobs:
7070

7171
# Upload the results to GitHub's code scanning dashboard.
7272
- name: "Upload to code-scanning"
73-
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
73+
uses: github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
7474
with:
7575
sarif_file: results.sarif

tools/projmgr/include/ProjMgrWorker.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,15 @@ enum class MessageType {
374374
Error
375375
};
376376

377+
/**
378+
* @brief Process Board/Device
379+
*/
380+
enum class BoardOrDevice {
381+
Both,
382+
None,
383+
SkipDevice,
384+
};
385+
377386
/**
378387
* @brief projmgr worker class responsible for processing requests and orchestrating parser and generator calls
379388
*/
@@ -802,10 +811,10 @@ class ProjMgrWorker {
802811
bool GetProjectSetup(ContextItem& context);
803812
bool InitializeTarget(ContextItem& context);
804813
bool SetTargetAttributes(ContextItem& context, std::map<std::string, std::string>& attributes);
805-
bool ProcessPrecedences(ContextItem& context, bool processDevice = false, bool rerun = false);
814+
bool ProcessPrecedences(ContextItem& context, BoardOrDevice process = BoardOrDevice::None, bool rerun = false);
806815
bool ProcessPrecedence(StringCollection& item);
807816
bool ProcessCompilerPrecedence(StringCollection& item, bool acceptRedefinition = false);
808-
bool ProcessDevice(ContextItem& context);
817+
bool ProcessDevice(ContextItem& context, BoardOrDevice process = BoardOrDevice::Both);
809818
bool ProcessDevicePrecedence(StringCollection& item);
810819
bool ProcessBoardPrecedence(StringCollection& item);
811820
bool ProcessToolchain(ContextItem& context);

tools/projmgr/src/ProjMgrWorker.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,7 +1182,7 @@ ConnectionsValidationResult ProjMgrWorker::ValidateConnections(ConnectionsCollec
11821182
return { result, conflicts, overflows, incompatibles, missedCollections, activeConnectMap };
11831183
}
11841184

1185-
bool ProjMgrWorker::ProcessDevice(ContextItem& context) {
1185+
bool ProjMgrWorker::ProcessDevice(ContextItem& context, BoardOrDevice process) {
11861186
DeviceItem deviceItem;
11871187
GetDeviceItem(context.device, deviceItem);
11881188
if (context.board.empty() && deviceItem.name.empty()) {
@@ -1256,6 +1256,11 @@ bool ProjMgrWorker::ProcessDevice(ContextItem& context) {
12561256
context.targetAttributes["Brevision"] = matchedBoard->GetRevision();
12571257
context.targetAttributes["Bversion"] = matchedBoard->GetRevision(); // deprecated
12581258

1259+
if (matchedBoard && process == BoardOrDevice::SkipDevice) {
1260+
// skip device processing
1261+
return true;
1262+
}
1263+
12591264
// find device from the matched board
12601265
matchedBoard->GetMountedDevices(mountedDevices);
12611266
if (mountedDevices.size() > 1 && deviceItem.name.empty()) {
@@ -2615,7 +2620,7 @@ bool ProjMgrWorker::ProcessCompilerPrecedence(StringCollection& item, bool accep
26152620
}
26162621

26172622

2618-
bool ProjMgrWorker::ProcessPrecedences(ContextItem& context, bool processDevice, bool rerun) {
2623+
bool ProjMgrWorker::ProcessPrecedences(ContextItem& context, BoardOrDevice process, bool rerun) {
26192624
// Notes: defines, includes and misc are additive. All other keywords overwrite previous settings.
26202625
// The target-type and build-type definitions are additive, but an attempt to
26212626
// redefine an already existing type results in an error.
@@ -2726,7 +2731,7 @@ bool ProjMgrWorker::ProcessPrecedences(ContextItem& context, bool processDevice,
27262731
}
27272732

27282733
// Process device and board
2729-
if (processDevice && !ProcessDevice(context)) {
2734+
if (process != BoardOrDevice::None && !ProcessDevice(context, process)) {
27302735
CheckMissingPackRequirements(context.name);
27312736
error |= true;
27322737
}
@@ -3313,7 +3318,7 @@ bool ProjMgrWorker::ProcessSequenceRelative(ContextItem& context, string& item,
33133318
if (!refContext.rteActiveTarget && !LoadPacks(refContext)) {
33143319
return false;
33153320
}
3316-
if (!ProcessPrecedences(refContext, true)) {
3321+
if (!ProcessPrecedences(refContext, BoardOrDevice::Both)) {
33173322
return false;
33183323
}
33193324
}
@@ -3650,7 +3655,7 @@ bool ProjMgrWorker::ProcessContext(ContextItem& context, bool loadGenFiles, bool
36503655
bool ret = true;
36513656
ret &= LoadPacks(context);
36523657
context.rteActiveProject->SetAttribute("update-rte-files", updateRteFiles ? "1" : "0");
3653-
if (!ProcessPrecedences(context, true)) {
3658+
if (!ProcessPrecedences(context, BoardOrDevice::Both)) {
36543659
return false;
36553660
}
36563661
if (!SetTargetAttributes(context, context.targetAttributes)) {
@@ -3880,7 +3885,7 @@ bool ProjMgrWorker::ListComponents(vector<string>& components, const string& fil
38803885
return false;
38813886
}
38823887
if (!selectedContext.empty()) {
3883-
if (!ProcessPrecedences(context, true)) {
3888+
if (!ProcessPrecedences(context, BoardOrDevice::Both)) {
38843889
return false;
38853890
}
38863891
}
@@ -4093,7 +4098,7 @@ bool ProjMgrWorker::ListLayers(vector<string>& layers, const string& clayerSearc
40934098
}
40944099
} else {
40954100
// process precedences and device/board
4096-
if (!ProcessPrecedences(context, true)) {
4101+
if (!ProcessPrecedences(context, BoardOrDevice::SkipDevice)) {
40974102
failedContexts.insert(selectedContext);
40984103
error |= true;
40994104
continue;
@@ -5003,7 +5008,7 @@ bool ProjMgrWorker::ProcessGeneratedLayers(ContextItem& context) {
50035008
return false;
50045009
}
50055010
}
5006-
if (!ProcessPrecedences(context, true, true)) {
5011+
if (!ProcessPrecedences(context, BoardOrDevice::Both, true)) {
50075012
return false;
50085013
}
50095014
if (!ProcessGroups(context)) {

0 commit comments

Comments
 (0)