From: Wolfgang Denk Date: Fri, 12 May 2006 14:21:05 +0200 Subject: [U-Boot-Users] Intel P30, HowTo? In-Reply-To: Your message of "Fri, 12 May 2006 10:37:31 +0200." <20060512083731.GB18479@ku-gbr.de> Message-ID: <20060512122105.DF25B352B2A@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Konstatntin, [Please keep the list on Cc: - thanks.] In message <20060512083731.GB18479@ku-gbr.de> you wrote: > > > Are you sure that your board configuration is OK? Checked your > > CFG_MAX_FLASH_SECT definiton? > > ARGH! The value was too less. Yeah, the symptoms looked like writing out of the bounds of the array. > Now it unlocks erases and programs the flash fine so far. > But what is this variable for? It defines the size of the array which holds the flash information. It's statically allocated. > flinfo gets the right capacity and number of sectors automatically. When I wrote that code I decided to use a static array because this results in a smaller code size... Not a big issue on most boards, but a piece of the puzzle on a few. > Is it harmful the variable being too big? I have You waste a little memory, that's all. > CFG_MAX_FLASH_SECT set to 266 now, because I don't now the number of > sectors of p30 flash exactly... Look it up in the data sheet! Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Probably the best operating system in the world is the [operating system] made for the PDP-11 by Bell Laboratories." - Ted Nelson, October 1977