Can't find source file in imported project: KSDK 1.3.0/KDS 3.0.0/Win 7

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't find source file in imported project: KSDK 1.3.0/KDS 3.0.0/Win 7

1,683 Views
garylynch
Contributor IV

I have incorporated KSDK 1.3.0 into KDS 3.0.0 and have
imported, built, and run an example on my Tower out of the
TWR-K60D100M project collection. I imported the project
without setting the "Copy projects..." option, so assume it
was built and run from the original directory.

 

Next I wanted to tinker with a project after I imported it,
so selected the "Copy projects..." option. The import
appeared to terminate normally, but I couldn't build it, and
when I tried to open a source file I got an error message
indicating it didn't exist.

 

I deleted the project and repeated the process, to no
different result.  I deleted it again, but now the import
fails, giving the diagnostic:

 

  "Some projects cannot be imported because they already
   exist in the workspace"

 

I took a look at the workspace with Windows Explorer. Oddly
enough, the project I tried to delete (plus one other) shows
up in the file pane, but not in the folder pane! I can click
down into it and see that it has no "Sources" sub-folder, in
which my other projects keep their main.c.

99670_99670.pngIncompleteImport01.png

I have found only sketchy documentation on how projects are
stored by KDS.  Anyone know what's going on here?

Labels (1)
0 Kudos
Reply
5 Replies

797 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Gary,

1) When you import one project in kds  , if the project name is the same with one project which has under the workspace ,

it will show  "Some projects cannot be imported because they already exist in the workspace"

2) When you delete the project under workspace  , i recommend you close the KDS , then delete it .

3) Could you please tell me when you import  and copy which demo code , it have error ? I will test it on my side .

4)About the store project on kds, if without link , it will store at the project you put , if with, it is saved in the source place .

Hope it helps , if still have any question or i misunderstand your ,please tell me without any hesitate .

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------


Have a great day,
Alice

0 Kudos
Reply

797 Views
garylynch
Contributor IV

Thank you, Alice,

I tried to add and remove projects in the manner you
describe:


- I imported from directory:
  • C:\Freescale\KSDK_1.3.0\examples\twrk60d100m\driver_examples\i2c\i2c_callback\master\kds

  with "Copy projects into workspace" unchecked, and
  • C:\Freescale\KSDK_1.3.0\examples\twrk60d100m\driver_examples\i2c\i2c_callback\slave\kds

  with the same box checked.

- In my "Project Explorer" pane of KDS I see both projects:
  • i2c_callback_master_example_twrk60d100m
  • i2c_callback_slave_example_twrk60d100m

- Using Windows Explorer in my
  • C:\Users\gary.lynch\workspace.kds

  folder I can see the folder
  i2c_callback_slave_example_twrk60d100m, but under it I see
  only a .settings folder: no source or Includes folders, no
  source files, and no header files, although they all
  appear in my "Project Explorer " window.

- Next I returned to:
  • C:\Freescale\KSDK_1.3.0\examples\twrk60d100m\driver_examples\i2c\i2c_callback

  checking \master\kds & \slave\kds to learn that they, too,
  contained no source nor header files. However their parent
  folders (\master & \slave) DO contain source files.

- Then I built the master project using the hammer button.
  This created a folder structure under the
  C:\Freescale\KSDK_1.3.0\examples\twrk60d100m\driver_examples\i2c\i2c_callback\master\kds
  folder:
  \kds
    +--debug
        +--board
        +--source
        +--startup
        +--utilities

  whose members contain only build artifacts (*.d, *.o).

- Then I built the slave project as before. This build
  failed however, in a slew of error messages:
  >
  > 10:08:00 **** Build of configuration debug for project i2c_callback_slave_example_twrk60d100m ****
  > make -k all
  > make: *** No rule to make target `C:/platform/utilities/src/fsl_debug_console.c', needed by `utilities/fsl_debug_console.o'.
  > make: *** No rule to make target `C:/platform/utilities/src/fsl_misc_utilities.c', needed by `utilities/fsl_misc_utilities.o'.
  > make: *** No rule to make target `C:/platform/utilities/src/print_scan.c', needed by `utilities/print_scan.o'.
  > make: *** No rule to make target `C:/platform/devices/startup.c', needed by `startup/startup.o'.
  > make: *** No rule to make target `C:/platform/devices/MK60D10/startup/gcc/startup_MK60D10.S', needed by `startup/startup_MK60D10.o'.
  > make: *** No rule to make target `C:/platform/devices/MK60D10/startup/system_MK60D10.c', needed by `startup/system_MK60D10.o'.
  > make: *** No rule to make target `C:/Users/gary.lynch/workspace.kds/fsl_i2c_irq.c', needed by `source/fsl_i2c_irq.o'.
  > make: *** No rule to make target `C:/Users/gary.lynch/workspace.kds/main.c', needed by `source/main.o'.
  > make: *** No rule to make target `C:/board.c', needed by `board/board.o'.
  > make: *** No rule to make target `C:/gpio_pins.c', needed by `board/gpio_pins.o'.
  > make: *** No rule to make target `C:/Users/gary.lynch/workspace.kds/hardware_init.c', needed by `board/hardware_init.o'.
  > make: *** No rule to make target `C:/pin_mux.c', needed by `board/pin_mux.o'.
  > make: *** No rule to make target `C:/Users/gary.lynch/workspace.kds/i2c_callback_slave_example_twrk60d100m/../../../../../../../lib/ksdk_platform_lib/kds/K60D10/debug/libksdk_platform.a', needed by `i2c_callback_slave_example_twrk60d100m.elf'.
  > make: Target `all' not remade because of errors.
  >
  > 10:08:01 Build Finished (took 296ms)
  >

  A quick check with Google indicates that make generates
  such messages when it can't find the source file cited
  therein. Most alarming are the paths:
  • C:/platform
  • C:/board.c

  which point to non-existent folders. I may be missing an
  environment variable somewhere.

  This time the
  • C:\Users\gary.lynch\workspace.kds\

  folder received the
   debug
    +--board
    +--source
    +--startup
    +--utilities

  structure, and the folders contain only *.mk files.

- Then I tried to delete both projects from KDS, using
  <RgtClk> Delete, and checked the box:
    "Delete project contents on disk (cannot be undone)"

  for both projects. Each time the project disappeared from
  the "Project Explorer" pane and the \slave folder vanished
  from my workspace.kds folder.

- Last (but not least) I tried to re-import the \slave
  project, copying files to the workspace and it appears to
  have restored it original state. (The build still fails.)

So my original question remains: when I import a project
with the "Copy files" option, where are the files supposed
to go?

In addition it would be nice to know why the build described
above fails.

Thanks again.

0 Kudos
Reply

797 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Gary Lynch:

In short, the option "Copy projects into workspace" is not of any use with the example projects delivered with KSDK.

The reason is that all the files are linked using relative paths, referencing the original location of the project. There is a similar discussion in this thread: CW 10.6 Import/Copy to workspace Example Project(s) Issue .

In fact, after importing the project with the "Copy.." option checked, if you open the Project Properties -> Resource -> Linked Resources -> Linked Resources tab, you will see all of the links that are broken (invalid location):

pastedImage_2.png

Of course you can fix those links, but that is a tedious task.

Instead, if you want to copy the example projects or create new ones, Freescale has just released the first official version of KSDK project generator. Read about it in this document:

New Kinetis SDK Project Generator is available!

The tools lets you clone an example project or create a new one, in standalone or linked modes.

PS. Just as a comment, in your post above you mentioned about selecting "Delete project contents...". If you did that for the I2C master project, then it will not be in your KSDK installation anymore.

Regards!
Jorge Gonzalez

0 Kudos
Reply

797 Views
garylynch
Contributor IV

I finally got KSDK Project Generator up and running on my
workstation but am unsure how to accomplish what I want with
it.  I will re-explain my objectives and ask you to tell me
what I got wrong.

1. I want to develop test applications on a Tower
    TWR-K60D100M board in preparation to fire up a new
    a new board (with a K10 process)--still in manufacture.
    Everything I get working on the K609 has to be ported
    over to the K10. I am primarily testing peripherals (e.g.
    digital I/O, analog in, CAN bus, SPI port, etc) one at a
    time.

2. The projects in the SDK cannot be 'imported' in the
    generic sense of that word. Any modifications I make
    will change the SDK base code.

3. The Project Generator (under the [Advanced] button) will
    let me clone projects inside the SDK and modify the
    clones without destroying the original projects. I still
    have to pseudo-import the cloned SDK projects into KSD.

4. The clonable projects appear to all come from the
    'demo_apps' section of the SDK (see screen shot).

ProjGenClones00.bmp

    I am  working on a CAN driver today, and find it only in
    'driver_examples' section of the SDK.

Is there any way to use these tools to generate a CAN
driver?

Thanks.

0 Kudos
Reply

797 Views
garylynch
Contributor IV

The first time I tried to delete an imported project, I
backed out, out of fear it would damage the SDK. 

This time I risked a project I am unlikely to use (my board
has no I²C interface). I was able to see the files within
the SDK from the deleted project and today I re-imported and
built the deleted project without problem.

I will try your project generator and report back if
necessary, but it will be next week before I get the chance.

Thanks again.

0 Kudos
Reply