chipKIT® Development Platform

Inspired by Arduino™

Tools for assembly programming Uno32

Created Sun, 05 Jul 2015 07:36:41 +0000 by pierre


pierre

Sun, 05 Jul 2015 07:36:41 +0000

Apologies for a newbie question, but before delving into the copious MPLAB IDE documentation I'd really appreciate some basic info, so that I know that what I need is actually in there, somewhere, and I can look for the details.

I would like to program in assembly the PIC32 on the Uno32 board. I understand I would need MPLAB and the PICkit 3 In-Circuit Debugger/Programmer (and a RJ-11/ICSP adapter to connect it to the board?). I think I can download MPLAB for free and install it on my Debian, but does it include the assembler and assembly code debugger? Thanks!


majenko

Sun, 05 Jul 2015 09:46:49 +0000

If you're not bothered about the debugging side of things, then you have everything you need with MPIDE or UECIDE (especially UECIDE). You can create a <whatever>.S file within your sketch and work in assembly in there. You can them mix the power of assembly with the ease of use of the Arduino API. You also get to keep the bootloader, so no programming hardware is needed.

But if you do want to work in MPLAB-X with all its debugging facilities, though, then you'll need XC32 as well, since that is the compiler / assembler (pretty much the same one as is in MPIDE / UECIDE). All that is downloadable from Microchip. Personally I hate MPLAB-X since it is just so heavyweight, and it doesn't work too wonderfully on Linux in my experience, even though it is written in Java.


pierre

Sun, 05 Jul 2015 16:18:29 +0000

Thanks!

Personally I hate MPLAB-X since it is just so heavyweight

I sympathize, reminds me of Qt on Linux vs VSC++ on Windows and installing MPLAB-X and the XC32 compiler doesn't look very straightforward either, but a debugger might come handy in assembly.


Max44

Sun, 05 Jul 2015 18:31:04 +0000

I used MPLAB-X (under Windows), the XC32 compiler (the install includes assembler and linker), and an ICD3 for debug in my work with the WF32 board, which included some assembly language routines. I found the debug capabilities simplifies program development immeasurably, despite the "heavyweight" aspect. I don't know how I would have managed any of the program development I undertook without the debug tools. If you're planning any extensive assembly programming, it's almost essential to have visibility to the processor registers ..... which you have with MPLAB. I've used Microchip tools for many years, though, so it wasn't much of an adjustment.

I switched to using Microchip libraries (the old ones ..... I couldn't deal with the new Harmony ones) for my programming as well. If you want to use the libraries in MPIDE or UECIDE, you might take a look at the presentation by Digilent at the Microchip Masters conference on how to transfer compiled code into MPLAB for debug. See this forum at [url]http://chipkit.net/forum/viewtopic.php?f=19&t=2520[/url]. I tried this a few times before moving to a pure Microchip environment and it does work.


majenko

Sun, 05 Jul 2015 18:44:32 +0000

It's simple enough to install - it's just a bit of a pain to use. I often find that menus don't show where the mouse actually is and you have to have the mouse about 2 inches to the right of the menu for it to register. Weird things like that.


guymc

Mon, 06 Jul 2015 18:40:29 +0000

I often find that menus don't show where the mouse actually is and you have to have the mouse about 2 inches to the right of the menu for it to register. Weird things like that.

New versions of MPLAB X are released approximately every two months, and it may well be the case that this has already been fixed. If you experience this sort of thing again, please enter a ticket at http://www.microchip.com/support.

Thanks!


majenko

Mon, 06 Jul 2015 20:19:59 +0000

New versions of MPLAB X are released approximately every two months, and it may well be the case that this has already been fixed. If you experience this sort of thing again, please enter a ticket at http://www.microchip.com/support. Thanks!

I think most of the issues are actually caused by Java rather than MPLAB-X's code. I notice odd things in UECIDE as well, though it's not such a problem.


pierre

Mon, 06 Jul 2015 22:11:12 +0000

For the chipKit Uno32, I assume I shall be able to find the documentation concerning board-specific details such as memory mapping (and I/O mapping if implemented) etc., I mean any hardware specific details that I would need to know to program in assembly and would probably be hidden from me were I to use C libraries. Of course, if all these details are just microcontroller-dependent then I can refer to the uC's specs. Apologies if this is a dumb question, but this is a new experience for me, as formerly I only used microprocessors (not uC) of other manufacturers and I designed the prototype boards myself. Thanks!


majenko

Mon, 06 Jul 2015 23:42:48 +0000

Yep, there is an entire reference library that tells you everything you could ever wish to know.

First you need the Uno32 manual, which will tell you how the board is wired up (the schematic is useful, too - google is your friend for that).

Then you need the information on the chip. Go here: http://www.microchip.com/pagehandler/en-us/family/32bit/home.html?tab=t2

In there is the "Data Sheet" section where you can find the information about the chip sub-family. There is also the "Reference Manual" section which has about 50 documents in it detailing all the internals of the PIC32 chips in great detail.


pierre

Tue, 07 Jul 2015 06:57:07 +0000

Thank you!

First you need the Uno32 manual, which will tell you how the board is wired up (the schematic is useful, too - google is your friend for that).

Yes, in fact I got the manual from the web and I had found the schematic (which I did not save, I'll have to search for it again) before posting

Go here:

Great! I really appreciate your help, thanks for your time!