Board logo

标题: 将lcd_display重命名为pio_pio出现的问题 [打印本页]

作者: undead_fish    时间: 2005-5-23 14:12     标题: 将lcd_display重命名为pio_pio出现的问题

我将lcd_display重命名为pio_pio(sopc builder中)后,在程序中本来是
#ifdef LCD_DISPLAY_NAME
  lcd = fopen("/dev/lcd_display", "w");
#endif

现在把它改为这样
#ifdef LCD_PIO_NAME
  lcd = fopen("/dev/lcd_pio", "w");
#endif
调试到这里的时候就出现了问题
不知道这样改有没有问题,请各位大侠帮帮忙,小弟谢过先。
作者: rayme2000    时间: 2005-5-23 15:15

你可以把你的问题是什么说清楚些吗,比如错误信息 ~
你修改的那个地方lcd = fopen("/dev/lcd_pio", "w");  要注意lcd_pio一定要和Builder 里面的设备名称一致。否则就找不这个设备了。
作者: undead_fish    时间: 2005-5-23 15:45

Error! : Failed memory access in component my_cpu - Unable to read data from mis
aligned memory address 0xb
Error! : Simulation failed in component my_cpu at instruction 4427 (PC=0x800988
instr=0x1900030b).
我在builder中把定义的是显示pio为lcd_pio,我现在使用了例子中的那个计数程序,他里面是用lcd_display的,我就把它改了,调试的时候出现上面的错误。
作者: undead_fish    时间: 2005-5-23 20:55

又出现问题了  哪位高手帮帮我
Warning : SOPC Builder system component button_pio is not supported by the simul
ator. Simulation may be incorrect if your software attempts to access it
Warning : SOPC Builder system component lcd_display is not supported by the simu
lator. Simulation may be incorrect if your software attempts to access it
Warning : SOPC Builder system component led_pio is not supported by the simulato
r. Simulation may be incorrect if your software attempts to access it
Warning : SOPC Builder system component seven_seg_pio is not supported by the si
mulator. Simulation may be incorrect if your software attempts to access it
Warning : SOPC Builder system component reconfig_request_pio is not supported by
the simulator. Simulation may be incorrect if your software attempts to access
it
Listening on port 2334 for connection from GDB:   
Error! : Simulation failed in component my_cpu at instruction 5326 (PC=0x805f30
instr=0x183ee83a).
不知道错误是不是由warning引起的?
作者: yancharles    时间: 2005-5-23 21:21

照我看来,你八成是程序中指针使用出现了问题,编译通过但debug仿真通不过。这跟C里面指针使用不当会引起系统崩溃的道理一样。
作者: undead_fish    时间: 2005-5-23 22:57

现在我把系统全改了,builder中定义lcd_display,程序用模板里的count_binary(什么都没有改),运行完lcd_init的时候又出同样的错误了
Error! : Simulation failed in component my_cpu at instruction 5326 (PC=0x805f30
instr=0x183ee83a).




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