[ECOS] Atmel DataFlash Driver and EB55

Andrew Lunn andrew@lunn.ch
Wed Oct 6 11:13:00 GMT 2004


On Wed, Oct 06, 2004 at 12:49:56PM +0200, Sebastian Block wrote:
> RAM: 0x04000000-0x04200000, [0x0401cd88-0x04200000] available
> FLASH: 0x01000000 - 0x003fffff 64 x 0x10000 blocks
> RedBoot>
> 

I fixed a bug in this bit of code recently and inserted a new bug :-(

Attached is a patch.

        Andrew

        
-------------- next part --------------
Index: io/flash/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/flash/current/ChangeLog,v
retrieving revision 1.38.2.9
diff -u -r1.38.2.9 ChangeLog
--- io/flash/current/ChangeLog	30 Sep 2004 18:09:20 -0000	1.38.2.9
+++ io/flash/current/ChangeLog	6 Oct 2004 10:58:12 -0000
@@ -1,3 +1,8 @@
+2004-10-06  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* src/legacy_dev.c (legacy_flash_init): The end is the size plus
+	the start.
+
 2004-09-30  Savin Zlobec <savin@elatec.si>
 
 	* src/flash.c: Offset into the block is not calculated correctly
Index: io/flash/current/src/legacy_dev.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/flash/current/src/Attic/legacy_dev.c,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 legacy_dev.c
--- io/flash/current/src/legacy_dev.c	30 Sep 2004 18:09:21 -0000	1.1.2.3
+++ io/flash/current/src/legacy_dev.c	6 Oct 2004 10:58:12 -0000
@@ -92,7 +92,7 @@
 
   if (!err) {
     dev->start = (cyg_flashaddr_t)flash_info.start;
-    dev->end = flash_info.block_size * flash_info.blocks - 1; 
+    dev->end = dev->start + flash_info.block_size * flash_info.blocks - 1; 
     dev->num_block_infos = 1;
     dev->block_info = block_info;
     block_info[0].block_size = flash_info.block_size;

-------------- next part --------------
-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


More information about the Ecos-discuss mailing list