From b2db45bee3c6915346fb7be8dba064708955549e Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 1 Sep 2012 15:33:33 +0000 Subject: [PATCH] Separate CVS parsing logic from tools/mksyscall.c; Create tools/mksymtab.c to create symbol tables from CSV files git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5075 7fd9a85b-ad96-42d3-883c-3090e2eb8679 --- nuttx/ChangeLog | 4 + nuttx/Documentation/NuttXDemandPaging.html | 1 - nuttx/Documentation/NuttXNxFlat.html | 61 +++- nuttx/configs/README.txt | 24 ++ nuttx/lib/README.txt | 2 + nuttx/lib/lib.csv | 336 ++++++++++----------- nuttx/syscall/README.txt | 4 + nuttx/tools/Makefile.export | 2 +- nuttx/tools/Makefile.host | 9 +- nuttx/tools/README.txt | 22 +- nuttx/tools/cfgparser.h | 2 +- nuttx/tools/configure.sh | 2 +- nuttx/tools/csvparser.c | 205 +++++++++++++ nuttx/tools/csvparser.h | 76 +++++ nuttx/tools/define.sh | 2 +- nuttx/tools/indent.sh | 2 +- nuttx/tools/link.sh | 2 +- nuttx/tools/mkdeps.sh | 2 +- nuttx/tools/mknulldeps.sh | 2 +- nuttx/tools/mkromfsimg.sh | 2 +- nuttx/tools/mksymtab.c | 277 +++++++++++++++++ nuttx/tools/mksyscall.c | 157 +--------- nuttx/tools/mkversion.c | 2 +- 23 files changed, 852 insertions(+), 346 deletions(-) create mode 100644 nuttx/tools/csvparser.c create mode 100644 nuttx/tools/csvparser.h create mode 100644 nuttx/tools/mksymtab.c diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 2e17f8eb1e..3ba81d4a7e 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3243,3 +3243,7 @@ for testing the changes to the uIP web server (see apps/ChangeLog.txt). * lib/stdio/lib_perror.c: Remove CONFIG_LIBC_PERROR_DEVNAME. What was I thinking? Arbitrary streams cannot be shared by different tasks. + * tools/mksyscall.c, csvparser.c, and csvparser.h: Separate CSV parsing + logic from mksyscall.c into files where it can be shared. + * tools/mksymtab.c: Add a tool that can be used to convert a CSV file + into a NuttX-style symbol table. diff --git a/nuttx/Documentation/NuttXDemandPaging.html b/nuttx/Documentation/NuttXDemandPaging.html index c238161a82..082edd21b7 100644 --- a/nuttx/Documentation/NuttXDemandPaging.html +++ b/nuttx/Documentation/NuttXDemandPaging.html @@ -8,7 +8,6 @@

On-Demand Paging

-

>>> Under Construction <<<

Last Updated: August 12, 2010

diff --git a/nuttx/Documentation/NuttXNxFlat.html b/nuttx/Documentation/NuttXNxFlat.html index e6923a8bcb..8fab8fed16 100644 --- a/nuttx/Documentation/NuttXNxFlat.html +++ b/nuttx/Documentation/NuttXNxFlat.html @@ -9,8 +9,7 @@

NXFLAT

-

>>> Under Construction <<<

-

Last Updated: June 29, 2012

+

Last Updated: September 1, 2012

@@ -90,7 +89,13 @@
- 1.4 Making an NXFLAT module + 1.4 mksymtab + + + +
+ + 1.5 Making an NXFLAT module @@ -122,7 +127,7 @@

1.0 Overview

-f +

1.1 Functionality

@@ -386,7 +391,41 @@ any following arguments. debug output is enabled [Default: no verbose output]. -

1.4 Making an NXFLAT module

+

1.4 mksymtab

+ +

+ There is a small helper program available in nuttx/tools call mksymtab. + mksymtab can be sued to generate symbol tables for the NuttX base code that would be usable by the typical NXFLAT application. + mksymtab builds symbol tables from common-separated value (CSV) files. + In particular, the CSV files: +

+
    +
  1. + nuttx/syscall/syscall.csv that describes the NuttX RTOS interface, and +
  2. +
  3. + nuttx/lib/lib/csv that describes the NuttX C library interface. +
  4. +
+ +

+ For example, +

+ + +

1.5 Making an NXFLAT module

Below is a snippet from an NXFLAT make file (simplified from NuttX @@ -639,8 +678,7 @@ any following arguments.

@@ -652,8 +690,7 @@ any following arguments.