summaryrefslogtreecommitdiff
path: root/cesar
diff options
context:
space:
mode:
Diffstat (limited to 'cesar')
-rw-r--r--cesar/ecos/packages/ecos.db10
-rw-r--r--cesar/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c2
-rw-r--r--cesar/ecos/packages/hal/maximus/lib/current/cdl/hal_maximus_lib.cdl39
-rw-r--r--cesar/ecos/packages/hal/maximus/lib/current/include/hal_lib_atox.h79
-rw-r--r--cesar/ecos/packages/hal/maximus/lib/current/src/hal_lib_atox.c (renamed from cesar/lib/src/atox.c)50
-rw-r--r--cesar/lib/Module2
-rw-r--r--cesar/lib/atox.h61
-rw-r--r--cesar/lib/test/atox/Makefile7
-rw-r--r--cesar/lib/test/atox/src/test_atox.c117
9 files changed, 164 insertions, 203 deletions
diff --git a/cesar/ecos/packages/ecos.db b/cesar/ecos/packages/ecos.db
index 12ba51acbd..cf60192bff 100644
--- a/cesar/ecos/packages/ecos.db
+++ b/cesar/ecos/packages/ecos.db
@@ -544,6 +544,15 @@ package CYGPKG_HAL_MAXIMUS_I386 {
i386 processor-specific support for the Linux Maximus target"
}
+package CYGPKG_HAL_MAXIMUS_LIB {
+ alias { "Linux/lib Maximus target" lib_maximus }
+ directory hal/maximus/lib
+ script hal_maximus_lib.cdl
+ hardware
+ description "
+ The Linux Maximus HAL Library package provides differents functions specific to Maximus HAL target"
+}
+
package CYGPKG_HAL_SPARC {
alias { "SPARC V7/V8 common HAL" hal_sparc sparc_hal sparc_arch_hal }
directory hal/sparc/arch
@@ -596,6 +605,7 @@ target maximus {
alias { "Linux Maximus target" i386linuxmaximus }
packages { CYGPKG_HAL_MAXIMUS
CYGPKG_HAL_MAXIMUS_I386
+ CYGPKG_HAL_MAXIMUS_LIB
CYGPKG_DEVS_FLASH_SYNTH
CYGPKG_DEVS_ETH_ECOSYNTH
CYGPKG_DEVS_WATCHDOG_SYNTH
diff --git a/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c
index 449d2d96eb..04914efbad 100644
--- a/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c
+++ b/cesar/ecos/packages/hal/maximus/arch/current/src/maximus_intr.c
@@ -34,7 +34,7 @@
#include "common/std.h"
#include "host/station/station.h"
-#include "lib/atox.h"
+#include <cyg/hal/hal_lib_atox.h>
// global variable to communicate with SCI Layer
station_ctx_t my_station = {0};
diff --git a/cesar/ecos/packages/hal/maximus/lib/current/cdl/hal_maximus_lib.cdl b/cesar/ecos/packages/hal/maximus/lib/current/cdl/hal_maximus_lib.cdl
new file mode 100644
index 0000000000..6da9a103a0
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/lib/current/cdl/hal_maximus_lib.cdl
@@ -0,0 +1,39 @@
+# ====================================================================
+#
+# hal_maximus_lib.cdl
+#
+# specific Maximus libraries
+#
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s): jpSave
+# Original data: jpSave
+# Contributors: SPiDCOM
+# Date: 2008-05-15
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL_MAXIMUS_LIB {
+ parent CYGPKG_HAL_MAXIMUS
+ display "maximus libraries"
+ description "
+ The Maximus libraries package provides the
+ support needed to run eCos binaries with specifics libraries
+ for Maximus simulator."
+
+ include_dir cyg/hal
+
+ make {
+ <PREFIX>/lib/vectors.o : <PACKAGE>/src/vectors.S
+ $(CC) -Wp,-MD,vectors.tmp $(INCLUDE_PATH) $(CFLAGS) -c -o $@ $<
+ @echo $@ ": \\" > $(notdir $@).deps
+ @tail -n +2 vectors.tmp >> $(notdir $@).deps
+ @echo >> $(notdir $@).deps
+ @rm vectors.tmp
+ }
+ compile hal_lib_atox.c
+
+}
diff --git a/cesar/ecos/packages/hal/maximus/lib/current/include/hal_lib_atox.h b/cesar/ecos/packages/hal/maximus/lib/current/include/hal_lib_atox.h
new file mode 100644
index 0000000000..d1450e0c5d
--- /dev/null
+++ b/cesar/ecos/packages/hal/maximus/lib/current/include/hal_lib_atox.h
@@ -0,0 +1,79 @@
+#ifndef hal_lib_atox_h
+#define hal_lib_atox_h
+/**{{{
+ *
+ * ####ECOSGPLCOPYRIGHTBEGIN####
+ * -------------------------------------------
+ * This file is part of eCos, the Embedded Configurable Operating System.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+ *
+ * eCos is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 or (at your option) any later version.
+ *
+ * eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with eCos; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * As a special exception, if other files instantiate templates or use macros
+ * or inline functions from this file, or you compile this file and link it
+ * with other works to produce a work based on this file, this file does not
+ * by itself cause the resulting work to be covered by the GNU General Public
+ * License. However the source code for this file must still be made available
+ * in accordance with section (3) of the GNU General Public License.
+ *
+ * This exception does not invalidate any other reasons why a work based on
+ * this file might be covered by the GNU General Public License.
+ *
+ * Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+ * at http://sources.redhat.com/ecos/ecos-license/
+ * -------------------------------------------
+ * ####ECOSGPLCOPYRIGHTEND####
+ }}}*/
+/**
+ * \file hal_lib_atox.h
+ * \brief ASCII string convertions
+ * \ingroup lib
+ */
+
+/**
+ * Convert an ASCII string into a integer.
+ * \param nptr the string pointer
+ * \return the integer
+ */
+int atoi(const char *nptr);
+
+/**
+ * Convert an ASCII string into a long.
+ * \param nptr the string pointer
+ * \return the long
+ */
+long atol(const char *nptr);
+
+/**
+ * Convert an ASCII string into a long long.
+ * \param nptr the string pointer
+ * \return the long long
+ */
+long long atoll(const char *nptr);
+
+/**
+ * Convert an ASCII string into a unsigned long.
+ * \param nptr the string pointer
+ * \return the long
+ */
+unsigned long atoul(const char *nptr);
+
+/**
+ * Convert an ASCII string into a unsigned long long.
+ * \param nptr the string pointer
+ * \return the long long
+ */
+unsigned long long atoull(const char *nptr);
+
+#endif /* hal_lib_atox_h */
diff --git a/cesar/lib/src/atox.c b/cesar/ecos/packages/hal/maximus/lib/current/src/hal_lib_atox.c
index 9dd8160710..8390dfa02c 100644
--- a/cesar/lib/src/atox.c
+++ b/cesar/ecos/packages/hal/maximus/lib/current/src/hal_lib_atox.c
@@ -1,26 +1,44 @@
/**{{{
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * ####ECOSGPLCOPYRIGHTBEGIN####
+ * -------------------------------------------
+ * This file is part of eCos, the Embedded Configurable Operating System.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+ *
+ * eCos is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 or (at your option) any later version.
+ *
+ * eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with eCos; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ *
+ * As a special exception, if other files instantiate templates or use macros
+ * or inline functions from this file, or you compile this file and link it
+ * with other works to produce a work based on this file, this file does not
+ * by itself cause the resulting work to be covered by the GNU General Public
+ * License. However the source code for this file must still be made available
+ * in accordance with section (3) of the GNU General Public License.
+ *
+ * This exception does not invalidate any other reasons why a work based on
+ * this file might be covered by the GNU General Public License.
+ *
+ * Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+ * at http://sources.redhat.com/ecos/ecos-license/
+ * -------------------------------------------
+ * ####ECOSGPLCOPYRIGHTEND####
}}}*/
/**
- * \file lib/src/atox.c
+ * \file hal_lib_atox.c
* \brief ASCII string convertions
* \ingroup lib
*/
-#include "lib/atox.h"
+#include <cyg/hal/hal_lib_atox.h>
#define LONG_MAX 2147483647L
#define LONG_MIN (-LONG_MAX-1)
diff --git a/cesar/lib/Module b/cesar/lib/Module
index 99c6f1b8f6..051acb25f0 100644
--- a/cesar/lib/Module
+++ b/cesar/lib/Module
@@ -1,5 +1,5 @@
SOURCES := mt19937ar.c crc.c dbg.c heap.c test.c blk.c list.c aatree.c try.c \
- swap.c read_word.c bitstream.c circular_buffer.c atox.c
+ swap.c read_word.c bitstream.c circular_buffer.c
ifeq ($(CONFIG_HEAP_SKEW),y)
SOURCES += skewheap.c
endif
diff --git a/cesar/lib/atox.h b/cesar/lib/atox.h
deleted file mode 100644
index 28a5da879d..0000000000
--- a/cesar/lib/atox.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef atox_h
-#define atox_h
-/**{{{
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- }}}*/
-/**
- * \file lib/atox.h
- * \brief ASCII string convertions
- * \ingroup lib
- */
-
-/**
- * Convert an ASCII string into a integer.
- * \param nptr the string pointer
- * \return the integer
- */
-int atoi(const char *nptr);
-
-/**
- * Convert an ASCII string into a long.
- * \param nptr the string pointer
- * \return the long
- */
-long atol(const char *nptr);
-
-/**
- * Convert an ASCII string into a long long.
- * \param nptr the string pointer
- * \return the long long
- */
-long long atoll(const char *nptr);
-
-/**
- * Convert an ASCII string into a unsigned long.
- * \param nptr the string pointer
- * \return the long
- */
-unsigned long atoul(const char *nptr);
-
-/**
- * Convert an ASCII string into a unsigned long long.
- * \param nptr the string pointer
- * \return the long long
- */
-unsigned long long atoull(const char *nptr);
-
-#endif /* atox_h */
diff --git a/cesar/lib/test/atox/Makefile b/cesar/lib/test/atox/Makefile
deleted file mode 100644
index 3d87a51f03..0000000000
--- a/cesar/lib/test/atox/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-BASE = ../../..
-
-HOST_PROGRAMS = test_atox
-test_atox_SOURCES = test_atox.c
-test_atox_MODULES = lib
-
-include $(BASE)/common/make/top.mk
diff --git a/cesar/lib/test/atox/src/test_atox.c b/cesar/lib/test/atox/src/test_atox.c
deleted file mode 100644
index 25d8ac6170..0000000000
--- a/cesar/lib/test/atox/src/test_atox.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Cesar project {{{
- *
- * Copyright (C) 2008 Spidcom
- *
- * <<<Licence>>>
- *
- * }}} */
-/**
- * \file lib/test/circular_list/src/test_circular.c
- * \brief « brief description »
- * \ingroup « module »
- *
- * « long description »
- */
-#include "common/std.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include "lib/test.h"
-#include "lib/atox.h"
-
-#define TEST_VAL_MAX 10
-
-static char buffer[21];
-
-void atox_basic_test_case(test_t test)
-{
- int fd, i;
- int i_val, i_res;
- long l_val, l_res;
- long long ll_val, ll_res;
- long ul_val, ul_res;
- long long ull_val, ull_res;
-
- fd = open("/dev/urandom", O_RDONLY);
-
- test_begin (test, "atoi")
- {
- for(i=0;i<TEST_VAL_MAX;i++)
- {
- read(fd, (void *)&i_val, sizeof(int));
- sprintf(buffer, "%d", i_val);
- i_res = atoi(buffer);
- test_fail_if (i_res != i_val, "Wrong convertion");
- }
- }
- test_end;
-
- test_begin (test, "atol")
- {
- for(i=0;i<TEST_VAL_MAX;i++)
- {
- read(fd, (void *)&l_val, sizeof(long));
- sprintf(buffer, "%ld", l_val);
- l_res = atol(buffer);
- test_fail_if (l_res != l_val, "Wrong convertion");
- }
- }
- test_end;
-
- test_begin (test, "atoll")
- {
- for(i=0;i<TEST_VAL_MAX;i++)
- {
- read(fd, (void *)&ll_val, sizeof(long long));
- sprintf(buffer, "%lld", ll_val);
- ll_res = atoll(buffer);
- test_fail_if (ll_res != ll_val, "Wrong convertion");
- }
- }
- test_end;
-
- test_begin (test, "atoul")
- {
- for(i=0;i<TEST_VAL_MAX;i++)
- {
- read(fd, (void *)&ul_val, sizeof(long));
- sprintf(buffer, "%lu", ul_val);
- ul_res = atoul(buffer);
- test_fail_if (ul_res != ul_val, "Wrong convertion");
- }
- }
- test_end;
-
- test_begin (test, "atoull")
- {
- for(i=0;i<TEST_VAL_MAX;i++)
- {
- read(fd, (void *)&ull_val, sizeof(long long));
- sprintf(buffer, "%llu", ull_val);
- ull_res = atoull(buffer);
- test_fail_if (ull_res != ull_val, "Wrong convertion");
- }
- }
- test_end;
-
- close(fd);
-}
-
-int main (int argc, char **argv)
-{
- test_t test;
-
- test_init(test, argc, argv);
- test_case_begin(test, "Basic");
-
- atox_basic_test_case(test);
-
- test_result(test);
- return test_nb_failed(test) == 0 ? 0 : 1;
-}
-