Getting Download Verification error

Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
Post Reply
mkrummey
Posts: 4
Joined: 09 March 2009, 6:52 AM

Getting Download Verification error

Post by mkrummey »

I have recently started to get a Verification error when downloading to a ZX1280. From the IDE-> GO I get "Verification Error, record 3842. Download verification failed."
The download looks to proceed OK and the code looks to be functioning properly as far as I can tell. The compiled code size is 62185.

How can I get more information on this error? What is absolute max with the code size?

Thanks.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

A verification error will be reported if a readback of the downloaded data doesn't exactly match what was intended to be written. A ZX-1280 has 128KB of Flash memory. The first 64K is used for the Virtual Machine, the next 60K is used for the application code (i.e. your program) and the final 4K is the ZBasic VM bootloader. That means that your code can be up to 61440 bytes. If the size exceeds that, the excess will be attempted to be written in the write-protected bootloader area which will fail thus causing a verification error.

As a confirmation of this hypothesis you might try commenting out parts of your program to reduce the size below the maximum and see if the verification error goes away. I would have thought that the application exceeding the allowable size would have produce an error or at least a warning - I don't know yet why that isn't so.

You might try compiling the existing project for a ZX-1280n. Because it is a native device it doesn't give up space for the VM. On the other hand, the resulting code is not as dense. Even so, I suspect that compiling for a ZX-1280n will produce code size less than the maximum of 126976 bytes (124KB).
- Don Kinzer
mkrummey
Posts: 4
Joined: 09 March 2009, 6:52 AM

Post by mkrummey »

Thanks for the reply and information. I was aware of the boot space but was not sure of the actual size. I did verify that the issue is as you have stated by knocking the code size back. Yes it would be nice to see a more obvious error message. I can work like this for a short time.

I did take a simple pass at trying to compile for the 1280n. I got a one line indication of an "error in the back-end build process..". Where do I go for reference on how to make compiler errors more visible?

Also- Other than to potentially solve a code space issue, what would be other selling points for going to the 1280n? (Execution speed?)

Thanks again.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

mkrummey wrote:Where do I go for reference on how to make compiler errors more visible?
Section 9.2 of the ZBasic Reference Manual describes the compiler options. You'll want to place the option --verbose near the top of your .pjt file. That will cause more information to be displayed about the backend build process. It may be helpful to also add the option --keep-files to the .pjt file as that will prevent the generated code files from being deleted. It is likely that the backend compiler output will refer to lines in the generated code.
mkrummey wrote: what would be other selling points for going to the 1280n? (Execution speed?)
The native mode devices are much faster. Whether that benefits your application depends on what it does. Another advantage of native mode devices is that you can add interrupt handlers for special needs or add C or assembly language code if necessary. This makes it possible to use code other people have written in C, for example.
- Don Kinzer
Post Reply