RetroBSD

2.11BSD operating system for microcontrollers
It is currently Tue Sep 25, 2018 5:10 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Kermit for embedded
PostPosted: Sat Dec 21, 2013 11:26 am 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
http://www.columbia.edu/kermit/ek.html

What E-Kermit Does
EK performs just two functions: sending files and receiving files. It is compact, portable, and fully reentrant. On SPARC (RISC), kermit.o is about 25K. On Intel (CISC) it's about 15K. By reducing buffer sizes and eliminating optional or unwanted features, smaller sizes can be achieved.

What E-Kermit Does NOT Do
EK does not include client/server functions; a command or script programming language; character-set conversion; transport encryption; or any form of communications or file input/output. It does not dial modems, it does not make connections, it does not have a built-in TCP/IP stack or interface to an external one.

EK is not an application itself, it's a subroutine to be called from your master application. It is useful only to developers, who must supply the master application or calling environment as well as the file and communications i/o routines. The calling environment must, in turn, make and configure the communications connection if one is required and not already open. A sample calling environment and i/o support are provided for Unix.

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
 Post subject: Re: Kermit for embedded
PostPosted: Sat Dec 21, 2013 7:05 pm 
Contributor
User avatar

Joined: Thu Nov 08, 2012 7:04 am
Posts: 2401
Location: Rapa Nui
Under uecide with:
platform.h:
Code:
/* Unix platform.h for EK */
// Pito: Retrobsd experimental

#include <stdio.h>
#include <sys/stat.h>

#define NODEBUG
#define MINSIZE
#define FN_MAX   64
#define P_PKTLEN  256
#define P_WSLOTS  8

#ifndef IBUFLEN
#define IBUFLEN  2048         /* File input buffer size */
#endif /* IBUFLEN */

#ifndef OBUFLEN
#define OBUFLEN  2048                   /* File output buffer size */
#endif /* OBUFLEN */


and
in unixio.c with (and w/ close(ttyfd) and default tty0 settings as well):
Code:
..
int
devopen(char *device) {      
   if ((ttyfd = open(device,O_RDWR)) < 0){
      return 0;
   }
    //ttyfd = 0;
    return(1);
}

and with in main:
Code:
/* THE REAL STUFF IS FROM HERE DOWN */

    if (!devopen("/dev/tty0"))      /* Open the communication device */
      doexit(FAILURE);
    if (!devsettings("/dev/tty0"))      /* Perform any needed settings */
      doexit(FAILURE);


it compiles (hopefully) with mips32:
Code:
Program Size:
  Flash: 9% (51112 bytes out of 520192 bytes max)
    RAM: 10432 bytes
         (text: 50360, data: 752, bss: 9680)


But getting bus error when run kermit -r..
Any clue?

_________________
Pukao Hats Cleaning Services Ltd.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron




Powered by phpBB® Forum Software © phpBB Group

BSD Daemon used with permission