Re: RTEMS Tier Allocations.
Hello Chris, with the change to the INI format files, the target_pretest_command target_exe_filter_command disappeared. I am not sure how I can invoke the tester for a board using U-Boot connected via TTY or telnet. Do you have an example command line? -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 3/9] tests: Use rtems_test_printer
Update #3170. Update #3199. --- testsuites/libtests/block14/init.c | 5 + testsuites/libtests/debugger01/init.c| 7 ++- testsuites/libtests/mouse01/init.c | 4 +--- testsuites/libtests/tar01/init.c | 29 + testsuites/libtests/uid01/init.c | 4 +--- testsuites/smptests/smpschededf01/init.c | 7 ++- testsuites/sptests/spprofiling01/init.c | 4 +--- 7 files changed, 21 insertions(+), 39 deletions(-) diff --git a/testsuites/libtests/block14/init.c b/testsuites/libtests/block14/init.c index fcbb1b5f66..d7cd640e25 100644 --- a/testsuites/libtests/block14/init.c +++ b/testsuites/libtests/block14/init.c @@ -120,11 +120,8 @@ static int test_disk_ioctl(rtems_disk_device *dd, uint32_t req, void *arg) static void test_actions(rtems_disk_device *dd) { - rtems_printer printer; int i; - rtems_print_printer_printf(&printer); - for (i = 0; i < ACTION_COUNT; ++i) { const test_action *action = &actions [i]; rtems_status_code sc; @@ -160,7 +157,7 @@ static void test_actions(rtems_disk_device *dd) ); } - rtems_blkdev_print_stats(&dd->stats, 0, 1, 2, &printer); + rtems_blkdev_print_stats(&dd->stats, 0, 1, 2, &rtems_test_printer); } static void test(void) diff --git a/testsuites/libtests/debugger01/init.c b/testsuites/libtests/debugger01/init.c index e7db8fe15d..1bb28d4992 100644 --- a/testsuites/libtests/debugger01/init.c +++ b/testsuites/libtests/debugger01/init.c @@ -25,14 +25,11 @@ static void test(void) { - rtems_printer printer; - - rtems_print_printer_fprintf(&printer, stdout); rtems_test_assert(rtems_debugger_start("test", "something", - 3, 10, &printer) < 0); + 3, 10, &rtems_test_printer) < 0); rtems_test_assert(rtems_debugger_register_test_remote() == 0); rtems_test_assert(rtems_debugger_start("test", "something", - 3, 10, &printer) == 0); + 3, 10, &rtems_test_printer) == 0); rtems_debugger_set_verbose(true); rtems_test_assert(rtems_debugger_remote_debug(true) == 0); diff --git a/testsuites/libtests/mouse01/init.c b/testsuites/libtests/mouse01/init.c index 145887a15a..24d6a2e0cc 100644 --- a/testsuites/libtests/mouse01/init.c +++ b/testsuites/libtests/mouse01/init.c @@ -97,10 +97,8 @@ void printf_uid_message( struct MW_UID_MESSAGE *uid ) { - rtems_printer printer; - rtems_print_printer_printf( &printer ); uid_print_message_with_plugin( -&printer, +&rtems_test_printer, uid ); } diff --git a/testsuites/libtests/tar01/init.c b/testsuites/libtests/tar01/init.c index ffc49b68c1..8f3d69094c 100644 --- a/testsuites/libtests/tar01/init.c +++ b/testsuites/libtests/tar01/init.c @@ -69,12 +69,13 @@ static void test_untar_check_mode(const char* file, int mode) void test_untar_from_memory(void) { rtems_status_code sc; - rtems_printer printer; - - rtems_print_printer_printf(&printer); printf("Untaring from memory - "); - sc = Untar_FromMemory_Print((void *)TARFILE_START, TARFILE_SIZE, &printer); + sc = Untar_FromMemory_Print( +(void *)TARFILE_START, +TARFILE_SIZE, +&rtems_test_printer + ); if (sc != RTEMS_SUCCESSFUL) { printf ("error: untar failed: %s\n", rtems_status_text (sc)); exit(1); @@ -146,7 +147,6 @@ void test_untar_from_file(void) void test_untar_chunks_from_memory(void) { rtems_status_code sc; - rtems_printer printer; int rv; Untar_ChunkContext ctx; unsigned long counter = 0; @@ -155,8 +155,6 @@ void test_untar_chunks_from_memory(void) puts( "" ); - rtems_print_printer_printf(&printer); - /* make a directory to untar it into */ rv = mkdir( "/dest2", 0777 ); rtems_test_assert( rv == 0 ); @@ -167,7 +165,12 @@ void test_untar_chunks_from_memory(void) printf( "Untaring chunks from memory - " ); Untar_ChunkContext_Init(&ctx); do { -sc = Untar_FromChunk_Print(&ctx, &buffer[counter], (size_t)1 , &printer); +sc = Untar_FromChunk_Print( + &ctx, + &buffer[counter], + (size_t)1 , + &rtems_test_printer +); rtems_test_assert(sc == RTEMS_SUCCESSFUL); counter ++; } while (counter < buflen); @@ -191,7 +194,6 @@ void test_untar_chunks_from_memory(void) void test_untar_unzip_tgz(void) { int status; - rtems_printer printer; int rv; Untar_GzChunkContext ctx; size_t i = 0; @@ -203,8 +205,6 @@ void test_untar_unzip_tgz(void) rtems_test_assert( buflen != 0 ); - rtems_print_printer_printf(&printer); - /* make a directory to untar it into */ rv = mkdir( "/dest3", 0777 ); rtems_test_assert( rv == 0 ); @@ -217,7 +217,7 @@ void test_untar_unzip_tgz(void) status = Untar_GzChunkContext_Init(&ctx, &inflate_buffer, 1); rtems_test_assert(status == UNTAR_SUCCESSFUL); for(i = 0; i < buflen; i++) { -status = Untar_FromGzChunk_Print(&ctx, &buffer[i],
[PATCH 4/9] tests: Use rtems_print_printer_fprintf_putc()
Use rtems_print_printer_fprintf_putc() instead of rtems_print_printer_printf() to output via rtems_putc(). Update #3170. Update #3199. --- testsuites/libtests/capture01/init.c | 2 +- testsuites/libtests/complex/init.c | 2 +- testsuites/libtests/math/init.c | 2 +- testsuites/libtests/mathf/init.c | 2 +- testsuites/libtests/mathl/init.c | 2 +- testsuites/samples/capture/init.c| 2 +- testsuites/samples/hello/init.c | 2 +- testsuites/samples/loopback/init.c | 2 +- testsuites/samples/paranoia/init.c | 2 +- testsuites/samples/pppd/init.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/testsuites/libtests/capture01/init.c b/testsuites/libtests/capture01/init.c index 6d5d095527..4791c5a1c0 100644 --- a/testsuites/libtests/capture01/init.c +++ b/testsuites/libtests/capture01/init.c @@ -48,7 +48,7 @@ rtems_task Init( rtems_mode old_mode; rtems_name to_name = rtems_build_name('I', 'D', 'L', 'E');; - rtems_print_printer_printf(&rtems_test_printer); + rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); diff --git a/testsuites/libtests/complex/init.c b/testsuites/libtests/complex/init.c index 7e21b2c92e..5f8ba34799 100644 --- a/testsuites/libtests/complex/init.c +++ b/testsuites/libtests/complex/init.c @@ -59,7 +59,7 @@ int main( void ) #endif { #if __rtems__ - rtems_print_printer_printf(&rtems_test_printer); + rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); #endif diff --git a/testsuites/libtests/math/init.c b/testsuites/libtests/math/init.c index b3d56c41c6..fc493e86e7 100644 --- a/testsuites/libtests/math/init.c +++ b/testsuites/libtests/math/init.c @@ -61,7 +61,7 @@ int main( void ) #endif { #if __rtems__ - rtems_print_printer_printf(&rtems_test_printer); + rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); #endif diff --git a/testsuites/libtests/mathf/init.c b/testsuites/libtests/mathf/init.c index 671e881fef..a553e25482 100644 --- a/testsuites/libtests/mathf/init.c +++ b/testsuites/libtests/mathf/init.c @@ -59,7 +59,7 @@ int main( void ) #endif { #if __rtems__ - rtems_print_printer_printf(&rtems_test_printer); + rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); #endif diff --git a/testsuites/libtests/mathl/init.c b/testsuites/libtests/mathl/init.c index 98a6f458a4..7e239f3fbe 100644 --- a/testsuites/libtests/mathl/init.c +++ b/testsuites/libtests/mathl/init.c @@ -59,7 +59,7 @@ int main( void ) #endif { #if __rtems__ - rtems_print_printer_printf(&rtems_test_printer); + rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); #endif diff --git a/testsuites/samples/capture/init.c b/testsuites/samples/capture/init.c index 24f04c50a2..2bf21c8acc 100644 --- a/testsuites/samples/capture/init.c +++ b/testsuites/samples/capture/init.c @@ -48,7 +48,7 @@ rtems_task Init( rtems_task_priority old_priority; rtems_mode old_mode; - rtems_print_printer_printf(&rtems_test_printer); + rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); status = rtems_shell_wait_for_input( diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c index ba379fbaa0..216a8b7e06 100644 --- a/testsuites/samples/hello/init.c +++ b/testsuites/samples/hello/init.c @@ -28,7 +28,7 @@ rtems_task Init( rtems_task_argument ignored ) { - rtems_print_printer_printf(&rtems_test_printer); + rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); printf( "Hello World\n" ); rtems_test_end(); diff --git a/testsuites/samples/loopback/init.c b/testsuites/samples/loopback/init.c index 3ff8fbd41e..0532ef091b 100644 --- a/testsuites/samples/loopback/init.c +++ b/testsuites/samples/loopback/init.c @@ -248,7 +248,7 @@ Init (rtems_task_argument ignored) { rtems_status_code sc; -rtems_print_printer_printf(&rtems_test_printer); +rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); diff --git a/testsuites/samples/paranoia/init.c b/testsuites/samples/paranoia/init.c index 4326db3b6f..1ee4db0b84 100644 --- a/testsuites/samples/paranoia/init.c +++ b/testsuites/samples/paranoia/init.c @@ -37,7 +37,7 @@ rtems_task Init( M68KFPSPInstallExceptionHandlers (); #endif - rtems_print_printer_printf(&rtems_test_printer); + rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); paranoia(1, args); rtems_test_end(); diff --git a/testsuites/samples/pppd/init.c b/testsuites/samples/pppd/init.c index d689ff1e71..1a9ddeee21 100644 --- a/testsuites/samples/pppd/init.c +++ b/testsuites/samples/pppd/init.c @@ -39,7 +39,7 @@ rtems_task Init(rtems_task_argument argument) { rtems_status_code status; - rtems_print_printer_printf(&rtems_test_printer); + rtems_print_printer_fprintf_putc(&rtems_test_printer); rtems_test_begin(); -- 2.12.3 _
[PATCH 2/9] rtems: Add rtems_print_printer_fprintf_putc()
Update #3170. Update #3199. --- cpukit/include/rtems/printer.h | 25 ++- cpukit/libcsupport/Makefile.am | 1 + cpukit/libcsupport/src/printerfprintfputc.c | 67 + 3 files changed, 82 insertions(+), 11 deletions(-) create mode 100644 cpukit/libcsupport/src/printerfprintfputc.c diff --git a/cpukit/include/rtems/printer.h b/cpukit/include/rtems/printer.h index c18600bbe3..fccd9bcf5f 100644 --- a/cpukit/include/rtems/printer.h +++ b/cpukit/include/rtems/printer.h @@ -74,7 +74,7 @@ static inline bool rtems_print_printer_valid(const rtems_printer *printer) } /** - * @brief Initializes the rtems_printer struct to empty. + * @brief Initializes the printer to print nothing. * * An empty printer prints nothing. You can use this to implement an enable and * disable type print implementation. @@ -88,31 +88,34 @@ static inline void rtems_print_printer_empty(rtems_printer *printer) } /** - * @brief Initializes the rtems_printer struct to printk - * - * The printer will output to the kernel printk support. + * @brief Initializes the printer to print via printk(). * * @param[in] printer Pointer to the printer structure. */ void rtems_print_printer_printk(rtems_printer *printer); /** - * @brief Initializes the rtems_printer struct to printf - * - * The printer will output to the libc printf support. + * @brief Initializes the printer to print via printf(). * * @param[in] printer Pointer to the printer structure. */ -extern void rtems_print_printer_printf(rtems_printer *printer); +void rtems_print_printer_printf(rtems_printer *printer); /** - * @brief Initializes the rtems_printer struct to a fprintf device. + * @brief Initializes the printer to print via fprintf() using the specified + * file stream. * - * The printer will output to the libc fprintf file provided. + * @param[in] printer Pointer to the printer structure. + */ +void rtems_print_printer_fprintf(rtems_printer *printer, FILE *file); + +/** + * @brief Initializes the printer to print via fprintf() using an unbuffered + * FILE stream with output through rtems_putc(). * * @param[in] printer Pointer to the printer structure. */ -extern void rtems_print_printer_fprintf(rtems_printer *printer, FILE *file); +void rtems_print_printer_fprintf_putc(rtems_printer *printer); typedef struct { rtems_id task; diff --git a/cpukit/libcsupport/Makefile.am b/cpukit/libcsupport/Makefile.am index 0b192aa6b0..41985393af 100644 --- a/cpukit/libcsupport/Makefile.am +++ b/cpukit/libcsupport/Makefile.am @@ -140,6 +140,7 @@ libcsupport_a_SOURCES = src/gxx_wrappers.c src/getchark.c src/printk.c \ $(BSD_LIBC_C_FILES) $(BASE_FS_C_FILES) $(MALLOC_C_FILES) \ $(ERROR_C_FILES) $(ASSOCIATION_C_FILES) libcsupport_a_SOURCES += src/printertask.c +libcsupport_a_SOURCES += src/printerfprintfputc.c libcsupport_a_SOURCES += $(LIBC_GLUE_C_FILES) $(PASSWORD_GROUP_C_FILES) \ $(TERMINAL_IDENTIFICATION_C_FILES) $(SYSTEM_CALL_C_FILES) \ diff --git a/cpukit/libcsupport/src/printerfprintfputc.c b/cpukit/libcsupport/src/printerfprintfputc.c new file mode 100644 index 00..8b502fa489 --- /dev/null +++ b/cpukit/libcsupport/src/printerfprintfputc.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2017 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#include + +static pthread_once_t fprintf_putc_once = PTHREAD_ONCE_INIT; + +static FILE fprintf_putc_file; + +static _READ_WRITE_RETURN_TYPE fprintf_putc_write( + struct _reent*ptr, + void *cookie, + char const *buf, + _READ_WRITE_BUFSIZE_TYPE n +) +{ + _READ_WRITE_RETURN_TYPE i; + _READ_WRITE_RETURN_TYPE m; + + m = (_READ_WRITE_RETURN_TYPE) n; + for (i = 0; i < m; ++i) { +rtems_putc(buf[i]); + } + + return m; +} + +static void fprintf_putc_init(void) +{ + FILE *f; + + f = &fprintf_putc_file; + f->_flags = __SWR | __SNBF; + f->_cookie = f; + f->_write = fprintf_putc_write; + __lock_init_recursive(f->_lock); +} + +static int fprintf_putc_printer(void *context, const char *fmt, va_list ap) +{ + return vfprintf(context, fmt, ap); +} + +void rtems_print_printer_fprintf_putc(rtems_printer *printer) +{ + pthread_once(&fprintf_putc_once, fprintf_putc_init); + printer->context = &fprintf_putc_file; + printer->printer = fprintf_putc_printer; +} -- 2.12.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 6/9] tests: Remove obsolete TESTS_USE_PRINTK
Update #3170. Update #3199. --- testsuites/fstests/fsimfsconfig01/init.c | 1 - testsuites/fstests/fsimfsconfig03/init.c | 1 - testsuites/fstests/fsnofs01/init.c| 1 - testsuites/libtests/block02/init.c| 1 - testsuites/libtests/block03/init.c| 1 - testsuites/libtests/block04/init.c| 1 - testsuites/libtests/block05/init.c| 1 - testsuites/libtests/block09/init.c| 1 - testsuites/libtests/devfs01/init.c| 1 - testsuites/libtests/devfs02/init.c| 1 - testsuites/libtests/devfs04/init.c| 1 - testsuites/libtests/devnullfatal01/testcase.h | 4 testsuites/libtests/exit01/init.c | 1 - testsuites/libtests/exit02/init.c | 1 - testsuites/libtests/stackchk/system.h | 1 - testsuites/psxtests/psxdevctl01/test.c| 1 - testsuites/psxtests/psxfatal_support/init.c | 1 - testsuites/psxtests/psxspin01/test.c | 1 - testsuites/smptests/smpfatal01/init.c | 1 - testsuites/smptests/smpfatal02/init.c | 1 - testsuites/smptests/smpfatal03/init.c | 1 - testsuites/smptests/smpfatal04/init.c | 1 - testsuites/smptests/smpfatal05/init.c | 1 - testsuites/smptests/smpfatal06/init.c | 1 - testsuites/smptests/smpfatal08/init.c | 1 - testsuites/smptests/smplock01/init.c | 1 - testsuites/smptests/smpmrsp01/init.c | 1 - testsuites/sptests/sperror01/init.c | 1 - testsuites/sptests/sperror02/init.c | 1 - testsuites/sptests/sperror03/init.c | 1 - testsuites/sptests/spextensions01/init.c | 1 - testsuites/sptests/spfatal26/init.c | 1 - testsuites/sptests/spfatal30/init.c | 1 - testsuites/sptests/spfatal31/init.c | 1 - testsuites/sptests/spfatal_support/system.h | 1 - testsuites/sptests/spglobalcon01/init.cc | 1 - testsuites/sptests/spinternalerror01/init.c | 1 - testsuites/sptests/spprintk/init.c| 1 - testsuites/sptests/spsysinit01/init.c | 1 - testsuites/sptests/sptimecounter01/init.c | 1 - 40 files changed, 43 deletions(-) diff --git a/testsuites/fstests/fsimfsconfig01/init.c b/testsuites/fstests/fsimfsconfig01/init.c index 57fd63c526..ed0e804e04 100644 --- a/testsuites/fstests/fsimfsconfig01/init.c +++ b/testsuites/fstests/fsimfsconfig01/init.c @@ -18,7 +18,6 @@ #define TEST_INIT -#define TESTS_USE_PRINTK #include "tmacros.h" #include diff --git a/testsuites/fstests/fsimfsconfig03/init.c b/testsuites/fstests/fsimfsconfig03/init.c index 311c5bb6b2..47f1fefc26 100644 --- a/testsuites/fstests/fsimfsconfig03/init.c +++ b/testsuites/fstests/fsimfsconfig03/init.c @@ -18,7 +18,6 @@ #define TEST_INIT -#define TESTS_USE_PRINTK #include "tmacros.h" #include diff --git a/testsuites/fstests/fsnofs01/init.c b/testsuites/fstests/fsnofs01/init.c index 603a906fdf..623f6bc085 100644 --- a/testsuites/fstests/fsnofs01/init.c +++ b/testsuites/fstests/fsnofs01/init.c @@ -18,7 +18,6 @@ #define TEST_INIT -#define TESTS_USE_PRINTK #include "tmacros.h" #include diff --git a/testsuites/libtests/block02/init.c b/testsuites/libtests/block02/init.c index 3523c5d364..361475da05 100644 --- a/testsuites/libtests/block02/init.c +++ b/testsuites/libtests/block02/init.c @@ -26,7 +26,6 @@ #define TEST_INIT -#define TESTS_USE_PRINTK #include "tmacros.h" #include diff --git a/testsuites/libtests/block03/init.c b/testsuites/libtests/block03/init.c index ea82421e7f..3a5e110ede 100644 --- a/testsuites/libtests/block03/init.c +++ b/testsuites/libtests/block03/init.c @@ -26,7 +26,6 @@ #define TEST_INIT -#define TESTS_USE_PRINTK #include "tmacros.h" #include diff --git a/testsuites/libtests/block04/init.c b/testsuites/libtests/block04/init.c index d9748df609..cf39ea9c3c 100644 --- a/testsuites/libtests/block04/init.c +++ b/testsuites/libtests/block04/init.c @@ -26,7 +26,6 @@ #define TEST_INIT -#define TESTS_USE_PRINTK #include "tmacros.h" #include diff --git a/testsuites/libtests/block05/init.c b/testsuites/libtests/block05/init.c index 80e3641820..4003c34373 100644 --- a/testsuites/libtests/block05/init.c +++ b/testsuites/libtests/block05/init.c @@ -26,7 +26,6 @@ #define TEST_INIT -#define TESTS_USE_PRINTK #include "tmacros.h" #include #include diff --git a/testsuites/libtests/block09/init.c b/testsuites/libtests/block09/init.c index 3ad283ec59..ca6efd210b 100644 --- a/testsuites/libtests/block09/init.c +++ b/testsuites/libtests/block09/init.c @@ -26,7 +26,6 @@ #define TEST_INIT -#define TESTS_USE_PRINTK #include "tmacros.h" #include diff --git a/testsuites/libtests/devfs01/init.c b/testsuites/libtests/devfs01/init.c index 66e702f61a..c727cb34ba 100644 --- a/testsuites/libtests/devfs01/init.c +++ b/testsuites/libtests/devfs01/init.c @@ -13,7 +13,6 @@ #define TEST_INIT -#define TESTS_USE_PRINTK #include #include "test_suppo
[PATCH 1/9] tests: Move rtems_test_printer definition
Statically initialize it to use printk(). Update #3170. Update #3199. --- cpukit/include/rtems/bspIo.h | 6 ++ cpukit/libcsupport/src/printk_plugin.c| 4 ++-- cpukit/libmisc/testsupport/testbeginend.c | 7 ++- testsuites/libtests/capture01/init.c | 1 - testsuites/libtests/complex/init.c| 1 - testsuites/libtests/math/init.c | 1 - testsuites/libtests/mathf/init.c | 1 - testsuites/libtests/mathl/init.c | 1 - testsuites/samples/capture/init.c | 1 - testsuites/samples/hello/init.c | 1 - testsuites/samples/loopback/init.c| 1 - testsuites/samples/paranoia/init.c| 1 - testsuites/samples/pppd/init.c| 1 - testsuites/sptests/sp20/init.c| 2 -- testsuites/support/src/locked_print.c | 2 -- 15 files changed, 14 insertions(+), 17 deletions(-) diff --git a/cpukit/include/rtems/bspIo.h b/cpukit/include/rtems/bspIo.h index 8ab46afecd..d49fe3a228 100644 --- a/cpukit/include/rtems/bspIo.h +++ b/cpukit/include/rtems/bspIo.h @@ -94,6 +94,12 @@ extern int getchark(void); */ extern int vprintk(const char *fmt, va_list ap); +int rtems_printk_printer( + void *ignored, + const char *format, + va_list ap +); + /** * @brief Kernel Print * diff --git a/cpukit/libcsupport/src/printk_plugin.c b/cpukit/libcsupport/src/printk_plugin.c index 3b4a911eb2..9676b83978 100644 --- a/cpukit/libcsupport/src/printk_plugin.c +++ b/cpukit/libcsupport/src/printk_plugin.c @@ -21,7 +21,7 @@ #include #include -static int printk_plugin( +int rtems_printk_printer( void *ignored, const char *format, va_list ap @@ -37,5 +37,5 @@ void rtems_print_printer_printk( ) { printer->context = NULL; - printer->printer = printk_plugin; + printer->printer = rtems_printk_printer; } diff --git a/cpukit/libmisc/testsupport/testbeginend.c b/cpukit/libmisc/testsupport/testbeginend.c index cc00c8f0a9..ff64851c02 100644 --- a/cpukit/libmisc/testsupport/testbeginend.c +++ b/cpukit/libmisc/testsupport/testbeginend.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 embedded brains GmbH. All rights reserved. + * Copyright (c) 2014, 2017 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 @@ -17,6 +17,11 @@ #endif #include +#include + +rtems_printer rtems_test_printer = { + .printer = rtems_printk_printer +}; int rtems_test_begin(void) { diff --git a/testsuites/libtests/capture01/init.c b/testsuites/libtests/capture01/init.c index 8062cbbd75..6d5d095527 100644 --- a/testsuites/libtests/capture01/init.c +++ b/testsuites/libtests/capture01/init.c @@ -35,7 +35,6 @@ rtems_task Init(rtems_task_argument argument); const char rtems_test_name[] = "CAPTURE 1"; -rtems_printer rtems_test_printer; rtems_task Init( rtems_task_argument ignored diff --git a/testsuites/libtests/complex/init.c b/testsuites/libtests/complex/init.c index c4295e6589..7e21b2c92e 100644 --- a/testsuites/libtests/complex/init.c +++ b/testsuites/libtests/complex/init.c @@ -27,7 +27,6 @@ #include const char rtems_test_name[] = "COMPLEX"; -rtems_printer rtems_test_printer; #endif #include diff --git a/testsuites/libtests/math/init.c b/testsuites/libtests/math/init.c index 732979394e..b3d56c41c6 100644 --- a/testsuites/libtests/math/init.c +++ b/testsuites/libtests/math/init.c @@ -31,7 +31,6 @@ #include const char rtems_test_name[] = "MATH"; -rtems_printer rtems_test_printer; #endif #include diff --git a/testsuites/libtests/mathf/init.c b/testsuites/libtests/mathf/init.c index 0737686aec..671e881fef 100644 --- a/testsuites/libtests/mathf/init.c +++ b/testsuites/libtests/mathf/init.c @@ -27,7 +27,6 @@ #include const char rtems_test_name[] = "MATHF"; -rtems_printer rtems_test_printer; #endif #include diff --git a/testsuites/libtests/mathl/init.c b/testsuites/libtests/mathl/init.c index 0f0672dab6..98a6f458a4 100644 --- a/testsuites/libtests/mathl/init.c +++ b/testsuites/libtests/mathl/init.c @@ -27,7 +27,6 @@ #include const char rtems_test_name[] = "MATHL"; -rtems_printer rtems_test_printer; #endif #include diff --git a/testsuites/samples/capture/init.c b/testsuites/samples/capture/init.c index 4893274254..24f04c50a2 100644 --- a/testsuites/samples/capture/init.c +++ b/testsuites/samples/capture/init.c @@ -29,7 +29,6 @@ rtems_task Init(rtems_task_argument argument); static void notification(int fd, int seconds_remaining, void *arg); const char rtems_test_name[] = "CAPTURE ENGINE"; -rtems_printer rtems_test_printer; volatile int can_proceed = 1; diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c index 5460da9f9e..ba379fbaa0 100644 --- a/testsuites/samples/hello/init.c +++ b/testsuites/samples/hello/init.c @@ -23,7 +23,6 @@ rtems_task Init(rtems_task_argument argument); const char rtems_test_name[] = "HELLO WORLD"; -rtems_printer rtems_test_printer; rtems_task Init( rtems_task_argument ignored diff --git a/te
[PATCH 7/9] Revert "testsuite: Fix build"
This reverts commit 4c701106fa81d480de6b6d9c99c972738c2ee026. --- testsuites/psxtests/psxclockrealtime01/init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/testsuites/psxtests/psxclockrealtime01/init.c b/testsuites/psxtests/psxclockrealtime01/init.c index f3ad3ac0ff..8deac3cf88 100644 --- a/testsuites/psxtests/psxclockrealtime01/init.c +++ b/testsuites/psxtests/psxclockrealtime01/init.c @@ -24,8 +24,6 @@ #include "config.h" #endif -#define TEST_INIT - #include #include #include -- 2.12.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 5/9] tests: Use rtems_test_printer in general
Update #3170. Update #3199. --- testsuites/libtests/block02/init.c | 1 + testsuites/libtests/block03/init.c | 1 + testsuites/libtests/block04/init.c | 1 + testsuites/libtests/block05/init.c | 1 + testsuites/libtests/termios06/init.c| 1 + testsuites/sptests/spfatal03/testcase.h | 2 + testsuites/sptests/spprintk/init.c | 1 + testsuites/support/include/buffer_test_io.h | 225 ++-- testsuites/support/include/tmacros.h| 4 +- testsuites/support/src/locked_print.c | 2 + 10 files changed, 59 insertions(+), 180 deletions(-) diff --git a/testsuites/libtests/block02/init.c b/testsuites/libtests/block02/init.c index f7dc3efd0d..3523c5d364 100644 --- a/testsuites/libtests/block02/init.c +++ b/testsuites/libtests/block02/init.c @@ -30,6 +30,7 @@ #include "tmacros.h" #include +#include #include #include #include diff --git a/testsuites/libtests/block03/init.c b/testsuites/libtests/block03/init.c index f2f6bd9ee4..ea82421e7f 100644 --- a/testsuites/libtests/block03/init.c +++ b/testsuites/libtests/block03/init.c @@ -30,6 +30,7 @@ #include "tmacros.h" #include +#include #include #include #include diff --git a/testsuites/libtests/block04/init.c b/testsuites/libtests/block04/init.c index 3d674c1107..d9748df609 100644 --- a/testsuites/libtests/block04/init.c +++ b/testsuites/libtests/block04/init.c @@ -30,6 +30,7 @@ #include "tmacros.h" #include +#include #include #include #include diff --git a/testsuites/libtests/block05/init.c b/testsuites/libtests/block05/init.c index 7a40b50b3c..80e3641820 100644 --- a/testsuites/libtests/block05/init.c +++ b/testsuites/libtests/block05/init.c @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/testsuites/libtests/termios06/init.c b/testsuites/libtests/termios06/init.c index 5c39dabacf..c1e04eb6d8 100644 --- a/testsuites/libtests/termios06/init.c +++ b/testsuites/libtests/termios06/init.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include diff --git a/testsuites/sptests/spfatal03/testcase.h b/testsuites/sptests/spfatal03/testcase.h index 90ed0535b3..b6935657ea 100644 --- a/testsuites/sptests/spfatal03/testcase.h +++ b/testsuites/sptests/spfatal03/testcase.h @@ -9,6 +9,8 @@ * http://www.rtems.org/license/LICENSE. */ +#include + #define CONFIGURE_MAXIMUM_SEMAPHORES 10 #define FATAL_ERROR_TEST_NAME"3" diff --git a/testsuites/sptests/spprintk/init.c b/testsuites/sptests/spprintk/init.c index 3d9b00149f..52f0ccdada 100644 --- a/testsuites/sptests/spprintk/init.c +++ b/testsuites/sptests/spprintk/init.c @@ -25,6 +25,7 @@ #define TEST_INIT #define TESTS_USE_PRINTK +#include #include const char rtems_test_name[] = "SPPRINTK"; diff --git a/testsuites/support/include/buffer_test_io.h b/testsuites/support/include/buffer_test_io.h index dff312d132..1ff15f6ca8 100644 --- a/testsuites/support/include/buffer_test_io.h +++ b/testsuites/support/include/buffer_test_io.h @@ -5,7 +5,6 @@ #ifndef __BUFFER_TEST_IO_h #define __BUFFER_TEST_IO_h -#include #include #ifdef __cplusplus @@ -34,186 +33,56 @@ extern "C" { #define TEST_STATE_STRING "*** TEST STATE: BENCHMARK\n" #endif -/* - * USE PRINTK TO MINIMIZE SIZE - */ -#if defined(TESTS_USE_PRINTK) - -#include - - #undef printf - #define printf(...) \ -do { \ - printk( __VA_ARGS__); \ -} while (0) - - #undef puts - #define puts(_s) \ -do { \ - printk( "%s\n", _s); \ -} while (0) - - #undef putchar - #define putchar(_c) \ -do { \ - printk( "%c", _c ); \ -} while (0) - - /* Do not call exit() since it closes stdin, etc and pulls in stdio code */ - #define rtems_test_exit(_s) \ -do { \ - rtems_shutdown_executive(0); \ -} while (0) - - #define FLUSH_OUTPUT() \ -do { \ -} while (0) - - #if defined(TEST_STATE_STRING) -#define TEST_BEGIN() \ -do { \ - printk("\n"); \ - printk(TEST_BEGIN_STRING); \ - printk(TEST_STATE_STRING); \ -} while (0) - #else -#define TEST_BEGIN() \ -do { \ - printk("\n"); \ - printk(TEST_BEGIN_STRING); \ -} while (0) - #endif - - #define TEST_END() \ -do { \ - printk( "\n" ); \ - printk(TEST_END_STRING); \ - printk( "\n" ); \ -} while (0) - -/* - * BUFFER TEST OUTPUT - */ +#undef printf +#define printf(...) \ + do { \ + rtems_printf( &rtems_test_printer, __VA_ARGS__ ); \ + } while (0) + +#undef puts +#define puts(_s) \ + do { \ + rtems_printf( &rtems_test_printer, "%s\n", _s ); \ + } while (0) + +#undef putchar +#define putchar(_c) \ + do { \ + rtems_printf( &rtems_test_printer, "%c", _c ); \ + } while (0) + +/* Do not call exit() since it closes stdin, etc and pulls in stdio code */ +#define rtems_test_exit(_s) \ + do { \ +rtems_shutdown_executive(0); \ + } while (0) + +#define FLUSH_O
[PATCH 8/9] Revert "testsuite: Fix build"
This reverts commit 88e84c2236146049386be55b4f6373cf75c50aed. --- testsuites/smptests/smpscheduler03/test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/testsuites/smptests/smpscheduler03/test.c b/testsuites/smptests/smpscheduler03/test.c index f804bc7088..3f6b9e3fd8 100644 --- a/testsuites/smptests/smpscheduler03/test.c +++ b/testsuites/smptests/smpscheduler03/test.c @@ -21,8 +21,6 @@ #include #include -#define TEST_INIT - #include "tmacros.h" void Init(rtems_task_argument arg); -- 2.12.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 1/4] Add riscv32 to autotools files v3
From: Hesham Almatary --- c/src/aclocal/rtems-cpu-subdirs.m4 | 1 + cpukit/configure.ac| 1 + cpukit/score/cpu/Makefile.am | 1 + 3 files changed, 3 insertions(+) diff --git a/c/src/aclocal/rtems-cpu-subdirs.m4 b/c/src/aclocal/rtems-cpu-subdirs.m4 index 44d38c9..b5b579e 100644 --- a/c/src/aclocal/rtems-cpu-subdirs.m4 +++ b/c/src/aclocal/rtems-cpu-subdirs.m4 @@ -23,6 +23,7 @@ _RTEMS_CPU_SUBDIR([nios2],[$1]);; _RTEMS_CPU_SUBDIR([no_cpu],[$1]);; _RTEMS_CPU_SUBDIR([or1k],[$1]);; _RTEMS_CPU_SUBDIR([powerpc],[$1]);; +_RTEMS_CPU_SUBDIR([riscv32],[$1]);; _RTEMS_CPU_SUBDIR([sh],[$1]);; _RTEMS_CPU_SUBDIR([sparc],[$1]);; _RTEMS_CPU_SUBDIR([sparc64],[$1]);; diff --git a/cpukit/configure.ac b/cpukit/configure.ac index 212a659..210eebf 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -459,6 +459,7 @@ score/cpu/moxie/Makefile score/cpu/nios2/Makefile score/cpu/or1k/Makefile score/cpu/powerpc/Makefile +score/cpu/riscv32/Makefile score/cpu/sh/Makefile score/cpu/sparc/Makefile score/cpu/sparc64/Makefile diff --git a/cpukit/score/cpu/Makefile.am b/cpukit/score/cpu/Makefile.am index 5183510..73c6540 100644 --- a/cpukit/score/cpu/Makefile.am +++ b/cpukit/score/cpu/Makefile.am @@ -14,6 +14,7 @@ DIST_SUBDIRS += nios2 DIST_SUBDIRS += no_cpu DIST_SUBDIRS += or1k DIST_SUBDIRS += powerpc +DIST_SUBDIRS += riscv32 DIST_SUBDIRS += sh DIST_SUBDIRS += sparc DIST_SUBDIRS += sparc64 -- 2.7.4 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 2/4] cpukit: librpc - add riscv* to xdr_float.c v3
From: Hesham Almatary --- cpukit/librpc/src/xdr/xdr_float.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cpukit/librpc/src/xdr/xdr_float.c b/cpukit/librpc/src/xdr/xdr_float.c index 4c58720..989cbff 100644 --- a/cpukit/librpc/src/xdr/xdr_float.c +++ b/cpukit/librpc/src/xdr/xdr_float.c @@ -72,6 +72,7 @@ static char *rcsid = "$FreeBSD: src/lib/libc/xdr/xdr_float.c,v 1.7 1999/08/28 00 defined(__or1k__) || defined(__or1knd__) || \ defined(__sparc__) || \ defined(__ppc__) || defined(__PPC__) || \ +defined(__riscv) || \ defined(__sh__) || \ defined(__BFIN__) || \ defined(__m32c__) || \ -- 2.7.4 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 4/4] bsp: Add new riscv_generic bsp v3
From: Hesham Almatary * Only runs/tested on simulator/spike. * Ticker, hello, capture work proprely * Tested via RTEMS Tester, Passed: 525/565 (92%) Update #3109 --- c/src/lib/libbsp/riscv32/Makefile.am | 14 + c/src/lib/libbsp/riscv32/acinclude.m4 | 10 + c/src/lib/libbsp/riscv32/configure.ac | 19 ++ c/src/lib/libbsp/riscv32/riscv_generic/Makefile.am | 93 + c/src/lib/libbsp/riscv32/riscv_generic/bsp_specs | 13 + .../libbsp/riscv32/riscv_generic/clock/clockdrv.c | 131 +++ .../lib/libbsp/riscv32/riscv_generic/configure.ac | 36 ++ .../riscv32/riscv_generic/console/console-io.c | 178 ++ .../lib/libbsp/riscv32/riscv_generic/include/bsp.h | 73 .../libbsp/riscv32/riscv_generic/include/bspopts.h | 68 .../lib/libbsp/riscv32/riscv_generic/include/irq.h | 49 +++ .../libbsp/riscv32/riscv_generic/include/tm27.h| 53 +++ c/src/lib/libbsp/riscv32/riscv_generic/irq/irq.c | 65 .../riscv_generic/make/custom/riscv_generic.cfg| 7 + .../lib/libbsp/riscv32/riscv_generic/start/start.S | 122 +++ .../riscv32/riscv_generic/startup/bsp_fatal_halt.c | 35 ++ .../libbsp/riscv32/riscv_generic/startup/linkcmds | 378 + .../lib/libbsp/riscv32/riscv_generic/timer/timer.c | 70 .../libbsp/riscv32/shared/include/linker-symbols.h | 81 + 19 files changed, 1495 insertions(+) create mode 100644 c/src/lib/libbsp/riscv32/Makefile.am create mode 100644 c/src/lib/libbsp/riscv32/acinclude.m4 create mode 100644 c/src/lib/libbsp/riscv32/configure.ac create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/Makefile.am create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/bsp_specs create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/clock/clockdrv.c create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/configure.ac create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/console/console-io.c create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/include/bsp.h create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/include/bspopts.h create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/include/irq.h create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/include/tm27.h create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/irq/irq.c create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/make/custom/riscv_generic.cfg create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/start/start.S create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/startup/bsp_fatal_halt.c create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/startup/linkcmds create mode 100644 c/src/lib/libbsp/riscv32/riscv_generic/timer/timer.c create mode 100644 c/src/lib/libbsp/riscv32/shared/include/linker-symbols.h diff --git a/c/src/lib/libbsp/riscv32/Makefile.am b/c/src/lib/libbsp/riscv32/Makefile.am new file mode 100644 index 000..9c319b6 --- /dev/null +++ b/c/src/lib/libbsp/riscv32/Makefile.am @@ -0,0 +1,14 @@ +ACLOCAL_AMFLAGS = -I ../../../aclocal +## Descend into the @RTEMS_BSP_FAMILY@ directory +## Currently, the shared directory is not explicitly +## added but it is present in the source tree. + + +_SUBDIRS = @RTEMS_BSP_FAMILY@ + +include_bspdir = $(includedir)/bsp +include_bsp_HEADERS = shared/include/linker-symbols.h + +include $(srcdir)/preinstall.am +include $(top_srcdir)/../../../automake/subdirs.am +include $(top_srcdir)/../../../automake/local.am diff --git a/c/src/lib/libbsp/riscv32/acinclude.m4 b/c/src/lib/libbsp/riscv32/acinclude.m4 new file mode 100644 index 000..2358993 --- /dev/null +++ b/c/src/lib/libbsp/riscv32/acinclude.m4 @@ -0,0 +1,10 @@ +# RTEMS_CHECK_BSPDIR(RTEMS_BSP_FAMILY) +AC_DEFUN([RTEMS_CHECK_BSPDIR], +[ + case "$1" in + riscv_generic ) +AC_CONFIG_SUBDIRS([riscv_generic]);; + *) +AC_MSG_ERROR([Invalid BSP]);; + esac +]) diff --git a/c/src/lib/libbsp/riscv32/configure.ac b/c/src/lib/libbsp/riscv32/configure.ac new file mode 100644 index 000..116fa2f --- /dev/null +++ b/c/src/lib/libbsp/riscv32/configure.ac @@ -0,0 +1,19 @@ +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.69]) +AC_INIT([rtems-c-src-lib-libbsp-riscv32],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla]) +AC_CONFIG_SRCDIR([../riscv32]) +RTEMS_TOP(../../../../..) + +RTEMS_CANONICAL_TARGET_CPU +AM_INIT_AUTOMAKE([no-define foreign subdir-objects 1.12.2]) +AM_MAINTAINER_MODE + +RTEMS_ENV_RTEMSBSP +RTEMS_PROJECT_ROOT + +RTEMS_CHECK_BSPDIR([$RTEMS_BSP_FAMILY]) + +# Explicitly list all Makefiles here +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/c/src/lib/libbsp/riscv32/riscv_generic/Makefile.am b/c/src/lib/libbsp/riscv32/riscv_generic/Makefile.am new file mode 100644 index 000..83257ac --- /dev/null +++ b/c/src/lib/libbsp/riscv32/riscv_generic/Makefile.am @@ -0,0 +1,93 @@ +## +# +# @brief Makefile of LibBSP for the RISCV/Spike simulator. +# +# +ACLOCAL_AMFLAGS = -I ../../../../aclocal + +include $(top_srcdir)/../../.
[PATCH 3/4] cpukit: Add basic riscv32 architecture port v3
From: Hesham Almatary Limitations: * NO FPU support [TODO] Update #3109 --- cpukit/score/cpu/riscv32/Makefile.am | 26 + cpukit/score/cpu/riscv32/cpu.c | 124 ++ .../score/cpu/riscv32/riscv-context-initialize.c | 67 + cpukit/score/cpu/riscv32/riscv-context-switch.S| 139 ++ cpukit/score/cpu/riscv32/riscv-context-validate.S | 201 +++ .../cpu/riscv32/riscv-context-volatile-clobber.S | 50 + cpukit/score/cpu/riscv32/riscv-exception-default.c | 39 + .../cpu/riscv32/riscv-exception-frame-print.c | 41 + cpukit/score/cpu/riscv32/riscv-exception-handler.S | 220 +++ cpukit/score/cpu/riscv32/rtems/asm.h | 120 ++ cpukit/score/cpu/riscv32/rtems/score/cpu.h | 585 cpukit/score/cpu/riscv32/rtems/score/cpu_asm.h | 90 ++ cpukit/score/cpu/riscv32/rtems/score/cpuatomic.h | 31 + cpukit/score/cpu/riscv32/rtems/score/cpuimpl.h | 51 + .../score/cpu/riscv32/rtems/score/riscv-utility.h | 1526 cpukit/score/cpu/riscv32/rtems/score/riscv.h | 66 + cpukit/score/cpu/riscv32/rtems/score/types.h | 70 + 17 files changed, 3446 insertions(+) create mode 100644 cpukit/score/cpu/riscv32/Makefile.am create mode 100644 cpukit/score/cpu/riscv32/cpu.c create mode 100644 cpukit/score/cpu/riscv32/riscv-context-initialize.c create mode 100644 cpukit/score/cpu/riscv32/riscv-context-switch.S create mode 100644 cpukit/score/cpu/riscv32/riscv-context-validate.S create mode 100644 cpukit/score/cpu/riscv32/riscv-context-volatile-clobber.S create mode 100644 cpukit/score/cpu/riscv32/riscv-exception-default.c create mode 100644 cpukit/score/cpu/riscv32/riscv-exception-frame-print.c create mode 100644 cpukit/score/cpu/riscv32/riscv-exception-handler.S create mode 100644 cpukit/score/cpu/riscv32/rtems/asm.h create mode 100644 cpukit/score/cpu/riscv32/rtems/score/cpu.h create mode 100644 cpukit/score/cpu/riscv32/rtems/score/cpu_asm.h create mode 100644 cpukit/score/cpu/riscv32/rtems/score/cpuatomic.h create mode 100644 cpukit/score/cpu/riscv32/rtems/score/cpuimpl.h create mode 100644 cpukit/score/cpu/riscv32/rtems/score/riscv-utility.h create mode 100644 cpukit/score/cpu/riscv32/rtems/score/riscv.h create mode 100644 cpukit/score/cpu/riscv32/rtems/score/types.h diff --git a/cpukit/score/cpu/riscv32/Makefile.am b/cpukit/score/cpu/riscv32/Makefile.am new file mode 100644 index 000..1de5b2d --- /dev/null +++ b/cpukit/score/cpu/riscv32/Makefile.am @@ -0,0 +1,26 @@ +include $(top_srcdir)/automake/compile.am +include_rtemsdir = $(includedir)/rtems +include_rtems_HEADERS = rtems/asm.h + +include_rtems_scoredir = $(includedir)/rtems/score +include_rtems_score_HEADERS = rtems/score/cpu.h +include_rtems_score_HEADERS += rtems/score/cpuatomic.h +include_rtems_score_HEADERS += rtems/score/cpuimpl.h +include_rtems_score_HEADERS += rtems/score/cpu_asm.h +include_rtems_score_HEADERS += rtems/score/types.h +include_rtems_score_HEADERS += rtems/score/riscv.h +include_rtems_score_HEADERS += rtems/score/riscv-utility.h + +noinst_LIBRARIES = libscorecpu.a +libscorecpu_a_CPPFLAGS = $(AM_CPPFLAGS) +libscorecpu_a_SOURCES = cpu.c +libscorecpu_a_SOURCES += riscv-exception-handler.S +libscorecpu_a_SOURCES += riscv-exception-default.c +libscorecpu_a_SOURCES += riscv-exception-frame-print.c +libscorecpu_a_SOURCES += riscv-context-switch.S +libscorecpu_a_SOURCES += riscv-context-initialize.c +libscorecpu_a_SOURCES += riscv-context-validate.S +libscorecpu_a_SOURCES += riscv-context-volatile-clobber.S + +include $(srcdir)/preinstall.am +include $(top_srcdir)/automake/local.am diff --git a/cpukit/score/cpu/riscv32/cpu.c b/cpukit/score/cpu/riscv32/cpu.c new file mode 100644 index 000..7061d10 --- /dev/null +++ b/cpukit/score/cpu/riscv32/cpu.c @@ -0,0 +1,124 @@ +/* + * riscv32 CPU Dependent Source + * + * Copyright (c) 2015 University of York. + * Hesham ALmatary + * + * COPYRIGHT (c) 1989-1999. + * On-Line Applications Research Corporation (OAR). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTI
Re: [PATCH 1/4] Add riscv32 to autotools files
On Thu, Oct 26, 2017 at 4:34 PM, Sebastian Huber wrote: > Hello Hesham, > > thanks for your RISC-V port. Most files have a BSD-like license. Would it be > possible to use a BSD-2 license for all the files which have the RTEMS > license in the patch set? > done (v3 set of patches) > -- > Sebastian Huber, embedded brains GmbH > > Address : Dornierstr. 4, D-82178 Puchheim, Germany > Phone : +49 89 189 47 41-16 > Fax : +49 89 189 47 41-09 > E-Mail : sebastian.hu...@embedded-brains.de > PGP : Public key available on request. > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. > -- Hesham ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 1/9] tests: Move rtems_test_printer definition
Hi, This patch series looks good and thank you for making move. I had planned on moving to this point once I knew printk change gave me suitable test results on the zedboard. Does this mean the TEST_INIT defines can be removed? I can do this after I have tested this change. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 1/9] tests: Move rtems_test_printer definition
On 27/10/2017 14:50, Chris Johns wrote: > > Does this mean the TEST_INIT defines can be removed? I can do this after I > have > tested this change. > Sorry missed the patch to remove them in the series. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: RTEMS Tier Allocations.
On 26/10/2017 18:50, Sebastian Huber wrote: > > with the change to the INI format files, the > > target_pretest_command > target_exe_filter_command > > disappeared. Oh I changed some names as part of a clean up. > I am not sure how I can invoke the tester for a board using U-Boot > connected via TTY or telnet. Do you have an example command line? Of course, with the removal of my local set up there is nothing left in the BSP configurations as examples. A command line is: $ sudo rtems-test --rtems-tools=/opt/work/rtems/4.12 \ --rtems-bsp=xilinx_zynq_zedboard \ --timeout=60 --log=t.txt \ --user-config=$HOME/.rtemstesterrc \ --mail . Notes: 1. The tester will walk the file system, find all the *.exe files and filter the executable file names. 2. I need to provide my local file on the command because the sudo changes me to root to access the TFTP port. My local configuration file is: # # RTEMS Tester configuration # # # Zedboard with U-Boot on an SD card. # [xilinx_zynq_zedboard] bsp_tty_dev= tuke:30005 target_pretest_command = rtems-zynq-mkimg @EXE@ target_exe_filter = /\.exe/.exe.img/ target_on_command = wemo-reset CSEng1 0 && sleep 4 && wemo-reset CSEng1 -1 target_off_command = wemo-reset CSEng1 0 target_reset_command = wemo-reset CSEng1 3 # # Xilinx ZC706 connected via JTAG to OpenOCD # [xilinx_zynq_zc706] bsp_tty_dev= tuke:30006 bsp_gdb_script = target remote kaka: mon load_image /opt/src/rtems/zynq/xilinx_zynq_zc706_fsbl.elf 0 elf on resume 0 mon sleep 4000 mon halt load b bsp_reset continue # # PC # [pc] target_on_command= wemo-reset CSEng2 0 && sleep 3 && wemo-reset CSEng2 -1 target_off_command = wemo-reset CSEng2 0 target_reset_command = wemo-reset CSEng2 1 bsp_tty_dev = tuke:30010 # # MCF5235 # [mcf5235] bsp_tty_dev= tuke:30011 gdb_script = bsp_gdb_script bsp_gdb_script = target remote | m68k-bdm-gdbserver pipe 003-005 thb *0xffe254c0 continue load b bsp_reset continue # # The BeagleBone Black. # [beagleboneblack] bsp_tty_dev = tuke:30007 target_on_command= wemo-reset CSEng3 0 && sleep 3 && wemo-reset CSEng3 -1 target_off_command = wemo-reset CSEng3 0 target_reset_command = wemo-reset CSEng3 5 # # The BeagleBoard. # [beagleboardxm] bsp_tty_dev= tuke:30013 gdb_script = bsp_gdb_script bsp_gdb_script = target remote kaka: mon beagleboard_xm_mlo /home/chris/development/rtems/bb/uboot/u-boot/MLO load b _Terminate_CPU_Fatal_halt continue Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] RSB - Add support for RISC-V RV64 (64-bit) toolchain v2
Thanks, committed. Even the Ada support works: riscv64-rtems4.12-gnat --version GNAT 7.2.0 20170814 (RTEMS 4.12, RSB 5bd4aa6bb33872b0f0fb243e7fc2f0784e69ab81, Newlib 2.5.0.20170922) Copyright (C) 1996-2017, Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] RSB - Add support for RISC-V RV64 (64-bit) toolchain v2
On 27/10/2017 16:45, Sebastian Huber wrote: > Thanks, committed. Even the Ada support works: > > riscv64-rtems4.12-gnat --version > GNAT 7.2.0 20170814 (RTEMS 4.12, RSB 5bd4aa6bb33872b0f0fb243e7fc2f0784e69ab81, > Newlib 2.5.0.20170922) > Copyright (C) 1996-2017, Free Software Foundation, Inc. > This is free software; see the source for copying conditions. > There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > This this arch get put in tier-4? Tools for archs with no BSP sit is tier-4 until a BSP is merged. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel