• 0

Question

This may be the worst of the noob questions.

I just purchased an uc32 as an upgrade to my use of arduino to get something more powerful and upon using the 1.6.8 arduino ide, the first sketch that I try to push to the board gives a "cannot erase chip" error.

Thoughts?

David

 

--cut--

Sketch uses 19,096 bytes (3%) of program storage space. Maximum is 520,192 bytes.
Global variables use 6,316 bytes of dynamic memory.
Programmer for Microchip PIC32 microcontrollers, Version 2.0.186
    Copyright: (C) 2011-2015 Serge Vakulenko
      Adapter: STK500v2 Bootloader
 Program area: 1d000000-1d1fffff
    Processor: Bootloader
 Flash memory: 2048 kbytes
  Boot memory: 80 kbytes
         Data: 19096 bytes
        Erase: Cannot erase chip.

Share this post


Link to post
Share on other sites

8 answers to this question

Recommended Posts

  • 1

Hi guys,

Sorry you're have such a hard time with these boards. I'm pretty sure it's a problem with the old bootloader on the uC32. You can run the sketch found here in MPIDE to update the bootloader. You do not need a programmer to do this, just run the sketch in MPIDE and let me know if it solves the problem!

Share this post


Link to post
Share on other sites
  • 0

This error is not due to your code, is not something normal so asking about this is the best thing you could do.

Erasing the microcontroller is done transparently before programming the code. So, what I suppose is that chipkit is unable to program your uc32.

Please focus on chipkit configuration: be sure that you have properly selected your board (Tools / Board) and your COM port (Tools / Serial).

Also, please provide a caption of the whole chipkit window.

Share this post


Link to post
Share on other sites
  • 0

Hello,

It looks like the bootloader needs to be programmed using the one from this location:  https://reference.digilentinc.com/_media/chipkit_uc32:chipkit-uc32.zip

You can program the bootloader using MPLABX IPE, but you need a programmer like Microchip Pickit3 or Digilent PGM. You can read detailed information about this procedure here: http://chipkit.net/wp-content/uploads/2016/02/Restore-your-chipKIT-Bootloader-Guide.pdf.

Please tell me if you need more information.

Regards,

Cristian

Share this post


Link to post
Share on other sites
  • 0

Re: the first post, I've got the board selected as a chipkit uc32 + the correctly set COM4 (in this case port).

Fwiw, it's possible for me to program it from chipkit's proprietary MPIDE, but since that's deprecated, I'd just as soon get this working properly.

One other item, I programmed a simple blink led routine on it (my intent is to use this to power a 3d 8x8x8 led cube) and was able to get it working and interesting can get the serial communication from the board to work with the arduino IDE.

I'm concerned about reburning the bootloader since I have something almost working: use MPIDE to load a program and I don't want to break that totally.

Thoughts?

David

Share this post


Link to post
Share on other sites
  • 0

Can confirm the device is ttyUSB0 via dmesg.

I don't understand why I need to buy another piece of hardware to get this working with ArduinoIDE since it is advertised everywhere about it. Slightly irritated this hasn't been plug and play.

 

cannot_erase_chip.png

Share this post


Link to post
Share on other sites
  • 0

I admit to not having figure it out.  It's annoying and I've been using MPIDE as I've said.  But, since that's deprecated, I'd like to get the real answer to making this work with the arduino IDE.  I'm not believing it's that I need a new bootloader since I can successfully program the board from the other IDE

Share this post


Link to post
Share on other sites
  • 0

Woah, I apologize for not getting back sooner. I thought I had responded to this a while ago!

All you need to do to update the firmware is run the sketch https://reference.digilentinc.com/_media/chipkit_uc32/updbluc32.zip in MPIDE. This will update the firmware to be used in Arduino IDE WITHOUT the use of a PicKIT3 or another debugger.

Open the sketch and program your board. When it is programmed, open the serial monitor and follow the instructions there to install the firmware update.

 

Hope this helps!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now