SAM-BA 3.3.1 Error: Cannot erase without overflow

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

timjack
Posts: 2
Joined: Tue Sep 08, 2020 1:10 pm

SAM-BA 3.3.1 Error: Cannot erase without overflow

Tue Sep 08, 2020 2:51 pm

I am using SAM-BA3.3.1 to load the latest AT91 Bootstrap and U-Boot + VxWorks to a SAMA5D3Xplained board and also a custom board based on the Xplained board. All is fine with the Xplained board but fails with the custom board. The custom board has a larger NAND flash (MT29F8G08ABA, 8Gbit) and I calculate the PMECC header for this is 0xC2A02E07. The SAM-BA terminal output seems to indicate that the new header is in use and manages to erase and programme the AT91Bootstrap and U-boot environment but fails when erasing the memory area for U-Boot itself with 'sam-ba_3.3.1/qml/SAMBA/Applet.qml:368: Error: Cannot erase requested region using supported erase block sizes without overflow'. This is borne out by a terminal attached to the board only getting as far as running the Bootstrap and no further when restarted. If I do the trick with the chip select to get back to the SAM-BA monitor but now connect SAM-BA 2.18, enable the flash and set the PMECC options and load the U-Boot and VxWorks binaries, all from the GUI, then these programme OK. When restarted the board will run all the way through, loading and running AT91 Bootstrap, U-Boot and VxWorks in turn. Note when using SAM-BA 3.3.1 I have tried modifying the PMECC header in the top level QML file that programmes each file in turn (a modified 'demo_linux_nandflash_usb.qml'), I have tried over-riding using the 'nandflash' applet with the header and tried defining my own board with the revised header. As indicated above, the new header does appear to be in use in all cases, but with the same results. Any ideas / solution for the 'Applet.qml:368: Error: Cannot erase requested region using supported erase block sizes without overflow'?
blue_z
Location: USA
Posts: 2117
Joined: Thu Apr 19, 2007 10:15 pm

Re: SAM-BA 3.3.1 Error: Cannot erase without overflow

Wed Sep 09, 2020 9:02 pm

timjack wrote: The custom board has a larger NAND flash (MT29F8G08ABA, 8Gbit) ...
fails when erasing the memory area for U-Boot itself with 'sam-ba_3.3.1/qml/SAMBA/Applet.qml:368: Error: Cannot erase requested region using supported erase block sizes without overflow'.
A message (especially errors) is incomplete without the command that generated that response.

A quick inspection of the source code (i.e. sam-ba_3.3.1/qml/SAMBA/Applet.qml) that contains that text string indicates that the message is in response to an "undefined plan".

Code: Select all

		var plan = computeErasePlan(offset, end, false)
		if (plan === undefined)
			throw new Error("Cannot erase requested region using supported erase block sizes without overflow")
A larger NAND chip could mean larger page size and/or larger erase block size.
A larger erase block size means the scripts (i.e. offsets in erase commands) have to change.

timjack wrote: Any ideas / solution for the 'Applet.qml:368: Error: Cannot erase requested region using supported erase block sizes without overflow'?
The Q&D solution is erase the entire chip with a single command instead of a "region" at a time.
But regardless, you'll have to relocate and resize the partitions for U-Boot environment(s) to align with the new/larger erase blocks.

Regards
timjack
Posts: 2
Joined: Tue Sep 08, 2020 1:10 pm

Re: SAM-BA 3.3.1 Error: Cannot erase without overflow

Wed Oct 14, 2020 4:05 pm

Many thanks. Yes, indeed, the larger memory has larger block sizes (0x80000 v. 0x20000 bytes of the original memory) and the error message now makes sense as I was using a script file with an entry of 'eraseWrite(0x00040000, "u-boot-sama5d3-xplained.bin")' i.e. with a granularity of 0x40000). I can see that it will not be possible to just erase U-Boot in this instance - is the address where U-Boot is placed down to where the AT91Bootstrap expects it to be? Can it be changed by rebuilding the AT91Bootstrap or is this well left alone?

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 3 guests