November 22, 2024, 06:38:48 PM

Pinguino IDE

Started by JeanFrancois, April 04, 2020, 07:55:48 PM

Previous topic - Next topic

JeanFrancois

Good day,

I tried to compile a demo program for PIC32-Pinguino-Micro but the program said it compiled for an old PIC32 256 and detected circuit has a newer 512 chip.

Could you pleas help find and install the last IDE for Linux which supports more recent chips ?

With IDE v12 installed :

IDE: compiling for 32MX440F256H
Board fit with: 32MX795F512H

Resulting in a correct compile and failure on upload, with error:

Aborting: program compiled for 32MX440F256H but device has 32MX795F512H

Thank you,

Jean-François Simon
We propose hobbyists and professional products at
[url="https://lecomptoirelectronique.fr"]https://lecomptoirelectronique.fr[/url]

JohnS

#1
Looks like the board still has a 256 chip - have a look at the markings on the CPU and either post them here or check with Microchip site.

If that's so then the fault is with whatever misdetected it - try another version / reinstall / or some such.

If it's a 512KB chip... let us know the markings and I expect Olimex will have some ideas.  I don't see any sign of such a serious change on the product page, though.

John

JeanFrancois

#2
Good evening,

Sorry the board is in fact PIC32-RETROBSD fit with PIC32MX795.
It does'nt appear to be listed in the IDE.

Is this possible to edit configuration files used by the IDE in order to compile for the proper chip ?

Regards,

Jean-François Simon
We propose hobbyists and professional products at
[url="https://lecomptoirelectronique.fr"]https://lecomptoirelectronique.fr[/url]

JohnS

It's a better chip :)

hmm... well, I expect the IDE can be tweaked but meanwhile the Olimex board PIC32-T795 looks to be supported and uses the same CPU I think so maybe you can pretend that's the board you have and it may work - but before you do, if it overwrites things (er, bootloader mainly) do you have a PICkit3 or the like?  You may need something like that.

Probably also worth waiting for someone else with ideas to post a reply...

John

JeanFrancois

#4
Hi,

Indeed found out, tuned up boards.py with proper chip and programmed the board.
Now it boots but always enter boot-loader mode (blinks the LEDs quickly) and will no run the program.

Regards,

Jean-François
We propose hobbyists and professional products at
[url="https://lecomptoirelectronique.fr"]https://lecomptoirelectronique.fr[/url]

JohnS

Have a look at the schematics for the board you have & the T795 - it may be that a boot/something button is not on the same input pin / the pin being looked at is pulled up (or down) differently.

Let me know if this is not something you know how to do!

John

JeanFrancois

#6
Good evening,

I'm a little lost, after modification of the python file to use the same board as base, PIC32-PINGUINO-MICRO (which the RetroBSD is based on), only tuning the chip to 512H so the code compiles and programs properly, is still goes into bootloader.

Indeed John there are defines and such, which change the pin layout, so the T795 is not usable, but modifying the Micro to match properchip and modifying nothing else did'nt work either (it compiles, programs, but starts into the quick blinking leds bootlader).

Regards,

Jean-François Simon
We propose hobbyists and professional products at
[url="https://lecomptoirelectronique.fr"]https://lecomptoirelectronique.fr[/url]

JohnS

I think it will need careful comparison of the files and schematics, and sadly some (more) mistakes.

If they also support the UBW32 then it also uses the 795.

The 795 mainly has more of its memory space usefully filled and a different DEVID (Device ID) - see the datasheets for full details.

John

JeanFrancois

Hello,

I Modified this file: boards.py

# MODIFIED Micro:

class PIC32_Pinguino_Micro(object):
    name = 'PIC32 Pinguino Micro'
    arch = 32
    bldr = 'microchip'
    proc = '32MX795F512H' # Original: 32MX440F256H
    board = 'PIC32_PINGUINO_MICRO'
    vendor = MICROCHIP_ID
    product = P32_ID
    ivtstart = 0x9D005000           # _ebase_address (exception_mem)
    memstart = 0x9D006010           # kseg0_program_mem
    memend   = 0x9D080000        # Original: 0x9D040000
    shortarg = '-M'              # Original: M
    longarg = '--olimex440Micro' # Original: olimex440Micro

class PIC32_Pinguino_T795(object):
    name = 'PIC32 Pinguino T795'
    arch = 32
    bldr = 'microchip'
    proc = '32MX795F512H'
    board = 'PIC32_PINGUINO_T795'
    vendor = MICROCHIP_ID
    product = P32_ID
    ivtstart = 0x9D005000           # _ebase_address (exception_mem)
    memstart = 0x9D006010           # kseg0_program_mem
    memend   = 0x9D080000
    shortarg = '-T'
    longarg = '--olimexT795'


Regards,

Jean-François Simon
We propose hobbyists and professional products at
[url="https://lecomptoirelectronique.fr"]https://lecomptoirelectronique.fr[/url]

JohnS

You'll need to find what the shortarg & longarg are for - my guess is conditional compilation of the C (and/or runtime for the py) code.

You may be lucky and get away with copying the T795 but may well need to make changes to the C (and/or py) code and some new arg settings to match those changes.

John