diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-01 15:33:33 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-01 15:33:33 +0000 |
commit | a84f75e7ff26cc9593580900ee5d112bf8677c50 (patch) | |
tree | 74e075e57750eb9ae78c295f6a9e21fac86119b1 /nuttx/Documentation/NuttXNxFlat.html | |
parent | 5d7c1ab348722edfff7f71c30b9fe6bef8b56fa0 (diff) | |
download | px4-nuttx-a84f75e7ff26cc9593580900ee5d112bf8677c50.tar.gz px4-nuttx-a84f75e7ff26cc9593580900ee5d112bf8677c50.tar.bz2 px4-nuttx-a84f75e7ff26cc9593580900ee5d112bf8677c50.zip |
Separate CVS parsing logic from tools/mksyscall.c; Create tools/mksymtab.c to create symbol tables from CSV files
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5075 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/Documentation/NuttXNxFlat.html')
-rw-r--r-- | nuttx/Documentation/NuttXNxFlat.html | 61 |
1 files changed, 49 insertions, 12 deletions
diff --git a/nuttx/Documentation/NuttXNxFlat.html b/nuttx/Documentation/NuttXNxFlat.html index e6923a8bc..8fab8fed1 100644 --- a/nuttx/Documentation/NuttXNxFlat.html +++ b/nuttx/Documentation/NuttXNxFlat.html @@ -9,8 +9,7 @@ <tr align="center" bgcolor="#e4e4e4"> <td> <h1><big><font color="#3c34ec"><i>NXFLAT</i></font></big></h1> - <h2><font color="#dc143c">>>> Under Construction <<<</font></h2> - <p>Last Updated: June 29, 2012</p> + <p>Last Updated: September 1, 2012</p> </td> </tr> </table> @@ -90,7 +89,13 @@ <tr> <td><br></td> <td> - <a href="#making">1.4 Making an NXFLAT module</a> + <a href="#mksymtab">1.4 mksymtab</a> + </td> +</tr> +<tr> + <td><br></td> + <td> + <a href="#making">1.5 Making an NXFLAT module</a> </td> </tr> <tr> @@ -122,7 +127,7 @@ <a name="overview"><h1>1.0 Overview</h1></a> </td> </tr> -</table>f +</table> <a name="functionality"><h2>1.1 Functionality</h2></a> @@ -386,7 +391,41 @@ any following arguments. debug output is enabled [Default: no verbose output]. </pre></ul> -<a name="making"><h2>1.4 Making an NXFLAT module</h2></a> +<a name="mksymtab"><h2>1.4 mksymtab</h2></a> + +<p> + There is a small helper program available in <code>nuttx/tools</code> call <code>mksymtab</code>. + <code>mksymtab</code> can be sued to generate symbol tables for the NuttX base code that would be usable by the typical NXFLAT application. + <code>mksymtab</code> builds symbol tables from common-separated value (CSV) files. + In particular, the CSV files: +</p> +<ol> + <li> + <code>nuttx/syscall/syscall.csv</code> that describes the NuttX RTOS interface, and + </li> + <li> + <code>nuttx/lib/lib/csv</code> that describes the NuttX C library interface. + </li> +</ol> +<ul><pre> +USAGE: ./mksymtab <cvs-file> <symtab-file> + +Where: + + <cvs-file> : The path to the input CSV file + <symtab-file>: The path to the output symbol table file + -d : Enable debug output +</pre></ul> +<p> + For example, +</p> +<ul><pre> +cd nuttx/tools +cat ../syscall/syscall.csv ../lib/lib.csv | sort >tmp.csv +./mksymtab.exe tmp.csv tmp.c +</pre></ul> + +<a name="making"><h2>1.5 Making an NXFLAT module</h2></a> <p> Below is a snippet from an NXFLAT make file (simplified from NuttX @@ -639,8 +678,7 @@ any following arguments. <p> <ul><pre> ldr r1, .L0 <-- Fetch the offset to 'x' - ldr r0, [r10, r1] <-- Load the value of 'x' with PIC - offset + ldr r0, [r10, r1] <-- Load the value of 'x' with PIC offset` ... .L0: .word x <-- Offset to 'x' </pre></ul> @@ -652,8 +690,7 @@ any following arguments. <ul><pre> ldr r1, .L0 <-- Fetch the offset to the GOT entry - ldr r1, [r10,r1] <-- Fetch the (relocated) address - of 'x' from the GOT + ldr r1, [r10,r1] <-- Fetch the (relocated) address of 'x' from the GOT ldr r0, [r1, #0] <-- Fetch the value of 'x' ... .L1 .word x(GOT) <-- Offset to entry in the GOT @@ -667,9 +704,9 @@ any following arguments. execution time. </p> <p> - NXFLAT (like <a href="http://xflat.sourceforge.net/">XFLAT</a>) can work even better with + NXFLAT (like <a href="http://xflat.sourceforge.net/">XFLAT</a>) can work even better without the GOT. - Patches again older version of GCC exist to eliminate the GOT indirections. + Patches against older version of GCC exist to eliminate the GOT indirections. Several are available <a href="http://xflat.cvs.sourceforge.net/viewvc/xflat/xflat/gcc/">here</a> if you are inspired to port them to a new GCC version. </p> @@ -735,7 +772,7 @@ any following arguments. <a href="http://xflat.cvs.sourceforge.net/viewvc/*checkout*/xflat/xflat/gcc/README?revision=1.1.1.1">XFLAT discussion</a>. </p> <p> - Patches again older version of GCC exist to correct this GCC behavior. + Patches against older version of GCC exist to correct this GCC behavior. Several are available <a href="http://xflat.cvs.sourceforge.net/viewvc/xflat/xflat/gcc/">here</a> if you are inspired to port them to a new GCC version. </p> |