element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
FPGA
  • Technologies
  • More
FPGA
Forum Help with Petalinux device tree config
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join FPGA to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 2 replies
  • Subscribers 559 subscribers
  • Views 1859 views
  • Users 0 members are here
  • fpga
Related

Help with Petalinux device tree config

mesamike
mesamike over 4 years ago

I am using Petalinux 2019.2 with a Picozed.

I want to add a CAN device node.
I follow UG1144 for adding a block to the device tree to describe the CAN PS device, but when I rebuild, the build fails, complaining about a syntax error in my can-conf.dtsi file (which is where I put the CAN device block).

Here is my block:

&zynq_can_0: can@e0008000 {

        compatible = "xlnx,zynq-can-1.0";

        clocks = <&clkc 19>, <&clkc 36>;

        clock-names = "can_clk", "pclk";

        reg = <0xe0008000 0x1000>;

        interrupts = <0 28 4>;

        interrupt-parent = <&intc>;

        tx-fifo-depth = <0x40>;

        rx-fifo-depth = <0x40>;

};



The error message indicates the syntax error is on the first line, but I don't see what's wrong.

I wonder if anybody has had success with this, or can spot what I may be doing wrong.

Thanks





  • Sign in to reply
  • Cancel

Top Replies

  • mesamike
    mesamike over 4 years ago in reply to drozwood90 +1
    Thanks for your response. I found that it seems that there is an outer wrapping that I needed on what I wrote above, at it should look like this: &can0 { zynq_can_0: can@e0008000 { compatible = "xlnx,zynq…
  • drozwood90
    drozwood90 over 4 years ago

    Hi there,

     

    Do you have an editor that highlights braces?  I know back when we had to add all that stuff by hand for SDSoC, most of the time when I would goof, it was a } in the wrong spot.  That is, I put my block inside another block.

    I hope it is that simple!  I will also pass this along to one of our PetaLinux experts and see what they can see.

    Also, can you paste a new copy of the code, and put it inside a "Syntax Highlight" block?  plain should be OK.  I am just curious about and possible "hidden" text issues.

     

    --Dan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mesamike
    mesamike over 4 years ago in reply to drozwood90

    Thanks for your response.

    I found that it seems that there is an outer wrapping that I needed on what I wrote above, at it should look like this:


    &can0 {

       zynq_can_0: can@e0008000 {

            compatible = "xlnx,zynq-can-1.0";

            clocks = <&clkc 19>, <&clkc 36>;

            clock-names = "can_clk", "pclk";

            reg = <0xe0008000 0x1000>;

            interrupts = <0 28 4>;

            interrupt-parent = <&intc>;

            tx-fifo-depth = <0x40>;

            rx-fifo-depth = <0x40>;

       };

    };


    Available documentation on the format of the device tree file seems to be lacking detail / contradictory.

    This section is not inside any other set of braces, in fact it is the entire file can-conf.dtsi which I include in system-user.dtsi
    The project builds now without error...

    However, when I boot the new image, I don't get a device node under /dev for my CAN device, so...  something else needs to be done apparently.




    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube