- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我已经成功地在 Nios 2 Altera DE2 板上运行了一个复杂的项目,在该项目中我使用输入和输出创建了一个带有汇编和 C 代码的定时器。使用 Nios 2 IDE,我可以将项目下载到 DE2 FPGA,并且时钟按预期运行。但我并不了解有关编程模型的所有内容,而且我还在尝试了解基本的 Hello World 示例和 IDE 附带的诊断示例。
Hello World 例子就是
/*
* "Hello World" example.
*
* This example prints 'Hello from Nios II' to the STDOUT stream. It runs on
* the Nios II 'standard', 'full_featured', 'fast', and 'low_cost' example
* designs. It runs with or without the MicroC/OS-II RTOS and requires a STDOUT
* device in your system's hardware.
* The memory footprint of this hosted application is ~69 kbytes by default
* using the standard reference design.
*
* For a reduced footprint version of this template, and an explanation of how
* to reduce the memory footprint for a given application, see the
* "small_hello_world" template.
*
*/
#include <stdio.h>
int main()
{
printf("Hello from Nios II!\n");
return 0;
}
但是当我“作为 Nios 2 硬件”编译和运行这个程序时,它只会在 IDE 中按照标准输出 Hello World,它不会下载并在板上运行——难道不应该那样做吗?如果它不在板上运行,这个例子有什么意义?我做错了什么,如果是的话,因为示例编译并运行了?我必须对 BSD 编辑器进行设置吗?
它根本不起作用。我在 BSP 编辑器中尝试了不同的组合,但都没有用。当我尝试将项目作为“Nios II 硬件”运行时,板上没有任何反应,即使它在 IDE 中显示项目正在下载到板上。为什么容易的事情很难?用户体验很糟糕,不得不猜测是不科学的。
最佳答案
这是 a link来自哥伦比亚大学的嵌入式系统设计类(class)。
检查 link to lab 3用于在 Altera DE2 板上使用 VHDL 和 C 实现闪烁 LED。
此实现使用 Altera Quartus、Nios II 和 SOPC Builder。我将尝试总结以下步骤:
您需要在 VHDL/Verilog 中编写 SRAM 和 LED Controller 以连接到 Avalon 总线。在 SOPC Builder 上创建系统。使用这些 Controller 在 SOPC Builder 中创建组件(SRAM 和 LED 组件)。
将组件连接到 Nios II 处理器和 JTAG 调试模块。分配基地址并生成您的系统。
在 Nios II 中,使用 SOPC Builder 生成的 SOPC 文件创建一个 C 项目(Nios II 应用程序和来自模板的 BSP)。
将模板中的代码替换为 C 程序(在本例中为 LED 闪光器程序)。使用您之前生成的基地址访问 LED。
构建并运行您的程序作为 Nios II 硬件。
更多信息 here .
关于c - Nios 2 "Hello World"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17966235/
我的 CS2 讲师给出了一个 java 正则表达式,用于检查单词是否重复: \\b(\\w+)\\s+\\1\\b 如何修改它来检查某个单词是否重复两次,如“hello hello hello”或“h
关闭。这个问题是not reproducible or was caused by typos .它目前不接受答案。 这个问题是由于错别字或无法再重现的问题引起的。虽然类似的问题可能是on-topi
这个问题已经有答案了: printf anomaly after "fork()" (3 个回答) 已关闭 3 年前。 #include #include Void main() { Printf
我一直在分配以下作业来解释 3 个语句中发生的事情,但我无法弄清楚。 cout << ("hello" + 1); // ello cout << (*"hello") + 1; // 10
如何确定用户是否使用 hello.js 登录? 使用 Google Sign-In SDK,我可以使用 gapi.auth2.init() 注册回调,当设置 SDK 并准备好回答诸如“你是登录了吗?”
执行String S1 = "hello";后,JVM将在SCP中创建一个String对象,该对象将在value字段中保存一个字符数组,如 s1.value = {'h', 'e', 'l', 'l'
我正在 build gomobile Hello示例应用程序,但遇到以下问题:在 Xcode (7.1) 中打开应用程序后尝试构建并运行该应用程序时,出现错误“找不到 hello/Hello.h”文件
#coding=utf-8 '''Tkinter module''' from Tkinter import * import time root=Tk() t=Text(root,fg='red')
在C/C++中,下面两行代码有什么区别: char *str1="hello"; char *str2={"hello"}; 最佳答案 根据 2011 C 标准,条款 6.7.9 初始化,第 11
我对在 android studio 中导入 import.hello.Hello 时出错有疑问,如下图所示。请给我解决方案如何解决这个错误 最佳答案 请参阅此处 @Arpit Patel answe
hello/ 忽略文件夹结构中任何位置名为“hello”的所有文件夹 hello/* 仅忽略顶级文件夹“hello”。 这是为什么?请指出http://git-scm.com/docs/gitigno
请解释以下程序中发生了什么。 我在程序的开头和结尾检查了 strerror(errno) 返回的地址,并确认它每次都返回相同的地址。然后一旦确定这一点,在第一种情况下我继续将相同的地址分配给 ptr,
在整个互联网上你都会看到这个命令 alias hello='echo Hello' 是的,我知道以上是一个蹩脚的例子,但它不是重点。如果我执行它,它就会起作用。但是当我重新启动计算机时,它丢失了。为什
我正在学习 C++ 指针,而 -> 运算符对我来说似乎很奇怪。代替ptr->hello(); 可以写成 (*ptr).hello(); 因为它似乎也可以工作,所以我认为前者只是更方便方式。 是这样还是
这个问题在这里已经有了答案: About the changing id of an immutable string (5 个回答) 关闭4年前。 为什么 "hello"is "hello" 在 P
我需要Prolog的源代码,它用于与Weka连接,并且能够在Windows环境下使用Weka算法进行预测。我尝试通过 Java 连接,但无法使用 Java 和 Prolog 进行连接和预测。 最佳答案
这个问题已经有答案了: 已关闭11 年前。 Possible Duplicate: Capitalize First Char of Each Word in a String Java 编写进行以下
当我在 ruby 控制台中运行以下示例时,我感到很惊讶。它们都产生相同的输出。 "hello".length 和 "hello" .length ruby
我创建了一个Hello World应用,系统生成了下面大部分的Android语言。在没有 System.out 语句的情况下运行应用程序时,模拟器中不会显示“Hello”。然后,使用 Eclipse
是的,所以我正在制作一个沼泽标准 Hello world 以确保 android 正常工作。这是我第一次使用 android,所以我正在设置环境。我按照以下程序制作了程序:http://develop
我是一名优秀的程序员,十分优秀!