1 .../bin/ld.exe: address 0x1043ad0 of dp_demo.elf section `.bss' is not within region `onchip_mem'
.../bin/ld.exe: address 0x1041084 of dp_demo.elf section `.rwdata' is not within region `onchip_mem'
参考 : https://www.cnblogs.com/yongleili717/p/11253006.html
此类问题都是存储空间不够,要么加大硬件 ram 的容量配置,要么减小运行空间,如下:
ram 配置
bsp - properties - Nios 2 Bsp Properties 中下面三项 注意,影响实际 RAM 的使用量
2 ...main.c:116: undefined reference to `alt_timestamp_start'
...main.c:117: undefined reference to `alt_timestamp_freq'
...main.c:118: undefined reference to `alt_timestamp'
参考: https://www.cnblogs.com/mark-sun/archive/2012/05/13/2498029.html
bsp -- 右键 NIOS 2 -- BSP editor ... 中注意给 timestamp_timer 指定实际物理设备
如果硬件没有配置下面的模块,则上面的 sys_clk_timer 和 timestamp_timer 没有选项
3 .../bin/ld.exe : can`t find xxxlib 无法找到xx库
右键工程 -- properties -- NIOS II Application Properties -- Nios II Application Path 中 Application library directories 添加 lib 的父目录
4 下载时 ID 报错
参考 https://www.cnblogs.com/hbxgwjl/p/4453867.html
1 pll 的 rst 要给一个外部复位, 不能直接置高或者拉低,pll 的 rst 是高有效
2 18.1standard 版本,pll 设置输入和输出频率一样时,真实输出频率不是设定值,可微调使输入输出不一致
3 nios核及大部分qsys 的 rst 其实为低有效,若 rst 反了下载时会报 ID hash 不匹配,建议用reset bridge 模块,此模块输出为低有效,输入为设定值
4 nios 的输入 clk 必须由 pll 给出,直接从引脚给出,下载时可能会报 ID hash 不匹配
5 如果要加 interval timer 模块,单位要用 ms,如果用默认 us 也可能导致 ID hash 不匹配
NIOS II 注意事项 :
1 开着ecilips ,硬件不能下载
2 拷贝工程改名字 ,添加模块,软件工程需要重建
3 ecilips debug 时没有reset 按键,直接点 debug即可
向nios中添加文件,提示找不到main :https://www.cnblogs.com/yuphone/archive/2011/10/24/2222207.html
向nios导入现有工程: https://blog.csdn.net/HHXUN/article/details/52751099
最小系统参考 : https://blog.csdn.net/botao_li/article/details/84403894
最小系统只需要 一个外部pll,nios 里 clk ,processor, ram,sys_id 4+1即可,若要断电保存需要单独的rom,要打印用 jtag_uart 注意 pll 的 rst 是高有效,nios中 rst 大部分是低有效