blob: 76581df8ba60da0902619f46a188f1d8f4884c36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
Running an eCos application on Colibri VF61
===========================================
This chapter will explain how to run the eCos application on the Colibri VF61 Cortex-M core from the Cortex-A core in two ways: either from Linux using ``MQXBboot`` or from U-Boot using TFTP.
Vybrid has three available memory regions:
* OCRAM - 256KB - Default.
* DRAM - 10MB - Available, but needs limiting Linux RAM memory.
* TCML - 32KB - Small. Not recommended.
.. note::
Out of the 16MB of the DRAM memory in the CPU, 6MB was reserved for enabling the passing of large data blocks between Cortex-A and Cortex-M.
This setting can be changed in the ``mlt_vybrid_ext_dram.ldi`` file located in ``ecos/packages/hal/cortexm/vybrid/col_vf61/current/include/pkgconf/``, by modifying the ``DRAM LENGTH`` and ``hal_startup_stack`` values (currently ``0x9FFFF0``).
U-Boot over TFTP
----------------
Set up TFTP on your host machine and put the binary to be loaded (for example, ``hello.bin``) there. Make sure your host machine is connected to the network and you know its IP address.
.. _u-boot:
Configuring U-Boot
~~~~~~~~~~~~~~~~~~
.. note::
The memory restriction is mandatory only if DRAM is used to run eCos. See :ref:`memory` for details.
Connect the module to the network with an Ethernet cable, power it on.
Enter U-Boot and then use the following command sequence:
.. code-block:: bash
dhcp # set module IP address
set memargs mem=240M # restrict Linux memory space
set serverip xxx.xxx.xxx.xxx # set TFTP server address
save # save the configuration
Running from U-Boot
~~~~~~~~~~~~~~~~~~~
The application can then be run over TFTP with the ``tftp`` command.
The two other ``mw`` commands will set the entry point and turn on the clocks, respectively.
OCRAM is recommended as default, but you may refer to :ref:`memory` for information on what memory to use and how to get eCos to run from it.
.. topic:: OCRAM (default)
.. code-block:: bash
tftp 0x3f000400 hello.bin
mw.l 0x4006e028 0x1f000411
mw.l 0x4006b08c 0x00015a5a
.. topic:: DRAM
.. code-block:: bash
tftp 0x8f000400 hello.bin
mw.l 0x4006e028 0x0f000411
mw.l 0x4006b08c 0x00015a5a
.. topic:: TCML
.. code-block:: bash
tftp 0x1f800400 hello.bin
mw.l 0x4006e028 0x1f800411
mw.l 0x4006b08c 0x00015a5a
Linux over MQXBoot
------------------
Requirements
~~~~~~~~~~~~
The following have to be present on the Cortex-A Linux (apart from the eCos binary) to make this method possible:
* ``mcc.ko`` kernel module
* ``mqxboot`` binary
Running from MQXBoot
~~~~~~~~~~~~~~~~~~~~
The command to run the binary depends on the memory we want to use.
OCRAM is recommended as default, but you may refer to :ref:`memory` for information on what memory to use and how to get eCos to run from it.
.. topic:: Loading to OCRAM (default)
.. code-block:: bash
mqxboot hello.bin 0x3f000400 0x1f000411
.. topic:: Loading to DRAM
.. code-block:: bash
mqxboot hello.bin 0x8f000400 0x0f000411
.. topic:: Loading to TCML
.. code-block:: bash
mqxboot hello.bin 0x1f800400 0x1f800411
|