cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
laser_ibz
Visitor
Visitor
1,438 Views
Registered: ‎04-16-2013

ERROR sharing memory in SDK

Dear all,

 

I have create a EDK block in simulink with one To Register. 

Then I have create a EDK proyect. 

Now, im propraming the software. 

I am using the example of the System Generator for DSP Page 155 in order to send the data to the Rs232. 

 

Here the simple code:

#include <stdio.h>
#include "xparameters.h"
#include "xutil.h"


// header file of System Generator Pcore
#include "counter1550_plbw.h"

 

int main (void) {
int i;
uint32_t Prompt;
//print("-- Entering main() --\n\r");
xc_iface_t *iface;
xc_from_reg_t *fromreg_Prompt;


// initialize the software driver

xc_create(&iface, &COUNTER1550_PLBW_ConfigTable[0]);


// obtain the memory locations
xc_get_shmem(iface, "Prompt", (void **) &fromreg_Prompt);
xc_read(iface, fromreg_Prompt->dout, &Prompt);
xil_printf("Gray = %x \n\r", Prompt);

print("-- Exiting main() --\n\r");
return 0;
}

 

 

But i get the following error at xc_create(&iface, &COUNTER1550_PLBW_ConfigTable[0]):

C:\PROYECTO_ESA_II\FPGA_EDK\Counter1500\workspace\hw_platform_0\Debug/../src/helloworld.c:37: undefined reference to `COUNTER1550_PLBW_ConfigTable'
collect2: ld returned 1 exit status
make: *** [hw_platform_0.elf] Error 1

 

Can anyone help me?

I saw in the counter1550_plbw.h the following instance:

extern COUNTER1550_PLBW_Config COUNTER1550_PLBW_ConfigTable[];

 

 

Many thanks in advance for your help. 

 

BR

Moisés 

 

 

0 Kudos
0 Replies