public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Error: end address not on sector boundary
@ 2006-06-04 18:22 Hurricane555
  2006-06-06  7:17 ` Wolfgang Denk
  0 siblings, 1 reply; 9+ messages in thread
From: Hurricane555 @ 2006-06-04 18:22 UTC (permalink / raw)
  To: u-boot


Hello I?m using a Am29LV160B FLASH with a size of 4MB. My problem is, that I
can?t using the option saveenv. Writing and deleteting of FLASH is no
problem.

My settings are follows:

....


#define PHYS_FLASH_SIZE		0x000400000 /* 4 MB */
#define CFG_MAX_FLASH_SECT	(35)	/* max number of sectors on one chip */
#define CFG_MAX_FLASH_BANKS 1 /* Max # of flash banks */
#define CFG_ENV_ADDR		(CFG_FLASH_BASE) /* addr of environment*/
//#undef  CFG_FLASH_CHECKSUM
#define CFG_FLASH_ERASE_TOUT    1024000 /* Flash Erase Timeout (ms) */
#define CFG_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (ms) */



#define CFG_ENV_IS_IN_FLASH         1
#define ENV_IS_EMBEDDED
//#define CFG_ENV_IS_NOWHERE
#define CFG_ENV_OFFSET          0x8000  /* Offset of the Environment Sector  
*/
#define CFG_ENV_SIZE            0x4000  /* Size of the Environment Sector   
*/

....


What I?m doing wrong?
--
View this message in context: http://www.nabble.com/Error%3A-end-address-not-on-sector-boundary-t1731654.html#a4705029
Sent from the Uboot - Users forum at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] Error: end address not on sector boundary
  2006-06-04 18:22 [U-Boot-Users] Error: end address not on sector boundary Hurricane555
@ 2006-06-06  7:17 ` Wolfgang Denk
  2006-06-06  7:47   ` Hurricane555
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2006-06-06  7:17 UTC (permalink / raw)
  To: u-boot

In message <4705029.post@talk.nabble.com> you wrote:
> CkhlbGxvIEnCtG0gdXNpbmcgYSBBbTI5TFYxNjBCIEZMQVNIIHdpdGggYSBzaXplIG9mIDRNQi4g
>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dGhlIEVudmlyb25tZW50IFNlY3RvciAg
> IAoqLwoKLi4uLgoKCldoYXQgScK0bSBkb2luZyB3cm9uZz8KLS0KVmlldyB0aGlzIG1lc3NhZ2Ug
> aW4gY29udGV4dDogaHR0cDovL3d3dy5uYWJibGUuY29tL0Vycm9yJTNBLWVuZC1hZGRyZXNzLW5v
> dC1vbi1zZWN0b3ItYm91bmRhcnktdDE3MzE2NTQuaHRtbCNhNDcwNTAyOQpTZW50IGZyb20gdGhl
> IFVib290IC0gVXNlcnMgZm9ydW0gYXQgTmFiYmxlLmNvbS4KCgoKX19fX19fX19fX19fX19fX19f
> X19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVS1Cb290LVVzZXJzIG1haWxpbmcgbGlzdApV
> LUJvb3QtVXNlcnNAbGlzdHMuc291cmNlZm9yZ2UubmV0Cmh0dHBzOi8vbGlzdHMuc291cmNlZm9y
> Z2UubmV0L2xpc3RzL2xpc3RpbmZvL3UtYm9vdC11c2Vycwo=
> 

Please do not send base 64 encoded messages.

Please do not send HTML messages.

Please send plain text only.

Message unreadable, ignored. Sorry.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] Error: end address not on sector boundary
  2006-06-06  7:17 ` Wolfgang Denk
@ 2006-06-06  7:47   ` Hurricane555
  2006-06-06 12:09     ` Joao, Nuno
  0 siblings, 1 reply; 9+ messages in thread
From: Hurricane555 @ 2006-06-06  7:47 UTC (permalink / raw)
  To: u-boot


Now I changed my settings as follows:


#define PHYS_FLASH_SIZE		0x000400000 /* 4 MB */
#define CFG_MAX_FLASH_SECT	(35)	/* max number of sectors on one chip */
#define CFG_MAX_FLASH_BANKS 1 /* Max # of flash banks */
#define CFG_ENV_ADDR		(CFG_FLASH_BASE) /* addr of environment*/
//#undef  CFG_FLASH_CHECKSUM
#define CFG_FLASH_ERASE_TOUT    1024000 /* Flash Erase Timeout (ms) */
#define CFG_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (ms) */



#define CFG_ENV_IS_IN_FLASH         1
#define ENV_IS_EMBEDDED
//#define CFG_ENV_IS_NOWHERE
#define CFG_ENV_OFFSET          0x8000  /* Offset of the Environment Sector  
*/
#define CFG_ENV_SIZE            0x2000  /* Size of the Environment Sector   
*/

Now I can make saveenv, but after restart the bootloader is damaged!

--
View this message in context: http://www.nabble.com/Error%3A-end-address-not-on-sector-boundary-t1731654.html#a4728893
Sent from the Uboot - Users forum at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] Error: end address not on sector boundary
@ 2006-06-06 12:09     ` Joao, Nuno
  2006-06-06 16:47       ` Hurricane555
  0 siblings, 1 reply; 9+ messages in thread
From: Joao, Nuno @ 2006-06-06 12:09 UTC (permalink / raw)
  To: u-boot

> From: u-boot-users-bounces at lists.sourceforge.net 
> [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf 
> Of Hurricane555
> Sent: ter?a-feira, 6 de Junho de 2006 8:48
> To: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] Error: end address not on sector boundary
> 
> 
> Now I changed my settings as follows:
> 
> 
> #define PHYS_FLASH_SIZE		0x000400000 /* 4 MB */
> ...


	This is mine:

#define CFG_ENV_IS_IN_FLASH     1
#define CFG_ENV_SECT_SIZE       0x40000     /* 256K (one sector) for env */
#define CFG_ENV_SIZE            CFG_ENV_SECT_SIZE
#define CFG_ENV_ADDR            0xffe00000

	I have a 256KB sized-sector flash, u-boot (512KB) at 0xFFF80000 
	(at the end of flash) and the environment at 0xFFE00000 (1 sector).


> Now I can make saveenv, but after restart the bootloader is damaged!

	This probably means that you're setting your environment to
	overlap u-boot's flash area. Check your memory map and (re-)read
	the file README in u-boot's root directory about the environment's
	configuration defines.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] Error: end address not on sector boundary
  2006-06-06 12:09     ` Joao, Nuno
@ 2006-06-06 16:47       ` Hurricane555
  2006-06-06 16:57         ` Jerry Van Baren
  0 siblings, 1 reply; 9+ messages in thread
From: Hurricane555 @ 2006-06-06 16:47 UTC (permalink / raw)
  To: u-boot



Nuno Jo?o (Ext_NBS) wrote:
> 
>> From: u-boot-users-bounces at lists.sourceforge.net 
>> [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf 
>> Of Hurricane555
>> Sent: ter?a-feira, 6 de Junho de 2006 8:48
>> To: u-boot-users at lists.sourceforge.net
>> Subject: Re: [U-Boot-Users] Error: end address not on sector boundary
>> 
>> 
>> Now I changed my settings as follows:
>> 
>> 
>> #define PHYS_FLASH_SIZE		0x000400000 /* 4 MB */
>> ...
> 
> 
> 	This is mine:
> 
> #define CFG_ENV_IS_IN_FLASH     1
> #define CFG_ENV_SECT_SIZE       0x40000     /* 256K (one sector) for env
> */
> #define CFG_ENV_SIZE            CFG_ENV_SECT_SIZE
> #define CFG_ENV_ADDR            0xffe00000
> 
> 	I have a 256KB sized-sector flash, u-boot (512KB) at 0xFFF80000 
> 	(at the end of flash) and the environment at 0xFFE00000 (1 sector).
> 
> 
>> Now I can make saveenv, but after restart the bootloader is damaged!
> 
> 	This probably means that you're setting your environment to
> 	overlap u-boot's flash area. Check your memory map and (re-)read
> 	the file README in u-boot's root directory about the environment's
> 	configuration defines.
> 
> 
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 
> 

Hmmmm.... I see what my mistake was! 
My ENV was on the same address like U-BOOT!


U-BOOT is now on address 50000000. The ENV on 50010000!

I checked this address and I was clear! No data was on it, so I thougt I
could use the section for my ENV. But when I make saveenv the bootloader is
dead!? Why?
--
View this message in context: http://www.nabble.com/Error%3A-end-address-not-on-sector-boundary-t1731654.html#a4736940
Sent from the Uboot - Users forum at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] Error: end address not on sector boundary
  2006-06-06 16:47       ` Hurricane555
@ 2006-06-06 16:57         ` Jerry Van Baren
  2006-06-06 17:14           ` Hurricane555
  0 siblings, 1 reply; 9+ messages in thread
From: Jerry Van Baren @ 2006-06-06 16:57 UTC (permalink / raw)
  To: u-boot

Hurricane555 wrote:
> 
> Nuno Jo?o (Ext_NBS) wrote:
>>> From: u-boot-users-bounces at lists.sourceforge.net 
>>> [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf 
>>> Of Hurricane555
>>> Sent: ter?a-feira, 6 de Junho de 2006 8:48
>>> To: u-boot-users at lists.sourceforge.net
>>> Subject: Re: [U-Boot-Users] Error: end address not on sector boundary
>>>
>>>
>>> Now I changed my settings as follows:
>>>
>>>
>>> #define PHYS_FLASH_SIZE		0x000400000 /* 4 MB */
>>> ...
>>
>> 	This is mine:
>>
>> #define CFG_ENV_IS_IN_FLASH     1
>> #define CFG_ENV_SECT_SIZE       0x40000     /* 256K (one sector) for env
>> */
>> #define CFG_ENV_SIZE            CFG_ENV_SECT_SIZE
>> #define CFG_ENV_ADDR            0xffe00000
>>
>> 	I have a 256KB sized-sector flash, u-boot (512KB) at 0xFFF80000 
>> 	(at the end of flash) and the environment at 0xFFE00000 (1 sector).
>>
>>
>>> Now I can make saveenv, but after restart the bootloader is damaged!
>> 	This probably means that you're setting your environment to
>> 	overlap u-boot's flash area. Check your memory map and (re-)read
>> 	the file README in u-boot's root directory about the environment's
>> 	configuration defines.
>>
>>
>> _______________________________________________
>> U-Boot-Users mailing list
>> U-Boot-Users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>>
>>
> 
> Hmmmm.... I see what my mistake was! 
> My ENV was on the same address like U-BOOT!
> 
> 
> U-BOOT is now on address 50000000. The ENV on 50010000!
> 
> I checked this address and I was clear! No data was on it, so I thougt I
> could use the section for my ENV. But when I make saveenv the bootloader is
> dead!? Why?

According to the above, your sector size is 0x40000 (256K) but you 
stored your ENV at u-boot + 0x10000 (64K) which is in the same sector as 
u-boot.  When you erased your ENV area, you inadvertently erased u-boot 
as well since it is all in one sector.

gvb

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] Error: end address not on sector boundary
  2006-06-06 16:57         ` Jerry Van Baren
@ 2006-06-06 17:14           ` Hurricane555
  2006-06-08  6:38             ` Hurricane555
  0 siblings, 1 reply; 9+ messages in thread
From: Hurricane555 @ 2006-06-06 17:14 UTC (permalink / raw)
  To: u-boot



Jerry Van Baren wrote:
> 
> Hurricane555 wrote:
>> 
>> Nuno Jo?o (Ext_NBS) wrote:
>>>> From: u-boot-users-bounces at lists.sourceforge.net 
>>>> [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf 
>>>> Of Hurricane555
>>>> Sent: ter?a-feira, 6 de Junho de 2006 8:48
>>>> To: u-boot-users at lists.sourceforge.net
>>>> Subject: Re: [U-Boot-Users] Error: end address not on sector boundary
>>>>
>>>>
>>>> Now I changed my settings as follows:
>>>>
>>>>
>>>> #define PHYS_FLASH_SIZE		0x000400000 /* 4 MB */
>>>> ...
>>>
>>> 	This is mine:
>>>
>>> #define CFG_ENV_IS_IN_FLASH     1
>>> #define CFG_ENV_SECT_SIZE       0x40000     /* 256K (one sector) for env
>>> */
>>> #define CFG_ENV_SIZE            CFG_ENV_SECT_SIZE
>>> #define CFG_ENV_ADDR            0xffe00000
>>>
>>> 	I have a 256KB sized-sector flash, u-boot (512KB) at 0xFFF80000 
>>> 	(at the end of flash) and the environment at 0xFFE00000 (1 sector).
>>>
>>>
>>>> Now I can make saveenv, but after restart the bootloader is damaged!
>>> 	This probably means that you're setting your environment to
>>> 	overlap u-boot's flash area. Check your memory map and (re-)read
>>> 	the file README in u-boot's root directory about the environment's
>>> 	configuration defines.
>>>
>>>
>>> _______________________________________________
>>> U-Boot-Users mailing list
>>> U-Boot-Users at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>>>
>>>
>> 
>> Hmmmm.... I see what my mistake was! 
>> My ENV was on the same address like U-BOOT!
>> 
>> 
>> U-BOOT is now on address 50000000. The ENV on 50010000!
>> 
>> I checked this address and I was clear! No data was on it, so I thougt I
>> could use the section for my ENV. But when I make saveenv the bootloader
>> is
>> dead!? Why?
> 
> According to the above, your sector size is 0x40000 (256K) but you 
> stored your ENV at u-boot + 0x10000 (64K) which is in the same sector as 
> u-boot.  When you erased your ENV area, you inadvertently erased u-boot 
> as well since it is all in one sector.
> 
> gvb
> 
>>> no, you are wrong! At the beginning of my Flash the first four sectors
>>> have different size! The first 8000 ( 32K ) the second and the third
>>> 4000 (16k) and the fourth 10000 (64k) and the rest 31 sectors 20000
>>> (128k )
> 
> flinfo
> 
> Bank # 1: CFI conformant FLASH (32 x 16)  Size: 4 MB in 35 Sectors
>  Erase timeout 16384 ms, write timeout 0 ms, buffer write timeout 1 ms,
> buffer s
> ize 1
>   Sector Start Addresses:
>     50000000      50008000      5000C000      50010000 (RO)  50020000
>     50040000      50060000      50080000      500A0000      500C0000
>     500E0000      50100000      50120000      50140000      50160000
>     50180000      501A0000      501C0000      501E0000      50200000
>     50220000      50240000      50260000      50280000      502A0000
>     502C0000      502E0000      50300000      50320000      50340000
>     50360000      50380000      503A0000      503C0000      503E0000
> 
> 
> 
> 
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 
> 
--
View this message in context: http://www.nabble.com/Error%3A-end-address-not-on-sector-boundary-t1731654.html#a4737358
Sent from the Uboot - Users forum at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] Error: end address not on sector boundary
  2006-06-06 17:14           ` Hurricane555
@ 2006-06-08  6:38             ` Hurricane555
  0 siblings, 0 replies; 9+ messages in thread
From: Hurricane555 @ 2006-06-08  6:38 UTC (permalink / raw)
  To: u-boot


what I have to do? saveenv is still not working!
--
View this message in context: http://www.nabble.com/Error%3A-end-address-not-on-sector-boundary-t1731654.html#a4766947
Sent from the Uboot - Users forum at Nabble.com.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot-Users] Error: end address not on sector boundary
@ 2006-06-08 11:48 Joao, Nuno
  0 siblings, 0 replies; 9+ messages in thread
From: Joao, Nuno @ 2006-06-08 11:48 UTC (permalink / raw)
  To: u-boot

> From: u-boot-users-bounces at lists.sourceforge.net 
> [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf 
> Of Hurricane555

>>> no, you are wrong! At the beginning of my Flash the first four
sectors
> have different size! The first 8000 ( 32K ) the second and the
> third 4000 (16k) and the fourth 10000 (64k) and the rest 31
> sectors 20000 (128k ) 
>
> flinfo 
>
> Bank # 1: CFI conformant FLASH (32 x 16)  Size: 4 MB in 35 Sectors 
>  Erase timeout 16384 ms, write timeout 0 ms, buffer write timeout 1
ms,
> buffer size 1 
>   Sector Start Addresses: 
>     50000000      50008000      5000C000      50010000 (RO)  50020000 
>     50040000      50060000      50080000      500A0000      500C0000 
>	(...)


	You are putting u-boot at the start of flash (50000000) and
	the env at 50010000? Your u-boot has less than 64Kb?

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-06-08 11:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-04 18:22 [U-Boot-Users] Error: end address not on sector boundary Hurricane555
2006-06-06  7:17 ` Wolfgang Denk
2006-06-06  7:47   ` Hurricane555
2006-06-06 12:09     ` Joao, Nuno
2006-06-06 16:47       ` Hurricane555
2006-06-06 16:57         ` Jerry Van Baren
2006-06-06 17:14           ` Hurricane555
2006-06-08  6:38             ` Hurricane555
  -- strict thread matches above, loose matches on Subject: below --
2006-06-08 11:48 Joao, Nuno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox