chipKIT® Development Platform

Inspired by Arduino™

[FIXED]PIC32 Ethernet Starter Kit and Arduino USB Bootloader

Created Sun, 07 Oct 2012 16:24:14 +0000 by luismaduro


luismaduro

Sun, 07 Oct 2012 16:24:14 +0000

Hi,

I have an ethernet stater kit from microchip and I read that we can use it with the chipkit platform and arduino bootloader. I already read all the threads that i could find about this and still can't get the problem fixed.

I am facing some problems with the bootloader, specifically with the compilation... I downloaded the pic32-Arduino-USB-Bootloader ([url]https://github.com/chipKIT32/pic32-Arduino-USB-Bootloader[/url]) and set the configuration to PIC32 Ethernet Starter Kit. Then a notice that a file is missing in the project, "nvm_operation_lib.c", I removed it from the project tree and the compiler doesn't complain.

Next I found problems with the linker script that came with the project. Three errors to be specific:

warning: Sections: .debug_ranges, .debug_pubtypes, and .gnu.attributes should be mapped in the linker script. Link Error: Could not allocate section .reset.startup, size = 242 PC units, attributes = code Link Error: Could not allocate section .reset.startup, size = 242 PC units, attributes = code

Last two apparently are the same error. So my question is, most of the people say that can compile (and burn) the bootloader into the starter kit, what I my missing? Does anyone have the solution?

PS: Sorry for my English...


RMSchafer

Thu, 11 Oct 2012 16:19:01 +0000

I'm having a similar problem.


RMSchafer

Fri, 12 Oct 2012 19:03:43 +0000

The best I have been able to determine, there have been changes to the linker in the C32 package (current version is 2.02). There are some references to this in the migration notes. My guess is that the linker script would have to be updated for the new version of C32.

I've tried getting the serial version working using the XC32 compiler and the MX4cK board. I've got it downloading, but am getting verification errors.


luismaduro

Tue, 16 Oct 2012 15:32:42 +0000

The best I have been able to determine, there have been changes to the linker in the C32 package (current version is 2.02). There are some references to this in the migration notes. My guess is that the linker script would have to be updated for the new version of C32. I've tried getting the serial version working using the XC32 compiler and the MX4cK board. I've got it downloading, but am getting verification errors.

I do not have the board with me right now, so I can't try, but if we compile with the version 1.xx it should work, right? If the problem is the changes in the linker on the new version...

I will try on the weekend and give an update...


luismaduro

Fri, 19 Oct 2012 14:38:00 +0000

I do not have the board with me right now, so I can't try, but if we compile with the version 1.xx it should work, right? If the problem is the changes in the linker on the new version... I will try on the weekend and give an update...

OK, the problem is fixed! The problem was indeed the compiler version. If you go here [url]http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023073[/url] you can download the an older version of the compiler and then compiler the project to your platform.

There is a missing file but you can remove it from the project, it compiles and work with no problem.

Tested in the Ethernet and USB Starter Kit.

I will make a pull request to the official repo but in the meantime you can check the updated bootloader here: [url]https://github.com/Westpack/pic32-Arduino-USB-Bootloader[/url].

Many thank to RMSchafer for the tip!!!