📄 v3k_fram_watch_sdcc.c
字号:
//-------------------------------------------------------------------------------------------------------//
// V3K_FRAM_Watch_SDCC.c //
//------------------------//
// The FRAM display function is not available when the parallel port version
// of the Versa JTAG interface is used.
//
// However it is still possible to monitor the content of specific FRAM address locations
// using the Watch function in the VersaWare JTAG debugger.
//
// To define a Watch variable pointing to the the address 8100h FRAM memory:
//
// 1) Select the Watch->Add... menu item. An "Add Watch" window will appear
// 2) In the "Name" Edit Box, enter the name you want to be displayed
// for this FRAM address in the watch list.
// 3) The "location" should be set to XRAM
// 4) Type 8100 in the "address" edit Box
// 5) The value type chosen depends on the parameter to watch size. Lets chose char
// 6) Finally set the parameter "display as" setting and click
//
// The simple demo program below can be used to test the FRAM watch variable setting.
//
//
// Rev 1.0
// www.ramtron.com
//-------------------------------------------------------------------------------------------------------//
#include <VRS51L3074_SDCC.h>
//--Init pointer to FRAM base address
xdata at 0x8000 unsigned char frambase; //Init a char variable pointing to FRAM
xdata unsigned char * data framptr = &frambase ; //Init a pointer in IRAM pointing to the frambase var.
//-----------------------------------------//
// MAIN FUNCTION //
//-----------------------------------------//
void main (void){
volatile idata count = 0x00; //general purpose counter
volatile idata int cptr= 0x00; //general purpose counter
volatile idata char framread = 0x00;
DEVMEMCFG |= 0xC0; //Activate the FRAM memory
framptr = (&frambase + 0x100);
do{
*framptr = count++;
}while(1);
}//end of Main
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -