Skip to content

Commit

Permalink
trunner: pass not aligned size to plo alias cmd
Browse files Browse the repository at this point in the history
JIRA: CI-276

It's not needed, applied after the corresponding change in plo scripts used in project
  • Loading branch information
damianloew committed May 22, 2023
1 parent 2af9212 commit 9d58c96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trunner/target/armv7m4.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, dut: Dut, apps: Sequence[AppOptions], gdb: GdbInteractive):
self.ram_addr = 0x20000000
self.page_sz = 0x200

def _app_size(self, path: Path):
def _aligned_app_size(self, path: Path):
sz = path.stat().st_size
# round up to the size of the page
offset = (self.page_sz - sz) % self.page_sz
Expand All @@ -79,7 +79,7 @@ def __call__(self):

for app in self.apps:
path = self.gdb.cwd / Path(app.file)
sz = self._app_size(path)
sz = self._aligned_app_size(path)

self.gdb.load(path, self.ram_addr + offset)
offset += sz
Expand All @@ -93,12 +93,12 @@ def __call__(self):
offset = self.load_offset
for app in self.apps:
path = self.gdb.cwd / Path(app.file)
sz = self._app_size(path)
sz = path.stat().st_size

self.alias(app.file, offset=offset, size=sz)
self.app("ramdev", app.file, "ram", "ram")

offset += sz
offset += self._aligned_app_size(path)


class fdspawncustom(pexpect.fdpexpect.fdspawn):
Expand Down

0 comments on commit 9d58c96

Please sign in to comment.