Defines | Functions | Variables
firm_update.c File Reference

Example code for Simple Open EtherCAT master. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <unistd.h>
#include "ethercat_soem/ethercattype.h"
#include "ethercat_soem/nicdrv.h"
#include "ethercat_soem/ethercatbase.h"
#include "ethercat_soem/ethercatmain.h"
#include "ethercat_soem/ethercatcoe.h"
#include "ethercat_soem/ethercatfoe.h"
#include "ethercat_soem/ethercatconfig.h"
#include "ethercat_soem/ethercatprint.h"
Include dependency graph for firm_update.c:

Go to the source code of this file.

Defines

#define FWBUFSIZE   (8 * 1024 * 1024)

Functions

void boottest (char *ifname, uint16 slave, char *filename)
int input_bin (char *fname, int *length)
int main (int argc, char *argv[])

Variables

uint16 argslave
uint32 data
char filebuffer [FWBUFSIZE]
char filename [256]
int filesize
int j
uint8 ob
uint16 ow

Detailed Description

Example code for Simple Open EtherCAT master.

Usage: firm_update ifname1 slave fname ifname is NIC interface, f.e. eth0 slave = slave number in EtherCAT order 1..n fname = binary file to store in slave CAUTION! Using the wrong file can result in a bricked slave!

This is a slave firmware update test.

(c)Arthur Ketels 2011

Definition in file firm_update.c.


Define Documentation

#define FWBUFSIZE   (8 * 1024 * 1024)

Definition at line 30 of file firm_update.c.


Function Documentation

void boottest ( char *  ifname,
uint16  slave,
char *  filename 
)

Definition at line 58 of file firm_update.c.

int input_bin ( char *  fname,
int *  length 
)

Definition at line 41 of file firm_update.c.

int main ( int  argc,
char *  argv[] 
)

Definition at line 146 of file firm_update.c.


Variable Documentation

Definition at line 39 of file firm_update.c.

Definition at line 34 of file firm_update.c.

Definition at line 36 of file firm_update.c.

char filename[256]

Definition at line 35 of file firm_update.c.

int filesize

Definition at line 37 of file firm_update.c.

int j

Definition at line 38 of file firm_update.c.

Definition at line 32 of file firm_update.c.

Definition at line 33 of file firm_update.c.



ethercat_soem
Author(s): Arthur Ketels, M.J.G. van de Molengraft
autogenerated on Wed Aug 26 2015 11:32:40