1 uLan embedded source tree v 0.8.3
2 =================================
4 uLan is message oriented multi-master communication protocol for
5 microcontrollers. It uses 9-bit character format for addressing
6 and link control and RS-485 physical layer.
8 http://ulan.sourceforge.net/
9 http://sourceforge.net/projects/ulan
11 This README is focussed on use of the uLAN
12 protocol in embedded systems.
14 The uLan embedded tree/archive provides uLan protocol
15 support for multiple embedded targets.
16 The code is used as firmware base of some experimental
17 and more production grade devices distributed by
18 PiKRON Ltd., Agrosoft Tabor s.r.o. and the Czech
19 Technical University in Prague.
21 The ul_embedded archive is more or less only
22 skeleton/snapshot/example of the applications
23 and build environment. We use SourceForge GIT
24 repositories directly in our real projects
25 and combine that with other repositories
26 with device specific functions.
28 If you intend to use uLan embedded code for
29 something more than structure review or simple
30 boot-loader compilation, it is suggested to use
31 full uLan GIT based source tree.
33 Next commands sequence can be used to obtain combined
34 uLAN host and embedded source tree. This is preferred
35 way to start the development
37 ULAN_SRIPTS="http://ulan.git.sourceforge.net/git/gitweb.cgi?p=ulan/ulan;a=blob_plain;f=scripts"
38 wget $ULAN_SRIPTS/get-git-ulan -O get-git-ulan
39 wget $ULAN_SRIPTS/build-ulan-host -O build-ulan-host
40 wget $ULAN_SRIPTS/build-ulan-embedded -O build-ulan-embedded
41 wget $ULAN_SRIPTS/install-ul_drv -O install-ul_drv
42 chmod +x get-git-ulan build-ulan-host build-ulan-embedded install-ul_drv
49 The top-level sources tree utilizes POSIX symbolic links
50 to construct whole combined sources tree. This makes
51 problem to use this whole tree on operating systems
52 which lacks these standard features (Windows).
53 We could look for some workaround for this problem
54 but it is not priority for core uLan project developers
55 because they use MINGW (i586-mingw32 or i586-mingw32msvc)
56 cross compiler to build Windows binaries in sane Linux
57 environment. Only uLAN driver has to be build by freely
58 available WDF Windows Driver Foundation tools. But WDF
59 build under WINE is possible and used.
61 The two distinct embedded microcontrollers categories
62 are supported by uLAN embedded protocol sources.
64 * 32-bit microcontrollers supported by GCC
65 ARM NXP LPC-2xxx and LPC-17xx currently used
67 * 8-bit 8051 based resource constrained devices
68 TI MSC1210 and Atmel AT89C51ed2 curently used
70 We suggest to use ARM, MIPS or may it be MSP430 for new
71 designs. The 8051 port is maintained mainly for completeness,
72 testing of the uLAN code in resource constrained
73 environment and because more 8051 based applications
74 are still in production by uLAN developers' companies.
77 GCC supported microcontrollers build
78 ------------------------------------
80 The GCC cross compiler for targeted device is required.
81 The next instructions expect the use of ARM family
82 microcontroller. The arm-elf-gcc and arm-elf-binutils
83 are required to build sources. The cross compiler packages
84 and Linux host system installation instructions can be
85 found on CTU RTIME server.
87 http://rtime.felk.cvut.cz/hw/index.php/Cross_compilers
89 Copy, link or include Makefile.gcc (in)to Makefile.rules
90 first. Then correct build target and configuration
91 has to be selected. The example configurations are found
92 in a corresponding board directory (i.e. board/arm/ul_usb1/config).
95 rm Makefile.rules config.target config.omk
96 cp Makefile.gcc Makefile.rules
97 cp board/arm/ul_usb1/config/config.u2uv2 config.omk
101 You should find resulting binaries in the "_compiled/bin"
102 directory. If application to target loader/flasher is
103 correctly configured then invoking "load" target in
104 desired application directory programs code into device.
109 The make parameter "V=1" can be used to display
110 more verbose output from make.
112 More detailed manual for OMK make system can be
113 found on OMK rules homepage
115 http://rtime.felk.cvut.cz/omk/omk-manual.html
120 The SDCC 3.1.0 or later version is required to build the code.
121 The GNU make program 3.81beta3 or better is required.
122 The full build has been tested on Linux based hosts only
123 for now. The uLan protocol code has been successfully build
124 by Keil compiler under Windows in the past.
126 The archive has to be unpacked with symbolic links
129 Copy, link or include Makefile.sdcc (in)to Makefile.rules
130 first. Then correct build target and configuration
131 has to be selected. The example configurations are found
132 in a corresponding board directory (i.e. board/mcs51/ulad21/config).
135 rm Makefile.rules config.target config.omk
136 cp Makefile.sdcc Makefile.rules
137 cp board/mcs51/ulad21/config/config.u2u config.omk
141 You should find resulting binaries in the "_compiled/bin"
142 directory. The board and application is selected by used
145 The next boards and applications are supported
147 Device: MCS51 TI MSC-1210
148 Board: ULAD-21 - AD converter and uLan2USB converter
150 board/mcs51/ulad21/config/config.u2u
151 - uLan to USB converter
152 board/mcs51/ulad21/config/config.ulboot
153 - uLan enabled remote boot-loader and boot-block
155 Board: HISC - Home Information System Controller
156 board/mcs51/hisc/config/config.ulboot
157 - boot block for distributed HISC system
158 board/mcs51/hisc/config/config.blinder
160 board/mcs51/hisc/config/config.heating-kswtimer
161 - kettle switch timer
163 Device: MCS51 Atmel AT89C51RD2
164 board/mcs51/ps1/config/config.u2u
165 - AT89C51RD2 based uLan2USB converter
167 The procedure to write boot-block into ULAD-21 MSC1210 based board
170 FLASHMSC_TTY=/dev/ttyS1
171 flashmsc -d $FLASHMSC_TTY -E 0x807f
172 flashmsc -d $FLASHMSC_TTY -E 0x7fff
173 flashmsc -d $FLASHMSC_TTY -X 18432000 ulad21-hcr.hex
174 flashmsc -d $FLASHMSC_TTY -X 18432000 ulad21-boot.hex
176 The "flashmsc" sources can be found at page
177 http://cmp.felk.cvut.cz/~pisa/#mcuutils
179 To replace application in the converter or other uLan node
180 over uLan communication protocol, next steps are required
182 echo Reset application if running
184 echo Waiting to target to go into boot block
185 echo If application blocks, reset device at this time
186 echo to activate boot block now
191 ul_sendhex -m 62 -t 5 -e -s 0x2000 -l 0x6000
193 echo Loading application
194 ul_sendhex -m 62 -t 5 application.hex
196 Look for uLan driver for host side (Linux, Windows, DOS)
197 uLan protocol driver. The uLan2USB converter requires
198 at least version ul_drv-0.7 release.
202 (C) Copyright 1996-2012 by Pavel Pisa
203 http://cmp.felk.cvut.cz/~pisa
204 (C) Copyright 1996-2012 PiKRON Ltd.
205 http://www.pikron.com
206 (C) Copyright 2002-2012 Petr Smolik