From 8b768dc6facaa25792c5fc4ed405fe1212bd0b50 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: svn://svn.code.sf.net/p/nuttx/code/trunk@5075 42af7a65-404d-4744-a932-0658087f49c3 --- ChangeLog | 4 + Documentation/NuttXDemandPaging.html | 1 - Documentation/NuttXNxFlat.html | 61 ++++- configs/README.txt | 24 ++ lib/README.txt | 2 + lib/lib.csv | 336 +++++++++++++-------------- syscall/README.txt | 4 + tools/Makefile.export | 2 +- tools/Makefile.host | 9 +- tools/README.txt | 22 +- tools/cfgparser.h | 2 +- tools/configure.sh | 2 +- tools/csvparser.c | 205 ++++++++++++++++ tools/csvparser.h | 76 ++++++ tools/define.sh | 2 +- tools/indent.sh | 2 +- tools/link.sh | 2 +- tools/mkdeps.sh | 2 +- tools/mknulldeps.sh | 2 +- tools/mkromfsimg.sh | 2 +- tools/mksymtab.c | 277 ++++++++++++++++++++++ tools/mksyscall.c | 157 +------------ tools/mkversion.c | 2 +- 23 files changed, 852 insertions(+), 346 deletions(-) create mode 100644 tools/csvparser.c create mode 100644 tools/csvparser.h create mode 100644 tools/mksymtab.c diff --git a/ChangeLog b/ChangeLog index 2e17f8eb1e..3ba81d4a7e 100644 --- a/ChangeLog +++ b/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/Documentation/NuttXDemandPaging.html b/Documentation/NuttXDemandPaging.html index c238161a82..082edd21b7 100644 --- a/Documentation/NuttXDemandPaging.html +++ b/Documentation/NuttXDemandPaging.html @@ -8,7 +8,6 @@

On-Demand Paging

-

>>> Under Construction <<<

Last Updated: August 12, 2010

diff --git a/Documentation/NuttXNxFlat.html b/Documentation/NuttXNxFlat.html index e6923a8bcb..8fab8fed16 100644 --- a/Documentation/NuttXNxFlat.html +++ b/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.