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
Enchanted Objects
  • Challenges & Projects
  • Design Challenges
  • Enchanted Objects
  • More
  • Cancel
Enchanted Objects
Forum Enchanted Objects: Let's work together to tame the ATMEL SMART SAMA5D4 Xplained Ultra kit
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 40 replies
  • Subscribers 10 subscribers
  • Views 4474 views
  • Users 0 members are here
  • atmel_sama5d4
  • enchanted_objects
Related

Enchanted Objects: Let's work together to tame the ATMEL SMART SAMA5D4 Xplained Ultra kit

Jan Cumps
Jan Cumps over 10 years ago

Pinging my fellow enchanted_objects participants

Workshopshed, Jan Cumps, kidiccurus, RParkerE, amgalbu, tanah, christiann22, JokerZ, nikil511, Robert Peter Oakes, iayanpahwa, coolbox, crjeder, doca, dwinhold

to work together on getting us to the point where we can build and run code for the The specified item was not found. SMART SAMA5D4 Xplained Ultra .

 

This board is rather tough to crack. It would be great if we could all share the small steps that work here.

If you get one step further than anyone else, let's document our progress here.

It would be great to document it in reproducible steps.

 

I tried to create a Document, but that's not available in this section of the element14 website. So it's a Discussion.

 

Loading images, binaries and Pre-compiled Demos

Robert Peter Oakes has created a step by step guide to load binaries to the board using SAM-BA.

The embedded video is easy to following along step-by-step.

SAMA5D4 Xplained Ultra - Tips and Tricks #1 - Getting Displays up and Running

SAMA5D4 Xplained Ultra - Tips and Tricks #2 - Using the built in IO and external devices

 

JokerZ compiled an Ubuntu 14.x; including the toolchain and a mesage queue service loaded to the board.

The image he created is available from his blog post:

SAMA5D4 and my Ubuntu experience. Blog Post #2 - A place in the cloud

 

Jan Cumps documentation on getting TCP/IP, SSH and SCP running using Robert Peter Oakes' technique:

Review 5: Atmel SMART SAMA5D4 Xplained Ultra - TCP/IP running

Review 6: Atmel SMART SAMA5D4 Xplained Ultra - LINUX Distro with SSH support

 

Jan Cumps documentation on transfering files to the linux distro over the USB port (for those cases where your board isn't connected to the network):

Sending Files to SAMA5D4 over USB


 

 

Tool Chain

JokerZ compiled an Ubuntu 14.x; and loaded the toolchain on the board itself using apt-get.

SAMA5D4 and my Ubuntu experience. Blog Post #2 - A place in the cloud

 

Jan Cumps installed a tool chain that compiles the bare metal libraries from SAMA5D4 Software Package.

Review 2: Atmel SMART SAMA5D4 Xplained Ultra - Building the Libraries from Source

 

Jan Cumps cross-compiled a C++ program from source and executed it on linux:

Run my own C++ Program on the SAMA5D4



 

TODO
  • Build, Load and Run any example  from source
  • Build, Load and Run an OS from source
  • Make an example that talks to the peripherals (IO, ADC, protocols)
  • Install a software package
  • Debug your application
  • Whatever we come up with during the challenge
  • Sign in to reply
  • Cancel

Top Replies

  • Former Member
    Former Member over 10 years ago in reply to Jan Cumps +6
    I am not sure that distro with HDMI opens up the display as much as we'd like it to. I was able to print random garbage to the HDMI screen today, but my attempts at loading graphics of any type weren't…
  • Former Member
    Former Member over 10 years ago +5
    Just a really quick note here as it is after 2:30am I finally managed to get the SAMA5D4 to boot with an ubuntu kernel :-) Version is 14.04 This includes a base ubuntu root file structure and I am currently…
  • Former Member
    Former Member over 10 years ago in reply to Jan Cumps +3
    Thanks for the updates to the thread Jan. I really want to get around to making a youtube video showing the boot process. It's cool to see it all happen, hopefully I'll get it done tomorrow or over the…
  • crjeder
    crjeder over 10 years ago in reply to clem57

    You are right it is NOT in the DTB...image

    trying to fix that

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago in reply to crjeder

    crjeder, what command(s) do you use to check the DTB?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • crjeder
    crjeder over 10 years ago in reply to Jan Cumps

    The actually loaded DTB can be obtained on the U-Boot command line. You have to load the kernel and dtb through the band load commands in the bootcmd variable and the interpret the dtb with FTD print. I can give you more precise information when I am back home.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • noglitch
    noglitch over 10 years ago in reply to Jan Cumps

    Hi,

     

    If you only have the .dtb at hand, you can use the Device Tree Compiler to read it:

    dtc -I dtb -O dts my_dtb_file.dtb

     

    But I advice you to read the .dtsi/.dts files that generated the .dtb that you have: it's far more readable!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • crjeder
    crjeder over 10 years ago in reply to noglitch

    The dtb files are part of the linux4sam demo packages, the dts and dtsi files unfortunately not. But they can be found on github.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Jan Cumps
    Jan Cumps over 10 years ago in reply to crjeder

    Hey thank you both!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • crjeder
    crjeder over 10 years ago in reply to Jan Cumps

    Jan Cumps: here the commands (with output) I've used. But of course the remarks of noglitch are valid (he's the author of e. g. the sam4linux dts files..)

    U-Boot> printenv

    baudrate=115200

    bootargs=console=ttyS0,115200 mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env),256k(env_redundant),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw

    bootcmd=nand read 0x21000000 0x00180000 0x00004648; nand read 0x22000000 0x00200000 0x002CA7F8; bootz 0x22000000 - 0x21000000

    bootdelay=1

    ethact=gmac0

    stderr=serial

    stdin=serial

    stdout=serial

    Identify the bootcmd and paste the first load command to the command line (dtb has to be loaded bevore the kernel):

    U-Boot> nand read 0x21000000 0x00180000 0x00004648

     

    NAND read: device 0 offset 0x180000, size 0x4648

    17992 bytes read: OK

     

    after the dtb has been loaded to ram point U-Boot to it and print it's content

    U-Boot> fdt addr 0x21000000

    U-Boot> fdt print

    / {

        #address-cells = <0x00000001>;

        #size-cells = <0x00000001>;

        model = "Atmel SAMA5D4 Xplained ULTRA";

        compatible = "atmel,sama5d4-xplained", "atmel,sama5d4", "atmel,sama5", "encoder-sii9022";

        interrupt-parent = <0x00000001>;

        chosen {

            bootargs = "console=ttyS0,115200 ignore_loglevel earlyprintk";

        };

        aliases {

            serial0 = "/ahb/apb/serial@fc00c000";

            serial1 = "/ahb/apb/serial@fc010000";

            serial2 = "/ahb/apb/serial@fc008000";

            gpio0 = "/ahb/apb/pinctrl@fc06a000/gpio@fc06a000";

            gpio1 = "/ahb/apb/pinctrl@fc06a000/gpio@fc06b000";

            gpio2 = "/ahb/apb/pinctrl@fc06a000/gpio@fc06c000";

            gpio4 = "/ahb/apb/pinctrl@fc06a000/gpio@fc06d000";

            tcb0 = "/ahb/apb/timer@f801c000";

            tcb1 = "/ahb/apb/timer@fc020000";

            i2c2 = "/ahb/apb/i2c@f8024000";

            ssc0 = "/ahb/apb/ssc@f8008000";

            ssc1 = "/ahb/apb/ssc@fc014000";

            pwm0 = "/ahb/apb/pwm@f800c000";

        };

     

    ------------------------------8<------------------------

    leds {

            compatible = "gpio-leds";

            status = "okay";

            d8 {

                label = "d8";

                gpios = <0x0000001f 0x0000000f 0x00000001>;

                linux,default-trigger = "heartbeat";

            };

        };

        sound@sii9022a {

            compatible = "atmel,asoc-sii9022";

            atmel,model = "sii9022 @ SAMA5D3EK";

            atmel,audio-routing = "Playback", "TX";

            atmel,ssc-controller = <0x0000002b>;

            atmel,audio-codec = <0x0000002c>;

        };

    };

    U-Boot>

    I think that's pretty readable. Hope that helps.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • crjeder
    crjeder over 10 years ago

    noglitch and clem57:

    Do you know if dynamic device tree overlays are possible with the sam4linux kernel (like with the BeagleBone Black)?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • clem57
    clem57 over 10 years ago in reply to crjeder

    http://elinux.org/images/8/82/Antoniou--transactional_device_tree_and_overlays.pdf

    This seems to imply that any linux kernel 3.17 with patches should be able to overlay the device tree. But the tools are not in normal SAMA5D4 Yocto. But I have Ubuntu and may try later.

    Clem

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • noglitch
    noglitch over 10 years ago in reply to clem57

    Hi clem57,

     

    I've never tried to use DT overlays. We were planning to do so with our 3.18-based kernel but maybe some patches are still missing in this one: the sysfs interface which might be handy...

     

    I'm looking forward following your progress on this topic as I have big expectations concerning the use of overlays to simplify the "mutiple cpu modules/mother boards/screens"  situation...

     

    Bye,

    • 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