Skip to content

Commit 7a97f48

Browse files
committed
Tools: Ensure vtor reserved bits are all 0
### Description The VTOR reserves the lowest 7 bits. This PR changes the round up behavoir of the application offset to make sure that the address used for the in-flash vector table always ends in 7 0's. Fixes #7392 ### Pull request type [x] Fix [ ] Refactor [ ] Target update [ ] Functionality change [ ] Breaking change
1 parent 45f59f8 commit 7a97f48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/config/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def _make_header_region(self, start, header_format, offset=None):
684684
size = self._header_size(header_format)
685685
region = Region("header", start, size, False, None)
686686
start += size
687-
start = ((start + 7) // 8) * 8
687+
start = ((start + (2**7 - 1)) // (2**7)) * (2**7)
688688
return (start, region)
689689

690690
@staticmethod

0 commit comments

Comments
 (0)