Hi, I'm having some issues with running an RTEMS application configured with more than 1 CPU. I'm using RTEMS5 checked out from Nov 8 (git hash b3c624d8886db6e791babe5e0d4f8b28992e000a).
What I've done is currently modified the sample Hello World application, based off of smp01, to print out the number of processors RTEMS detects with the rtems_get_processor_count() method. Initially this method reported 1 which made sense since I didn't have CONFIGURE_MAXIMUM_PROCESSORS defined. After setting #define CONFIGURE_MAXIMUM_PROCESSORS to 2 what I see is that I no longer get any serial output from the program. I'm not quite sure what's going on. The entirety of my program is as follows (also attached to this email): #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <rtems.h> #include <tmacros.h> const char rtems_test_name[] = "HELLO WORLD"; static rtems_task Init( rtems_task_argument ignored ) { rtems_print_printer_fprintf_putc(&rtems_test_printer); TEST_BEGIN(); #ifdef RTEMS_SMP printf("SMP SUPPORT ENABLED\n"); #else printf("NO SMP SUPPORT ENABLED\n"); #endif printf( "Hello Windows RTEMS SMP\n" ); uint32_t cpu_count = rtems_get_processor_count(); printf("CPU Count is %d\n", cpu_count); TEST_END(); rtems_test_exit( 0 ); } #define CONFIGURE_INIT /* NOTICE: the clock driver is explicitly disabled */ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER #define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER #define CONFIGURE_MAXIMUM_PROCESSORS 2 #define CONFIGURE_MAXIMUM_TASKS (CONFIGURE_MAXIMUM_PROCESSORS + 1) #define CONFIGURE_MAXIMUM_SEMAPHORES 1 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION #define CONFIUGRE_SCHEDULER_PRIORITY_AFFINITY_SMP #include <rtems/confdefs.h> The output when I have CONFIGURE_MAXIMUM_PROCESSORS to 1 can be seen the screenshot below (also attached to this thread). [cid:image001.png@01D4924E.ACA8B930] Any idea what might be going on here or if there's something that I'm doing incorrectly? Thanks, Avi
/* * COPYRIGHT (c) 1989-2012. * On-Line Applications Research Corporation (OAR). * * 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 <rtems.h> #include <tmacros.h> const char rtems_test_name[] = "HELLO WORLD"; static rtems_task Init( rtems_task_argument ignored ) { rtems_print_printer_fprintf_putc(&rtems_test_printer); TEST_BEGIN(); #ifdef RTEMS_SMP printf("SMP SUPPORT ENABLED\n"); #else printf("NO SMP SUPPORT ENABLED\n"); #endif printf( "Hello Windows RTEMS SMP\n" ); uint32_t cpu_count = rtems_get_processor_count(); printf("CPU Count is %d\n", cpu_count); TEST_END(); rtems_test_exit( 0 ); } #define CONFIGURE_INIT /* NOTICE: the clock driver is explicitly disabled */ #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER #define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER #define CONFIGURE_MAXIMUM_PROCESSORS 2 #define CONFIGURE_MAXIMUM_TASKS (CONFIGURE_MAXIMUM_PROCESSORS + 1) #define CONFIGURE_MAXIMUM_SEMAPHORES 1 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION #define CONFIUGRE_SCHEDULER_PRIORITY_AFFINITY_SMP #include <rtems/confdefs.h>
_______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel