Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mplabx - xc8 and pinguino bootloader with PIC18F2455
13-01-2014, 05:18 PM, (This post was last modified: 13-01-2014, 05:22 PM by regis.)
#7
RE: mplabx - xc8 and pinguino bootloader with PIC18F2455
That's right the stand-alone version of uploader8.py had a bug.
I fixed it just as you said. I also turned all upper case MCU names to lower case ;-)
I will commit the file soon.
Thanks you very much for this report Niko.
Régis

(13-01-2014, 02:07 PM)noefner Wrote: Hello,

to all Linux users:

I was writing a little test code in MPlabX / XC8 for the pic18f24j50 and pic18f26j50 to find out how and if it runs with the pinguino v4.x bootloader.

It came out that there is a little bug in the 'uploader8.py' python script:

The comparison in line #426 is always false if you're using a "j" device due to defined devices in 'devices_table' line #163.
All the "j" devices are defined with an upper case "J", so the uploader script will detect the right MCU but will use the wrong erased blocks size.

This results in a non-working code on the MCU and a no more working bootloader (a read on the flash memory showed up a completely empty rom with 0x0000).

Change the lower case "j" to an upper case "J" or add an 'or "J"' in line #426 and it will work fine:

uploader8.py:
Code:
> #425:    # Pinguino x6j50 or x7j53, erased blocks are 1024-byte long
> #426:    if "j" or "J" in proc :
> #427:        erasedBlockSize = 1024
> #428:
> #429:    # Pinguino x455, x550 or x5k50, erased blocks are 64-byte long
> #430:    else:
> #431:        erasedBlockSize = 64

So long,
Niko.
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply


Messages In This Thread
RE: mplabx - xc8 and pinguino bootloader with PIC18F2455 - by regis - 13-01-2014, 05:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)