# \[SOLVED\]Sdef file, or sdef files. Where are they located?

**URL:** <https://forum.legato.io/t/solved-sdef-file-or-sdef-files-where-are-they-located/2379>\
**Category:** Legato Application Framework\
**Created:** [March 7, 2017, 10:53am UTC](https://forum.legato.io/t/solved-sdef-file-or-sdef-files-where-are-they-located/2379 "2017-03-07T10:53:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Luis](https://forum.legato.io/u/Luis)\
**Post date:** [March 7, 2017, 10:53am UTC](https://forum.legato.io/t/solved-sdef-file-or-sdef-files-where-are-they-located/2379/1 "2017-03-07T10:53:54Z")

</div>

I´m trying to automatically start spiService. I read that I need to edit sdef files to point to a mdef file. The thing is that I can´t find this system.sdef file or I don´t know where to put my custom sdef file.

---

<div class="post-metadata">

**Author:** ![spastor](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/spastor/32/80_2.png) [@spastor](https://forum.legato.io/u/spastor)\
**Post date:** [March 7, 2017, 11:18am UTC](https://forum.legato.io/t/solved-sdef-file-or-sdef-files-where-are-they-located/2379/2 "2017-03-07T11:18:27Z")

</div>

Hello Luis,

Here a very basic custom system:

 ![](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/b4a76655871a787b97f7aa0a8e702cf3ed728eec.png)

In your legato framework directory: Create a symbolic link to your “custom” target definitions extra file (targetDefs.extra).

Example:

> ln -sf /home/sylvain/work/temp/legato\_example/my\_custom\_system/targetDefs targetDefs.extra

In my custom targetDefs file:

> # Root directory
> 
> export MY\_ROOT = $(LEGATO\_ROOT)/…/my\_custom\_system

> # Override the default sdef file
> 
> export SDEF\_TO\_USE = $(MY\_ROOT)/custom.sdef

In your custom.sdef file:

> //--------------------------------------------------------------------------------------------------  
> /\*\*
> 
> - Simple system definition that includes examples services and applications  
> \*/  
> //--------------------------------------------------------------------------------------------------

> apps:  
> {  
> $MY\_ROOT/apps/helloWorld/helloWorld.adef  
> }

And build (if your target is a WP85 device)

> make wp85

Best regards,

---

<div class="post-metadata">

**Author:** ![Luis](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Luis](https://forum.legato.io/u/Luis)\
**Post date:** [March 7, 2017, 12:48pm UTC](https://forum.legato.io/t/solved-sdef-file-or-sdef-files-where-are-they-located/2379/3 "2017-03-07T12:48:02Z")

</div>

Hello spator, thanks for your help.

In my WP85 I´ve got 6.10 Framework installed.  
The legato directory looks like this:

 ![](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/fd84efc78cdae7a68e45ae4377c3f42b150026a3.png)

there isn´t a default sdef file. I have created system.sdef file and I have copied it in legato, but results are not what I expected.

I have read these lines in documentation:

----mdef File Load

----You can also use Legato’s mdef to load the pre-built kernel module.

----Create Kernel Module Definition .mdef hello.mdef file in any location with this preBuilt section:

----preBuilt: /path/to/kernel/module/ktest\_module.ko

----Modify $LEGATO\_ROOT/system.sdef (in Legato root dir) to include the kernelModule path:

----kernelModules:  
----{ “path\_to\_hello.mdef” }

When I try to do

echo $LEGATO\_PATH

I don´t get a result

---

<div class="post-metadata">

**Author:** ![spastor](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/spastor/32/80_2.png) [@spastor](https://forum.legato.io/u/spastor)\
**Post date:** [March 7, 2017, 10:47pm UTC](https://forum.legato.io/t/solved-sdef-file-or-sdef-files-where-are-they-located/2379/4 "2017-03-07T22:47:43Z")

</div>

Sorry I’m not understand your problem.

On your “screen capture”, you show your device file system.

You try to “find” $LEGATO\_PATH on your device target ?

On target, $LEGATO\_PATH don’t exist & your system is installed in /legato/systems/current.

Best regards,  
Sylvain

---

<div class="post-metadata">

**Author:** ![Luis](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Luis](https://forum.legato.io/u/Luis)\
**Post date:** [March 8, 2017, 10:01am UTC](https://forum.legato.io/t/solved-sdef-file-or-sdef-files-where-are-they-located/2379/5 "2017-03-08T10:01:08Z")

</div>

Hello Sylvain,

I´m very new with Legato platform. I have never worked with a linux before. I thougt that Legato was going to help me to avoid diving into Linux, but it is not the case.

Now I think I can see things more clearly with your help.

Thanks

---

<div class="post-metadata">

**Author:** ![Luis](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Luis](https://forum.legato.io/u/Luis)\
**Post date:** [March 9, 2017, 7:31am UTC](https://forum.legato.io/t/solved-sdef-file-or-sdef-files-where-are-they-located/2379/6 "2017-03-09T07:31:10Z")

</div>

I have found what I was searching.

I found out that in Developer Studio, I can create Application Projects and System Projects. Creating a System Project you can edit an .sdef file and attach your applications to it
