2011年10月12日 星期三

設定VisualDSP++環境讓ICE動作時SDRAM可使用


當有數值或程式預設放置於SDRAM時,程式一啟動尚未設置SDRAM這時將會發生錯誤
程式也會提出警告:
[Warning ld0151]: You may need to specify an initialization file (.dxe) to set up the registers for external memory initialization. ...
除了利用initialization file預先設定SRAM外,另一個方式則是修改VisualDSP++環境
以BF531為例,修改檔案"Analog Devices\VisualDSP 5.0\System\ArchDef\ADSP-BF531-proc.xml"
<memory-definitions>

...

</memory-definitions>


<!-- *********************************************** -->
<!-- Register resets used by emulator                -->
<!-- *********************************************** -->
<register-reset-definitions>
<register name="EBIU_SDRRC" reset-value="0x03A0" core="Common" />
<register name="EBIU_SDBCTL" reset-value="0x01" core="Common" />
<register name="EBIU_SDGCTL" reset-value="0x0091998d" core="Common" />
<register name="EBIU_AMGCTL" reset-value="0xff" core="Common" />
</register-reset-definitions>



<!-- **************************************************************** -->
<!-- **** Beginning at VisualDSP++ 5.0, a Custom Board Support File   -->
<!-- **** feature was introduced. Do not edit this file directly.     -->
<!-- **** See online help for creating a custom board XML file and    -->
<!-- **** for setting the Custom Board File active for your debugging -->
<!-- **** session. Your custom board file will have only the          -->
<!-- **** incremental changes needed, not a full definition.          -->
<!-- **************************************************************** -->


</visualdsp-proc-xml>
加入SDRAM控制暫存器的預設值,在ICE連線時會預先載入完成SDRAM設置

沒有留言:

張貼留言