zoukankan      html  css  js  c++  java
  • 20175207-20175235 实验一 开发环境的熟悉

    实验一 开发环境的熟悉

    20175207冷南
    20175235泽仁拉措

    目录

    ###[1-交叉编译环境(使用自己的笔记本电脑)](#1) ###[2-目标机宿主机联通](#2) ###[3-目标机运行程序](#3)

    1-交叉编译环境(使用自己的笔记本电脑)

    >0. 实验三人一组
    1. 可以使用自己的笔记本,也可以使用实验室台式机(使用实验室机器的不用做本题)
    2. 安装老师提供的[software](https://pan.baidu.com/s/11scmLNo0rClEXwkQGU0yGA)(提取码:dxzc)目录中的**VMware-workstation-full-10.0.1-1379776.exe**
    3. 解压老师提供的[software](https://pan.baidu.com/s/11scmLNo0rClEXwkQGU0yGA)(提取码:dxzc)目录中的**Ubuntu1204.rar**
    4. 用VMWare打开Ubuntu,用户名:**linux**,口令:**1**
    5. 建立实验目录```mkdir linux_组员1学号_组员2学号_组员3学号```
    6. 在实验目录中编写hello word程序,另外补充几行打印所有组员的学号姓名
    7. 参考bocsd目录中的脚本armc.sh, 分别用```gcc```和交叉编译器```arm-none-linux-gnuenbi-gcc```编译**hello.c**,
    用gcc编译的可执行文件命名**linuxhello**:```gcc hello.c -o linuxhello```;
    用arm-none-linux-gnuenbi-gcc编译的命名为**armhello**:```/usr/local/toolchain/toolchain4.3.2/bin/arm-none-linux-gnueabi-gcc hello.c -o armhello```

    步骤

    • 安装VMware workstation(详见上文中的链接)
    • 打开VM
    • 打开虚拟机
    • 找到RocEDU.Ubuntu文件夹,进入,选中Ubuntu_12.04_64-bit_farsight.vmx文件
    • 运行Ubuntu ARM V12B v2.0
    • 进入终端
    • mkdir linux_20175207_20175235
    • cd linux_20175207_20175235
    • gedit hello.c hello.c程序代码
    • gcc hello.c -o linuxhello
    • /usr/local/toolchain/toolchain4.3.2/bin/arm-none-linux-gnueabi-gcc hello.c -o armhello
    • ./linuxhello
    • ./armhello

    hello.c程序代码

    #include <stdio.h>
    int main()
    {
        printf("20175207
    ");
        printf("20175235
    ");
        return 0;
    }
    

    2-目标机宿主机联通

    3-目标机运行程序

    [回到目录](#0)
  • 相关阅读:
    【LeetCode】241. Different Ways to Add Parentheses
    【LeetCode】240. Search a 2D Matrix II
    【LeetCode】239. Sliding Window Maximum
    【LeetCode】238. Product of Array Except Self
    【LeetCode】237. Delete Node in a Linked List
    【Babble】批量学习与增量学习、稳定性与可塑性矛盾的乱想
    【LeetCode】233. Number of Digit One
    【LeetCode】236. Lowest Common Ancestor of a Binary Tree
    MySQL存储过程
    mysql远程连接/访问速度慢的解决方案
  • 原文地址:https://www.cnblogs.com/ln-0407/p/11793216.html
Copyright © 2011-2022 走看看