Skip to content

Commit b02a075

Browse files
lvanasseanchao
authored andcommitted
Doc: add migration warning to updating release system and elf programs
Add a migration warning to the update release system and the elf programs documentation pages. This is just to add a papertrail from where the documentation originate in case of error during the migration process. Also fix a bit of formatting in the pages
1 parent 04c7391 commit b02a075

File tree

3 files changed

+38
-23
lines changed

3 files changed

+38
-23
lines changed

Documentation/guides/fully_linked_elf.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
===============================
12
ELF Programs – No Symbol Tables
23
===============================
34

5+
.. warning::
6+
Migrated from:
7+
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629542
8+
49
You can easily extend the firmware in your released, embedded system using ELF
510
programs provided via a file system (for example, an SD card or downloaded into
611
on-board SPI FLASH). In order to support such post-release updates, your
@@ -13,7 +18,7 @@ Alan Carvalho de Assis has also made a video based on this example in the
1318
YouTube `NuttX Channel <https://www.youtube.com/watch?v=oL6KAgkTb8M>`_.
1419

1520
Creating the Export Package
16-
---------------------------
21+
===========================
1722

1823
At the time that you release the firmware, you should create and save an
1924
export package. The export package is all that you need to create
@@ -104,7 +109,7 @@ content of this ZIP file is the following directory structure:
104109
`- .config
105110
106111
The Add-On Build Directory
107-
--------------------------
112+
==========================
108113
109114
In order to create the add-on ELF program, you will need (1) the export
110115
package, (2) the program build ``Makefile``, (3) a linker script used by the
@@ -121,7 +126,7 @@ package, (2) the program build ``Makefile``, (3) a linker script used by the
121126
script (``mkdefines.sh``).
122127
123128
Hello Example
124-
-------------
129+
=============
125130
126131
To keep things manageable, let's use a concrete example. Suppose the ELF
127132
program that we wish to add to the release code is the single source file
@@ -142,7 +147,7 @@ Let's say that we have a directory called ``addon`` and it contains the
142147
Bash script called ``mkdefines.sh`` that will create a linker script.
143148
144149
Building the ELF Program
145-
------------------------
150+
========================
146151
147152
The first step in creating the ELF program is to unzip the Export Package. We
148153
start with our ``addon`` directory containing the following:
@@ -173,7 +178,7 @@ the content from the released NuttX code that we need to build the ELF
173178
program.
174179
175180
The Makefile
176-
------------
181+
============
177182
178183
The ELF program is created simply as:
179184
@@ -261,7 +266,7 @@ Below is the ``Makefile`` used to create the ELF program:
261266
rm -f *.o
262267
263268
The Linker Script
264-
-----------------
269+
=================
265270
266271
Two linker scripts are used. One is a normal file (we'll call it the main
267272
linker script), and the other, ``defines.ld``, is created on-the-fly as
@@ -335,7 +340,7 @@ The main linker script, ``gnu-elf.ld``, contains the following:
335340
}
336341
337342
Creating the ``defines.ld`` Linker Script
338-
-----------------------------------------
343+
=========================================
339344
340345
The additional linker script ``defines.ld`` is created through a three-step
341346
process:
@@ -444,7 +449,7 @@ Here is an example ``defines.ld`` created by ``mkdefines.sh``:
444449
printf = 0x0800aefc | 0x00000001 ;
445450
446451
Replacing an NSH Built-In Function
447-
----------------------------------
452+
==================================
448453
449454
Files can be executed by ``NSH`` from the command line by simply typing the
450455
name of the ELF program. This requires:
@@ -486,7 +491,7 @@ replaced with the version in the file system:
486491
nsh>
487492
488493
Version Dependency
489-
------------------
494+
==================
490495
491496
.. note::
492497
@@ -501,7 +506,7 @@ The alternative approach using :doc:`Symbol Tables <fully_linked_elf>` is more
501506
or less version independent.
502507
503508
Tightly Coupled Memories
504-
------------------------
509+
========================
505510
506511
Most MCUs based on ARMv7-M family processors support some kind of Tightly
507512
Coupled Memory (TCM). These TCMs have somewhat different properties for

Documentation/guides/partially_linked_elf.rst

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
=================================
12
ELF Programs – With Symbol Tables
23
=================================
34

5+
.. warning::
6+
Migrated from:
7+
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139629543
8+
49
Updating a Release System with ELF Programs – With Symbol Tables
5-
-----------------------------------------------------------------
10+
================================================================
611

712
You can easily extend the firmware in your released, embedded system using
813
ELF programs provided via a file system. For example, an SD card or, perhaps,
@@ -16,7 +21,7 @@ The files shown in this Wiki page can be downloaded
1621
`here <https://cwiki.apache.org/confluence/download/attachments/139629402/elfprog-wsymtab.tar.gz?version=1&modificationDate=1576735523000&api=v2>`_
1722

1823
Creating a Symbol Table
19-
-----------------------
24+
=======================
2025

2126
There are several ways to create an application symbol table. Only two are
2227
compatible with the example provided here:
@@ -75,7 +80,7 @@ compatible with the example provided here:
7580
- Include application logic to provide the symbol table. If ``CONFIG_EXAMPLES_NSH_SYMTAB=y`` is set, NSH can handle this automatically.
7681

7782
Export Package
78-
--------------
83+
==============
7984

8085
At the time of firmware release, you should create and save an export package.
8186
This export package contains all the necessary files required to create
@@ -142,7 +147,7 @@ of this ZIP file are organized as follows:
142147
`- .config
143148
144149
Add-On Build Directory
145-
-----------------------
150+
======================
146151

147152
In order to create the add-on ELF program, you will need:
148153

@@ -155,7 +160,7 @@ that non-GNU toolchains would likely require a significantly different
155160
Makefile and linker script.
156161

157162
Hello Example
158-
-------------
163+
=============
159164

160165
To keep things manageable, let's use a concrete example. Suppose the ELF
161166
program that we wish to add to the release code is the simple
@@ -180,7 +185,7 @@ Let's say that we have a directory called ``addon`` that contains the following:
180185

181186

182187
Building the ELF Program
183-
------------------------
188+
========================
184189

185190
The first step in creating the ELF program is to unzip the export
186191
package. Starting in the ``addon`` directory:
@@ -209,7 +214,7 @@ the ELF program.
209214

210215

211216
The Makefile
212-
------------
217+
============
213218

214219
To build the ELF program, simply run:
215220

@@ -278,7 +283,7 @@ The Makefile used to create the ELF program is as follows:
278283
rm -f *.o
279284
280285
The Linker Script
281-
-----------------
286+
=================
282287

283288
The linker script that I am using in this example, gnu-elf.ld,
284289
contains the following:
@@ -349,7 +354,7 @@ contains the following:
349354
}
350355
351356
Replacing NSH Built-In Functions
352-
--------------------------------
357+
================================
353358
354359
Files can be executed by NSH from the command line by simply typing the name
355360
of the ELF program. This requires (1) that the feature be enabled with
@@ -397,7 +402,7 @@ successfully. The built-in version will be ignored. It has been replaced with
397402
the version in the file system.
398403
399404
Tightly Coupled Memories
400-
------------------------
405+
========================
401406
402407
Most MCUs based on ARMv7-M family processors support some kind of Tightly
403408
Coupled Memory (TCM). These TCMs have somewhat different properties for

Documentation/guides/updating_release_system_elf.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
===========================================
12
Updating a Release System with ELF Programs
2-
============================================
3+
===========================================
4+
5+
.. warning::
6+
Migrated from:
7+
https://cwiki.apache.org/confluence/display/NUTTX/Updating+a+Release+System+with+ELF+Programs
38

49
You can enhance the functionality of your released embedded system by adding
510
ELF programs, which can be loaded from a file system. These programs can be
@@ -9,15 +14,15 @@ easy updates or extensions to the system's firmware.
914
There are two ways you can accomplish this:
1015

1116
Partially linked
12-
----------------
17+
================
1318
This describes building the partially linked, relocatable ELF program that
1419
depends on a symbol table provided by the base firmware in FLASH.
1520

1621
Reference:
1722
- See :doc:`Partially Linked ELF Programs <partially_linked_elf>`
1823

1924
Fully linked
20-
------------
25+
============
2126
This describes building a fully linked, relocatable ELF program that does
2227
not depend on any symbol table information.
2328

0 commit comments

Comments
 (0)