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.

Full EtherCat application error

Other Parts Discussed in Thread: AM3359, SYSBIOS

Hello!

I want to build the full ethercat apllication to create my own slave device with a am3359 ice board. I followed the description in the sdk user guide, but when I build the project, i get an error:


#5  could not open source file "p24Hxxxx.h"

This error is located in the el9800hb.h

So I thought to turn this makro off, because I'm not using a Beckhoff Board:

#define EL9800_HW                                 1

Then I get the next error about the _PIC24 makro, also turned this off, but it doesn't help.

I'm using the latest version, sdk_1.1.0.1.

Additonally, according to the user guide I made "Applying a Patch File" step, how can I know that this was made successfully? In my opinion the source files of SSC have to change afterwards, but I couldn't see that. Maybe here is the error?

Does anyone have an idea?

  • Stefan,

    does you SSC code match the version listed for current IA-SDK? I assume you either trying to patch the wrong files or something went wrong during patching. Usually patch produces some output. Can you redo that step from scratch and add the logs here?

    regards,

  • Hi Frank,

    yes it matches, I have the SSC 5.10 as requested (in user guide).

    So I've done it again (user guide page 15) and tried to patch the src files, but I got no output and the src files are the same as before. Here is my log:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.

    C:\Users\slotis.ITK>cd C:\Users\slotis.ITK\Downloads\patch-2.5.9-7-bin\bin

    C:\Users\slotis.ITK\Downloads\patch-2.5.9-7-bin\bin>patch.exe -i C:\TexasInstrum
    ents\am335x_sysbios_ind_sdk_1.1.0.1\sdk\protocols\ethercat_slave\ecat_appl\patch
    \TI_ECAT.patch -d C:\Users\slotis.ITK\Documents\Bachelorarbeit neu\Slave Stack C
    ode Beckhoff\SSC_V5i10\SlaveFiles2\src

    C:\Users\slotis.ITK\Downloads\patch-2.5.9-7-bin\bin>

    So after I enter it, windows asks me about permission for changes, I accept, and then a window appears, but for such a short time I cannot see something because it disappears very quick.

    Kindly regards

  • Can you check your patch tool if it has any option for full detailed output. Did it actually change any files?

    Regards,

  • Oh, you already stated files are not changed... So your patch does not work at all. You will need to your folder paths then. the full output option should be helpful to find issues.

  • Where can I change the options of the patch tool? I couldn't find anything

  • c:\Program Files (x86)\_Tools\File\patch-2.5.9-7-bin\bin>patch.exe --help
    Usage: patch.exe [OPTION]... [ORIGFILE [PATCHFILE]]

    Input options:

      -p NUM  --strip=NUM  Strip NUM leading components from file names.
      -F LINES  --fuzz LINES  Set the fuzz factor to LINES for inexact matching.
      -l  --ignore-whitespace  Ignore white space changes between patch and input.

      -c  --context  Interpret the patch as a context difference.
      -e  --ed  Interpret the patch as an ed script.
      -n  --normal  Interpret the patch as a normal difference.
      -u  --unified  Interpret the patch as a unified difference.

      -N  --forward  Ignore patches that appear to be reversed or already applied.
      -R  --reverse  Assume patches were created with old and new files swapped.

      -i PATCHFILE  --input=PATCHFILE  Read patch from PATCHFILE instead of stdin.

    Output options:

      -o FILE  --output=FILE  Output patched files to FILE.
      -r FILE  --reject-file=FILE  Output rejects to FILE.

      -D NAME  --ifdef=NAME  Make merged if-then-else output using NAME.
      -E  --remove-empty-files  Remove output files that are empty after patching.

      -Z  --set-utc  Set times of patched files, assuming diff uses UTC (GMT).
      -T  --set-time  Likewise, assuming local time.

      --quoting-style=WORD   output file names using quoting style WORD.
        Valid WORDs are: literal, shell, shell-always, c, escape.
        Default is taken from QUOTING_STYLE env variable, or 'shell' if unset.

    Backup and version control options:

      -b  --backup  Back up the original contents of each file.
      --backup-if-mismatch  Back up if the patch does not match exactly.
      --no-backup-if-mismatch  Back up mismatches only if otherwise requested.

      -V STYLE  --version-control=STYLE  Use STYLE version control.
            STYLE is either 'simple', 'numbered', or 'existing'.
      -B PREFIX  --prefix=PREFIX  Prepend PREFIX to backup file names.
      -Y PREFIX  --basename-prefix=PREFIX  Prepend PREFIX to backup file basenames.
      -z SUFFIX  --suffix=SUFFIX  Append SUFFIX to backup file names.

      -g NUM  --get=NUM  Get files from RCS etc. if positive; ask if negative.

    Miscellaneous options:

      -t  --batch  Ask no questions; skip bad-Prereq patches; assume reversed.
      -f  --force  Like -t, but ignore bad-Prereq patches, and assume unreversed.
      -s  --quiet  --silent  Work silently unless an error occurs.
      --verbose  Output extra information about the work being done.
      --dry-run  Do not actually change any files; just print what would happen.
      --posix  Conform to the POSIX standard.
      --unified-reject-files  Create unified reject files.
      --global-reject-file=file  Put all rejects into one file.

      -d DIR  --directory=DIR  Change the working directory to DIR first.
      --binary  Read and write data in binary mode.

      -v  --version  Output version info.
      --help  Output this help.

    Report bugs to <bug-patch@gnu.org>.

  • Thank you!

    I rethought and I decided to work first with the simple example.

    How can I debug the project? Why the breakpoints don't work which I have set in the "LEDtask"? How can I get into this task to see what it exactly does?

    It's very confusing and hard to understand the mode of operation of the debugging in CCS...

  • Ok I found the answer in another thread...

    The option "Halt the target before any debugger accesses (will impact servicing of interrupts)" in Debugger options=>Auto Run and Launch options has to be checked.

    Then it is possible to set breakpoints while running, the breakpoints now have a blue circle with a hook. Before, setting breakpoints while stopping is possible, but the debugger would not stop if you resume. Quite curious for me...

    I think it would be great if that option is checked as default, otherwise probably every beginner will run into this problem...