Page 1 of 1

Upgrading to chipKIT core 1.2.0 Issue

Posted: Fri Jun 10, 2016 7:23 pm
by Jacob Christ
Just tried to upgrade to core 1.2.0 from the "Board Manager" and got a "CRC Doesn't Match. File is corrupted" message.

I tried the Update, Remove and Install buttons don't seem to have any functionality now.

I tried to restart Arduino IDE (1.6.7) and is still has the same message and I can't revert to 1.1.0.

Jacob

Re: Upgrading to chipKIT core 1.2.0 Issue

Posted: Fri Jun 10, 2016 8:46 pm
by Jacob Christ
Windows 10, I don't have a C:\Users\bschmalz directory ;-).

I tried deleting just the 1.2.0 zip and the preferences.txt and the chipKIT json files. No dice.

I also tried reverting to the old json file: https://raw.githubusercontent.com/chipK ... index.json

Didn't work either, but I'm not sure if that link was the old working file.

Brian's suggestion fixed the problem.


Jacob

On Fri, Jun 10, 2016 at 11:55 AM, Brian Schmalz wrote:
Jacob,

Crud. I wonder why it failed for you but worked for me.

Are you on Windows? If so, quit Arduino IDE, go to C:\Users\bschmalz\AppData\Local\Arduino15 and delete all files and folders except the preferences.txt file, then restart Arduino IDE and go to the boards manager again and see if the same problem happens. If so, I need to take down the 1.2.0 update until I can figure out what's going on.

*Brian

Re: Upgrading to chipKIT core 1.2.0 Issue

Posted: Sat Jun 11, 2016 12:53 pm
by EmbeddedMan
Jacob,

I have been able to reproduce this problem now. It happens any time you use the "Update" button in the Boards Manager, or if you click the "Install" button in the Boards Manager and you already have a previous version of chipKIT-core installed.

So basically upgrading from an existing version is currently broken.

As you found, the workaround (for now) is to completely uninstall chipKIT-core by deleting all files except preferences.txt in the C:\Users\<username>\AppData\Local\Arduino15 directory (if you are running Windows - under Linux it's a .arduino15 in your home directory, etc.) and then restarting Arduino to install chipKIT-core 1.2.0 fresh.

I'll figure out why this is happening and update the .json file to fix it, hopefully.

*Brian

Re: Upgrading to chipKIT core 1.2.0 Issue

Posted: Sat Jun 11, 2016 1:59 pm
by EmbeddedMan
I have found and fixed the error (for Windows - other OSes will be fixed in a few minutes).

The problem appears to be that Arduino IDE does not attach any type of version number to downloaded binaries, and it puts them in the same directory. So if you have chipKIT-core v1.1.0 installed, which downloads pic32prog-windows.zip into the staging directory, and then later update to v1.2.0, the IDE will copy down the new pic32prog-windows.zip file into the same directory, overwriting the old one. I don't understand why this causes the CRC check to fail, but it appears that's what happens, and the IDE is then stuck in an unhappy state.

The solution is to uniquely name all of your binary files so they don't overwrite previous versions. This works, is uploaded to the GitHub repo now, and things should work. I tried upgrading, downgrading, removing, installing, etc. etc. and can't get it to fail.

If you do have problems still, delete the downloaded files as specified above and try again - it should work.

*Brian

Re: Upgrading to chipKIT core 1.2.0 Issue

Posted: Sat Jun 11, 2016 2:09 pm
by majenko
Yet another reason to switch to UECIDE from Arduino's half-arsed job of package management...

Re: Upgrading to chipKIT core 1.2.0 Issue

Posted: Sun Jun 12, 2016 2:10 am
by Jacob Christ
Brian: Good find.

Matt: I wouldn't expect an Arduino IDE bug report to come without a plug for the superior UIECIDE, keep'em coming.