This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HalCoGen 04.06.00 error: can't open file

Other Parts Discussed in Thread: HALCOGEN

Hi,

when I press F5 (generate Code), I get

error: can't open file: D:\xxxxx\TICore\include\*.*

for each and every file. Nevertheless they are touched (time and date changed) and changes are applied.

Is this a known problem?
Any ideas?

Best Regards

  • solved - files were accidentally write protected
  • Hi Achim,
    Glad your problem is solved. Can you please close this thread? Thanks.
  • Hi,

    I still get unpredictable results from HalCoGen without meaningful error messages.

    I have created two HET projects in separate directories.

    If I keep the created het-files in their directories, they are not found by auto generated code.
    If I copy them to the TICore/include and TICore/source directory the are destroyed each time I run HalcoGen.

    If I change the #include in TICore\source\HL_het.c to use relative path it is destroyed each time I run HalcoGen, because the auto generated #include is not placed in a user code section.

    What is the recommended way to get the path known for auto-generated code?
    Or where should I place the files created from hetp.exe?

    If I try to debug code from HL_het.c after this change I get
    No code is associated with
    “D:/xxxx/TICore/source/HL_het.c” line 275
    but CCS 6.1.3 terminated with 0 errors

     

    The HET stuff is done with:
    c:\ti\Hercules\bin\hetp.exe -v2 -hc32 -n0 d:\xxxx\HETstuff\HET1\HET1.het
    c:\ti\Hercules\bin\hetp.exe -v2 -hc32 -n1 d:\xxxx\HETstuff\HET2\HET2.het
    and seems to work in HET IDE simulation (WIN7)

    Is there any recommendation where to use Windows \ or Linux / in path?

    They seem to be mixed up all over the project.

    Thanks for any help in advance

     

  • Hi Achim,

      After you assemble the HET program, there will be a .h and .c files generated. In HalCoGen you can include these two files as part of generated code. Did you click the checkbox 'Enable Advance Config Mode/ Disable BlacBox Driver' and supply the the .h and .c files? Please see the below screenshot.

  • Hi Charles,

    thanks for your answer - I did it exactly this way.

    When I put
    d:\xxxx\HETstuff\HET1\HET1.c
    and
    d:\xxxx\HETstuff\HET1\HET1.h into this menu it is automatically changed to
    ..\HETstuff\HET1\HET1.c
    and
    ..\HETstuff\HET1\HET1.h
    in HalcoGen.

    But the include auto-generated in HL_het.c is:
    #include "HET1.h" and #include "HET2.h"
    if I change the auto-generated code to
    #include "..\..\HETstuff\HET1\HET1.h" and #include "..\..\HETstuff\HET2\HET2.h"
    it is possible to compile, link and run.

    If I move the files manually to TICore they are found as well.
    I can compile and I got my first Interrupts.

    But each time I touch the HalgoGen these changes are lost.

    Best Regards
    Olaf
  • Hi Olaf,

     I might need to forward your question to our HalCoGen team as to why it does not recognize the full path to the .h and .c files.

    In the meantime I'm checking one of my HET projects and I don't see an issue. I guess the reason I don't have the same issue you have is that I have these files (the .c and .h files) in the same project directory Below is what I do.

    I have a 'HET code' subdirectory where I have my HET .c and .h files under my project Symmetrical_PWM. See below. Note that I exclude the 'HET code' from build.

    In the HalCoGen I associate the .h and .c files.

    Once you generate code in HalCoGen, the two .c and .h files will be automatically created again in the 'source' directory. See below for Symmetrical_PWM.c. With this approach I don't have any compile issue.

    Or, you can include your .h and .c within the USER CODE so they don't get removed when you generate code again. See below.

    #include "het.h"
    #include "sys_vim.h"
    /* USER CODE BEGIN (0) */

    #include "..\..\HETstuff\HET1\HET1.h"

    #include "..\..\HETstuff\HET2\HET2.h"
    /* USER CODE END */