Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Start Eclipse and select a workspace directory, different from the directory where your source file is located.

  2. To create an empty project, open File -> New -> C/C++ Project, select ะก Managed Build and click Next.

    image-20240620-104405.png
  3. In C Project window enter a name of the project, for example, c-example, select Empty Project -> Cross GCC and click Finish.

    image-20240620-104619.png
  4. On this step you are prompted to choose build configurations. Click Next to proceed with the default settings.

  5. In the Cross GCC Command dialog, enter arm-buildroot-uclinuxfdpiceabi- in the Cross compiler prefix box and
    /usr/local/arm-buildroot-uclinuxfdpiceabi_sdk-buildroot/bin in Cross compiler path, click Finish.

    image-20240620-105026.png
  6. Develop source files for whatever application user would like to debug on the uClinux target. For instance:

    Code Block
    $ vi app.c
    #include <stdio.h>
    int func(int a, int b)
    {
            int c = (a+b)/2;
            printf("%s: (%d + %d)/2 = %d\n", __func__, a, b, c);
            return c;
    }
    int main()
    {
            int a, b, ret;
            a = 10;
            b = 20;
            ret = func(a,b);
            printf("%s: got result %d\n", __func__, ret);
            return 0;
    } 
  7. To add the source file to the project, open File -> Import. In the Import dialog select General -> File System, click Next.

    image-20240620-105501.png
  8. Click Browse and navigate to the directory where the source file is located (/home/sasha/work in the example below), then select the directory in the left window.

    image-20240620-105742.png
  9. Click Finish to complete.

...