Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:08 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Arduino Environment for PIC32

Author Message
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 08:18pm 26 Apr 2019
Copy link to clipboard 
Print this post

I've had someone request to use the Arduino IDE with the CGMICROKIT. This would forgo the MMBASIC that is loaded on the chip and load it with the code developed in the Arduino IDE.

I've found that there is support for the '120, the '250, and the '270 in a board support package called chipKIT. I've tried using the IDE to make a hex file and PICKIT3 to load that hex file. I thought that one of these would work at least with some simple blinky test code. But nope.

So I tried a copy/edit of one of the boards to make a '170 flavor, but still no blinky.

Still going down a rabbit hole trying to see what I missed, but I thought I would ask here if anyone has done this.
Micromites and Maximites! - Beginning Maximite
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 08:48pm 26 Apr 2019
Copy link to clipboard 
Print this post

Probably a daft question but I suspect a chipKit-specific/Arduino-specific bootloader is needed (and is probably CPU-specific).

Is one, and did you install it?

John
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 08:58pm 26 Apr 2019
Copy link to clipboard 
Print this post

  JohnS said   Probably a daft question but I suspect a chipKit-specific/Arduino-specific bootloader is needed (and is probably CPU-specific).

Is one, and did you install it?

John


There are some ugly files that I modified that end in ".ld" that have bootloader and non-bootloader options. I modified the nobootloader file.

For example:
chipKIT-application-32MX250F128.ld
chipKIT-application-32MX250F128-nobootloader.ld

No need for bootloader if I'm using the PICKIT 3 to program. I amuse.

Micromites and Maximites! - Beginning Maximite
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 09:09pm 26 Apr 2019
Copy link to clipboard 
Print this post

I don't want the bootloader because the console pins won't be right.
Micromites and Maximites! - Beginning Maximite
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 09:30pm 26 Apr 2019
Copy link to clipboard 
Print this post

You're right that you don't need a bootloader with the PICkit3 but I suspect the Arduino IDE expects the right bootloader.

Unless it can talk direct to a PICkit3, but I think not and anyway typical Arduino users would not have or want a PICkit.

John
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1132
Posted: 09:30pm 26 Apr 2019
Copy link to clipboard 
Print this post

Does anything at fubarino.org help?
Visit Vegipete's *Mite Library for cool programs.
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 09:34pm 26 Apr 2019
Copy link to clipboard 
Print this post

  JohnS said   You're right that you don't need a bootloader with the PICkit3 but I suspect the Arduino IDE expects the right bootloader.

Unless it can talk direct to a PICkit3, but I think not and anyway typical Arduino users would not have or want a PICkit.

John


The Arduino IDE has an option to build a hex file that I can read using the PICKIT3 software. I'm not sure what programmer would integrate with the Arduino IDE.
Micromites and Maximites! - Beginning Maximite
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 09:37pm 26 Apr 2019
Copy link to clipboard 
Print this post

  vegipete said   Does anything at fubarino.org help?


Fubarino is a subset of the chipKIT stuff. I didn't find anything at the site.

Micromites and Maximites! - Beginning Maximite
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 09:41pm 26 Apr 2019
Copy link to clipboard 
Print this post

Well... if the user will have a PICkit3 then all should be OK - though rather painful.

So... why did you need to change any .ld file? None already that targetted your board or what?

(Yes they're horrible.)

John
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 10:08pm 26 Apr 2019
Copy link to clipboard 
Print this post

You can probably look at a few hex files that work (ones not from your new Arduino system) and compare with one that's from the Arduino system to figure what's wrong.

As you'll know, you'll need the DEVCFGn bytes with sane values.

John
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 11:33pm 26 Apr 2019
Copy link to clipboard 
Print this post

  JohnS said   Well... if the user will have a PICkit3 then all should be OK - though rather painful.


True that, but perhaps improvement later.

  JohnS said   So... why did you need to change any .ld file? None already that targetted your board or what?


Correct.
Micromites and Maximites! - Beginning Maximite
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 11:34pm 26 Apr 2019
Copy link to clipboard 
Print this post

  JohnS said   You can probably look at a few hex files that work (ones not from your new Arduino system) and compare with one that's from the Arduino system to figure what's wrong.

As you'll know, you'll need the DEVCFGn bytes with sane values.

John


I'm sure I'm zigging when I should be zagging.
Micromites and Maximites! - Beginning Maximite
 
isochronic
Guru

Joined: 21/01/2012
Location: Australia
Posts: 689
Posted: 03:23am 27 Apr 2019
Copy link to clipboard 
Print this post


This looks similar to the cgmicrokit scenario.
Not sure if it helps but - Chipkit / Agilent sometimes use a wiki for docos, there is a recent update , worth a look

Edited by chronic 2019-04-28
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 06:11am 27 Apr 2019
Copy link to clipboard 
Print this post

Sounds like the problem is in the .ld and/or that the hex file expects the matching bootloader and/or the hex is not adapted to the specific PIC32 variant. You can check the latter two by hunting around the hex. If it's wrong the .ld may well be the cause.

E.g. the hex may have no start addr or one that jumps into the bootloader you've not got.

John
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025