OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [packages/] [hal/] [arm/] [sa11x0/] [ipaq/] [v2_0/] [doc/] [README.ipaq] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
Feb 24, 2001
2
 
3
These are the original notes, based on the contribution from
4
Richard Panton at 3G Labs, Inc.
5
 
6
eCOS For The Compaq iPAQ H3600 Series Handheld PC
7
=================================================
8
 
9
Intro
10
-----
11
 
12
IMPORTANT - this current version does not allow the construction of a
13
_bootable_ ROM image for the iPAQ. However, it DOES allow the creation
14
of ROM and RAM based images.
15
 
16
You will need:
17
        A Compaq iPAQ h3600 series.
18
        The SERIAL docking cradle.
19
 
20
You can use:
21
        The CF-Card expansion sleeve.
22
        A Socket LP-E CF Ethernet card.
23
 
24
In order to load any Free Software onto the iPAQ, the Flash ROM must be
25
reprogrammed with the Linux Bootloader. Please see the instructions
26
at >>> www.handhelds.org <<< for installing the 'stable' bootloader. Note
27
that installing the bootloader will erase WinCE from the Flash ROMs, and
28
that ..
29
 
30
     .. IT MAY NOT BE POSSIBLE TO RE-INSTALL WinCE AFTER THIS.
31
 
32
 
33
(You WILL be able to load ARMLinux, however ;-)
34
 
35
The rest of this document assumes that you have a working bootloader on
36
your iPAQ, such that when you boot, the 'boot>' prompt comes out of the
37
serial port.
38
 
39
As the bootloader resides at address 0x0000 in the ROM, and we do not
40
wish to overwrite the bootloader (dangerous - this would turn the iPAQ
41
into what is colloquially known as a 'brick'), the eCOS Redboot image
42
must be loaded at some other address. In order to make memory mapping
43
simpler, eCOS/Redboot must be loaded onto a 1Mb boundary - i.e. at
44
address 0x00x00000, where x is 1,2,3...f. The eCOS startup code has been
45
adjusted for iPAQ to allow this. To minimise the changes to the memory
46
map, the MMU will map the correct 1Mb section to the start of ROM space
47
at 0x50000000 so that the rest of the image can run unchanged.
48
 
49
Patches to existing code
50
------------------------
51
 
52
Two patches to code are required:
53
 
54
$ECOS_REPOSITORY/hal/arm/arch/current/src/vectors.S:
55
    148c148,149
56
    <         ldr     pc,.reset_vector                // 0x00
57
    ---
58
    >         //ldr     pc,.reset_vector                // 0x00
59
    >   b       vectors                         // 0x00
60
    161c162,163
61
    < UNMAPPED_PTR(reset_vector)                      // 0x20
62
    ---
63
    > //UNMAPPED_PTR(reset_vector)                      // 0x20
64
    >   b       reset_vector
65
 
66
[This patch changes the reset vector to be position independant.]
67
 
68
 
69
 
70
and to $ECOS_REPOSITORY/hal/arm/sa11x0/var/current/src/hal_diag.c
71
    116,117c116
72
    <
73
    <     // Set UART to 8N1 (8 data bits, no partity, 1 stop bit)
74
    ---
75
    >     // Set UART to 8N1 (8 data bits, no parity, 1 stop bit)
76
    182a182,187
77
    > #if defined(CYGPKG_HAL_ARM_SA11X0_IPAQ)
78
    > static channel_data_t ser_channels[2] = {
79
    >     { (volatile struct sa11x0_serial*)SA11X0_UART3_BASE, 1000, CYGNUM_HAL_INTERRUPT_UART3 },
80
    >     { (volatile struct sa11x0_serial*)SA11X0_UART1_BASE, 1000, CYGNUM_HAL_INTERRUPT_UART1 }
81
    > };
82
    > #else
83
    186a192
84
    > #endif
85
 
86
[This patch makes the iPAQ use UART3 for debugging rather than UART1]
87
 
88
 
89
Flash Support
90
-------------
91
 
92
The iPAQ uses the same flash devices as the Intel Assabet board, and
93
uses the same eCOS package, CYGPKG_DEVS_FLASH_ASSABET.
94
 
95
To enable the iPAQ HAL to use the Assabet flash driver, you must edit
96
the file:
97
    $ECOS_REPOSITORY/devs/flash/arm/assabet/current/cdl/flash_assabet.cdl
98
 
99
changing the line:
100
    requires  CYGPKG_HAL_ARM_SA11X0_ASSABET
101
 
102
to:
103
    requires  CYGPKG_HAL_ARM_SA11X0_ASSABET || CYGPKG_HAL_ARM_SA11X0_IPAQ
104
 
105
This change allows the assabet flash package to be used with this iPAQ
106
HAL.
107
 
108
When running RedBoot, it is important to execute the command:
109
 
110
    RedBoot> egpio -s 1
111
 
112
(which will turn on the programming power supply) before attempting to
113
program any flash area.
114
 
115
VERY IMPORTANT: Do NOT attempt to re-program any flash memory between
116
addresses 0x00000000 and 0x000fffff with RedBoot, since that is where
117
the iPAQ Linux bootloader resides.
118
 
119
 
120
 
121
Packages
122
--------
123
hal_ipaq-v1_0_0.epk     CYGPKG_HAL_ARM_SA11X0_IPAQ
124
        Basic support for the iPAQ platform.
125
 
126
pcmcia_ipaq-v1_0_0.epk  CYGPKG_DEVS_PCMCIA_IPAQ
127
        PCMCIA and CF card support for the iPAQ. Allows the use of the
128
        Socket LP-E Ethernet CF card for network and debugging.
129
 
130
 
131
 
132
Compiling and installing RedBoot
133
--------------------------------
134
 
135
As a concrete example (stuff you type is highlighted like this)
136
                                                          ^^^^
137
 
138
    $ ecosconfig new ipaq redboot
139
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
140
    U CYGSEM_HAL_USE_ROM_MONITOR, new inferred value 0
141
    U CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT, new inferred value 1
142
    U CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT, new inferred value 0
143
    U CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM, new inferred value 0
144
    U CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS, new inferred value 1
145
    $ ecosconfig import \
146
      ^^^^^^^^^^^^^^^^^^^
147
    > $ECOS_REPOSITORY/hal/arm/sa11x0/ipaq/current/misc/redboot_ROM.cfg
148
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149
 
150
If you see an error here relating to unresolved FLASH components, then you
151
should edit the flash_assabet.cdl file as described above.
152
 
153
    $ ecosconfig resolve
154
      ^^^^^^^^^^^^^^^^^^
155
    $ ecosconfig tree
156
      ^^^^^^^^^^^^^^^
157
    $ make
158
      ^^^^
159
      ...
160
      ...
161
      [ creates install/bin/redboot.* ]
162
    $
163
 
164
You can now power up the iPAQ and connect to it via the serial port by using,
165
for example, minicom, at 115200 baud (8 data bits, 1 stop bit, no parity).
166
You should see the 'boot>' prompt if you press space/return a couple of times.
167
 
168
    @000002BC
169
    F
170
    *MTST
171
      ...
172
      ... [ loads of status and copyright info here ]
173
      ...
174
    booting flash...
175
    no boot image in flash
176
    boot>
177
    boot> load flash 0x00100000
178
          ^^^^^^^^^^^^^^^^^^^^^
179
Now start an XMODEM send of install/bin/redboot.bin
180
When the download is complete, you should see the following:
181
 
182
    programming flash...erasing ...
183
    Erasing sector 00100000
184
      len=00019500
185
    writing flash..
186
    addr: 00100000 data: EA000006
187
    addr: 00110000 data: E3530006
188
    verifying ... done.
189
    boot>
190
 
191
[ You may find that the iPAQ bootloader times out before you get the chance
192
to start the XMODEM send. In this case, use a script to perform the download
193
- this also will ensure that you never type the incorrect address. A sample
194
script for minicom can be found below in appendix A.]
195
 
196
In order to see the RedBoot start-up messages, it is a good idea to change
197
the baudrate used by the Linx bootloader now.
198
 
199
    boot> set baudrate 38400
200
          ^^^^^^^^^^^^^^^^^^
201
      setting param=baudrate to value=38400
202
    update_baudrate:  new baudrate=00009600
203
      CSRBASE=42000000
204
      l_ubrlcr=00000005
205
      m_ubrlcr=00000000
206
      h_ubrlcr=00000000
207
     baudrate changed to 0x00009600
208
    boot>
209
 
210
The final part of this message will be corrupted (since you are listening
211
at 115200 baud). Change your communications program to work at 38400 baud
212
and hit return a couple of times.
213
 
214
To make this change permanent (recommended), execute the following command:
215
 
216
    boot> params save
217
          ^^^^^^^^^^^
218
    bootldr: set baudrate 0x00009600
219
 
220
    programming flash...erasing ...
221
    Erasing sector 000C0000
222
      len=00000084
223
    writing flash..
224
    addr: 000C0000 data: 746F6F62
225
    verifying ... done.
226
    boot>
227
 
228
 
229
 
230
Assuming that the download and flash programming have been successful, you
231
will now be able to launch RedBoot by issuing the following command to the
232
iPAQ bootloader:
233
 
234
    boot> jump 0x00100000
235
          ^^^^^^^^^^^^^^^
236
    Calling fcn=00100000
237
      a0=00000000
238
      a1=00000000
239
      a2=00000000
240
      a3=0......j
241
                 +
242
    RedBoot(tm) debug environment - built 14:56:04, Dec  7 2000
243
    Platform: Compaq iPaq handheld PC (StrongARM 1110)
244
    This port Copyright (C) 2000, 3G Lab Ltd.
245
    Copyright (C) 2000, Red Hat, Inc.
246
 
247
    RAM: 0x00000000-0x02000000
248
    FLASH: 0x50000000 - 0x51000000, 64 blocks of 0x00040000 bytes each.
249
    FLASH configuration checksum error or invalid key
250
    ... Waiting for network card: .Ready!
251
 
252
    Socket Communications, Inc: Low Power Ethernet CF Revision C 5V/3.3V 08/27/98
253
    IP: 192.168.0.106, Default server: 192.168.0.1
254
    RedBoot>
255
 
256
 
257
 
258
Hints and Tips
259
--------------
260
 
261
Set the iPAQ Linux bootloader to operate at 38400 (ie. the same as GDB). This
262
means you don't have to switch baud rate when starting RedBoot.
263
 
264
Don't load a Linux kernel into flash, otherwise it may be booted
265
automatically before you get the chance to get to the boot> prompt.
266
 
267
Use Ethernet if possible!
268
 
269
Flash support WILL NOT WORK unless you have modified the flash_assabet.cdl
270
file as described above.
271
 
272
 
273
 
274
Extended RedBoot Commands
275
-------------------------
276
 
277
Four new commands have been added to RedBoot to aid system development.
278
 
279
1)      gpio [-s ] [-c ]
280
 
281
        gpio            will display the current state of the GPIO pins.
282
         -s     will set the bits that are set in , leaving
283
                        other bits unchanged.
284
         -c     will clear the bits that are set in , leaving
285
                        other bits unchanged. -s and -c may be used in the
286
                        same command.
287
 
288
2)      egpio [-s ] [-c ]
289
        egpio           will display the current state of the EGPIO pins.
290
         -s     will set the bits that are set in , leaving
291
                        other bits unchanged.
292
         -c     will clear the bits that are set in , leaving
293
                        other bits unchanged. -s and -c may be used in the
294
                        same command.
295
            [ In particular, "egpio -s 1" will enable flash programming ].
296
 
297
3)      physaddr 
298
                        will manually walk the translation and page tables
299
                        to determine which physical address is referenced
300
                        by the given . Also printed are
301
                        the page size (section, large (64k) page, or
302
                        small (4k) page), the ARM domain, and the access
303
                        permissions. Invalid mappings will be indicated
304
                        with an error message explaining WHY the mapping
305
                        is invalid.
306
 
307
4)      mem [-a 
] [-b|-h]
308
                        Stores the value given by  at the address
309
                        given by 
.
defaults to the
310
                        last address used if not supplied.
311
         -b             indicates a byte store (8 bits only).
312
         -h             indicates a half-word store (16 bits only).
313
                        Default is a word store (all 32 bits).
314
 
315
 
316
Appendix A - A sample minicom script to download images to flash
317
----------------------------------------------------------------
318
 
319
<<<<----------- CUT HERE ----------->>>>
320
getipaq:
321
        send " \c"
322
        expect {
323
            "boot>" goto gotit
324
            " " goto tryenter
325
            timeout 1 goto getipaq
326
        }
327
tryenter:
328
        send ""
329
        expect {
330
            "boot>" goto gotit
331
            timeout 1 goto getipaq
332
        }
333
gotit:
334
        send "load flash 0x00100000"
335
        ! sx install/bin/redboot.bin
336
 
337
<<<<----------- CUT HERE ----------->>>>
338
 
339
 
340
 
341
Appendix B - Differences between the Assabet and iPAQ source code
342
-----------------------------------------------------------------
343
 
344
memory map - Allocated space for LCD buffer at 0x8000. Use space at
345
0x0400 - 0x3fff for page tables.
346
 
347
hal_platform_setup.h - EGPIO word and initialisation. Skip memory
348
controller initialisation (for now).
349
 
350
redboot_cmds.c - Extra RedBoot commands as described above.
351
 
352
lcd_support.c - various changes for the iPAQ display.
353
 
354
ipaq_misc.c - Corrected descriptor structures. Added macros for setting
355
up page tables as well as sections. Use of domains. LCD is switched on
356
during plf_hardware_init(). phys_addr() function to perform translation
357
table walk under software control.
358
 
359
References
360
----------
361
 
362
ARM Architecture Reference Manual
363
        (Prentice-Hall ISBN 0-13-736299-4)
364
 
365
Compaq iPAQ H3600 Hardware Design Specification (Version 0.2f)
366
 
367
[ later versions of these documents may be available ].

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.