ECIO-40p
ECIO-40p
I am using the ECIO programmer in standalone mode and tried to load the hex file compiled under MPLAB V 8.76. The file loads and attempts program the device but fails to complete. The last block fails to load and led remains in a flashing state. It does this also with a pre-compiled code from fCV4. However within FCV4 it does program correctly reverting to a the green led being continuously on and code functions as intended. Are some other commands I need to supply to terminate the programming under stand alone operation ?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ECIO-40p
Hello,
Yes you need to do two things when using a stand alone compiler.
1) You need to shift the beginning of your code from 0x0 to 0x800. In the Microchip compilers this is normally done with a linker script or pragma command. You shoul dbe able to look at a Microchip bootloader example to find out how this is done.
2) You also need to ensure the hex file is generated in "inhx032" format. You may not need to do anything here but if the programming still does not work after you have shifted the code to start from 0x800 then you may need to look into how this is done for your compiler.
See this page where is details how to setup the HiTech compiler for use with an ECIO or MIAC in Flowcode.
http://www.matrixmultimedia.com/mmforum ... =26&t=6812
Programs generated in Flowcode for a non ECIO target eg the 18F4455 will not work on the ECIO as you need to follow step 1 as listed above. Simply switching the project chip target to a ECIO in Flowcode and recompiling will automatically solve this issue.
Yes you need to do two things when using a stand alone compiler.
1) You need to shift the beginning of your code from 0x0 to 0x800. In the Microchip compilers this is normally done with a linker script or pragma command. You shoul dbe able to look at a Microchip bootloader example to find out how this is done.
2) You also need to ensure the hex file is generated in "inhx032" format. You may not need to do anything here but if the programming still does not work after you have shifted the code to start from 0x800 then you may need to look into how this is done for your compiler.
See this page where is details how to setup the HiTech compiler for use with an ECIO or MIAC in Flowcode.
http://www.matrixmultimedia.com/mmforum ... =26&t=6812
Programs generated in Flowcode for a non ECIO target eg the 18F4455 will not work on the ECIO as you need to follow step 1 as listed above. Simply switching the project chip target to a ECIO in Flowcode and recompiling will automatically solve this issue.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ECIO-40p
Hi Benj,
Thanks for your detailed reply, however I still cannot get it to load correctly after setting switches as suggested. I am using picc-18 ver 9.63 in lite mode. On peeking the .hex file code in my application is offset at 0x800 but a bulk of the code is loaded at the top ( high address) end of memory - does this cause a problem with ECIO devices ?
Regards
Paul
Thanks for your detailed reply, however I still cannot get it to load correctly after setting switches as suggested. I am using picc-18 ver 9.63 in lite mode. On peeking the .hex file code in my application is offset at 0x800 but a bulk of the code is loaded at the top ( high address) end of memory - does this cause a problem with ECIO devices ?
Regards
Paul
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ECIO-40p
Hi Paul,
No that shouldn't be a problem. If you like you can send me the hex file via a attachment or PM and I will have a look for you.
No that shouldn't be a problem. If you like you can send me the hex file via a attachment or PM and I will have a look for you.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ECIO-40p
Hi Benj,
Soruce and .hex attached.
Regards
Paul
Soruce and .hex attached.
Regards
Paul
- Attachments
-
- led1.zip
- (2.73 KiB) Downloaded 502 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ECIO-40p
Hello,
Looking at another project online using the same compiler they seem to have the following linker setting in their compilation toolchain.
--output=default,-inhx032
I think this is the switch that will allow the ECIOprog tool to correctly load your hex file. The hex file itself looks ok to me so the addresses have been shifted to 0x800 correctly.
Taken from this post
http://www.microchip.com/forums/tm.aspx ... e=1#637261
Looking at another project online using the same compiler they seem to have the following linker setting in their compilation toolchain.
--output=default,-inhx032
I think this is the switch that will allow the ECIOprog tool to correctly load your hex file. The hex file itself looks ok to me so the addresses have been shifted to 0x800 correctly.
Taken from this post
http://www.microchip.com/forums/tm.aspx ... e=1#637261
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ECIO-40p
Hi Benj,
When I load a FCV4 test programme via the ECIO programmer it loads and only runs when I issue a reset command ( ^T). When the HITECH compiled code is loaded it fails to run after a reset. Looking at the hex file : in the flowcode example the code starts thus
1025 0800 EF26 GOTO 0x84c
1026 0802 F004 NOP
1027 0804 FFFF NOP
1028 0806 FFFF NOP
1029 0808 EF4B GOTO 0x896
1030 080A F004 NOP
In the HITECH example code starts :
1025 0800 EE00 LFSR 0, 0
1026 0802 F000 NOP
1027 0804 EE10 LFSR 0x1, 0x6
1028 0806 F006 NOP
1029 0808 EC1A CALL 0x834, 0
1030 080A F004 NOP
1031 080C EE04 LFSR 0, 0x400
1032 080E F000 NOP
LFSR is not listed in the PIC18F4455 instruction. Any Ideas ?
Paul
When I load a FCV4 test programme via the ECIO programmer it loads and only runs when I issue a reset command ( ^T). When the HITECH compiled code is loaded it fails to run after a reset. Looking at the hex file : in the flowcode example the code starts thus
1025 0800 EF26 GOTO 0x84c
1026 0802 F004 NOP
1027 0804 FFFF NOP
1028 0806 FFFF NOP
1029 0808 EF4B GOTO 0x896
1030 080A F004 NOP
In the HITECH example code starts :
1025 0800 EE00 LFSR 0, 0
1026 0802 F000 NOP
1027 0804 EE10 LFSR 0x1, 0x6
1028 0806 F006 NOP
1029 0808 EC1A CALL 0x834, 0
1030 080A F004 NOP
1031 080C EE04 LFSR 0, 0x400
1032 080E F000 NOP
LFSR is not listed in the PIC18F4455 instruction. Any Ideas ?
Paul
Re: ECIO-40p
Further investigation revealed that the hex file generated by the hitech compiler does not load properly even though the hex output format is inhx032. When read back via the programmer the device is empty ! Eyeballing the hex file and comparing it with a working FCV4 hex file they look similar in format. Perhaps its the compiler.
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ECIO-40p
Hello,
I have had hex files working with the ECIO and MIAC using the Hitech compiler so it definitely can work.
Here are the settings for Flowcode.
If your using a Matrix target with Matrix USB bootloader eg MIAC, ECIO
Compiler Location = C:\Program Files\HI-TECH Software\PICC-18\PRO\9.63\bin\picc18.exe
Params = --CHIP=%p -N48 %f.c --CODEOFFSET=800h --ROM=default,-0-7FF --OUTPUT=inhx032
Taken from this article.
http://www.matrixmultimedia.com/mmforum ... =26&t=6812
Have you done a Google search for some thing along the lines of "hitech pdfsusb bootloader example"
The second link down looks pretty good.
http://www.picprojects.net/usbbootloader/index.html
See the section entitled "Application Software for usage of the Bootloader"
Though the programming tool is the ECIOprog application and not the Microchip PDFSUSB application the hex format and firmware offset are the same.
I have had hex files working with the ECIO and MIAC using the Hitech compiler so it definitely can work.
Here are the settings for Flowcode.
If your using a Matrix target with Matrix USB bootloader eg MIAC, ECIO
Compiler Location = C:\Program Files\HI-TECH Software\PICC-18\PRO\9.63\bin\picc18.exe
Params = --CHIP=%p -N48 %f.c --CODEOFFSET=800h --ROM=default,-0-7FF --OUTPUT=inhx032
Taken from this article.
http://www.matrixmultimedia.com/mmforum ... =26&t=6812
Have you done a Google search for some thing along the lines of "hitech pdfsusb bootloader example"
The second link down looks pretty good.
http://www.picprojects.net/usbbootloader/index.html
See the section entitled "Application Software for usage of the Bootloader"
Though the programming tool is the ECIOprog application and not the Microchip PDFSUSB application the hex format and firmware offset are the same.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: ECIO-40p
Hi Benj,
Finally found the problem - I was using an old ECIO programmer. On using mLoader it run first time and code is performing as expected with compiler switches as suggested. Thanks for your help.
Regards
Paul
Finally found the problem - I was using an old ECIO programmer. On using mLoader it run first time and code is performing as expected with compiler switches as suggested. Thanks for your help.
Regards
Paul
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: ECIO-40p
Hi Paul,
That's great glad you got it working and thanks for letting us know.
That's great glad you got it working and thanks for letting us know.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel