• AVR Freaks

ICD 3 not recognized on simulink

Author
romain.delpoux
New Member
  • Total Posts : 17
  • Reward points : 0
  • Joined: 2017/03/24 13:36:54
  • Location: 0
  • Status: offline
2017/06/07 08:05:52 (permalink)
0

ICD 3 not recognized on simulink

Hi everyone, 
 
I have installed Microchip Blockset 3.39p03 however my ICD3 is not recognized. 
 
When I use the command : picInfo('check') I receive
Refreshing cache...
- Blockset in C:\Program Files (x86)\Microchip\MatlabTools
- Link to MPLAB X to program chip is Ok
1 Compiler(s) found for 16 bits chip:
- C:/Program Files (x86)/Microchip/xc16/v1.31

- No Compiler found for 32 bits chips
<--return
 
However in simulink, in MICROCHIP >  Select Programmer, I have only Refresh list
 
When I click, Matlab returns 
Refreshing list of programmer attached.
0 programmer found.
 
The ICD3 is correctly connected to the computer since it works perfectly with MPLAB.
 
The solution I use for the moment is to unselect Generate makefile in the simulink configuration parameters and bluid the file. It generates a *.X file that i can program using my ICD3 with MPLAB
 
Do you have any suggestions? 
 
Kind regards.
 
Romain DELPOUX
 
#1

7 Replies Related Threads

    Lubin
    Moderator
    • Total Posts : 360
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: ICD 3 not recognized on simulink 2017/06/07 08:23:03 (permalink)
    0
    Hi Romain,
     
    We mostly use kits, pickit3 and Real-Ice which are ok with Matlab/Simulnk. We need to check compatibility with ICD3.
     
    Proposed workaround:
    • keep the "Generate makefile", but to uncheck the "Flash after build" to avoid the programming attempt.
    • Add the compiler block, and check the "generate the .hex file" option
    • Program the binary file generated using the IPE software. It is distributed with MPLAB X except if you unchecked the IPE option during MPLAB X installation.
    #2
    romain.delpoux
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2017/03/24 13:36:54
    • Location: 0
    • Status: offline
    Re: ICD 3 not recognized on simulink 2017/06/07 08:36:44 (permalink)
    0
    Hi 
     
    Thank you for your asnwer.
     
    However, when I keep Generate makefile I have the following error :
    ### Build procedure for model: 'ADC3' aborted due to an error.
    Cannot propose to program chip from Matlab: Either file ADC3.hex does not exist or MPLAB X API is not available on this system.
    * Visit the Microchip Blockset Forum for any questions, issues, share tricks.
    * Visit the Microchip Wiki for further informations and examples.
    -----------------------------------------------------------------------------------------
    * MPLAB X project: ADC3.X then select the project folder
    -----------------------------------------------------------------------------------------

    ***** Error detected. Links above are provided for debug purpose only (.elf file might not be current).
    #3
    romain.delpoux
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2017/03/24 13:36:54
    • Location: 0
    • Status: offline
    Re: ICD 3 not recognized on simulink 2017/06/07 08:41:04 (permalink)
    0
    The compilations details are the following. It seems that files are missing.
     
    ### Invoking Target Language Compiler on ADC3.rtw
    ### Using System Target File: C:\Program Files (x86)\Microchip\MatlabTools\blocks\MCHP_dsPIC_stf.tlc
    ### Loading TLC function libraries
    ### Initial pass through model to cache user defined code
    .
    ### Caching model source code
    ### Writing main
    ### Writing MCHP_modelInclude.h
    --- Multi Tasking implementation (Treat each discrete rate as separate task)---
    .
    ### Writing header file ADC3.h
    ### Writing header file ADC3_types.h
    ### Writing header file rtwtypes.h
    .
    ### Writing source file ADC3.c
    ### Writing header file ADC3_private.h
    ### Writing header file rtmodel.h
    ### Writing source file ADC3_main.c
    ### TLC code generation complete.
    ### Generating TLC interface API.
    ...Warning : File C:/Program not found while building the MPLAB project.
    Warning : File Files not found while building the MPLAB project.
    Warning : File (x86)/MICROC~1/xc16/v1.31/lib/dsPIC33E/libp33EP256MC506-elf.a not found while building the MPLAB project.
    Warning : File C:/Program not found while building the MPLAB project.
    Warning : File Files not found while building the MPLAB project.
    Warning : File (x86)/MICROC~1/xc16/v1.31/lib/libpic30-elf.a not found while building the MPLAB project.
    Warning : File C:/Program not found while building the MPLAB project.
    Warning : File Files not found while building the MPLAB project.
    Warning : File (x86)/MICROC~1/xc16/v1.31/lib/libm-elf.a not found while building the MPLAB project.
    Warning : File C:/Program not found while building the MPLAB project.
    Warning : File Files not found while building the MPLAB project.
    Warning : File (x86)/MICROC~1/xc16/v1.31/lib/libc-elf.a not found while building the MPLAB project.
    Warning : File C:/Program not found while building the MPLAB project.
    Warning : File Files not found while building the MPLAB project.
    Warning : File (x86)/MICROC~1/xc16/v1.31/lib/libq-dsp-elf.a not found while building the MPLAB project.
    .
    ### Processing Template Makefile: C:\Program Files (x86)\Microchip\MatlabTools\mchp\MCHP_dsPIC.tmf
    COMPILATION using 9 thread.
    ### Creating ADC3.mk from C:\Program Files (x86)\Microchip\MatlabTools\mchp\MCHP_dsPIC.tmf
    ### Building ADC3: "mypath\ADC3.X\ADC3.bat"
    mypath\ADC3.X>"C:\Program Files\MATLAB\R2015a\bin\win64\gmake" -f ADC3.mk GENERATE_ASAP2=0 MCHP_AUTO_FLASH=0 MCHP_MULTITHREAD_COMPILATION=1 ISPROTECTINGMODEL=NOTPROTECTING -j 9 -l 9
    Compiling: ADC3_main.c
    "C:/Program Files (x86)/MICROC~1/xc16/v1.31/bin/xc16-gcc.exe" -c -mcpu=33EP256MC506 -omf=elf -g -O3 -I. -I.. -IC:/Program Files/MATLAB/R2015a/rtw/c/ert -IC:/Program Files/MATLAB/R2015a/extern/include -IC:/Program Files/MATLAB/R2015a/simulink/include -IC:/Program Files/MATLAB/R2015a/rtw/c/src -IC:/Program Files/MATLAB/R2015a/rtw/c/src/ext_mode/common -Imypath\ADC3.X -Imypath\ADC -IC:/Program Files (x86)/MICROC~1/xc16/v1.31/include -IC:/Program Files (x86)/MICROC~1/xc16/v1.31/support/dsPIC33E/h -IC:/Program Files (x86)/MICROC~1/xc16/v1.31/support/generic/h ADC3_main.c -o ADC3_main.o
    Compiling: MCHP_ADC1_Interrupt.c
    "C:/Program Files (x86)/MICROC~1/xc16/v1.31/bin/xc16-gcc.exe" -c -mcpu=33EP256MC506 -omf=elf -g -O3 -I. -I.. -IC:/Program Files/MATLAB/R2015a/rtw/c/ert -IC:/Program Files/MATLAB/R2015a/extern/include -IC:/Program Files/MATLAB/R2015a/simulink/include -IC:/Program Files/MATLAB/R2015a/rtw/c/src -IC:/Program Files/MATLAB/R2015a/rtw/c/src/ext_mode/common -Imypath\ADC3.X -Imypath\ADC -IC:/Program Files (x86)/MICROC~1/xc16/v1.31/include -IC:/Program Files (x86)/MICROC~1/xc16/v1.31/support/dsPIC33E/h -IC:/Program Files (x86)/MICROC~1/xc16/v1.31/support/generic/h MCHP_ADC1_Interrupt.c -o MCHP_ADC1_Interrupt.o
    Compiling: ADC3.c
    "C:/Program Files (x86)/MICROC~1/xc16/v1.31/bin/xc16-gcc.exe" -c -mcpu=33EP256MC506 -omf=elf -g -O3 -I. -I.. -IC:/Program Files/MATLAB/R2015a/rtw/c/ert -IC:/Program Files/MATLAB/R2015a/extern/include -IC:/Program Files/MATLAB/R2015a/simulink/include -IC:/Program Files/MATLAB/R2015a/rtw/c/src -IC:/Program Files/MATLAB/R2015a/rtw/c/src/ext_mode/common -Imypath\ADC3.X -Imypath\ADC -IC:/Program Files (x86)/MICROC~1/xc16/v1.31/include -IC:/Program Files (x86)/MICROC~1/xc16/v1.31/support/dsPIC33E/h -IC:/Program Files (x86)/MICROC~1/xc16/v1.31/support/generic/h ADC3.c -o ADC3.o
    Options have been disabled due to restricted license
    Visit http://www.microchip.com/ to purchase a new key.
    Options have been disabled due to restricted license
    Visit http://www.microchip.com/ to purchase a new key.
    Options have been disabled due to restricted license
    Visit http://www.microchip.com/ to purchase a new key.
    elf-gcc.exe: Files/MATLAB/R2015a/rtw/c/ert: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/extern/include: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/simulink/include: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/rtw/c/src: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/rtw/c/src/ext_mode/common: No such file or directory
    elf-gcc.exe: Files: No such file or directory
    elf-gcc.exe: (x86)/MICROC~1/xc16/v1.31/include: No such file or directory
    elf-gcc.exe: Files: No such file or directory
    elf-gcc.exe: (x86)/MICROC~1/xc16/v1.31/support/dsPIC33E/h: No such file or directory
    elf-gcc.exe: Files: No such file or directory
    elf-gcc.exe: (x86)/MICROC~1/xc16/v1.31/support/generic/h: No such file or directory
    gmake: *** [ADC3_main.o] Error 255
    gmake: *** Waiting for unfinished jobs....
    elf-gcc.exe: Files/MATLAB/R2015a/rtw/c/ert: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/extern/include: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/simulink/include: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/rtw/c/src: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/rtw/c/src/ext_mode/common: No such file or directory
    elf-gcc.exe: Files: No such file or directory
    elf-gcc.exe: (x86)/MICROC~1/xc16/v1.31/include: No such file or directory
    elf-gcc.exe: Files: No such file or directory
    elf-gcc.exe: (x86)/MICROC~1/xc16/v1.31/support/dsPIC33E/h: No such file or directory
    elf-gcc.exe: Files: No such file or directory
    elf-gcc.exe: (x86)/MICROC~1/xc16/v1.31/support/generic/h: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/rtw/c/ert: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/extern/include: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/simulink/include: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/rtw/c/src: No such file or directory
    elf-gcc.exe: Files/MATLAB/R2015a/rtw/c/src/ext_mode/common: No such file or directory
    elf-gcc.exe: Files: No such file or directory
    elf-gcc.exe: (x86)/MICROC~1/xc16/v1.31/include: No such file or directory
    elf-gcc.exe: Files: No such file or directory
    elf-gcc.exe: (x86)/MICROC~1/xc16/v1.31/support/dsPIC33E/h: No such file or directory
    elf-gcc.exe: Files: No such file or directory
    elf-gcc.exe: (x86)/MICROC~1/xc16/v1.31/support/generic/h: No such file or directory
    gmake: *** [MCHP_ADC1_Interrupt.o] Error 255
    gmake: *** [ADC3.o] Error 255
     
    #4
    Lubin
    Moderator
    • Total Posts : 360
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: ICD 3 not recognized on simulink 2017/06/07 09:44:14 (permalink)
    0
    Hi Romain,
     
    This seems another problem than the ICD3.
     
    This issue is related to short path name. The blockset is supposed to handle theses by converting long path to short ones (8.3 old dos format).
     
    This is the instruction used to shorten path. Could you try to type this at the matlab prompt ? RTW.transformPaths('C:/Program Files/MATLAB/R2015a/rtw/c/ert')
    What output do you get ?
     
    Thanks,
    Lubin
     
    #5
    Lubin
    Moderator
    • Total Posts : 360
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: ICD 3 not recognized on simulink 2017/06/08 04:37:38 (permalink)
    0
    Hi Romain,
     
    To get back on the ICD3 issue: ICD3 is supported by the package.
    Could you provide more details about your setup ? (Windows version etc...)
     
    Thanks,
    Lubin
    #6
    romain.delpoux
    New Member
    • Total Posts : 17
    • Reward points : 0
    • Joined: 2017/03/24 13:36:54
    • Location: 0
    • Status: offline
    Re: ICD 3 not recognized on simulink 2017/06/08 04:51:25 (permalink)
    0
    Hi Lubin,
     
    Thanks for this feedbacK.
     
    When I type command I have :
    >> RTW.transformPaths('C:/Program Files/MATLAB/R2015a/rtw/c/ert')
    ans =
    C:/Program Files/MATLAB/R2015a/rtw/c/ert
     
    I use Windows 7 Professionnel, with Matlab R2015a. I am working in a University and the system is installed by the computer service. I am still admin on my conputer.
     
    Best ragards. 
     
    Romain DELPOUX
     
     
     
    #7
    Lubin
    Moderator
    • Total Posts : 360
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: ICD 3 not recognized on simulink 2017/06/09 00:25:34 (permalink)
    4.5 (2)
    Hi Romain,
     
    Thanks for that test feedback. Your windows system has the 8.3 short name compatibility disabled. Thus when software requests a short pathname equivalent, windows provide back the original long path name. The dos command
    fsutil 8dot3name query c:
     should confirm that the “8dot3” name creation is disabled. By default, this 8dot3 name is enabled. I understood that disabling 8dot3 names slightly improve HDD performances but might create compatibility issue with technical software.

    The blockset works internally with short path name to minimize all potential problems caused by long path name containing space or special characters.

    First workaround:
    Enable long path name with a command like:
    fsutil 8dot3name set c: 0
    From now, all newly created file will have a 8dot3 equivalent. However, you will have to manually provide 8dot3 names equivalent for path created previously to this command was written with command like:
    fsutil file setshortname "c:\program files (x86)" PROGRA~1
    Further inputs about all this here: https://guyrleech.wordpress.com/2014/04/15/ntfs-8-3-short-names-solving-the-issues/
     
    Not sure however you want to modify such parameters in your system.
     
    Second workaround:
    We will make the blockset robust to residual “long path name”.

    Regarding ICD3 not detected within matlab: That problem is a side effect of that “long path name” problem. This should be fixed along with the patch making the blockset more robust in such situation.

    Would you be ok to test such patch?

    Lubin
    #8
    Jump to:
    © 2019 APG vNext Commercial Version 4.5