Skip to content

Commit e222bdc

Browse files
[packchk] added implicit eXecute attribute when checking for deprecated IRAMx / IROMx (#1195)
1 parent cd95e0d commit e222bdc

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

tools/packchk/src/ValidateSemantic.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,13 @@ bool ValidateSemantic::CheckMemories(RteDeviceItem* device)
277277
}
278278
}
279279

280-
// Check startup attribute
280+
// Check startup attribute
281281
if(startup == "1") {
282282
rxRegionWithStartup.push_back(memory);
283-
if(access.find_first_of("x") == string::npos) {
284-
LogMsg("M608", NAME(memoryName), ATTR("startup"), VALUE("1"), ATTR2("access"), VALUE2("x"), lineNo);
283+
if(id.find("IROM") != 0 && id.find("IRAM") != 0) { // no deprecated IRAM / IROM which have eXecute implicitly set
284+
if(access.find_first_of("x") == string::npos) {
285+
LogMsg("M608", NAME(memoryName), ATTR("startup"), VALUE("1"), ATTR2("access"), VALUE2("x"), lineNo);
286+
}
285287
}
286288
}
287289
}

tools/packchk/test/data/MemoryAttributes/TestVendor.MemoryAttributes.pdsc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@
4242
The TestSubFamily is ...
4343
</description>
4444

45+
<!-- ************************* TestDeviceOk, old IDs ************************ -->
46+
<device Dname="TestDeviceOkOldIDs">
47+
<processor Dcore="Cortex-M4" DcoreVersion="r0p1" Dfpu="SP_FPU" Dmpu="MPU" Ddsp="NO_DSP" Dendian="Little-endian" Dclock="204000000"/>
48+
<memory id="IROM1" start="0x08000000" size="0x00010000" default="1" startup="1"/>
49+
<memory id="IROM2" start="0x09000000" size="0x00010000" default="0" />
50+
<memory id="IRAM1" start="0x10000000" size="0x00010000" default="1" />
51+
<memory id="IRAM2" start="0x20000000" size="0x00010000" default="0" />
52+
</device>
53+
4554
<!-- ****************************** TestDeviceOk ***************************** -->
4655
<device Dname="TestDeviceOk">
4756
<processor Dcore="Cortex-M4" DcoreVersion="r0p1" Dfpu="SP_FPU" Dmpu="MPU" Ddsp="NO_DSP" Dendian="Little-endian" Dclock="204000000"/>

0 commit comments

Comments
 (0)