From 7b5a8ebc799a5d9486db4c2d89670b7ac7a236b4 Mon Sep 17 00:00:00 2001 From: arighi Date: Wed, 26 May 2010 13:36:32 +0000 Subject: [PATCH] lm3s: fix flash_lm3s_seek() end position. The current position of the flash is stored internally using the absolute memory address, so KSM_SEEK_END should sum the flash base address (FLASH_BASE) to the flash size. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3838 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/cortex-m3/drv/flash_lm3s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bertos/cpu/cortex-m3/drv/flash_lm3s.c b/bertos/cpu/cortex-m3/drv/flash_lm3s.c index 9d2baf9d..1bebb535 100644 --- a/bertos/cpu/cortex-m3/drv/flash_lm3s.c +++ b/bertos/cpu/cortex-m3/drv/flash_lm3s.c @@ -189,7 +189,7 @@ static kfile_off_t flash_lm3s_seek(struct KFile *_fd, kfile_off_t offset, KSeekM seek_pos = FLASH_BASE; break; case KSM_SEEK_END: - seek_pos = fd->fd.size; + seek_pos = FLASH_BASE + fd->fd.size; break; case KSM_SEEK_CUR: seek_pos = fd->fd.seek_pos; -- 2.25.1