Skip to content

Commit

Permalink
target/esp: change seek semihosting pos argument to int
Browse files Browse the repository at this point in the history
  • Loading branch information
sobuch committed Jan 22, 2025
1 parent b1c1368 commit 8e3ec5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/target/espressif/esp_semihosting.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,13 @@ int esp_semihosting_post_reset(struct target *target)
return clean_dir_map_list(target);
}

static int esp_semihosting_sys_seek(struct target *target, uint64_t fd, uint32_t pos, size_t whence)
static int esp_semihosting_sys_seek(struct target *target, uint64_t fd, int pos, size_t whence)
{
struct semihosting *semihosting = target->semihosting;

semihosting->result = lseek(fd, pos, whence);
semihosting->sys_errno = errno;
LOG_TARGET_DEBUG(target, "lseek(%" PRIx64 ", %" PRIu32 " %" PRId64 ")=%d", fd, pos, semihosting->result, errno);
LOG_TARGET_DEBUG(target, "lseek(%" PRIx64 ", %" PRId32 " %" PRId64 ")=%d", fd, pos, semihosting->result, errno);
return ERROR_OK;
}

Expand Down
1 change: 0 additions & 1 deletion testing/esp/test_semihost.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ def test_semihost_rw(self):
self.assertTrue(filecmp.cmp(self.fout_names[i], self.fin_names[i]))

@only_for_arch(['xtensa'])
@skip_for_chip_and_ver(['5.3', '5.4', 'latest'], ['esp32'], "skipped - OCD-1051")
def test_semihost_args(self):
"""
This test checks that semihosting syscalls working properly with wrong argumented functions
Expand Down

0 comments on commit 8e3ec5e

Please sign in to comment.