Lantronix Developer Forums  

Go Back   Lantronix Developer Forums > Evolution SDK > New Releases

New Releases Use this forum to view announcements for production releases and to download interim updates.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-28-2017, 11:44 AM
Papouch Papouch is offline
Junior Member
 
Join Date: Nov 2009
Posts: 4
Default start projekt

Hello,
I'm starting to program XPORT PRO EVO
I have installed Evolution XPort Pro SDK v5.2.0.1.R5 and Sourcery G ++, Lite

In Evolution SDK Users Guide, pages 17 and 18, I compiled and uploaded sample examples.

Then I created a new file on their site and wrote a simple example and after compiling the file I compiled it and lost it.

I do not know how to create another file.c aned file.h and put it in the main file.

example:

The main file is called helloworld.
This file was sent periodically to the hello world serial line.

Sending to the serial line I write in another file (serial.c)

#include "evolution_libs.h"
#include "evolution_stdio.h"
#include "evolution_http.h"
#include "evolution_cli.h"
#include "evolution_serial.h"
#include "serial.h"
// # includes "startup.h"

Void send_to_serial (char * source_d, unsigned char only_dat) {
*****SerialWrite (0, source_d, len_dat, true);
}



I have created serial.h where the function is described:

#ifndef SERIAL_H
#defines SERIAL_H

External void send_to_serial (char * source_d, unsigned char only_dat);

#endif

Helloworld.c

/ *!
** \ file
**
** \ addtogroup sample
**
** \ par Hello World: A simple Hello World sample.
** This sample writes Hello world out serial port 0 (Line 1).
** Using factory defaults, the serial port is configured at 9600, 8N1.
**
** The XML configuration and status record functions are stubbed out.
**
* /

#include "evolution_libs.h"
#include "evolution_stdio.h"
#include "evolution_http.h"
#include "evolution_cli.h"
#include "evolution_serial.h"
#include "serial.h"
#include "startup.h"


Int SDKMain (struct command_line * commandline, struct http_server * httpServer)
{
****(Void) commandLine; / * To avoid compiler warning for unused variables * /
****(Void) httpServer; / * To avoid compiler warning for unused variables * /
****
****Send_to_serial ("Hello World! \ R \ n", strlen ("Hello World! \ R \ n"));
****
****Return 0;
}

Compilation fails and I write to myself:

Microsoft Windows [Verze 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Všechna práva vyhrazena.

c:\Program Files (x86)\Lantronix\Evolution XPort Pro SDK v5.2.0.1.R5\samples\xpo
rt_pro>cs-make helloworld
../../sdk/startup.c
../helloworld.c
helloworld.out
Linking helloworld.out...
work/helloworld.o: In function `SDKMain':
c:\Program Files (x86)\Lantronix\Evolution XPort Pro SDK v5.2.0.1.R5\samples\xpo
rt_pro/../helloworld.c:28: undefined reference to `send_to_serial'
collect2: ld returned 1 exit status
cs-make: *** [helloworld.out] Error 1


Files helloworld.c, serial.c, serial.h I have in the sample samples.

I did not modify make file.
Can you advise me how to fix this problem?
Thank you

Mirek
Reply With Quote
  #2  
Old 07-31-2017, 10:31 AM
blee blee is offline
Super Moderator
 
Join Date: Jan 2017
Posts: 6
Default

Hi Mirek,

Did you check the make file?

You can open make file in editor. In make file line 120, there is a "cs-make helloworld". You may need to include your "serial" there in order to include it into the build rule.

Regards,
Brooke
Reply With Quote
  #3  
Old 07-31-2017, 02:43 PM
garry0427 garry0427 is offline
Moderator
 
Join Date: Apr 2008
Posts: 157
Default

It appears you are manually building with the cs-make command; but I do not see that you actually included serial.c on the command line to be built.
You included startup and helloworld, but not serial
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:57 AM.


Copyright © Lantronix, Inc. 2013. All rights reserved.
Powered by vBulletin® Copyright ©2000 - 2017, vBulletin Solutions, Inc.