相同的led闪烁代码在alt_main好使,在main中不好使!
- UID
- 154936
- 性别
- 男
|
相同的led闪烁代码在alt_main好使,在main中不好使!
最近几天调试出现的怪问题,原来一直都好好使,报了一次Verify failed between之后不好使,跑马灯试验测试好使,说明硬件应该没有问题的呀。可在main中就不行,请帮分析一下。
后来又有新发现:相同的led闪烁代码在alt_main好使,在main中不好使。 我配置的NIOSII的CPU是快速型的,NIOS IDE 的.test等分配全选sdram,我在alt_main中做个led闪烁试验可以闪烁,但在main中用同样的程序却不可以闪烁,并报告如下错误。main之前只是比alt_main中多一段初始化呀,怎么还能牵扯到校验错误呢?
在main和alt_main中的代码: alt_u8 led = 0x2; int i; while(1) { led=!led; IOWR(PIO_LED_BASE,0x00,led); i=500000; while(i>0) { i--; } }
console中报的错误:
Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 Pausing target processor: not responding. Resetting and trying again: OK Initializing CPU cache (if present) OK Downloading 00000020 ( 0%) Downloaded 28KB in 1.1s (25.4KB/s) Verifying 00000020 ( 0%) Verify failed between address 0x20 and 0x6F73 Leaving target processor paused
[此贴子已经被作者于2007-8-2 15:38:23编辑过] |
|
|
|
|
|
- UID
- 79720
- 性别
- 男
|
你是说用main函数就会出现程序下载不正确,用alt_main就没有这个问题了,是不是啊。 |
|
|
|
|
|
- UID
- 107474
- 性别
- 男
|
我也遇到同样的问题,请问你的问题解决了没有?如何解决的? |
|
|
|
|
|
- UID
- 136199
- 性别
- 男
|
Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 Pausing target processor: not responding. Resetting and trying again: OK Initializing CPU cache (if present) OK Downloading 00000020 ( 0%) Downloaded 28KB in 1.1s (25.4KB/s) Verifying 00000020 ( 0%) Verify failed between address 0x20 and 0x6F73 Leaving target processor paused\ 这个错误很显然是硬件错误啊, Verifying 00000020 ( 0%) Verify failed between address 0x20 and 0x6F73
验证没有通过。 |
这个版主不太冷
===========================
我的中电网博客:http://blog.chinaecnet.com/u/20/index.htm |
|
|
|
|
|
- UID
- 136199
- 性别
- 男
|
Using cable "ByteBlasterII [LPT1]", device 1, instance 0x00 Pausing target processor: not responding. Resetting and trying again: OK Initializing CPU cache (if present) OK Downloading 00000020 ( 0%) Downloaded 28KB in 1.1s (25.4KB/s) Verifying 00000020 ( 0%) Verify failed between address 0x20 and 0x6F73 Leaving target processor paused\ 这个错误很显然是硬件错误啊, Verifying 00000020 ( 0%) Verify failed between address 0x20 and 0x6F73
验证没有通过。 |
这个版主不太冷
===========================
我的中电网博客:http://blog.chinaecnet.com/u/20/index.htm |
|
|
|
|
|
- UID
- 79720
- 性别
- 男
|
|
|
|
|
|
- UID
- 162206
- 性别
- 男
|
明显是你的sdram的硬件有问题,好好查查HDL。应该和软件无关,是程序memory验证没通过 |
|
|
|
|
|
- UID
- 162206
- 性别
- 男
|
用alt_main时是实现重载技术的,所以估计没用到sdram,但是一旦你把它改成了main程序要大很多的。 |
|
|
|
|
|