Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ds30 Loader GUI can't write flash

I programmed my PIC12F1840 with ds30 Loader successfully, the HEX-file was imported successfully but after being parsed, the "Write flash" check box remains disabled and I don't know why. The program has been successfully tested on the µC without bootloader. Here is what I got from the GUI:

Quote:Parsing hexfile...
File timestamp: 14/05/2013 17:01:17
Opening hexfile...ok
Validating hexfile...ok
Detected instructions where user goto should be moved to
Flash row 0 is used, 0x00 - 0x1F
Flash row 1 is used, 0x20 - 0x3F
Flash row 2 is used, 0x40 - 0x5F
Flash row 3 is used, 0x60 - 0x7F
Flash row 4 is used, 0x80 - 0x9F
Flash row 117 is used, 0xEA0 - 0xEBF
Flash row 118 is used, 0xEC0 - 0xEDF
Flash row 119 is used, 0xEE0 - 0xEFF
Flash row 120 is used, 0xF00 - 0xF1F
Flash row 121 is used, 0xF20 - 0xF3F
Config word 0 is used, value: 0xC9E4
Config word 1 is used, value: 0xFFFF
Bootloader start address: 0xF40
Bootloader end address: 0xFFF
Bootloader start page: 122
Bootloader end page: 127
Bootloader start row: 122
Bootloader end row: 127
Hex file successfully parsed in 8ms

By the way, the firmware is well detected on the µC:

Quote:Opening port USB Serial Port (COM3)@9600
Searching for bl .
Found PIC12F1840 fw ver. 1.0.2
Closing port

If you could guide me about what is going wrong (or what I am doing wrong), I would be grateful, thank you.
Please post the hex file. In the meantime you could try to enable "Don't write empty pages" on the advanced tab.

Thanks for your quick reply. As you guessed, the hex-file is the problem as I tried with another hex-file and the 'Write flash' checkbox get enabled. So it seems that the generated hex-file is 'corrupted', is there an issue with my environment settings? Changing the 'Don't write empty pages' option does not affect the 'Write flash' checkbox.

Attached Files
.txt   hexfile.txt (Size: 14.77 KB / Downloads: 3)
Which compiler are you using?
I'm using HI-TECH C Lite compiler (link).
You need to reserve the boot loader space in you application using the "ROM ranges" compiler option. See the attached screenshot.

Attached Files Thumbnail(s)
Thank you! In fact, I did it but forgot about the space to deposit goto to user application (3 instructions). I don't know why I didn't try to reserve a wider space for the bootloader. The error message was clear but I didn't understand it. For someone who would be as silly as I was, here is the thing, the ds30 Loader GUI shows where the bootloader is located in the memory but the goto user app takes 3 more instructions so one needs to reserve enough space for the bootloader + 3.
Ah sorry, I forgot that Smile
(2013-05-14, 17:23:33)NicolasNSE Wrote: By the way, the firmware is well detected on the µC:

Will you be able to upload the hex file and full source for 12f1840 ?
All Iam getting is timeout. When I tried enabling external reset I get . (discarded null byte) . . . . . . . . . . . . . timed out..

Okay got it working,

Added the following to the userinit macro to make pins digital

CLRF ANSELA ;digital I/O


Forum Jump:

Users browsing this thread: 1 Guest(s)