uCUnit Logo

Getting started

Home | Getting Started | Documentation | Related Sites

Installation

Simply download the zip file to a location of your choice and unzip it.

Samples

There is a simple example located in the samples directory. You can use the (i386) GNU C compiler to compile the example. A makefile is provided.

Customizing

Because every microcontroller and every project differs from each other you need to customize the header file. You have to provide concrete implementation to write the output to a serial device, to a network connection or everthing else. If you can use printf() you might use it. Then you need a hardware initializing function to initialize the hardware. At least you must setup a communication device for outputting text to a host computer.

For safety critical systems you have to provide a function to put your system in a safe state. DO NOT FORGET TO PUT ALL IO PINS IN A SAFE STATE!

For customizing change the names of the predefined functions in the header file.

SYSOUT()

 #define SYSOUT(message) \
       printf("FAILED:%s:%u:%s\n",__FILE__, __LINE__, message)

Function to call to Write a message to host computer.

TODO:
Implement a SYSOUT function for output. For most microcontrollers a special implementation of printf is available for writing to a serial device or network. In some cases you have to implement a putch(char c) function.

GO_INTO_SAFESTATE()

 #define GO_INTO_SAFESTATE()         idle()

Function to call to put your system into a safe state

TODO:
Implement a funtion to put you microcontroller into a safe state. If you don't need it, then leave define empty.

RECOVER_FROM_SAFESTATE()

 #define RECOVER_FROM_SAFESTATE()    reset()
Function to call to recover your system from a safe state.

TODO:
Implement a funtion to recover your microcontroller from a safe state.

SYSINIT()

 #define SYSINIT()                   System_Init()

Function to call to initialize your hardware.

TODO:
Implement a funtion to intialize your microcontroller hardware. You need to initialize the communication device for transmitting your results to a host PC.


Copyright (C) 2007 by  KRAUSS Computer Engineering  |  Impressum  |  Datenschutz