- Mon Oct 02, 2006 11:07 am
#19916
I am programming flash memory on my AT91Sam7A3. The A3 is a 256KB (1024 pages of 256bytes), single flash bank device with 16 lock bits of 4kb each (16 pages of 256 bytes each). So only the bottom 64 KB is protected.
I am using WinArm and openocd-2006re80
I am unable to succcessfully program above a certain code size.
This compile works:
I am using WinArm and openocd-2006re80
I am unable to succcessfully program above a certain code size.
This compile works:
Size after:This compile doesn't:
main.elf :
section size addr
.text 9476 0
.data 4 2097152
.bss 2728 2097156
.comment 1728 0
.debug_aranges 1936 0
.debug_pubnames 3140 0
.debug_info 32760 0
.debug_abbrev 4748 0
.debug_line 7540 0
.debug_frame 4168 0
.debug_str 691 0
.debug_loc 4914 0
Total 73833
Size before:
main.elf :
section size addr
.text 16340 0
.data 4 2097152
.bss 2732 2097156
.comment 1728 0
.debug_aranges 1936 0
.debug_pubnames 3140 0
.debug_info 32760 0
.debug_abbrev 4748 0
.debug_line 7541 0
.debug_frame 4168 0
.debug_str 691 0
.debug_loc 4914 0
Total 80702
Code: Select all
It seems some lock bits are still set; but I am unable to clear them.Open On-Chip Debugger
> flash info 0
#1: at91sam7 at 0x00000000, size 0x00000000, buswidth 0, chipwidth 0
at91sam7 information:
cidr: 0x260a0941, arch: 0x0060, eproc: ARM7TDMI, version:0x001, flashsize: 0x00
040000
master clock(estimated): 16kHz
pagesize: 256, lockbits: 16 0xeee8, pages in lock region: 64
securitybit: 0, nvmbits: 0x0
> exit
Code: Select all
> flash protect 0 0 15 off
> flash info 0
#1: at91sam7 at 0x00100000, size 0x00040000, buswidth 4, chipwidth 0
at91sam7 information:
cidr: 0x260a0941, arch: 0x0060, eproc: ARM7TDMI, version:0x001, flashsize: 0x00
040000
master clock(estimated): 16kHz
pagesize: 256, lockbits: 16 0xeee8, pages in lock region: 64
securitybit: 0, nvmbits: 0x0
>