# DSDL compiler for libcanard

**URL:** <https://forum.opencyphal.org/t/dsdl-compiler-for-libcanard/491>\
**Category:** Libcanard\
**Created:** [May 27, 2019, 6:39am UTC](https://forum.opencyphal.org/t/dsdl-compiler-for-libcanard/491 "2019-05-27T06:39:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![YGQ](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/y/97f17d/32.png) [@YGQ](https://forum.opencyphal.org/u/YGQ)\
**Post date:** [May 27, 2019, 6:39am UTC](https://forum.opencyphal.org/t/dsdl-compiler-for-libcanard/491/1 "2019-05-27T06:39:07Z")

</div>

Hello, I want to use DSDL in my project, what should I do, shouldn’t he be a .c and .h file?  
How can I get NodeStatus.h

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [May 27, 2019, 7:23am UTC](https://forum.opencyphal.org/t/dsdl-compiler-for-libcanard/491/2 "2019-05-27T07:23:23Z")

</div>

This should help: [https://github.com/UAVCAN/libcanard/tree/master/dsdl\_compiler](https://github.com/UAVCAN/libcanard/tree/master/dsdl_compiler)

---

<div class="post-metadata">

**Author:** ![YGQ](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/y/97f17d/32.png) [@YGQ](https://forum.opencyphal.org/u/YGQ)\
**Post date:** [May 27, 2019, 7:27am UTC](https://forum.opencyphal.org/t/dsdl-compiler-for-libcanard/491/3 "2019-05-27T07:27:12Z")

</div>

I have followed this operation, unfortunately, after running python3 libcanard\_dsdlc --outdir he reported an error. Still can’t get .c and .h files

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [May 27, 2019, 7:44am UTC](https://forum.opencyphal.org/t/dsdl-compiler-for-libcanard/491/4 "2019-05-27T07:44:55Z")

</div>

Can’t help unless I know what the error was.

---

<div class="post-metadata">

**Author:** ![YGQ](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/y/97f17d/32.png) [@YGQ](https://forum.opencyphal.org/u/YGQ)\
**Post date:** [May 27, 2019, 7:47am UTC](https://forum.opencyphal.org/t/dsdl-compiler-for-libcanard/491/5 "2019-05-27T07:47:57Z")

</div>

Error is as follows：

```auto
Internal error
Traceback (most recent call last):
  File "/home/stm32/Downloads/libcanard/dsdl_compiler/pyuavcan/uavcan/dsdl/parser.py", line 691, in parse
    return self.parse_source(filename, source_text)
  File "/home/stm32/Downloads/libcanard/dsdl_compiler/pyuavcan/uavcan/dsdl/parser.py", line 683, in parse_source
    raise ex
DsdlException: /home/stm32/Downloads/zubax_gnss/firmware/libuavcan/libuavcan/test/dsdl_test/root_ns_b/T.uavcan: Invalid namespace name [Downloads.zubax_gnss.firmware.libuavcan.libuavcan.test.dsdl_test.root_ns_b]
Compiler failure
Traceback (most recent call last):
  File "libcanard_dsdlc", line 73, in <module>
    dsdlc_run(args.source_dir, args.incdir, args.outdir, args.header_only)
  File "/home/stm32/Downloads/libcanard/dsdl_compiler/libcanard_dsdl_compiler/ __init__.py", line 71, in run
    types = run_parser(source_dirs, include_dirs + source_dirs)
  File "/home/stm32/Downloads/libcanard/dsdl_compiler/libcanard_dsdl_compiler/ __init__.py", line 127, in run_parser
    die(ex)
  File "/home/stm32/Downloads/libcanard/dsdl_compiler/libcanard_dsdl_compiler/ __init__.py", line 119, in die
    raise DsdlCompilerException(str(text))

```

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [May 27, 2019, 8:00am UTC](https://forum.opencyphal.org/t/dsdl-compiler-for-libcanard/491/6 "2019-05-27T08:00:06Z")

</div>

The path to the root namespace is clearly invalid. Please provide the correct path to the root namespace (such as `/home/stm32/Downloads/zubax_gnss/firmware/libuavcan/libuavcan/test/dsdl_test/root_ns_b`) when invoking the script.

---

<div class="post-metadata">

**Author:** ![YGQ](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/y/97f17d/32.png) [@YGQ](https://forum.opencyphal.org/u/YGQ)\
**Post date:** [May 27, 2019, 8:59am UTC](https://forum.opencyphal.org/t/dsdl-compiler-for-libcanard/491/7 "2019-05-27T08:59:49Z")

</div>

Thank you for your help, it has been solved.
