查看: 16429|回复: 1

一步一步学ZedBoard & Zynq(六):在ZedBoard上运行linux并编写linux...

[复制链接]
  • TA的每日心情
    奋斗
    2020-9-28 10:10
  • 签到天数: 1018 天

    连续签到: 1 天

    [LV.10]以坛为家III

    发表于 2013-1-7 15:39:37 | 显示全部楼层 |阅读模式
    分享到:
    本帖最后由 xinxincaijq 于 2013-1-9 10:28 编辑

    一步一步学ZedBoard & Zynq(六):在ZedBoard上运行linux并编写linux下的应用程序HelloWorld

    转自博客:@超群天晴 http://www.cnblogs.com/surpassal/  

    从本小节开始,讲着重介绍Zedboard上的嵌入式linux应用,包括使用SDK设计最简单的linux应用程序、linux交叉编译环境搭建、设备驱动编写等内容。


    本小节使用的linux系统是Digilent官方提供的OOB设计,它是Digilent官网给出的一个完整的、Zedboard可运行的linux系统,包含了Zedboard上的几个重要的设备驱动如串口、USB、以太网、OLED、HDMI等。当linux在Zedboard上运行起来后,Zedboard就是一个小型的嵌入式系统,使用SDK及Xilinx ARM Linux工具链编译生成的可执行文件可以在这个系统执行。


    更多更新请关注我的博客:@超群天晴 http://www.cnblogs.com/surpassal/


    硬件平台:Digilent ZedBoard

    开发环境:Windows XP 32 bit

    软件: SDK 14.2

    一、获取Zedboard可运行的linux

    Digilent官网给出Zedboard的可运行linux设计ZedBoard_OOB_Design包,可从http://www.digilentinc.com/Data/ ... oard_OOB_Design.zip获取,下载后解压,可以看到包的结构和内容:
    1. boot_image目录:
    2. -- system.bit – 配置FPGA的bit文件
    3. -- u-boot.elf – 引导linux需要的Second-Stage boot loader
    4. -- zynq_fsbl.elf – 配置ARM PS系统的First-Stage boot loader(FSBL)
    5. doc目录:
    6. -- README.txt – 说明文件
    7. hw目录:
    8. -- EDK 14.1版本的XPS工程,用来生成硬件文件和bit文件
    9. linux目录:
    10. -- devicetree_ramdisk.dts – 设备树源代码
    11. -- .config – Linux内核配置文件,用来生成zImage
    12. sd_image目录:
    13. -- BOOT.BIN – 使用boot_images中的三个文件生成的Zynq配置文件
    14. -- devicetree_ramdisk.dtb – 编译后的设备树文件
    15. -- ramdisk8M.image.gz – 编译后的文件系统
    16. -- README – 介绍如何运行OOB设计的说明文档
    17. -- zImage – 编译后的内核
    18. sw目录:
    19. --硬件配置
    20. --FSBL源代码
    复制代码
    其中sd_image目录中包含了ZedBoard上能够运行linux的所有文件。将SD卡格式化为Fat32,把sd_image目录文件拷贝到SD卡根目录下;然后将JP7~JP11设置为SD卡启动模式,将JP2短路,JP3断开,这样可以下一步我们可以把U盘作为USB 从设备挂载到Zedboard上。
    2012110815543846.jpg
    Zedboard的连接和短路块设置


    上电后,等待ARM PS的配置、FPGA的配置(蓝色LED DONE 亮起),之后开始引导Linux系统了。可以从超级终端上看到一系列的引导信息:
    1. U-Boot 2012.04.01-00297-gc319bf9-dirty (Sep 13 2012 - 09:30:49)

    2. DRAM:  512 MiB
    3. WARNING: Caches not enabled
    4. MMC:   SDHCI: 0
    5. Using default environment

    6. In:    serial
    7. Out:   serial
    8. Err:   serial
    9. Net:   zynq_gemHit any key to stop autoboot:  0
    10. Copying Linux from SD to RAM...
    11. Device: SDHCI
    12. Manufacturer ID: 1b
    13. OEM: 534d
    14. Name: 00000
    15. Tran Speed: 25000000
    16. Rd Block Len: 512
    17. SD version 1.0
    18. High Capacity: Yes
    19. Capacity: 3.7 GiB
    20. Bus Width: 1-bit
    21. reading zImage

    22. 2479640 bytes read
    23. reading devicetree_ramdisk.dtb

    24. 5817 bytes read
    25. reading ramdisk8M.image.gz

    26. 3694108 bytes read
    27. ## Starting application at 0x00008000 ...
    28. Uncompressing Linux... done, booting the kernel.
    29. [    0.000000] Booting Linux on physical CPU 0
    30. [    0.000000] Linux version 3.3.0-digilent-12.07-zed-beta (tinghui.wang@DIGILENT_LINUX) (gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-50) ) #2 SMP PREEMPT Thu Jul 12 21:01:42 PDT 2012
    31. [    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
    32. [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    33. [    0.000000] Machine: Xilinx Zynq Platform, model: Xilinx Zynq ZED
    34. [    0.000000] bootconsole [earlycon0] enabled
    35. [    0.000000] Memory policy: ECC disabled, Data cache writealloc
    36. [    0.000000] BUG: mapping for 0xf8f00000 at 0xfe00c000 out of vmalloc space
    37. [    0.000000] BUG: mapping for 0xe0000000 at 0xfe000000 out of vmalloc space
    38. [    0.000000] BUG: mapping for 0xffff1000 at 0xfe200000 out of vmalloc space
    39. [    0.000000] PERCPU: Embedded 7 pages/cpu @c1489000 s5696 r8192 d14784 u32768
    40. [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 125824
    41. [    0.000000] Kernel command line: console=ttyPS0,115200 root=/dev/ram rw initrd=0x800000,8M earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=0
    42. [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    43. [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    44. [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    45. [    0.000000] Memory: 240MB 256MB = 496MB total
    46. [    0.000000] Memory: 489856k/489856k available, 34432k reserved, 0K highmem
    47. [    0.000000] Virtual kernel memory layout:
    48. [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    49. [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    50. [    0.000000]     vmalloc : 0xe0800000 - 0xfd000000   ( 456 MB)
    51. [    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    52. [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    53. [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    54. [    0.000000]       .text : 0xc0008000 - 0xc042f040   (4253 kB)
    55. [    0.000000]       .init : 0xc0430000 - 0xc0456640   ( 154 kB)
    56. [    0.000000]       .data : 0xc0458000 - 0xc0485dc0   ( 184 kB)
    57. [    0.000000]        .bss : 0xc0485de4 - 0xc049d734   (  95 kB)
    58. [    0.000000] Preemptible hierarchical RCU implementation.
    59. [    0.000000]  Verbose stalled-CPUs detection is disabled.
    60. [    0.000000] NR_IRQS:128
    61. [    0.000000] xlnx,ps7-ttc-1.00.a #0 at 0xe0800000, irq=43
    62. [    0.000000] Console: colour dummy device 80x30
    63. [    0.000000] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
    64. [    0.090000] pid_max: default: 32768 minimum: 301
    65. [    0.090000] Mount-cache hash table entries: 512
    66. [    0.090000] CPU: Testing write buffer coherency: ok
    67. [    0.090000] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    68. [    0.100000] smp_twd: clock not found: -2
    69. [    0.100000] Calibrating local timer... 399.36MHz.
    70. [    0.170000] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
    71. [    0.170000] Setting up static identity map for 0x2f8d48 - 0x2f8d7c
    72. [    0.270000] CPU1: Booted secondary processor
    73. [    0.310000] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    74. [    0.310000] Brought up 2 CPUs
    75. [    0.310000] SMP: Total of 2 processors activated (3188.32 BogoMIPS).
    76. [    0.320000] devtmpfs: initialized
    77. [    0.320000] ------------[ cut here ]------------
    78. [    0.320000] WARNING: at arch/arm/mm/dma-mapping.c:198 consistent_init+0x70/0x104()
    79. [    0.330000] Modules linked in:
    80. [    0.330000] [<c0012920>] (unwind_backtrace+0x0/0xe0) from [<c001e924>] (warn_slowpath_common+0x4c/0x64)
    81. [    0.340000] [<c001e924>] (warn_slowpath_common+0x4c/0x64) from [<c001e954>] (warn_slowpath_null+0x18/0x1c)
    82. [    0.350000] [<c001e954>] (warn_slowpath_null+0x18/0x1c) from [<c04345a8>] (consistent_init+0x70/0x104)
    83. [    0.360000] [<c04345a8>] (consistent_init+0x70/0x104) from [<c000858c>] (do_one_initcall+0x90/0x160)
    84. [    0.360000] [<c000858c>] (do_one_initcall+0x90/0x160) from [<c043085c>] (kernel_init+0x84/0x128)
    85. [    0.370000] [<c043085c>] (kernel_init+0x84/0x128) from [<c000dfcc>] (kernel_thread_exit+0x0/0x8)
    86. [    0.380000] ---[ end trace 1b75b31a2719ed1c ]---
    87. [    0.380000] ------------[ cut here ]------------
    88. [    0.390000] WARNING: at arch/arm/mm/dma-mapping.c:198 consistent_init+0x70/0x104()
    89. [    0.390000] Modules linked in:
    90. [    0.390000] [<c0012920>] (unwind_backtrace+0x0/0xe0) from [<c001e924>] (warn_slowpath_common+0x4c/0x64)
    91. [    0.400000] [<c001e924>] (warn_slowpath_common+0x4c/0x64) from [<c001e954>] (warn_slowpath_null+0x18/0x1c)
    92. [    0.410000] [<c001e954>] (warn_slowpath_null+0x18/0x1c) from [<c04345a8>] (consistent_init+0x70/0x104)
    93. [    0.420000] [<c04345a8>] (consistent_init+0x70/0x104) from [<c000858c>] (do_one_initcall+0x90/0x160)
    94. [    0.430000] [<c000858c>] (do_one_initcall+0x90/0x160) from [<c043085c>] (kernel_init+0x84/0x128)
    95. [    0.430000] [<c043085c>] (kernel_init+0x84/0x128) from [<c000dfcc>] (kernel_thread_exit+0x0/0x8)
    96. [    0.440000] ---[ end trace 1b75b31a2719ed1d ]---
    97. [    0.440000] NET: Registered protocol family 16
    98. [    0.460000] L310 cache controller enabled
    99. [    0.460000] l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72060000, Cache size: 524288 B
    100. [    0.460000] registering platform device 'pl330' id 0
    101. [    0.470000] registering platform device 'arm-pmu' id 0
    102. [    0.470000]
    103. [    0.470000] ###############################################
    104. [    0.480000] #                                             #
    105. [    0.480000] #                Board ZED Init               #
    106. [    0.480000] #                                             #
    107. [    0.490000] ###############################################
    108. [    0.490000]
    109. [    0.500000] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpointregisters.
    110. [    0.500000] hw-breakpoint: maximum watchpoint size is 4 bytes.
    111. [    0.530000] xslcr xslcr.0: at 0xF8000000 mapped to 0xE0808000
    112. [    0.540000] bio: create slab <bio-0> at 0
    113. [    0.540000] gpiochip_add: registered GPIOs 0 to 245 on device: xgpiops
    114. [    0.540000] xgpiops e000a000.gpio: gpio at 0xe000a000 mapped to 0xe080a000
    115. [    0.550000] SCSI subsystem initialized
    116. [    0.550000] usbcore: registered new interface driver usbfs
    117. [    0.560000] usbcore: registered new interface driver hub
    118. [    0.560000] usbcore: registered new device driver usb
    119. [    0.570000] Advanced Linux Sound Architecture Driver Version 1.0.24.
    120. [    0.570000] Switching to clocksource xttcpss_timer1
    121. [    0.590000] NET: Registered protocol family 2
    122. [    0.590000] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
    123. [    0.590000] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
    124. [    0.600000] TCP bind hash table entries: 16384 (order: 5, 196608 bytes)
    125. [    0.600000] TCP: Hash tables configured (established 16384 bind 16384)
    126. [    0.610000] TCP reno registered
    127. [    0.610000] UDP hash table entries: 256 (order: 1, 8192 bytes)
    128. [    0.620000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    129. [    0.620000] NET: Registered protocol family 1
    130. [    0.630000] Trying to unpack rootfs image as initramfs...
    131. [    0.630000] rootfs image is not initramfs (no cpio magic); looks like an initrd
    132. [    0.670000] Freeing initrd memory: 8192K
    133. [    0.670000] xscugtimer xscugtimer.0: ioremap fe00c200 to e0810200 with size 400
    134. [    0.670000] pl330 dev 0 probe success
    135. [    0.680000] msgmni has been set to 972
    136. [    0.680000] io scheduler noop registered
    137. [    0.680000] io scheduler deadline registered
    138. [    0.680000] io scheduler cfq registered (default)
    139. [    0.690000] e00   0.690000] console [ttyPS0] enabled, bootconsole disabled
    140. [    0.690000] console [ttyPS0] enabled, bootconsole disabled
    141. [    0.700000] xdevcfg f8007000.devcfg: ioremap f8007000 to e0814000 with size 1000
    142. [    0.710000] [drm] Initialized drm 1.1.0 20060810
    143. [    0.720000] brd: module loaded
    144. [    0.730000] loop: module loaded
    145. [    0.730000] xqspips e000d000.qspi: at 0xE000D000 mapped to 0xE0816000, irq=51
    146. [    0.740000] GEM: BASEADDRESS hw: e000b000 virt: e0818000
    147. [    0.740000] XEMACPS mii bus: probed
    148. [    0.750000] eth0, pdev->id -1, baseaddr 0xe000b000, irq 54
    149. [    0.750000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    150. [    0.760000] usb_hcd_xusbps_probe: No OTG assigned!
    151. [    0.760000] usb_hcd_xusbps_probe: OTG now assigned!
    152. [    0.770000] xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
    153. [    0.770000] xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
    154. [    0.810000] xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
    155. [    0.830000] xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
    156. [    0.830000] hub 1-0:1.0: USB hub found
    157. [    0.830000] hub 1-0:1.0: 1 port detected
    158. [    0.840000] Initializing USB Mass Storage driver...
    159. [    0.840000] usbcore: registered new interface driver usb-storage
    160. [    0.850000] USB Mass Storage support registered.
    161. [    0.850000] Xilinx PS USB Device Controller driver (Apr 01, 2011)
    162. [    0.860000] mousedev: PS/2 mouse device common for all mice
    163. [    0.860000] Linux video capture interface: v2.00
    164. [    0.870000] gspca_main: v2.14.0 registered
    165. [    0.870000] usbcore: registered new interface driver uvcvideo
    166. [    0.870000] USB Video Class driver (1.1.1)
    167. [    0.880000] WDT OF probe
    168. [    0.880000] xwdtps f8005000.swdt: Xilinx Watchdog Timer at 0xe081c000 with timeout 10 seconds
    169. [    0.890000] sdhci: Secure Digital Host Controller Interface driver
    170. [    0.890000] sdhci: Copyright(c) Pierre Ossman
    171. [    0.900000] sdhci-pltfm: SDHCI platform and OF driver helper
    172. [    0.900000] mmc0: Invalid maximum block size, assuming 512 bytes
    173. [    0.910000] mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using ADMA
    174. [    0.910000] usbcore: registered new interface driver usbhid
    175. [    0.920000] usbhid: USB HID core driver
    176. [    0.920000] No connectors reported connected with modes
    177. [    0.930000] adv7511 0-0039: Failed to add route DAI IN->TMDS
    178. [    0.940000] [drm] Cannot find any crtc or sizes - going 1024x768
    179. [    0.940000] drivers/gpu/drm/analog/analog_drm_fbdev.c:analog_drm_fbdev_probe[241]
    180. [    0.960000] asoc: adv7511 <-> 75c00000.axi-spdif-tx mapping ok
    181. [    0.960000] axi-spdif 75c00000.axi-spdif-tx: Failed to set DAI format: -22
    182. [    0.980000] ALSA device list:
    183. [    0.980000]   #0: HDMI monitor
    184. [    0.980000] TCP cubic registered
    185. [    0.980000] NET: Registered protocol family 17
    186. [    0.980000] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
    187. [    0.980000] Registering SWP/SWPB emulation handler
    188. [    0.980000] registered taskstats version 1
    189. [    0.980000] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
    190. [    0.980000] Console: switching to colour frame buffer device 128x48
    191. [    1.000000] mmc0: new high speed SDHC card at address 0002
    192. [    1.030000] fb0:  frame buffer device
    193. [    1.030000] mmcblk0: mmc0:0002 00000 3.70 GiB
    194. [    1.040000] drm: registered panic notifier
    195. [    1.040000] [drm] Initialized analog_drm 1.0.0 20110530 on minor 0
    196. [    1.050000]  mmcblk0: p1
    197. [    1.050000] RAMDISK: gzip image found at block 0
    198. [    1.310000] EXT4-fs (ram0): warning: mounting unchecked fs, running e2fsck is recommended
    199.   [    1.320000] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
    200. [    1.320000] VFS: Mounted root (ext4 filesystem) on device 1:0.
    201. [    1.330000] Freeing init memory: 152K
    202. Starting rcS...
    203. ++ Mounting filesystem
    204. ++ Setting up mdev
    205. ++ Configure static IP 192.168.1.10
    206. [    1.510000] GEM: lp->tx_bd ffdfb000 lp->tx_bd_dma 181a9000 lp->tx_skb d816b0c0
    207. [    1.520000] GEM: lp->rx_bd ffdfc000 lp->rx_bd_dma 181a8000 lp->rx_skb d816b1c0
    208. [    1.520000] GEM: MAC 0x00350a00, 0x00002201, 00:0a:35:00:01:22
    209. [    1.530000] GEM: phydev d8b81400, phydev->phy_id 0x1410dd1, phydev->addr 0x0
    210. [    1.540000] eth0, phy_addr 0x0, phy_id 0x01410dd1
    211. [    1.540000] eth0, attach [Marvell 88E1510] phy driver
    212. ++ Starting telnet daemon
    213. ++ Starting http daemon
    214. ++ Starting ftp daemon
    215. ++ Starting dropbear (ssh) daemon
    216. ++ Starting OLED Display
    217. [    1.580000] pmodoled-gpio-spi [zed_oled] SPI Probing
    218. [    1.730000] usb 1-1: new high-speed USB device number 2 using xusbps-ehci
    219. ++ Exporting LEDs & SWs
    220. rcS Complete
    221. zynq>
    复制代码
    至此,linux已经在Zedboard上启动起来。从超级终端输出的信息我们打开可以知道,“这个”linux系统的一些基本情况,如8~10行
    1. In:    serial
    2. Out:   serial
    3. Err:   serial
    复制代码
    输入输出调试信息使用的都是serial,即串口,这里是超级终端,因而超级终端就如同linux系统下的控制台,我们可以键入linux的命令对系统进行操作,例如输入ls命令,可以显示当前目录内容:
    2012110818192111.png
    其他命令如cd、mkdir、cp、rm等基本命令均可以执行。

    77~79行提示信息
    1. [    0.270000] CPU1: Booted secondary processor
    2. [    0.310000] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    3. [    0.310000] Brought up 2 CPUs
    复制代码
    可以知道ARM PS的两个CPU均被启动

    再如163~171行
    1. [    0.840000] Initializing USB Mass Storage driver...
    2. [    0.840000] usbcore: registered new interface driver usb-storage
    3. [    0.850000] USB Mass Storage support registered.
    4. [    0.850000] Xilinx PS USB Device Controller driver (Apr 01, 2011)
    5. [    0.860000] mousedev: PS/2 mouse device common for all mice
    6. [    0.860000] Linux video capture interface: v2.00
    7. [    0.870000] gspca_main: v2.14.0 registered
    8. [    0.870000] usbcore: registered new interface driver uvcvideo
    9. [    0.870000] USB Video Class driver (1.1.1)
    复制代码
    可以知道大容量USB设备驱动已经安装,包括PS USB设备等驱动均安装了,因此可以使用U盘、USB键盘、鼠标、摄像头等设备。

    二、使用SDK设计linux应用程序

    接下来我们就可以像其他的嵌入式linux开发一样来使用Zedboard了。SDK提供了标准可视化的linux-arm交叉编译链,不需要再进行交叉编译环境的搭建。

    启动SDK,new->C project,选择工程类型为“Xilinx ARM Linux Executable”,工具链为“Xilinx ARM GNU/Linux Toolchain”
    2012110816252955.png
    在工程配置选项中,去掉Debug(因为我们不需要进行调试),只保留Release
    2012110816260088.png
    工程建立后好,新建main.c文件,修改内容如下:
    1. /*
    2.   * hello.c
    3.   *
    4.   *  Created on: 2012-11-8
    5.   *  @超群天晴 http://www.cnblogs.com/surpassal/
    6.   */

    7. #include <stdio.h>

    8. int main()
    9. {
    10.      printf("HelloWorld!\n");
    11.      printf("This is from Zedboard Linux!\n");
    12.      printf("2012年11月8日16:43:22 by 超群天晴\n");
    13.      return 0;
    14. }
    复制代码
    就是一个简单的从控制台输出helloworld信息。编译后生成了lab_6.elf可执行文件,将其拷贝到了U盘上。

    三、运行linux可执行程序

    将U盘连接到Zedboard,控制台会提示有USB device连接上,分配给这个设备的名称是sda1
    1. zynq> [ 2263.970000] usb 1-1: new high-speed USB device number 2 using xusbps-ehci
    2. [ 2264.120000] scsi0 : usb-storage 1-1:1.0
    3. [ 2265.130000] scsi 0:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ: 0 ANSI: 4
    4. [ 2265.140000] sd 0:0:0:0: [sda] 3932160 512-byte logical blocks: (2.01 GB/1.87GiB)
    5. [ 2265.140000] sd 0:0:0:0: Attached scsi generic sg0 type 0
    6. [ 2265.150000] sd 0:0:0:0: [sda] Write Protect is off
    7. [ 2265.150000] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    8. [ 2265.170000]  sda: sda1
    9. [ 2265.180000] sd 0:0:0:0: [sda] Attached SCSI removable disk

    10. zynq>
    复制代码
    使用mount命令
    1. mount /dev/sda1 /mnt/
    复制代码
    将设备挂载到mnt目录下,
    输入命令
    1. cd /mnt
    复制代码
    切换到mnt目录

    输入命令
    1. ls
    复制代码
    可以看到目录下有我们刚刚生成的lab_6.elf可执行文件

    输入命令
    1. ./lab_6.elf
    复制代码
    运行,可以看到执行结果,控制台输出了我们需要的信息
    2012110817001355.png
    ===============================

    Digilent官方OOB设计参考:http://www.digilentinc.com/Data/ ... oard_OOB_Design.zip

    完整工程下载: lab_6.rar (8.38 KB, 下载次数: 66)
    回复

    使用道具 举报

    该用户从未签到

    发表于 2015-7-15 22:21:31 | 显示全部楼层
    我们先做了第一个HELLOworld实验之后
    按照步骤进行SD卡引导
    上电之后没反应  蓝灯也没亮  终端不打印任何信息
    回复 支持 反对

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /4 下一条



    手机版|小黑屋|与非网

    GMT+8, 2024-11-24 01:14 , Processed in 0.128574 second(s), 18 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.