Board logo

标题: hello world!??[求助] [打印本页]

作者: pennyllin    时间: 2006-9-15 10:22     标题: hello world!??[求助]

请高手指教,我在做hello world 例子时,出现以下错误:


rc/newlib/newlib/libc/reent/sbrkr.c:59: Unable to reach errno (at 0x00000020) from the global pointer (at 0x00009f98) because the offset (-40824) is out of the allowed range, -32678 to 32767.


collect2: ld returned 1 exit status
make: *** [hello_world_1.elf] Error 1
Build completed


作者: pennyllin    时间: 2006-9-15 11:26

我的程序就是模板中的程序:
#include
int main ()
{
printf("Hello world.\n");
return 0;
}
我在nios中就添加了CPU、ON— CHIP MEMORY 、JTAG-UART,我想通过这个例子看看板子和PC机的通信,希望在nios2 ide 的console筐内看到字符。
还请高手指点迷津,谢谢!


作者: kzw    时间: 2006-9-15 13:06

还是你的代码空间太小,用main函数,编译后代码>60k,你的片内ram有多大啊。
作者: pennyllin    时间: 2006-9-15 13:53

>60k?我的片内ram才4k.我是不是要把程序放到片外SDRAM中,那这样在nios中就要添加 SDRAM controler和三态桥吗?很菜的问题,还请大虾赐教,谢谢!
作者: kzw    时间: 2006-9-15 15:14

添加sdram不要添加三态桥的,你就添加一个sdram啊,按照altera的给的例子来添加阿,很简单的。
作者: pennyllin    时间: 2006-9-15 21:03

谢谢版主!
作者: pennyllin    时间: 2006-9-18 09:40

再请教大侠们一个很菜的问题:
对某一型号的FPGA,在定制nios 时,配一个片上RAM,这个RAM的大小有没有限制?

作者: pennyllin    时间: 2006-9-26 09:49

http://bbs.chinaecnet.com/uploadImages/tu.rar
大侠救命啊!
做”hello world!" 还是:
Using cable "USB-Blaster [USB-0]", device 1, instance 0x00
Pausing target processor: not responding.
Resetting and trying again: FAILED
Leaving target processor paused

作者: kzw    时间: 2006-9-27 08:33

片上ram的大小只是受限于器件内部的ram大小。
作者: kzw    时间: 2006-9-27 08:36

查查硬件,看看系统设计。
作者: pennyllin    时间: 2006-9-27 09:26

版主,请您看看我的设计吧:http://bbs.chinaecnet.com/uploadImages/tu0.rar

作者: pennyllin    时间: 2006-9-27 09:42

又一次失败!我再试了一下LED的例子,所有都放在片上RAM中,也是出现类似
Using cable "USB-Blaster [USB-0]", device 1, instance 0x00。。。。。。的错误,会不会是我的系统的问题,杀毒软件的监控开不了了!


作者: pennyllin    时间: 2006-9-29 14:49

“hello world" 程序动起来了,但为什么在consle里说:
nios2_terminal:can't open uart,permission denied.我把界面铐下来了,请高手赐教!
http://bbs.chinaecnet.com/uploadImages/092900.rar
作者: kzw    时间: 2006-10-8 08:36

你的硬件构成中没有uart,说明你把打印的终端设置为了uart了,你把它设置为jtag-uart就好了,就可以打印出来了。
作者: pennyllin    时间: 2006-10-8 08:47

版主,您好!
我的硬件构成中添的是JTAG-UART,打印终端就是jtag-uart,consle里还是上图中的红色警告,但我如果点击YES,也能够到DEBUG模式,用串口工具也能收到字符显示。我想请问您这个红色警告有没有关系呢?谢谢!




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0