]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/lx-rocon.git/blob - ulboot/README.txt
RoCoN: USB CDC ACM use maximal packet length - 64 bytes.
[fpga/lx-cpu1/lx-rocon.git] / ulboot / README.txt
1 uLan embedded source tree v 0.8.3
2 =================================
3
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.
7
8   http://ulan.sourceforge.net/
9   http://sourceforge.net/projects/ulan
10
11 This README is focussed on use of the uLAN
12 protocol in embedded systems.
13
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.
20
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.
27
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.
32
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
36
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
43  ./get-git-ulan
44  ./build-ulan-host
45  sudo ./install-ul_drv
46  sudo modprobe ul_drv
47  ./build-ulan-embedded
48
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.
60
61 The two distinct embedded microcontrollers categories
62 are supported by uLAN embedded protocol sources.
63
64  * 32-bit microcontrollers supported by GCC
65    ARM NXP LPC-2xxx and LPC-17xx currently used
66
67  * 8-bit 8051 based resource constrained devices
68    TI MSC1210 and Atmel AT89C51ed2 curently used
69
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.
75
76
77 GCC supported microcontrollers build
78 ------------------------------------
79
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.
86
87   http://rtime.felk.cvut.cz/hw/index.php/Cross_compilers
88
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).
93
94   cd ul_embedded-x.y
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
98   make defaul-config
99   make
100
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.
105
106   cd app/ulboot
107   make load
108
109 The make parameter "V=1" can be used to display
110 more verbose output from make.
111
112 More detailed manual for OMK make system can be
113 found on OMK rules homepage
114
115   http://rtime.felk.cvut.cz/omk/omk-manual.html
116
117 8-bit varinat build
118 -------------------
119
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.
125
126 The archive has to be unpacked with symbolic links
127 for now.
128
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).
133
134   cd ul_embedded-x.y
135   rm Makefile.rules config.target config.omk
136   cp Makefile.sdcc Makefile.rules
137   cp board/mcs51/ulad21/config/config.u2u config.omk
138   make defaul-config
139   make
140
141 You should find resulting binaries in the "_compiled/bin"
142 directory. The board and application is selected by used
143 "config.omk" file.
144
145 The next boards and applications are supported
146
147 Device: MCS51 TI MSC-1210
148    Board: ULAD-21 - AD converter and uLan2USB converter
149    Applications:
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
154
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
159         - blinder controller
160      board/mcs51/hisc/config/config.heating-kswtimer
161         - kettle switch timer
162
163 Device: MCS51 Atmel AT89C51RD2
164      board/mcs51/ps1/config/config.u2u
165         - AT89C51RD2 based uLan2USB converter
166
167 The procedure to write boot-block into ULAD-21 MSC1210 based board
168 requires next steps
169
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
175
176 The "flashmsc" sources can be found at page
177   http://cmp.felk.cvut.cz/~pisa/#mcuutils
178
179 To replace application in the converter or other uLan node
180 over uLan communication protocol, next steps are required
181
182   echo Reset application if running
183   ul_sendhex -g 0 -m 0
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
187   ul_sendhex -o 0 -m 0
188   echo Found devices
189   ul_sendhex -p 64
190   echo Erasing flash
191   ul_sendhex -m 62 -t 5 -e -s 0x2000 -l 0x6000
192   sleep 2
193   echo Loading application
194   ul_sendhex -m 62 -t 5 application.hex
195
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.
199
200 The code authors
201
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
207