Error: end address not on sector boundary
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.
Quoted 14 lines · In message <[email protected]> you wrote:
CkhlbGxvIEnCtG0gdXNpbmcgYSBBbTI5TFYxNjBCIEZMQVNIIHdpdGggYSBzaXplIG9mIDRNQi4g TXkgcHJvYmxlbSBpcywgdGhhdCBJCmNhbsK0dCB1c2luZyB0aGUgb3B0aW9uIHNhdmVlbnYuIFdy aXRpbmcgYW5kIGRlbGV0ZXRpbmcgb2YgRkxBU0ggaXMgbm8KcHJvYmxlbS4KCk15IHNldHRpbmdz IGFyZSBmb2xsb3dzOgoKLi4uLgoKCiNkZWZpbmUgUEhZU19GTEFTSF9TSVpFCQkweDAwMDQwMDAw MCAvKiA0IE1CICovCiNkZWZpbmUgQ0ZHX01BWF9GTEFTSF9TRUNUCSgzNSkJLyogbWF4IG51bWJl ciBvZiBzZWN0b3JzIG9uIG9uZSBjaGlwICovCiNkZWZpbmUgQ0ZHX01BWF9GTEFTSF9CQU5LUyAx I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nNAbGlzdHMuc291cmNlZm9yZ2UubmV0Cmh0dHBzOi8vbGlzdHMuc291cmNlZm9y Z2UubmV0L2xpc3RzL2xpc3RpbmZvL3UtYm9vdC11c2Vycwo=
Please do not send base 64 encoded messages.
Please do not send HTML messages.
Please send plain text only.
Message unreadable, ignored. Sorry.
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.
Joao
Quoted 8 lines
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
Quoted 5 lines
Now I changed my settings as follows:
#define
PHYS_FLASH_SIZE0x000400000/* 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).
Quoted 1 line
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.
Quoted 36 lines · Nuno Jo?o (Ext_NBS)
Quoted 9 lines
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 boundaryQuoted 5 lines
Now I changed my settings as follows:
#define
PHYS_FLASH_SIZE0x000400000/* 4 MB */
...This is mine:
#define
CFG_ENV_IS_IN_FLASH1
#defineCFG_ENV_SECT_SIZE0x40000/* 256K (one sector) for env
*/
#defineCFG_ENV_SIZECFG_ENV_SECT_SIZE
#defineCFG_ENV_ADDR0xffe00000I have a 256KB sized-sector flash, u-boot (512KB) at 0xFFF80000 (at the end of flash) and the environment at 0xFFE00000 (1 sector).Quoted 1 line
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.
Quoted 6 lines
_______________________________________________
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.
Quoted 46 lines · Hurricane555 wrote:
Quoted 33 lines · Nuno Jo?o (Ext_NBS)
Quoted 8 lines
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 boundaryQuoted 5 lines
Now I changed my settings as follows:
#define
PHYS_FLASH_SIZE0x000400000/* 4 MB */
...This is mine:
#define
CFG_ENV_IS_IN_FLASH1
#defineCFG_ENV_SECT_SIZE0x40000/* 256K (one sector) for env
*/
#defineCFG_ENV_SIZECFG_ENV_SECT_SIZE
#defineCFG_ENV_ADDR0xffe00000I have a 256KB sized-sector flash, u-boot (512KB) at 0xFFF80000 (at the end of flash) and the environment at 0xFFE00000 (1 sector).Quoted 1 line
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.
Quoted 6 lines
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-usersHmmmm.... I see what my mistake was!
My ENV was on the same address like U-BOOT!
Quoted 5 lines
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
Quoted 85 lines · Jerry Van Baren
Quoted 46 lines · Hurricane555 wrote:
Quoted 33 lines · Nuno Jo?o (Ext_NBS)
Quoted 8 lines
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 boundaryQuoted 5 lines
Now I changed my settings as follows:
#define
PHYS_FLASH_SIZE0x000400000/* 4 MB */
...This is mine:
#define
CFG_ENV_IS_IN_FLASH1
#defineCFG_ENV_SECT_SIZE0x40000/* 256K (one sector) for env
*/
#defineCFG_ENV_SIZECFG_ENV_SECT_SIZE
#defineCFG_ENV_ADDR0xffe00000I have a 256KB sized-sector flash, u-boot (512KB) at 0xFFF80000 (at the end of flash) and the environment at 0xFFE00000 (1 sector).Quoted 1 line
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.
Quoted 6 lines
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-usersHmmmm.... I see what my mistake was!
My ENV was on the same address like U-BOOT!Quoted 6 lines
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
Quoted 4 lines
Quoted 4 lines
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
Quoted 6 lines
_______________________________________________
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.
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.