Jump to content


ERROR: When I launch XMD


  • You cannot reply to this topic
1 reply to this topic

#1 ramonal

    Member

  • Members
  • PipPip
  • 4 posts

Posted 30 June 2009 - 01:20 PM

Hi!

I work with Virtex 4 FX 12 LC Development Kit and tried to implement a very easy program, where input equals output.
When I launch XMD I alsways get these ERROR messages:

/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c: In function 'config_IntegralController':
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c:92: error: 'co_loc' undeclared (first use in this function)
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c:92: error: (Each undeclared identifier is reported only once
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c:92: error: for each function it appears in.)
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c: In function 'co_initialize':
/cygdrive/c/Versuche/IntegralController/IntegralController/IntegralController_hw.c:97: warning: return makes pointer from integer without a cast

make: *** [integral/executable.elf] Error 1
Done!


///////////////////////////////////////////////////////////////////////////////
//
// Generated by Impulse CoDeveloper
// Impulse C is Copyright© 2003-2007 Impulse Accelerated Technologies, Inc.
//
// IntegralController_hw.c: includes the hardware process and configuration
// function.
//
// See additional comments in IntegralController.h.
//

#include "co.h"
#include "cosim_log.h"
#include "IntegralController.h"
#ifdef IMPULSE_C_TARGET
#include "xio.h"
#include "xparameters.h"
#include "apu_if.h"
#endif

Here you can see the hw.c


// Software process declarations (see IntegralController_sw.c)
extern void Producer(co_stream Phasedifferenz);
extern void Consumer(co_stream Piezovolt);

//
// This is the hardware process.
//
void Integration(co_stream Phasedifferenz, co_stream Piezovolt)
{
co_int32 nSample;
IF_SIM(int samplesread; int sampleswritten;)

IF_SIM(cosim_logwindow log;)
IF_SIM(log = cosim_logwindow_create("Integration")wink.gif

do { // Hardware processes run forever
IF_SIM(samplesread=0; sampleswritten=0;)

co_stream_open(Phasedifferenz, O_RDONLY, INT_TYPE(STREAMWIDTH));
co_stream_open(Piezovolt, O_WRONLY, INT_TYPE(STREAMWIDTH));

// Read values from the stream
while ( co_stream_read(Phasedifferenz, &nSample, sizeof(co_int32)) == co_err_none ) {
#pragma CO PIPELINE
IF_SIM(samplesread++wink.gif


co_stream_write(Piezovolt, &nSample, sizeof(co_int32));
IF_SIM(sampleswritten++wink.gif
}
co_stream_close(Phasedifferenz);
co_stream_close(Piezovolt);
IF_SIM(cosim_logwindow_fwrite(log,
"Closing filter process, samples read: %d, samples written: %d\n",
samplesread, sampleswritten)wink.gif

IF_SIM(break;) // Only run once for desktop simulation
} while(1);
}

//
// Impulse C configuration function
//
void config_IntegralController(void *arg)
{
co_stream Phasedifferenz;
co_stream Piezovolt;


co_process Integration_process;
co_process producer_process;
co_process consumer_process;

IF_SIM(cosim_logwindow_init()wink.gif

Phasedifferenz = co_stream_create("Phasedifferenz", INT_TYPE(STREAMWIDTH), STREAMDEPTH);
Piezovolt = co_stream_create("Piezovolt", INT_TYPE(STREAMWIDTH), STREAMDEPTH);

producer_process = co_process_create("Producer", (co_function)Producer,
1,
Phasedifferenz);

Integration_process = co_process_create("Integration", (co_function)Integration,
2,
Phasedifferenz,
Piezovolt);

consumer_process = co_process_create("Consumer",(co_function)Consumer,
1,
Piezovolt);

co_process_config(Integration_process, co_loc, "pe0");
}

co_architecture co_initialize(int param)
{
return(co_architecture_create("IntegralController_arch","Generic",config_IntegralController,(void *)param));
}


If anyone know how to solve this problem it would be great.

Greetings
Ramona

#2 RalphBodenner

    Advanced Member

  • Admin
  • PipPipPip
  • 348 posts

Posted 30 June 2009 - 05:11 PM

Hi Ramona,

You'll want to compile only software source files for the embedded processor, rather than the hardware source file you reprinted in your post. If you target your Impulse C project to a PowerPC-based Platform Support Package, such as "Xilinx Virtex-4 APU (VHDL)", the proper source files for the PowerPC, including driver code, will be generated and exported when you run the "Export Generated Hardware" and "Export Generated Software" commands from CoDeveloper.

I would suggest following one of the tutorials for the ML403 development board for an overview of the entire process of building the hardware and software portions of an Impulse C application using CoDeveloper and Xilinx Platform Studio:

http://www.impulseaccelerated.com/Tutorials/Xilinx/

Regards,
Ralph
Ralph Bodenner
Impulse Accelerated Technologies, Inc.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users