Skip to content

Commit 7ec0bc0

Browse files
committedMay 29, 2015
manual: explain how to compile and flash the idle kernel
1 parent 048782e commit 7ec0bc0

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed
 

Diff for: ‎doc/manual/getting_started.rst

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Getting started
22
===============
33

4+
.. _connecting-to-the-core-device:
5+
46
Connecting to the core device
57
-----------------------------
68

Diff for: ‎doc/manual/installing.rst

+20
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,26 @@ The communication parameters are 115200 8-N-1.
168168
.. note:: The reset button of the KC705 board is the "CPU_RST" labeled button.
169169
.. warning:: Both those instructions will result in the flash storage being wiped out. However you can use the test mode to change the IP/MAC without erasing everything if you skip the "fserase" command.
170170

171+
* (optional) Flash the ``idle`` kernel
172+
173+
The ``idle`` kernel is the kernel (some piece of code running on the core device) which the core device runs whenever it is not connected to a PC via ethernet.
174+
This kernel is therefore stored in the :ref:`core device configuration flash storage <core-device-flash-storage>`.
175+
To flash the ``idle`` kernel:
176+
177+
* Compile the ``idle`` experiment:
178+
The ``idle`` experiment's ``run()`` method must be a kernel: it must be decorated with the ``@kernel`` decorator (see :ref:`next topic <connecting-to-the-core-device>` for more information about kernels).
179+
180+
Moreover, since the core device is not connected to the PC: RPC are forbidden in this ``idle`` experiment.
181+
::
182+
183+
$ artiq_compile idle.py
184+
185+
* Write it into the core device configuration flash storage: ::
186+
187+
$ artiq_coreconfig -f idle_kernel idle.elf
188+
189+
.. note:: You can find more information about how to use the ``artiq_coreconfig`` tool on the :ref:`Utilities <core-device-configuration-tool>` page.
190+
171191
Installing the host-side software
172192
---------------------------------
173193

Diff for: ‎doc/manual/utilities.rst

+4-5
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,11 @@ To write the value ``test_value`` in the key ``my_key``::
117117
$ artiq_coreconfig -r my_key
118118
b'test_value'
119119

120-
You can also write entire files in a record using the ``-f`` parameter::
120+
You can also write entire files in a record using the ``-f`` parameter. This is useful for instance to write the ``idle`` kernel in the flash storage::
121121

122-
$ echo "this_is_a_test" > my_filename
123-
$ artiq_coreconfig -f my_key my_filename
124-
$ artiq_coreconfig -r my_key
125-
b'this_is_a_test\n'
122+
$ artiq_coreconfig -f idle_kernel idle.elf
123+
$ artiq_coreconfig -r idle_kernel | head -c9
124+
b'\x7fELF
126125

127126
You can write several records at once::
128127

0 commit comments

Comments
 (0)
Please sign in to comment.