changing for pic32
DEBUG:mikroeuhb.devkit:buffering 118908 of 118908 blocks DEBUG:mikroeuhb.devkit:writing 8 bytes to 0x1fc01180 Traceback (most recent call last): File "/usr/local/bin/mikroe-uhb", line 5, in <module> pkg_resources.run_script('mikroe-uhb==0.2', 'mikroe-uhb') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1441, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/mikroe_uhb-0.2-py2.7.egg/EGG-INFO/scripts/mikroe-uhb", line 58, in <module>

  File "/usr/local/lib/python2.7/dist-packages/mikroe_uhb-0.2-py2.7.egg/EGG-INFO/scripts/mikroe-uhb", line 55, in main

  File "build/bdist.linux-x86_64/egg/mikroeuhb/device.py", line 137, in program
  File "build/bdist.linux-x86_64/egg/mikroeuhb/hexfile.py", line 28, in load
  File "build/bdist.linux-x86_64/egg/mikroeuhb/devkit.py", line 417, in write
  File "build/bdist.linux-x86_64/egg/mikroeuhb/devkit.py", line 115, in _write_phy
IndexError: invalid address 0x1fc01180
make: *** [test_load] Error 1
AttributeError: PIC32DevKit instance has no attribute 'blockaddr'
DEBUG:mikroeuhb.devkit:attempting to write 4 bytes to addr 0x1d004944 DEBUG:mikroeuhb.devkit:writing 16 bytes to 0x1d004948 DEBUG:mikroeuhb.devkit:attempting to write 16 bytes to addr 0x1d004948 DEBUG:mikroeuhb.devkit:writing 8 bytes to 0x1d004958 DEBUG:mikroeuhb.devkit:attempting to write 8 bytes to addr 0x1d004958 DEBUG:mikroeuhb.devkit:writing 16 bytes to 0x1fc02ff0 DEBUG:mikroeuhb.devkit:attempting to write 16 bytes to addr 0x1fc02ff0 DEBUG:mikroeuhb.devkit:first block: ffffffffffffffff

shows no errors, but doesn't actually reflash the board
added more debugging statements
this is why it had problems:

DEBUG:mikroeuhb.devkit:PIC32 initializing blocks, block = None
DEBUG:mikroeuhb.devkit:initializing 643196 blocks of 4096 bytes each, total of 0x9d07c000 bytes
DEBUG:mikroeuhb.devkit:initializing extra block 130050 DEBUG:mikroeuhb.devkit:PIC32 initializing blockaddr, block = 130050 DEBUG:mikroeuhb.devkit:FIXME: fix_bootloader() unimplemented DEBUG:mikroeuhb.devkit:transfer to device starting Traceback (most recent call last): File "/usr/local/bin/mikroe-uhb", line 5, in <module> pkg_resources.run_script('mikroe-uhb==0.2', 'mikroe-uhb') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1441, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/mikroe_uhb-0.2-py2.7.egg/EGG-INFO/scripts/mikroe-uhb", line 58, in <module>

  File "/usr/local/lib/python2.7/dist-packages/mikroe_uhb-0.2-py2.7.egg/EGG-INFO/scripts/mikroe-uhb", line 55, in main

  File "build/bdist.linux-x86_64/egg/mikroeuhb/device.py", line 139, in program
  File "build/bdist.linux-x86_64/egg/mikroeuhb/devkit.py", line 205, in transfer
KeyError: 0
make: *** [test_load] Error 1
no errors but no sign anything was written either
with calculator.hex:

DEBUG:mikroeuhb.devkit:writing 1 bytes to 0x1d00f658
Traceback (most recent call last):
  File "/usr/local/bin/mikroe-uhb", line 5, in <module>
    pkg_resources.run_script('mikroe-uhb==0.2', 'mikroe-uhb')
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1441, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/mikroe_uhb-0.2-py2.7.egg/EGG-INFO/scripts/mikroe-uhb", line 58, in <module>

  File "/usr/local/lib/python2.7/dist-packages/mikroe_uhb-0.2-py2.7.egg/EGG-INFO/scripts/mikroe-uhb", line 55, in main

  File "build/bdist.linux-x86_64/egg/mikroeuhb/device.py", line 137, in program
  File "build/bdist.linux-x86_64/egg/mikroeuhb/hexfile.py", line 28, in load
  File "build/bdist.linux-x86_64/egg/mikroeuhb/devkit.py", line 413, in write
AssertionError
make: *** [test_load] Error 1
again no errors but no new program written
too verbose now. seems we might be trying to write to virtual addresses
appears to have written something this time, but quite possibly incorrectly it for sure isn't running the Calculator app
still does not program correctly, not sure yet if it still overwrite bootloader or not
it works!
removed some unnecessary stuff
DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d00f000 Traceback (most recent call last): File "/usr/local/bin/mikroe-uhb", line 5, in <module> pkg_resources.run_script('mikroe-uhb==0.2', 'mikroe-uhb') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1441, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/mikroe_uhb-0.2-py2.7.egg/EGG-INFO/scripts/mikroe-uhb", line 58, in <module>

  File "/usr/local/lib/python2.7/dist-packages/mikroe_uhb-0.2-py2.7.egg/EGG-INFO/scripts/mikroe-uhb", line 55, in main

  File "build/bdist.linux-x86_64/egg/mikroeuhb/device.py", line 138, in program
  File "build/bdist.linux-x86_64/egg/mikroeuhb/devkit.py", line 513, in transfer
IndexError: list index out of range
make: *** [test_load] Error 1
fix_bootloader is overwriting wrong place still, and the bootloader is still borked after running
here is what is getting overwritten with 0x70000000 compared to what gets written using windows tools.

jcomeau@aspire:~/rentacoder/jmuzzio$ diff pic32mx7_boot.xxd /tmp
5c5
< 0000040: 0000 0070 0000 0070 0000 0070 0000 0070  ...p...p...p...p
DEBUG:mikroeuhb.devkit:skipping write to config_data_addr DEBUG:mikroeuhb.devkit:boot block before fix: 000000700000007000000070 DEBUG:mikroeuhb.devkit:boot block after fix: 079d1e3c00c0de370800c003 DEBUG:mikroeuhb.devkit:transfer to device starting DEBUG:mikroeuhb.devkit:writing blocks 118784 through 118785 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d000000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d001000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d002000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d003000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d004000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d005000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d006000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d007000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d008000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d009000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d00a000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d00b000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d00c000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d00d000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d00e000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1d00f000 DEBUG:mikroeuhb.devkit:writing blocks 130048 through 130049 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1fc00000 DEBUG:mikroeuhb.devkit:WRITE 4096 bytes to address 0x1fc01000
fixed debugging message