[fpc-devel] Pinguino

Michael Schnell mschnell at lumino.de
Wed Sep 3 13:12:10 CEST 2014


On 09/02/2014 04:08 PM, Michael Ring wrote:
> I guess it depends on what you understand by the word support ;-)
Regarding "support", a first issue would be some kind of TODO-List / 
documentation e.g. in the Wiki.

Then, I suppose (but I don't know what exactly would be involved) that a 
dedicated RTL version would be necessary to run some fpc code in such an 
environment.

Additionally there would need to be a way to have the fpc code loaded 
and started in such an environment.

I see two ways to do this: as a function callable by some C code that is 
created by the Pinguino IDE, or as a stand-alone program that is just 
uploaded by the Pinguino tools.

I suppose for these variants, different RTLs are necessary. E.g. (1) 
would need to attach to malloc() and friends in the C library, while (2) 
would need a more complete system setup phase.

>
> The Pinguino has a PIC32MX440F256H; translated headers for this chip 
> are available. Flashing and Debugging with JLink V9 Adapter should 
> also work fine with gdb, it did with every other PIC32MX I tried.
I suppose the usual Pinguino lovers will want to use the Pinguino boot 
flash to upload any code and not buy a JTAG hardware adapter. I have no 
idea how they do any debugging.

"Normal" PIC users (like myself) have "PICKit" and "ICD" adapters, that 
are to be used with the MPLAB IDE, and here, too, using JTAG on a PIC 
seems rather uncommon.


> There's also support for defining the DEVCFG registers in sourcecode 
> and 'high level' (aehm...) support for accessing gpio pins and some 
> started code to do the same thing for uarts, timers osc and spi but 
> nothing that I'd call complete or well tested ;-)
I suppose this also is done via JTAG. Correct ?

>
> There's also a problem with debug symbols that is still open, I think 
> I know how to fix that but haven't spent much time on this lately.
I suppose this also is related to JTAG.
Is there no way to use the Microchip tools (PICKit and ICD) for this ? 
If yes I might be able to take a look.

>
> So, if you are willing to play arround and get your feet wet then I'd 
> say everything is usable, if you expect full integration in RTL, bells 
> & whizzles then there's no support (yet).
We (a colleague of mine and myself) definitively plan to try to make fpc 
compiled code run on a PIC32, as soon as we are ready with the current 
project and can hop on this extension. But we need to integrate the fpc 
code to be created (actually ported from a project running on PC) in a 
rather complex project done MPLAB in ANSI C. In fact the fpc unit needs 
to be called by the C code.

>
> If you are interested in making this port more complete then I can 
> check in my latest changes to the branch for this project, 90% of the 
> code are already in trunk, perhaps the rest can also show up in trunk 
> fast if some of the devs are willing to merge my latest changes to 
> trunk. This should be easy as most of the changes are in the 
> rtl/mipsel directory.
>
Great !
But at the moment we are not able to spend any time on this interesting 
stuff. I'll come back as soon as we can start to take a look.
Moreover we don't have a JTAG Adapter to use with the PIC (we do have 
two for the FIDO/ARM20 and several for ATMEL and Xilinx FPGAs, but I 
don't supposed they are usable here.) Hence I am most interested in 
allowing MPLAB (i.e. gcc/gdb) to link (and debug) in the fpc code.

-Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140903/a30996ec/attachment.html>


More information about the fpc-devel mailing list