From: Joris v. R. <jo...@sr...> - 2011-08-30 19:38:32
|
On Sunday 28 August 2011, Uwe Bonnes wrote: > Yes, XCF can only be erased as one block. But with > bitfile.1.bit:W:offset0 and bitfile2.bit:W:offset1, the erase action > is skipped, so partial writing is possible. Ah, right. I was not aware of the difference between 'W' and 'w'. > Again, XCFP knows about revisions, so it's more than a niche feature > for SPI programmed devices alone. programXCF handles both XCF and > XCFP, so getting it right for XCF will fix XFCP too. Not really. The subrange feature is pushed down from programXCF to the actual ProgAlg code. ProgAlgXCF tries to handle subranges, but ProgAlgXCFP simply ignores them. > But a look at the present code may also be worth some effort. The > handling of "current_offset" in the (int i = 0; i < nchainpos; i++) > loop seems dubious... Ok, let's try to fix it then. The attached patch makes multi-PROM programming work again, and also tries to do the right thing about offset/rlength situations. Note that I have not really tested offset/rlength because I don't have a natural test case for it. I took the liberty to change/simplify a few other small things in ProgAlgXCF code; mostly integer signedness I think. Greetings, Joris. |