• c helloworld on zynq


    A linux os runs on zynq board. I want ro run a hello world c program on it.

    I linked zynq board to a wifi router which my laptop also connected to and use scp command to transfer compiled files to board.

    The linux os runing on zynq is reduced. its user and password is simple root and root.

    helloworld.c

    The content of helloworld.c is:

    #include <stdio.h>

    int main()
    {
    printf("Hello World ");

    return 0;
    }

    compile helloworld.c

    when use universal arm gcc:
    arm-linux-gnueabi-gcc helloworld.c -o helloworld_arm.out

    when use xilinx arm gcc:
    arm-xilinx-linux-gnueabi-gcc helloworld.c -o helloworld_xilinx.out

    transfer file to board

    scp *.out root@[ip address of zynq board]:~/

    result

    ssh root@[ip address of zynq board]

    zynq> ./helloworld_arm.out
    Hello World
    zynq> ./helloworld_xilinx.out
    Hello World

  • 相关阅读:
    浅谈代理
    AFN
    网络请求
    Socket
    几种加密方式
    8种传值方式
    swift属性观察者机智
    Swift 字符串的分割
    Xcode 所有版本
    Error Domain=ALAssetsLibraryErrorDomain Code=-3310 "数据不可用" .......
  • 原文地址:https://www.cnblogs.com/snigoal/p/3153895.html
Copyright © 2020-2023  润新知