Re: HEAD fails on building pc386 BSP.
On 10/ 8/14 07:09 AM, Sebastian Huber wrote: On 07/10/14 23:00, Karel Gardas wrote: i386-rtems4.11-gcc --pipe -DHAVE_CONFIG_H -I.. -I../../cpukit/../../../pc386/lib/include -I/export/home/karel/vcs/rtems/c/src/../../cpukit/libmisc/shell -mtune=i386 -O2 -g -Wall -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs -MT shell/libshell_a-main_ping.o -MD -MP -MF shell/.deps/libshell_a-main_ping.Tpo -c -o shell/libshell_a-main_ping.o `test -f 'shell/main_ping.c' || echo '/export/home/karel/vcs/rtems/c/src/../../cpukit/libmisc/'`shell/main_ping.c /export/home/karel/vcs/rtems/c/src/../../cpukit/libmisc/shell/main_ping.c: In function ‘g_finish’: /export/home/karel/vcs/rtems/c/src/../../cpukit/libmisc/shell/main_ping.c:348:54: error: expected declaration specifiers before ‘__dead2’ static void g_finish(rtems_shell_globals_t* globals) __dead2; ^ [] is there any workaround for this issue already? Another FreeBSD stuff from slipped in (__dead2). A workaround is to update your tools to the latest version. My tools is GNU C 4.8.2, GNU Binutils 2.23.2 (with RTEMS patch) and newlib 1.20.0 with RTEMS patch. Except the binutils this is the newest stuff from ftp.rtems.org/rtems/SOURCES/ I can get. RSB is not working for me yet although there is some progress done on it already. This is due to binutils 2.24/2.23.90 issue on Solaris. Thanks! Karel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: HEAD fails on building pc386 BSP.
On 08/10/14 09:42, Karel Gardas wrote: My tools is GNU C 4.8.2, GNU Binutils 2.23.2 (with RTEMS patch) and newlib 1.20.0 with RTEMS patch. This Newlib version is far too old. Use the latest version from CVS or Git. git://sourceware.org/git/newlib.git Except the binutils this is the newest stuff from ftp.rtems.org/rtems/SOURCES/ I can get. Yes, sorry this is confusing. We should remove this directory for RTEMS 4.11. -- 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 2/3 v2] LEON3 SMP: support static interrupt affinity
--- c/src/lib/libbsp/sparc/leon3/include/bsp.h | 11 +++ c/src/lib/libbsp/sparc/shared/irq/irq-shared.c | 38 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/c/src/lib/libbsp/sparc/leon3/include/bsp.h b/c/src/lib/libbsp/sparc/leon3/include/bsp.h index a4a4a6f..3bd48bc 100644 --- a/c/src/lib/libbsp/sparc/leon3/include/bsp.h +++ b/c/src/lib/libbsp/sparc/leon3/include/bsp.h @@ -222,6 +222,17 @@ extern void BSP_shared_interrupt_mask(int irq); */ extern unsigned char LEON3_mp_irq; +#ifdef RTEMS_SMP +/* Weak table used to implement static interrupt CPU affinity in a SMP + * configuration. The array index is the interrupt to be looked up, and + * the array[INTERRUPT] content is the CPU number relative to boot CPU + * index that will be servicing the interrupts from the IRQ source. The + * default is to let the first CPU (the boot cpu) to handle all + * interrupts (all zeros). + */ +extern unsigned char sparc_irq_to_cpu[32]; +#endif + #ifdef __cplusplus } #endif diff --git a/c/src/lib/libbsp/sparc/shared/irq/irq-shared.c b/c/src/lib/libbsp/sparc/shared/irq/irq-shared.c index b49621f..105dcdd 100644 --- a/c/src/lib/libbsp/sparc/shared/irq/irq-shared.c +++ b/c/src/lib/libbsp/sparc/shared/irq/irq-shared.c @@ -2,6 +2,30 @@ #include #include +#if defined(RTEMS_SMP) && defined(LEON3) +/* Interrupt to CPU map. Default to CPU0 since in BSS. */ +unsigned char sparc_irq_to_cpu[32] __attribute__((weak)); + +/* On SMP use map table above relative to SMP Boot CPU (normally CPU0) */ +static inline int bsp_irq_cpu(int irq) +{ + /* protect from bad user configuration, default to boot cpu */ + if (rtems_configuration_get_maximum_processors() <= sparc_irq_to_cpu[irq]) +sparc_irq_to_cpu[irq] = 0; + return LEON3_Cpu_Index + sparc_irq_to_cpu[irq]; +} +#else +/* when not SMP the local CPU is returned */ +static inline int bsp_irq_cpu(int irq) +{ +#ifdef LEON3 + return _LEON3_Get_current_processor(); +#else + return 0; +#endif +} +#endif + static inline void bsp_dispatch_irq(int irq) { bsp_interrupt_handler_entry *e = @@ -54,26 +78,28 @@ rtems_status_code bsp_interrupt_facility_initialize(void) rtems_status_code bsp_interrupt_vector_enable(rtems_vector_number vector) { - BSP_Unmask_interrupt((int)vector); + int irq = (int)vector; + BSP_Cpu_Unmask_interrupt(irq, bsp_irq_cpu(irq)); - return RTEMS_SUCCESSFUL; + return RTEMS_SUCCESSFUL; } rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector) { - BSP_Mask_interrupt((int)vector); + int irq = (int)vector; + BSP_Cpu_Mask_interrupt(irq, bsp_irq_cpu(irq)); - return RTEMS_SUCCESSFUL; + return RTEMS_SUCCESSFUL; } void BSP_shared_interrupt_mask(int irq) { - BSP_Mask_interrupt(irq); + BSP_Cpu_Mask_interrupt(irq, bsp_irq_cpu(irq)); } void BSP_shared_interrupt_unmask(int irq) { - BSP_Unmask_interrupt(irq); + BSP_Cpu_Unmask_interrupt(irq, bsp_irq_cpu(irq)); } void BSP_shared_interrupt_clear(int irq) -- 1.7.0.4 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: How to send a shutdown signal to QEMU from RTEMS?
On 10/8/2014 12:15 AM, Sebastian Huber wrote: > On 07/10/14 15:53, Hesham Moustafa wrote: >> Hi, >> >> I want to send shutdown signal from RTEMS to qemu. Joel said that >> qemu-system-i386 does so; can anyone refers me to how to implement that for >> qemu-system-or32 (openrisc)? > This is target dependent. Some targets implement the registers of the reset > module. The easiest thing to figure this out is looking at the Qemu sources. > We need to ask Christian. There is a command line option to qemu which turns on "exit on reset" (--no-reboot). If the simulated target hardware has a way to reset it from software, the target specific simulation can honor the command line option and just exit rather than start over. We use this on at least the pc386. The questions for Christian are: + Does the or1ksim have a software reset capability? If not, can we add one? + Can qemu be modified to support this? It should only be a few lines of code in qemu and one write to the magic location in the BSP. It will be of great value in speeding the testing procedure. -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
m68k/m5484FireEngine and COBRA5475 strict alias warnings
Hi There appears to be something in the way the register access macros are defined for the genmcf548x BSP which results in a fairly large number of type-punned breaking strict alias warnings. There are 60 unique warnings reported in this BSP which is 3.5% of the total number of unique warnings overall right now. The mcf5235 BSP similarly has a large set of these and may be the same pattern. Eliminating these would be appreciated as I think it would nearly eliminate strict aliasing warnings. Thanks. -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 02/52] libcpu/powerpc/mpc8xx/clock: Fix warnings and clean up
--- c/src/lib/libbsp/powerpc/mbx8xx/clock/p_clock.c | 42 -- c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c | 58 - 2 files changed, 55 insertions(+), 45 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/clock/p_clock.c b/c/src/lib/libbsp/powerpc/mbx8xx/clock/p_clock.c index d55121c..d1fd075 100644 --- a/c/src/lib/libbsp/powerpc/mbx8xx/clock/p_clock.c +++ b/c/src/lib/libbsp/powerpc/mbx8xx/clock/p_clock.c @@ -1,6 +1,9 @@ +/** + * @file + * @brief mbx8xx Clock Tick connection code. + */ + /* - * Clock Tick interrupt conexion code. - * * COPYRIGHT (c) 1989-1997. * On-Line Applications Research Corporation (OAR). * @@ -21,23 +24,32 @@ extern void clockOff (void*); extern int clockIsOn(void*); extern void Clock_isr(void*); -static rtems_irq_connect_data clockIrqData = {BSP_PERIODIC_TIMER, - (rtems_irq_hdl)Clock_isr, - 0, - (rtems_irq_enable)clockOn, - (rtems_irq_disable)clockOff, - (rtems_irq_is_enabled)clockIsOn}; +static rtems_irq_connect_data clockIrqData = { + BSP_PERIODIC_TIMER, + (rtems_irq_hdl)Clock_isr, + 0, + (rtems_irq_enable)clockOn, + (rtems_irq_disable)clockOff, + (rtems_irq_is_enabled)clockIsOn +}; + +/* + * Prototypes + */ +int BSP_get_clock_irq_level(void); +int BSP_connect_clock_handler(rtems_irq_hdl hdl); +int BSP_disconnect_clock_handler(void); int BSP_get_clock_irq_level(void) { /* - * Caution : if you change this, you must change the + * Caution: if you change this, you must change the * definition of BSP_PERIODIC_TIMER accordingly */ return 6; } -int BSP_disconnect_clock_handler (void) +int BSP_disconnect_clock_handler(void) { if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) { printk("Unable to stop system clock\n"); @@ -46,16 +58,18 @@ int BSP_disconnect_clock_handler (void) return BSP_remove_rtems_irq_handler (&clockIrqData); } -int BSP_connect_clock_handler (rtems_irq_hdl hdl) +int BSP_connect_clock_handler(rtems_irq_hdl hdl) { if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) { - printk("Unable to get system clock handler\n"); +printk("Unable to get system clock handler\n"); rtems_fatal_error_occurred(1); } - if (!BSP_remove_rtems_irq_handler (&clockIrqData)) { - printk("Unable to remove current system clock handler\n"); + + if (!BSP_remove_rtems_irq_handler(&clockIrqData)) { +printk("Unable to remove current system clock handler\n"); rtems_fatal_error_occurred(1); } + /* * Reinit structure */ diff --git a/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c index 6ccc796..0d79883 100644 --- a/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c +++ b/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c @@ -2,7 +2,9 @@ * * This routine initializes the PIT on the MPC8xx. * The tick frequency is specified by the bsp. - * + */ + +/* * Author: Jay Monkman (jmonk...@frasca.com) * Copyright (C) 1998 by Frasca International, Inc. * @@ -49,14 +51,16 @@ extern int BSP_disconnect_clock_handler(void); extern uint32_t bsp_clicks_per_usec; extern uint32_t bsp_clock_speed; -void Clock_exit( void ); - /* - * These are set by clock driver during its init + * Prototypes */ - -rtems_device_major_number rtems_clock_major = ~0; -rtems_device_minor_number rtems_clock_minor; +rtems_isr Clock_isr(rtems_vector_number vector); +void Clock_exit( void ); +void clockOn(void* unused); +void clockOff(void* unused); +int clockIsOn(void* unused); +void Install_clock(rtems_isr_entry clock_isr); +void ReInstall_clock(rtems_isr_entry new_clock_isr); /* * ISR Handler @@ -103,9 +107,9 @@ void clockOn(void* unused) mfi_value = (plprcr_val & (0x000f)) >> (31-15); pdf_value = (plprcr_val & (0x0006)) >> (31-30); extclk = (((uint64_t)bsp_clock_speed) - * ((pdf_value + 1) * (mfd_value + 1)) - / (mfi_value * (mfd_value + 1) + mfn_value) - * (1 << s_value)); + * ((pdf_value + 1) * (mfd_value + 1)) + / (mfi_value * (mfd_value + 1) + mfn_value) + * (1 << s_value)); } else { /* @@ -116,20 +120,21 @@ void clockOn(void* unused) extclk= bsp_clock_speed / (mf_value+1); } pit_value = (extclk -/ 1000 -/ 4 -* rtems_configuration_get_microseconds_per_tick() -/ 1000); + / 1000 + / 4 + * rtems_configuration_get_microseconds_per_tick() + / 1000); m8xx.sccr |= (1<<23); force_prescaler = true; } else { pit_value = (rtems_configuration_get_microseconds_per_tick() * -bsp_clicks_per_usec); +bsp_clicks_per_usec); m8xx.sc
[PATCH 06/52] libbsp/shared/console-polled.c: Fix warning
--- c/src/lib/libbsp/shared/console-polled.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/c/src/lib/libbsp/shared/console-polled.c b/c/src/lib/libbsp/shared/console-polled.c index f418e44..6ae7587 100644 --- a/c/src/lib/libbsp/shared/console-polled.c +++ b/c/src/lib/libbsp/shared/console-polled.c @@ -17,17 +17,10 @@ #include /* external prototypes for monitor interface routines */ - -void console_outbyte_polled( - int port, - char ch -); - -int console_inbyte_nonblocking( - int port -); - +void console_outbyte_polled(int port, char ch); +int console_inbyte_nonblocking(int port); void console_initialize_hardware(void); +ssize_t console_write_support(int, const char *, size_t); /* * Console Termios Support Entry Points -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 01/52] sparc64/shared/clock/ckinit.c: Clean up formatting
--- c/src/lib/libbsp/sparc64/shared/clock/ckinit.c | 31 +- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c b/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c index d601a93..11779c4 100644 --- a/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c +++ b/c/src/lib/libbsp/sparc64/shared/clock/ckinit.c @@ -3,7 +3,9 @@ * This file provides a template for the clock device driver initialization. * * Modified for sun4v - niagara - * + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -21,7 +23,7 @@ #include #include -/* this is default frequency for simics simulator of niagara. Use the +/* This is default frequency for simics simulator of niagara. Use the * get_Frequency function to determine the CPU clock frequency at runtime. */ #define CPU_FREQ (500) @@ -33,16 +35,16 @@ uint64_t sparc64_cycles_per_tick; static unsigned int get_Frequency(void) { - phandle root = ofw_find_device("/"); - unsigned int freq; - if (ofw_get_property(root, "clock-frequency", &freq, sizeof(freq)) <= 0) { - printk("Unable to determine frequency, default: 0x%x\n",CPU_FREQ); - return CPU_FREQ; - } - - return freq; -} + phandle root = ofw_find_device("/"); + unsigned int freq; + + if (ofw_get_property(root, "clock-frequency", &freq, sizeof(freq)) <= 0) { +printk("Unable to determine frequency, default: 0x%x\n",CPU_FREQ); +return CPU_FREQ; + } + return freq; +} void Clock_driver_support_at_tick(void) { @@ -85,13 +87,14 @@ void Clock_driver_support_at_tick(void) void Clock_driver_support_initialize_hardware(void) { - uint64_t tick_reg; + uint64_t tick_reg; int bit_mask; bit_mask = SPARC_SOFTINT_TM_MASK | SPARC_SOFTINT_SM_MASK | (1<<14); sparc64_clear_interrupt_bits(bit_mask); - sparc64_cycles_per_tick = rtems_configuration_get_microseconds_per_tick()*(get_Frequency()/100); + sparc64_cycles_per_tick = +rtems_configuration_get_microseconds_per_tick()*(get_Frequency()/100); #if defined (SUN4U) sparc64_read_tick(tick_reg); @@ -109,12 +112,10 @@ void Clock_driver_support_initialize_hardware(void) #endif } - #define Clock_driver_support_shutdown_hardware( ) \ do { \ \ } while ( 0 ) - #include "../../../shared/clockdrv_shell.h" -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 05/52] libbsp/shared/clockdrv_shell.h: Fix warning
--- c/src/lib/libbsp/shared/clockdrv_shell.h | 1 + 1 file changed, 1 insertion(+) diff --git a/c/src/lib/libbsp/shared/clockdrv_shell.h b/c/src/lib/libbsp/shared/clockdrv_shell.h index 5af8c66..324e1e5 100644 --- a/c/src/lib/libbsp/shared/clockdrv_shell.h +++ b/c/src/lib/libbsp/shared/clockdrv_shell.h @@ -65,6 +65,7 @@ void Clock_exit( void ); */ #if defined(BSP_FEATURE_IRQ_EXTENSION) || \ (CPU_SIMPLE_VECTORED_INTERRUPTS != TRUE) +void Clock_isr(void *arg); void Clock_isr(void *arg) { #else -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 08/52] nios2-iic-irq.c: Include so it builds
--- cpukit/score/cpu/nios2/nios2-iic-irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cpukit/score/cpu/nios2/nios2-iic-irq.c b/cpukit/score/cpu/nios2/nios2-iic-irq.c index f51bc2d..aca25c7 100644 --- a/cpukit/score/cpu/nios2/nios2-iic-irq.c +++ b/cpukit/score/cpu/nios2/nios2-iic-irq.c @@ -24,6 +24,7 @@ #include #include #include +#include /* * This routine provides the RTEMS interrupt management. -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 04/52] gdbv850sim/console/console-io.c: Fix warnings
--- c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c b/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c index c178197..a66c800 100644 --- a/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c +++ b/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c @@ -12,6 +12,14 @@ #include /* + * Prototypes + */ +void console_initialize_hardware(void); +void console_outbyte_polled(int port, char ch); +int console_inbyte_nonblocking(int port); +void console_output_char(char c); + +/* * console_initialize_hardware * * This routine initializes the console hardware. @@ -38,7 +46,6 @@ void console_outbyte_polled( * * This routine polls for a character. */ - int console_inbyte_nonblocking( int port ) -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 03/52] libbsp/v850/shared/crt1.c: Remove warnings
--- c/src/lib/libbsp/v850/shared/crt1.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/c/src/lib/libbsp/v850/shared/crt1.c b/c/src/lib/libbsp/v850/shared/crt1.c index 18c240b..02a8a7f 100644 --- a/c/src/lib/libbsp/v850/shared/crt1.c +++ b/c/src/lib/libbsp/v850/shared/crt1.c @@ -1,21 +1,25 @@ /* * From newlib ==> libc/sys/sysnecv850/crt1.c * - * Obtained newlib 29 May 2012 + * Obtained from newlib: 29 May 2012 + * Warnings fixed: 7 October 2014 */ -void __main () + +void __main(void); +typedef void (*pfunc) (void); +extern pfunc __ctors[]; +extern pfunc __ctors_end[]; + +void __main(void) { static int initialized; if (! initialized) { - typedef void (*pfunc) (); - extern pfunc __ctors[]; - extern pfunc __ctors_end[]; pfunc *p; initialized = 1; for (p = __ctors_end; p > __ctors; ) - (*--p) (); +(*--p) (); } } -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Upcoming Series of Warning Elimination Patches
Hi I am about to submit a series of 52 which are generally very small. They eliminate at least 100 unique warnings. Most do one of a handful of things: + Add include of + Add static or prototype of method + Add "(void) VAR;" to eliminate set but not used warning. + Some also split the description from the copyright at the top of the file. One NIOS2 patch makes it build again. One patch fixes a warning in samples/unlimited but is dominated by fixing a spelling mistake in a method name. :) These built up pretty quickly and I am sorry for the bulk but each is small. If there are issues, I assume folks will speak up. Thanks. -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 07/52] libcpu/powerpc/mpc6xx/clock/c_clock.c: Fix warning and clean up
--- c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c | 89 +++-- 1 file changed, 39 insertions(+), 50 deletions(-) diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c index ba6d269..75ef38b 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c +++ b/c/src/lib/libcpu/powerpc/mpc6xx/clock/c_clock.c @@ -1,11 +1,13 @@ -/* - * Clock Tick Device Driver +/** + * @brief Clock Tick Device Driver * * This routine utilizes the Decrementer Register common to the PPC family. * * The tick frequency is directly programmed to the configured number of * microseconds per tick. - * + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -17,9 +19,9 @@ * Modifications Copyright (c) 1999 Eric Valette vale...@crf.canon.fr */ -#include #include #include +#include #include /* for atexit() */ #include #include @@ -39,41 +41,32 @@ extern int BSP_connect_clock_handler (void); /* * Clock ticks since initialization */ - volatile uint32_t Clock_driver_ticks; /* * This is the value programmed into the count down timer. */ - uint32_t Clock_Decrementer_value; -/* - * These are set by clock driver during its init - */ - -rtems_device_major_number rtems_clock_major = ~0; -rtems_device_minor_number rtems_clock_minor; - void clockOff(void* unused) { -rtems_interrupt_level l; + rtems_interrupt_level l; if ( ppc_cpu_is_bookE() ) { rtems_interrupt_disable(l); _write_BOOKE_TCR(_read_BOOKE_TCR() & ~BOOKE_TCR_DIE); rtems_interrupt_enable(l); } else { - /* - * Nothing to do as we cannot disable all interrupts and - * the decrementer interrupt enable is MSR_EE - */ +/* + * Nothing to do as we cannot disable all interrupts and + * the decrementer interrupt enable is MSR_EE + */ } } void clockOn(void* unused) { -rtems_interrupt_level l; + rtems_interrupt_level l; PPC_Set_decrementer( Clock_Decrementer_value ); @@ -94,7 +87,6 @@ rtems_interrupt_level l; static void clockHandler(void) { - #if (CLOCK_DRIVER_USE_FAST_IDLE == 1) do { rtems_clock_tick(); @@ -126,25 +118,28 @@ static void (*clock_handler)(void); */ void clockIsr(void *unused) { -int decr; + int decr; + /* * The driver has seen another tick. */ do { - register uint32_t flags; - rtems_interrupt_disable(flags); - __asm__ volatile ( -"mfdec %0; add %0, %0, %1; mtdec %0" -: "=&r"(decr) -: "r"(Clock_Decrementer_value)); - rtems_interrupt_enable(flags); - - Clock_driver_ticks += 1; - - /* - * Real Time Clock counter/timer is set to automatically reload. - */ - clock_handler(); +register uint32_t flags; + +rtems_interrupt_disable(flags); + __asm__ volatile ( + "mfdec %0; add %0, %0, %1; mtdec %0" + : "=&r"(decr) + : "r"(Clock_Decrementer_value) + ); +rtems_interrupt_enable(flags); + +Clock_driver_ticks += 1; + +/* + * Real Time Clock counter/timer is set to automatically reload. + */ +clock_handler(); } while ( decr < 0 ); } @@ -178,12 +173,11 @@ void clockIsrBookE(void *unused) * Real Time Clock counter/timer is set to automatically reload. */ clock_handler(); - } int clockIsOn(void* unused) { -uint32_t msr_value; + uint32_t msr_value; _CPU_MSR_GET( msr_value ); @@ -209,13 +203,12 @@ uint32_t msr_value; * Return values: NONE * */ - void Clock_exit( void ) { (void) BSP_disconnect_clock_handler (); } -uint32_t Clock_driver_nanoseconds_since_last_tick(void) +static uint32_t Clock_driver_nanoseconds_since_last_tick(void) { uint32_t clicks, tmp; @@ -252,7 +245,7 @@ rtems_device_driver Clock_initialize( void *pargp ) { -rtems_interrupt_level l,tcr; + rtems_interrupt_level l,tcr; Clock_Decrementer_value = (BSP_bus_frequency/BSP_time_base_divisor)* (rtems_configuration_get_microseconds_per_tick()/1000); @@ -269,10 +262,10 @@ rtems_interrupt_level l,tcr; rtems_interrupt_disable(l); -tcr = _read_BOOKE_TCR(); -tcr |= BOOKE_TCR_ARE; -tcr &= ~BOOKE_TCR_DIE; -_write_BOOKE_TCR(tcr); + tcr = _read_BOOKE_TCR(); + tcr |= BOOKE_TCR_ARE; + tcr &= ~BOOKE_TCR_DIE; + _write_BOOKE_TCR(tcr); rtems_interrupt_enable(l); @@ -285,22 +278,18 @@ rtems_interrupt_level l,tcr; Clock_driver_nanoseconds_since_last_tick ); - /* if a decrementer exception was pending, it is cleared by + /* + * If a decrementer exception was pending, it is cleared by * executing the default (nop) handler at this point; * The next exception will then be taken by our clock handler. * Clock handler installation initializes the decrementer to * the correct value. */ - clock_handler = clockHandler; if (!BSP_connect_clock_handler ()) { printk("Unable to initialize system clock\n");
[PATCH 17/52] arm/lpc24xx/misc/system-clocks.c: Fix warning
--- c/src/lib/libbsp/arm/lpc24xx/misc/system-clocks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/arm/lpc24xx/misc/system-clocks.c b/c/src/lib/libbsp/arm/lpc24xx/misc/system-clocks.c index 6ef027d..f64fca1 100644 --- a/c/src/lib/libbsp/arm/lpc24xx/misc/system-clocks.c +++ b/c/src/lib/libbsp/arm/lpc24xx/misc/system-clocks.c @@ -82,7 +82,7 @@ void lpc24xx_micro_seconds_delay(unsigned us) } #ifdef ARM_MULTILIB_ARCH_V7M - unsigned lpc17xx_sysclk(unsigned clksrcsel) + static unsigned lpc17xx_sysclk(unsigned clksrcsel) { return (clksrcsel & LPC17XX_SCB_CLKSRCSEL_CLKSRC) != 0 ? LPC24XX_OSCILLATOR_MAIN -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 20/52] arm/gba/startup/bspgetworkarea.c: Fix warning
--- c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c b/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c index 4cd85b6..ca48afe 100644 --- a/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c +++ b/c/src/lib/libbsp/arm/gba/startup/bspgetworkarea.c @@ -8,8 +8,8 @@ #include #include -extern void _end; -extern void __heap_limit; +extern int _end; +extern int __heap_limit; void bsp_work_area_initialize(void) { -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 11/52] arm/gba/clock/clockdrv.c: Fix warnings and clean up
--- c/src/lib/libbsp/arm/gba/clock/clockdrv.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/c/src/lib/libbsp/arm/gba/clock/clockdrv.c b/c/src/lib/libbsp/arm/gba/clock/clockdrv.c index 8ba9c6d..72d0b81 100644 --- a/c/src/lib/libbsp/arm/gba/clock/clockdrv.c +++ b/c/src/lib/libbsp/arm/gba/clock/clockdrv.c @@ -20,8 +20,8 @@ #include #include - void Clock_isr(void * arg); +void Clock_driver_support_initialize_hardware(void); #define Clock_driver_support_at_tick() @@ -81,9 +81,12 @@ void Clock_isr(void * arg); */ void Clock_driver_support_initialize_hardware(void) { - int tmreload = ((rtems_configuration_get_microseconds_per_tick()*1000)/__TimTickTime_ns); + int tmreload; + + tmreload = rtems_configuration_get_nanoseconds_per_tick() / __TimTickTime_ns; - if (tmreload>0x) tmreload = 0x; + if (tmreload>0x) +tmreload = 0x; GBA_REG_TM3CNT = (GBA_TMCNT_PS); GBA_REG_TM3D = (0x-tmreload); GBA_REG_TM3CNT = (0x00c0|GBA_TMCNT_PS); -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 14/52] arm/gdbarmsim/include/irq.h: Fix spacing
--- c/src/lib/libbsp/arm/gdbarmsim/include/irq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/arm/gdbarmsim/include/irq.h b/c/src/lib/libbsp/arm/gdbarmsim/include/irq.h index 968c58f..3c86d22 100644 --- a/c/src/lib/libbsp/arm/gdbarmsim/include/irq.h +++ b/c/src/lib/libbsp/arm/gdbarmsim/include/irq.h @@ -80,7 +80,7 @@ */ #define BSP_INTERRUPT_VECTOR_MAX DUMMY_IRQ_I2S -void bsp_interrupt_dispatch( void); +void bsp_interrupt_dispatch(void); #if 0 void lpc24xx_irq_set_priority( rtems_vector_number vector, unsigned priority); -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 15/52] arm/gdbarmsim/irq/irq.c: Fix warnings
--- c/src/lib/libbsp/arm/gdbarmsim/irq/irq.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/c/src/lib/libbsp/arm/gdbarmsim/irq/irq.c b/c/src/lib/libbsp/arm/gdbarmsim/irq/irq.c index 1d373c8..79665b4 100644 --- a/c/src/lib/libbsp/arm/gdbarmsim/irq/irq.c +++ b/c/src/lib/libbsp/arm/gdbarmsim/irq/irq.c @@ -28,6 +28,12 @@ #include #include +/* + * Prototypes + */ +void lpc24xx_irq_set_priority(rtems_vector_number, unsigned); +unsigned lpc24xx_irq_get_priority(rtems_vector_number); + static inline bool lpc24xx_irq_is_valid(rtems_vector_number vector) { return vector <= BSP_INTERRUPT_VECTOR_MAX; @@ -39,6 +45,7 @@ void lpc24xx_irq_set_priority(rtems_vector_number vector, unsigned priority) unsigned lpc24xx_irq_get_priority(rtems_vector_number vector) { + return 0; /* bogus value to avoid warning */ } #ifdef ARM_MULTILIB_ARCH_V4 -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 16/52] arm/lm3s69xx/startup/bspstart.c: Add include of to fix warning
--- c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c b/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c index 663239a..0602dcd 100644 --- a/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c +++ b/c/src/lib/libbsp/arm/lm3s69xx/startup/bspstart.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 12/52] arm/gba/irq/irq.c: Fix warnings and clean up
--- c/src/lib/libbsp/arm/gba/irq/irq.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/c/src/lib/libbsp/arm/gba/irq/irq.c b/c/src/lib/libbsp/arm/gba/irq/irq.c index 9cbf549..ba2751a 100644 --- a/c/src/lib/libbsp/arm/gba/irq/irq.c +++ b/c/src/lib/libbsp/arm/gba/irq/irq.c @@ -3,6 +3,7 @@ * * This file contains the implementation of the function described in irq.h. */ + /* * RTEMS GBA BSP * @@ -25,6 +26,11 @@ #include +/* + * Prototypes + */ +void bsp_interrupt_dispatch(void); + void bsp_interrupt_dispatch(void) { unsigned reg_ie = GBA_REG_IE; -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 25/52] m68k/mcf5225x/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/m68k/mcf5225x/startup/bspstart.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/c/src/lib/libbsp/m68k/mcf5225x/startup/bspstart.c b/c/src/lib/libbsp/m68k/mcf5225x/startup/bspstart.c index a373636..af47202 100644 --- a/c/src/lib/libbsp/m68k/mcf5225x/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mcf5225x/startup/bspstart.c @@ -1,11 +1,8 @@ /* - * BSP startup - * - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialisation. + */ + +/* * Author: *David Fiddes, d...@fiddes.surfaid.org *http://www.calm.hw.ac.uk/davidf/coldfire/ @@ -19,6 +16,7 @@ */ #include +#include /* * Cannot be frozen @@ -44,11 +42,6 @@ void _CPU_cache_disable_data(void) {} void _CPU_cache_invalidate_entire_data(void) {} void _CPU_cache_invalidate_1_data_line(const void *addr) {} -/* - * bsp_start - * - * This routine does the bulk of the system initialisation. - */ void __attribute__((weak)) bsp_start(void) { } -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 24/52] m68k/idp/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/m68k/idp/startup/bspstart.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c index 5c3ed75..1d8d103 100644 --- a/c/src/lib/libbsp/m68k/idp/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/idp/startup/bspstart.c @@ -1,9 +1,8 @@ /* - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialization. + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -13,6 +12,7 @@ */ #include +#include unsigned char *duart_base; extern struct duart_regs duart_info; @@ -21,11 +21,6 @@ extern struct duart_regs duart_info; void led_putnum(void); -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ void bsp_start( void ) { rtems_isr_entry *monitors_vector_table; -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 10/52] gen83xx/console/console-config.c: Fix warnings
--- c/src/lib/libbsp/powerpc/gen83xx/console/console-config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/gen83xx/console/console-config.c b/c/src/lib/libbsp/powerpc/gen83xx/console/console-config.c index b3ccb9c..e3e6098 100644 --- a/c/src/lib/libbsp/powerpc/gen83xx/console/console-config.c +++ b/c/src/lib/libbsp/powerpc/gen83xx/console/console-config.c @@ -41,14 +41,14 @@ #define DEVICE_FNS &ns16550_fns_polled #endif -static uint8_t gen83xx_console_get_register(uint32_t addr, uint8_t i) +static uint8_t gen83xx_console_get_register(uintptr_t addr, uint8_t i) { volatile uint8_t *reg = (volatile uint8_t *) addr; return reg [i]; } -static void gen83xx_console_set_register(uint32_t addr, uint8_t i, uint8_t val) +static void gen83xx_console_set_register(uintptr_t addr, uint8_t i, uint8_t val) { volatile uint8_t *reg = (volatile uint8_t *) addr; -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 09/52] nios2-iic-irq.c: Fix warnings
--- cpukit/score/cpu/nios2/nios2-iic-irq.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/cpukit/score/cpu/nios2/nios2-iic-irq.c b/cpukit/score/cpu/nios2/nios2-iic-irq.c index aca25c7..75d533d 100644 --- a/cpukit/score/cpu/nios2/nios2-iic-irq.c +++ b/cpukit/score/cpu/nios2/nios2-iic-irq.c @@ -36,6 +36,12 @@ unsigned long*_old_stack_ptr; #endif +/* + * Prototypes + */ +void __ISR_Handler(void); +void __Exception_Handler(CPU_Exception_frame *efr); + register unsigned long *stack_ptr __asm__ ("sp"); RTEMS_INLINE_ROUTINE void __IIC_Handler(void) -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 22/52] bfin/eZKit533/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c b/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c index 63c2d66..503fb6e 100644 --- a/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c +++ b/c/src/lib/libbsp/bfin/eZKit533/startup/bspstart.c @@ -1,10 +1,9 @@ /* bspstart.c for eZKit533 * - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialisation. + */ + +/* * Copyright (c) 2006 by Atos Automacao Industrial Ltda. * written by Alain Schaefer *and Antonio Giovanini @@ -14,8 +13,8 @@ * http://www.rtems.org/license/LICENSE. */ - #include +#include #include #include @@ -80,12 +79,6 @@ void bsp_pretasking_hook(void) bfin_interrupt_init(); } -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ - void bsp_start( void ) { /* BSP Hardware Initialization*/ -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 21/52] bfin/bf537Stamp/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c b/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c index 8183f14..cf7fbf1 100644 --- a/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c +++ b/c/src/lib/libbsp/bfin/bf537Stamp/startup/bspstart.c @@ -1,10 +1,9 @@ /* bspstart.c for bf537Stamp * - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialisation. + */ + +/* * Copyright (c) 2006 by Atos Automacao Industrial Ltda. * written by Alain Schaefer *and Antonio Giovanini @@ -16,6 +15,7 @@ #include +#include #include #include #include @@ -79,11 +79,6 @@ void bsp_pretasking_hook(void) bfin_interrupt_init(); } -/* - * bsp_start - * - * This routine does the bulk of the BSP initialization. - */ void bsp_start(void) { /* BSP Hardware Initialization*/ -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 18/52] arm/shared/abort/abort.c: Fix warnings and clean up
--- c/src/lib/libbsp/arm/shared/abort/abort.c | 44 +++ 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/c/src/lib/libbsp/arm/shared/abort/abort.c b/c/src/lib/libbsp/arm/shared/abort/abort.c index a686a62..05432f8 100644 --- a/c/src/lib/libbsp/arm/shared/abort/abort.c +++ b/c/src/lib/libbsp/arm/shared/abort/abort.c @@ -1,6 +1,10 @@ /* * ARM CPU Dependent Source * + * If you want a small footprint RTEMS, pls use simple_abort.c + */ + +/* * COPYRIGHT (c) 2007 Ray Xu. * mailto: Rayx at gmail dot com * @@ -10,8 +14,6 @@ * Copyright (c) 2002 Advent Networks, Inc * Jay Monkman * - * If you want a small footprint RTEMS, pls use simple_abort.c - * * 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. @@ -44,21 +46,26 @@ #define SET_REG(r, ctx, v) (((uint32_t *)ctx)[r] = v) #define GET_OFFSET(insn) (insn & 0xfff) -uint32_t g_data_abort_cnt = 0; +/* + * Prototypes + */ +void _print_full_context(uint32_t); +void do_data_abort(uint32_t, uint32_t, Context_Control *); + +uint32_t g_data_abort_cnt = 0; /*this is a big overhead for MCU only got 16K RAM*/ -uint32_t g_data_abort_insn_list[1024]; +uint32_t g_data_abort_insn_list[1024]; char *_print_full_context_mode2txt[0x20]={ - [0x0]="user", /* User */ - [0x1]="fiq", /* FIQ - Fast Interrupt Request */ - [0x2]="irq", /* IRQ - Interrupt Request */ - [0x3]="super", /* Supervisor */ - [0x7]="abort", /* Abort */ - [0xb]="undef", /* Undefined */ - [0xf]="system" /* System */ -}; - + [0x0]="user", /* User */ + [0x1]="fiq", /* FIQ - Fast Interrupt Request */ + [0x2]="irq", /* IRQ - Interrupt Request */ + [0x3]="super", /* Supervisor */ + [0x7]="abort", /* Abort */ + [0xb]="undef", /* Undefined */ + [0xf]="system" /* System */ +}; void _print_full_context(uint32_t spsr) { @@ -82,7 +89,7 @@ void _print_full_context(uint32_t spsr) : [arm_switch_reg] "=&r" (arm_switch_reg), [prev_sp] "=&r" (prev_sp), [prev_lr] "=&r" (prev_lr), [cpsr] "=&r" (cpsr) : [spsr] "r" (spsr) - : "cc"); + : "cc"); printk("Previous sp=0x%08x lr=0x%08x and actual cpsr=%08x\n", prev_sp, prev_lr, cpsr); @@ -102,8 +109,11 @@ void _print_full_context(uint32_t spsr) * All unhandled instructions cause the system to hang. */ -void do_data_abort(uint32_t insn, uint32_t spsr, -Context_Control *ctx) +void do_data_abort( + uint32_t insn, + uint32_t spsr, + Context_Control *ctx +) { /* Clarify, which type is correct, CPU_Exception_frame or Context_Control */ uint8_t decode; @@ -156,6 +166,6 @@ void do_data_abort(uint32_t insn, uint32_t spsr, while(1) { continue; } -return; +(void) level; /* avoid set but unused warning */ } -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 23/52] m68k/av5282/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/m68k/av5282/startup/bspstart.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/c/src/lib/libbsp/m68k/av5282/startup/bspstart.c b/c/src/lib/libbsp/m68k/av5282/startup/bspstart.c index 9794ddb..e85ea4c 100644 --- a/c/src/lib/libbsp/m68k/av5282/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/av5282/startup/bspstart.c @@ -1,11 +1,8 @@ /* - * BSP startup - * - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialisation. + */ + +/* * Author: *David Fiddes, d...@fiddes.surfaid.org *http://www.calm.hw.ac.uk/davidf/coldfire/ @@ -19,6 +16,7 @@ */ #include +#include #include /* @@ -129,11 +127,6 @@ void _CPU_cache_invalidate_1_data_line(const void *addr) __asm__ volatile ("cpushl %%bc,(%0)" :: "a" (addr)); } -/* - * bsp_start - * - * This routine does the bulk of the system initialisation. - */ void bsp_start( void ) { /* -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 19/52] bfin/TLL6527M/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c b/c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c index c900b76..38c2df4 100644 --- a/c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c +++ b/c/src/lib/libbsp/bfin/TLL6527M/startup/bspstart.c @@ -1,10 +1,9 @@ /* bspstart.c for TLL6527M * - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialisation. + */ + +/* * COPYRIGHT (c) 2010 by ECE Northeastern University. * * The license and distribution terms for this file may be @@ -14,6 +13,7 @@ #include +#include #include #include #include @@ -89,12 +89,6 @@ void bsp_pretasking_hook(void) bfin_interrupt_init(); } -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ - void bsp_start( void ) { /* BSP Hardware Initialization*/ -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 13/52] arm/gdbarmsim/console/console-io.c: Fix warnings
--- c/src/lib/libbsp/arm/gdbarmsim/console/console-io.c | 8 1 file changed, 8 insertions(+) diff --git a/c/src/lib/libbsp/arm/gdbarmsim/console/console-io.c b/c/src/lib/libbsp/arm/gdbarmsim/console/console-io.c index d5ac5e8..46db250 100644 --- a/c/src/lib/libbsp/arm/gdbarmsim/console/console-io.c +++ b/c/src/lib/libbsp/arm/gdbarmsim/console/console-io.c @@ -13,6 +13,14 @@ #include /* + * Prototypes + */ +void console_initialize_hardware(void); +void console_outbyte_polled(int, char); +int console_inbyte_nonblocking(int); +void MyBSP_output_char(char); + +/* * console_initialize_hardware * * This routine initializes the console hardware. -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 33/52] powerpc/beatnik/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c b/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c index d2501b5..e4b19ad 100644 --- a/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/beatnik/startup/bspstart.c @@ -3,7 +3,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * COPYRIGHT (c) 1989-1998. * On-Line Applications Research Corporation (OAR). * @@ -36,6 +38,7 @@ /*#include */ #include/* registers.h is included here */ #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 31/52] m68k/mvme162/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c index 8ffee61..2068049 100644 --- a/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c @@ -3,7 +3,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -20,6 +22,7 @@ */ #include +#include #include /* -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 28/52] m68k/mvme136/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c index 0d78452..04d073d 100644 --- a/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c @@ -1,9 +1,8 @@ /* - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialization. + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -13,13 +12,9 @@ */ #include +#include #include -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ void bsp_start( void ) { rtems_isr_entry *monitors_vector_table; -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 26/52] m68k/mcf5235/startup/bspstart.c: Add include of to fix warning
--- c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c b/c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c index 20a5cc8..4521c6c 100644 --- a/c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mcf5235/startup/bspstart.c @@ -8,6 +8,7 @@ */ #include +#include /* * Read/write copy of common cache -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 27/52] m68k/mcf5329/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/m68k/mcf5329/startup/bspstart.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/c/src/lib/libbsp/m68k/mcf5329/startup/bspstart.c b/c/src/lib/libbsp/m68k/mcf5329/startup/bspstart.c index 7d6bb2f..d5a258d 100644 --- a/c/src/lib/libbsp/m68k/mcf5329/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mcf5329/startup/bspstart.c @@ -1,11 +1,8 @@ /* - * BSP startup - * - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialisation. + */ + +/* * Author: *David Fiddes, d...@fiddes.surfaid.org *http://www.calm.hw.ac.uk/davidf/coldfire/ @@ -19,13 +16,9 @@ */ #include +#include #include -/* - * bsp_start - * - * This routine does the bulk of the system initialisation. - */ void bsp_start(void) { /* cfinit invalidates cache and sets acr registers */ -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 29/52] m68k/mvme147/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c index 1188291..cb5f84a 100644 --- a/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme147/startup/bspstart.c @@ -1,9 +1,8 @@ /* - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialization. + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -17,12 +16,7 @@ */ #include - -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ +#include void bsp_start( void ) { @@ -44,8 +38,7 @@ void bsp_start( void ) pcc->int_base_vector = PCC_BASE_VECTOR; /* Set the PCC int vectors base */ - (*(uint8_t*)0xfffe2001) = 0x08; - /* make VME access round-robin */ + (*(uint8_t*)0xfffe2001) = 0x08; /* make VME access round-robin */ rtems_cache_enable_instruction(); rtems_cache_enable_data(); -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 32/52] m68k/uC5282/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c index 15c9277..779e25b 100644 --- a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c @@ -5,7 +5,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * Author: W. Eric Norum * * COPYRIGHT (c) 2005. @@ -17,6 +19,7 @@ */ #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 35/52] powerpc/haleakala/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c b/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c index 3dfecb6..ef015fc 100644 --- a/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c @@ -4,11 +4,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * - * INPUT: NONE - * - * OUTPUT: NONE - * + */ + +/* * Author: Thomas Doerfler * IMD Ingenieurbuero fuer Microcomputertechnik * @@ -62,6 +60,7 @@ #include #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 34/52] powerpc/ep1a/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c b/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c index 92b466c..158d0dc 100644 --- a/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/ep1a/startup/bspstart.c @@ -3,7 +3,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -15,6 +17,7 @@ #warning The interrupt disable mask is now stored in SPRG0, please verify that this is compatible to this BSP (see also bootcard.c). #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 30/52] m68k/mvme147s/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c index 6b9064f..497b644 100644 --- a/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c +++ b/c/src/lib/libbsp/m68k/mvme147s/startup/bspstart.c @@ -1,9 +1,8 @@ /* - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialization. + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -17,12 +16,8 @@ */ #include +#include -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ void bsp_start( void ) { rtems_isr_entry *monitors_vector_table; -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 37/52] powerpc/mbc8260ads/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c index 3d84156..cd0ffdf 100644 --- a/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mpc8260ads/startup/bspstart.c @@ -4,7 +4,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * The MPC860 specific stuff was written by Jay Monkman (jmonk...@frasca.com) * * Modified for the MPC8260ADS board by Andy Dachs @@ -24,7 +26,6 @@ * conditions. * The mmu is unused at this time. * - * * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -34,6 +35,7 @@ */ #include +#include /* #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 42/52] powerpc/ss555/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/ss555/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/powerpc/ss555/startup/bspstart.c b/c/src/lib/libbsp/powerpc/ss555/startup/bspstart.c index 59aaf29..ca9b1d3 100644 --- a/c/src/lib/libbsp/powerpc/ss555/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/ss555/startup/bspstart.c @@ -4,7 +4,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -25,6 +27,7 @@ #include #include +#include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 41/52] powerpc/shared/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/shared/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c index c2c6949..7fff1b9 100644 --- a/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/shared/startup/bspstart.c @@ -3,7 +3,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -18,6 +20,7 @@ #include #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 36/52] powerpc/mbx8xx/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c index bb735fd..8ba87c4 100644 --- a/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c @@ -4,7 +4,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -18,6 +20,7 @@ #include #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 45/52] arm/rtems/score/cpu.h: _ARMV7M_Start_multitasking needed RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
--- cpukit/score/cpu/arm/rtems/score/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h index a032d4a..9aef8df 100644 --- a/cpukit/score/cpu/arm/rtems/score/cpu.h +++ b/cpukit/score/cpu/arm/rtems/score/cpu.h @@ -488,7 +488,8 @@ void _CPU_Context_restore( Context_Control *new_context ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; #if defined(ARM_MULTILIB_ARCH_V7M) - void _ARMV7M_Start_multitasking( Context_Control *heir ); + void _ARMV7M_Start_multitasking( Context_Control *heir ) +RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; #define _CPU_Start_multitasking _ARMV7M_Start_multitasking #endif -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 47/52] m68k/rtems/score/cpu.h: _CPU_Context_Restart_self needed RTEMS_COMPILER_NO_RETURN_ATTRIBUTE
--- cpukit/score/cpu/m68k/rtems/score/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h index 7d164f3..c36b2f1 100644 --- a/cpukit/score/cpu/m68k/rtems/score/cpu.h +++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h @@ -680,7 +680,7 @@ void _CPU_Context_switch( void _CPU_Context_Restart_self( Context_Control *the_context -); +) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; /* * _CPU_Context_save_fp -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 44/52] sparc64/shared/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/sparc64/shared/startup/bspstart.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/c/src/lib/libbsp/sparc64/shared/startup/bspstart.c b/c/src/lib/libbsp/sparc64/shared/startup/bspstart.c index 25d4276..f6c190b 100644 --- a/c/src/lib/libbsp/sparc64/shared/startup/bspstart.c +++ b/c/src/lib/libbsp/sparc64/shared/startup/bspstart.c @@ -1,9 +1,8 @@ /* - * This routine starts the application. It includes application, - * board, and monitor specific initialization and configuration. - * The generic CPU dependent initialization has been performed - * before this routine is invoked. - * + * This routine does the bulk of the system initialization. + */ + +/* * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -12,20 +11,12 @@ * http://www.rtems.org/license/LICENSE. */ -#include - #include +#include extern void sparc64_install_isr_entries(void); -/* - * bsp_start - * - * This routine does the bulk of the system initialization. - */ - void bsp_start( void ) { -/* bootstrap(); */ - sparc64_install_isr_entries(); + sparc64_install_isr_entries(); } -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 40/52] powerpc/score603e/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c index 63569ff..e5c860f 100644 --- a/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/score603e/startup/bspstart.c @@ -4,7 +4,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before any of these are invoked. - * + */ + +/* * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * @@ -16,6 +18,7 @@ #include #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 38/52] powerpc/mvme3100/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c index 4fa9951..b38995f 100644 --- a/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mvme3100/startup/bspstart.c @@ -3,7 +3,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * COPYRIGHT (c) 1989-1998. * On-Line Applications Research Corporation (OAR). * @@ -22,6 +24,7 @@ #include #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 48/52] samples/unlimited: Fix printf() warning and clean up
--- testsuites/samples/unlimited/init.c | 23 ++- testsuites/samples/unlimited/system.h | 2 +- testsuites/samples/unlimited/test1.c | 2 +- testsuites/samples/unlimited/test2.c | 28 testsuites/samples/unlimited/test3.c | 2 +- 5 files changed, 33 insertions(+), 24 deletions(-) diff --git a/testsuites/samples/unlimited/init.c b/testsuites/samples/unlimited/init.c index 06e0c3a..0fb5505 100644 --- a/testsuites/samples/unlimited/init.c +++ b/testsuites/samples/unlimited/init.c @@ -55,20 +55,21 @@ rtems_task Init( rtems_task test_task( rtems_task_argument my_number - ) +) { rtems_event_set out; + unsigned intmy_n = (unsigned int) my_number; - printf( "task %" PRIdrtems_task_argument " has started.\n", my_number); + printf( "task %" PRIdrtems_task_argument " has started.\n", my_n); rtems_event_receive(1, RTEMS_WAIT | RTEMS_EVENT_ANY, 0, &out); - printf( "task %" PRIdrtems_task_argument " ending.\n", my_number); + printf( "task %" PRIdrtems_task_argument " ending.\n", my_n); rtems_task_delete(RTEMS_SELF); } -void destory_all_tasks( +void destroy_all_tasks( const char *who ) { @@ -78,19 +79,23 @@ void destory_all_tasks( * If the id is not zero, signal the task to delete. */ - for (task = 0; task < MAX_TASKS; task++) -if (task_id[task]) -{ - printf(" %s : signal task %08" PRIxrtems_id " to delete, ", who, task_id[task]); + for (task = 0; task < MAX_TASKS; task++) { +if (task_id[task]) { + printf( +" %s : signal task %08" PRIxrtems_id " to delete, ", + who, + task_id[task] + ); fflush(stdout); rtems_event_send(task_id[task], 1); task_id[task] = 0; } + } } bool status_code_bad( rtems_status_code status_code - ) +) { if (status_code != RTEMS_SUCCESSFUL) { diff --git a/testsuites/samples/unlimited/system.h b/testsuites/samples/unlimited/system.h index 911aa69..5da5d06 100644 --- a/testsuites/samples/unlimited/system.h +++ b/testsuites/samples/unlimited/system.h @@ -24,7 +24,7 @@ rtems_task test_task( ); void -destory_all_tasks( +destroy_all_tasks( const char *who ); diff --git a/testsuites/samples/unlimited/test1.c b/testsuites/samples/unlimited/test1.c index 9d90af0..f02857c 100644 --- a/testsuites/samples/unlimited/test1.c +++ b/testsuites/samples/unlimited/test1.c @@ -99,7 +99,7 @@ void test1() exit( 1 ); } - destory_all_tasks("TEST1"); + destroy_all_tasks("TEST1"); the_information->auto_extend = auto_extend; diff --git a/testsuites/samples/unlimited/test2.c b/testsuites/samples/unlimited/test2.c index 911451f..411a401 100644 --- a/testsuites/samples/unlimited/test2.c +++ b/testsuites/samples/unlimited/test2.c @@ -95,7 +95,7 @@ void test2() printf( " FAIL2 : not enough tasks created -\n" " task created = %" PRIi32 ", required number = %i\n", task_count, (TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET); -destory_all_tasks("TEST2"); +destroy_all_tasks("TEST2"); exit( 1 ); } @@ -112,7 +112,7 @@ void test2() printf( " FAIL2 : remove task has a 0 id -\n" " task number = %" PRIi32 "\n", remove_task); -destory_all_tasks("TEST2"); +destroy_all_tasks("TEST2"); exit( 1 ); } @@ -122,7 +122,8 @@ void test2() removed_ids[task++] = task_id[remove_task]; - printf(" TEST2 : block %" PRIi32 " remove, signal task %08" PRIxrtems_id ", ", block, task_id[remove_task]); + printf(" TEST2 : block %" PRIi32 " remove, signal task %08" + PRIxrtems_id ", ", block, task_id[remove_task]); rtems_event_send(task_id[remove_task], 1); task_id[remove_task] = 0; } @@ -144,7 +145,7 @@ void test2() if (id_slot == MAX_TASKS) { printf( " FAIL2 : no free task id slot.\n"); - destory_all_tasks("TEST2"); + destroy_all_tasks("TEST2"); exit( 1 ); } @@ -164,11 +165,12 @@ void test2() printf( " FAIL2 : re-creating a task -\n" " task number = %" PRIi32 "\n", id_slot); - destory_all_tasks("TEST2"); + destroy_all_tasks("TEST2"); exit( 1 ); } -printf("number = %3" PRIi32 ", id = %08" PRIxrtems_id ", starting, ", task_count, task_id[id_slot]); +printf("number = %3" PRIi32 ", id = %08" PRIxrtems_id ", starting, ", + task_count, task_id[id_slot]); result = rtems_task_start(task_id[id_slot], test_task, @@ -179,7 +181,7 @@ void test2() printf( " FAIL : re-starting a task -\n" "task number = %" PRIi32 "\n", id_slot); - destory_all_tasks("TEST2"); + destroy_all_tasks("TEST2"); exit( 1 ); } @@ -190,7 +192,8 @@ void test2() NEXT_TASK_NAME(c1, c2, c3, c4); /* - * Search the removed ids to see
[PATCH 39/52] powerpc/mvme5500/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c index 1db27a6..792d38f 100644 --- a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c @@ -3,7 +3,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -31,6 +33,7 @@ #include/* registers.h is included here */ #include +#include #include #include #include -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 43/52] sh/shared/startup/bspstart.c: Add include of to fix warning and clean up
--- c/src/lib/libbsp/sh/shared/startup/bspstart.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/sh/shared/startup/bspstart.c b/c/src/lib/libbsp/sh/shared/startup/bspstart.c index 72cd890..e95fd88 100644 --- a/c/src/lib/libbsp/sh/shared/startup/bspstart.c +++ b/c/src/lib/libbsp/sh/shared/startup/bspstart.c @@ -3,7 +3,9 @@ * board, and monitor specific initialization and configuration. * The generic CPU dependent initialization has been performed * before this routine is invoked. - * + */ + +/* * COPYRIGHT (c) 2001. * Ralf Corsepius (corse...@faw.uni-ulm.de). * @@ -20,6 +22,7 @@ */ #include +#include uint32_t bsp_clicks_per_second; -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 49/52] samples/base_sp: Fix printf() warning
--- testsuites/samples/base_sp/apptask.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testsuites/samples/base_sp/apptask.c b/testsuites/samples/base_sp/apptask.c index c39d64f..aa1da14 100644 --- a/testsuites/samples/base_sp/apptask.c +++ b/testsuites/samples/base_sp/apptask.c @@ -32,13 +32,14 @@ rtems_task Application_task( { rtems_id tid; rtems_status_code status; + unsigned int a = (unsigned int) argument; status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); directive_failed( status, "ident" ); printf( "Application task was invoked with argument (%" PRIdrtems_task_argument ") " -"and has id of 0x%" PRIxrtems_id "\n", argument, tid +"and has id of 0x%" PRIxrtems_id "\n", a, tid ); TEST_END(); -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 46/52] moxiertems/score/cpu.h: _CPU_Context_switch needed RTEMS_COMPILER_NO_RETURN_ATTRIBUTE plus fix warnings on unimplemented ISR enable/disable
--- cpukit/score/cpu/moxie/rtems/score/cpu.h | 31 ++- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/cpukit/score/cpu/moxie/rtems/score/cpu.h b/cpukit/score/cpu/moxie/rtems/score/cpu.h index cf22601..4b204cb 100644 --- a/cpukit/score/cpu/moxie/rtems/score/cpu.h +++ b/cpukit/score/cpu/moxie/rtems/score/cpu.h @@ -570,9 +570,12 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; * * MOXIE Specific Information: * - * XXX + * TODO: As of 7 October 2014, this method is not implemented. */ -#define _CPU_ISR_Disable( _isr_cookie ) (_isr_cookie) = 0 +#define _CPU_ISR_Disable( _isr_cookie ) \ + do { \ +(_isr_cookie) = 0; \ + } while (0) /* * Enable interrupts to the previous level (returned by _CPU_ISR_Disable). @@ -581,9 +584,12 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; * * MOXIE Specific Information: * - * XXX + * TODO: As of 7 October 2014, this method is not implemented. */ -#define _CPU_ISR_Enable( _isr_cookie ) +#define _CPU_ISR_Enable( _isr_cookie ) \ + do { \ +(_isr_cookie) = (_isr_cookie); \ + } while (0) /* * This temporarily restores the interrupt to _level before immediately @@ -593,9 +599,13 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; * * MOXIE Specific Information: * - * XXX + * TODO: As of 7 October 2014, this method is not implemented. */ -#define _CPU_ISR_Flash( _isr_cookie ) +#define _CPU_ISR_Flash( _isr_cookie ) \ + do { \ +_CPU_ISR_Enable( _isr_cookie ); \ +_CPU_ISR_Disable( _isr_cookie ); \ + } while (0) /* * Map interrupt level in task mode onto the hardware that the CPU @@ -609,7 +619,7 @@ SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; * * MOXIE Specific Information: * - * XXX + * TODO: As of 7 October 2014, this method is not implemented. */ #define _CPU_ISR_Set_level( _new_level )\ { \ @@ -645,7 +655,8 @@ uint32_t _CPU_ISR_Get_level( void ); * * MOXIE Specific Information: * - * XXX + * TODO: As of 7 October 2014, this method does not ensure that the context + * is set up with interrupts disabled/enabled as requested. */ #define CPU_CCR_INTERRUPTS_ON 0x80 #define CPU_CCR_INTERRUPTS_OFF 0x00 @@ -656,6 +667,8 @@ uint32_t _CPU_ISR_Get_level( void ); do { \ uintptr_t _stack;\ \ +(void) _is_fp; /* avoid warning for being unused */\ +(void) _isr; /* avoid warning for being unused */\ _stack = ((uintptr_t)(_stack_base)) + (_size) - 8; \ *((proc_ptr *)(_stack)) = (_entry_point); \ _stack -= 4; \ @@ -948,7 +961,7 @@ void _CPU_Context_switch( */ void _CPU_Context_restore( Context_Control *new_context -); +) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; /* * _CPU_Context_save_fp -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 52/52] libbsp/powerpc/shared/tod/todcfg.c: Fix method prototype to eliminate warning
--- c/src/lib/libbsp/powerpc/shared/tod/todcfg.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/c/src/lib/libbsp/powerpc/shared/tod/todcfg.c b/c/src/lib/libbsp/powerpc/shared/tod/todcfg.c index 49e21b8..2859ac8 100644 --- a/c/src/lib/libbsp/powerpc/shared/tod/todcfg.c +++ b/c/src/lib/libbsp/powerpc/shared/tod/todcfg.c @@ -12,8 +12,8 @@ /* Forward function declaration */ #if !defined(mvme2100) -uint32_t mvmertc_get_register( uint32_t, uint8_t ); -void mvmertc_set_register( uint32_t, uint8_t, uint32_t ); +uint32_t mvmertc_get_register( uintptr_t, uint8_t ); +void mvmertc_set_register( uintptr_t, uint8_t, uint32_t ); #endif /* The following table configures the RTC drivers used in this BSP */ @@ -49,17 +49,17 @@ rtems_device_minor_number RTC_Minor; #if !defined(mvme2100) #include void mvmertc_set_register( - uint32_t base, - uint8_t reg, - uint32_t value + uintptr_t base, + uint8_t reg, + uint32_t value ) { printk( "RTC SUPPORT NOT IMPLEMENTED ON THIS BOARD\n"); } uint32_t mvmertc_get_register( - uint32_t base, - uint8_t reg + uintptr_t base, + uint8_t reg ) { printk( "RTC SUPPORT NOT IMPLEMENTED ON THIS BOARD\n"); -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 50/52] cpukit/score/src/ts64*: Return a value from non-void function
--- cpukit/score/src/ts64equalto.c| 2 +- cpukit/score/src/ts64getnanoseconds.c | 2 +- cpukit/score/src/ts64getseconds.c | 2 +- cpukit/score/src/ts64lessthan.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpukit/score/src/ts64equalto.c b/cpukit/score/src/ts64equalto.c index 28c6fa4..fd07474 100644 --- a/cpukit/score/src/ts64equalto.c +++ b/cpukit/score/src/ts64equalto.c @@ -26,6 +26,6 @@ bool _Timestamp64_Equal_to( const Timestamp64_Control *_rhs ) { - _Timestamp64_implementation_Equal_to( _lhs, _rhs ); + return _Timestamp64_implementation_Equal_to( _lhs, _rhs ); } #endif diff --git a/cpukit/score/src/ts64getnanoseconds.c b/cpukit/score/src/ts64getnanoseconds.c index 65a0b62..a5da43b 100644 --- a/cpukit/score/src/ts64getnanoseconds.c +++ b/cpukit/score/src/ts64getnanoseconds.c @@ -25,6 +25,6 @@ uint32_t _Timestamp64_Get_nanoseconds( const Timestamp64_Control *_time ) { - _Timestamp64_implementation_Get_nanoseconds( _time ); + return _Timestamp64_implementation_Get_nanoseconds( _time ); } #endif diff --git a/cpukit/score/src/ts64getseconds.c b/cpukit/score/src/ts64getseconds.c index 0f102bc..eca0536 100644 --- a/cpukit/score/src/ts64getseconds.c +++ b/cpukit/score/src/ts64getseconds.c @@ -25,6 +25,6 @@ uint32_t _Timestamp64_Get_seconds( const Timestamp64_Control *_time ) { - _Timestamp64_implementation_Get_seconds( _time ); + return _Timestamp64_implementation_Get_seconds( _time ); } #endif diff --git a/cpukit/score/src/ts64lessthan.c b/cpukit/score/src/ts64lessthan.c index 5c518c0..d147814 100644 --- a/cpukit/score/src/ts64lessthan.c +++ b/cpukit/score/src/ts64lessthan.c @@ -26,6 +26,6 @@ bool _Timestamp64_Less_than( const Timestamp64_Control *_rhs ) { - _Timestamp64_implementation_Less_than( _lhs, _rhs ); + return _Timestamp64_implementation_Less_than( _lhs, _rhs ); } #endif -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 03/52] libbsp/v850/shared/crt1.c: Remove warnings
On Wed, Oct 8, 2014 at 3:15 PM, Joel Sherrill wrote: > --- > c/src/lib/libbsp/v850/shared/crt1.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/c/src/lib/libbsp/v850/shared/crt1.c > b/c/src/lib/libbsp/v850/shared/crt1.c > index 18c240b..02a8a7f 100644 > --- a/c/src/lib/libbsp/v850/shared/crt1.c > +++ b/c/src/lib/libbsp/v850/shared/crt1.c > @@ -1,21 +1,25 @@ > /* > * From newlib ==> libc/sys/sysnecv850/crt1.c > * > - * Obtained newlib 29 May 2012 > + * Obtained from newlib: 29 May 2012 > + * Warnings fixed: 7 October 2014 > */ Is this still from newlib? If so, should it be fixed there and re-copied over? > -void __main () > + > +void __main(void); > +typedef void (*pfunc) (void); > +extern pfunc __ctors[]; > +extern pfunc __ctors_end[]; > + > +void __main(void) > { >static int initialized; >if (! initialized) > { > - typedef void (*pfunc) (); > - extern pfunc __ctors[]; > - extern pfunc __ctors_end[]; >pfunc *p; > >initialized = 1; >for (p = __ctors_end; p > __ctors; ) > - (*--p) (); > +(*--p) (); > > } > } > -- > 1.9.3 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 04/52] gdbv850sim/console/console-io.c: Fix warnings
On Wed, Oct 8, 2014 at 3:15 PM, Joel Sherrill wrote: > --- > c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c > b/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c > index c178197..a66c800 100644 > --- a/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c > +++ b/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c > @@ -12,6 +12,14 @@ > #include > > /* > + * Prototypes > + */ > +void console_initialize_hardware(void); > +void console_outbyte_polled(int port, char ch); > +int console_inbyte_nonblocking(int port); > +void console_output_char(char c); > + These prototype additions should go to a header file, or the functions should be made static. > +/* > * console_initialize_hardware > * > * This routine initializes the console hardware. > @@ -38,7 +46,6 @@ void console_outbyte_polled( > * > * This routine polls for a character. > */ > - > int console_inbyte_nonblocking( >int port > ) > -- > 1.9.3 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 03/52] libbsp/v850/shared/crt1.c: Remove warnings
On 10/8/2014 3:06 PM, Gedare Bloom wrote: > On Wed, Oct 8, 2014 at 3:15 PM, Joel Sherrill > wrote: >> --- >> c/src/lib/libbsp/v850/shared/crt1.c | 16 ++-- >> 1 file changed, 10 insertions(+), 6 deletions(-) >> >> diff --git a/c/src/lib/libbsp/v850/shared/crt1.c >> b/c/src/lib/libbsp/v850/shared/crt1.c >> index 18c240b..02a8a7f 100644 >> --- a/c/src/lib/libbsp/v850/shared/crt1.c >> +++ b/c/src/lib/libbsp/v850/shared/crt1.c >> @@ -1,21 +1,25 @@ >> /* >> * From newlib ==> libc/sys/sysnecv850/crt1.c >> * >> - * Obtained newlib 29 May 2012 >> + * Obtained from newlib: 29 May 2012 >> + * Warnings fixed: 7 October 2014 >> */ > Is this still from newlib? If so, should it be fixed there and re-copied > over? It originated there. That directory is not part of the v850-rtems build because we only get the sys/rtems directory. The other sys/ directories often contain necessary bits in the wrong place for historical reasons. The warnings are just because we compile with pickier warnings. I suppose we could feed this back upstream but we would still have a copy. :) >> -void __main () >> + >> +void __main(void); >> +typedef void (*pfunc) (void); >> +extern pfunc __ctors[]; >> +extern pfunc __ctors_end[]; >> + >> +void __main(void) >> { >>static int initialized; >>if (! initialized) >> { >> - typedef void (*pfunc) (); >> - extern pfunc __ctors[]; >> - extern pfunc __ctors_end[]; >>pfunc *p; >> >>initialized = 1; >>for (p = __ctors_end; p > __ctors; ) >> - (*--p) (); >> +(*--p) (); >> >> } >> } >> -- >> 1.9.3 >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 18/52] arm/shared/abort/abort.c: Fix warnings and clean up
On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill wrote: > --- > c/src/lib/libbsp/arm/shared/abort/abort.c | 44 > +++ > 1 file changed, 27 insertions(+), 17 deletions(-) > > diff --git a/c/src/lib/libbsp/arm/shared/abort/abort.c > b/c/src/lib/libbsp/arm/shared/abort/abort.c > index a686a62..05432f8 100644 > --- a/c/src/lib/libbsp/arm/shared/abort/abort.c > +++ b/c/src/lib/libbsp/arm/shared/abort/abort.c > @@ -1,6 +1,10 @@ > /* > * ARM CPU Dependent Source > * > + * If you want a small footprint RTEMS, pls use simple_abort.c > + */ > + > +/* > * COPYRIGHT (c) 2007 Ray Xu. > * mailto: Rayx at gmail dot com > * > @@ -10,8 +14,6 @@ > * Copyright (c) 2002 Advent Networks, Inc > * Jay Monkman > * > - * If you want a small footprint RTEMS, pls use simple_abort.c > - * > * 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. > @@ -44,21 +46,26 @@ > #define SET_REG(r, ctx, v) (((uint32_t *)ctx)[r] = v) > #define GET_OFFSET(insn) (insn & 0xfff) > > -uint32_t g_data_abort_cnt = 0; > +/* > + * Prototypes > + */ > +void _print_full_context(uint32_t); > +void do_data_abort(uint32_t, uint32_t, Context_Control *); > + > +uint32_t g_data_abort_cnt = 0; > /*this is a big overhead for MCU only got 16K RAM*/ > -uint32_t g_data_abort_insn_list[1024]; > +uint32_t g_data_abort_insn_list[1024]; > > > char *_print_full_context_mode2txt[0x20]={ > - [0x0]="user", /* User */ > - [0x1]="fiq", /* FIQ - Fast Interrupt Request */ > - [0x2]="irq", /* IRQ - Interrupt Request */ > - [0x3]="super", /* Supervisor */ > - [0x7]="abort", /* Abort */ > - [0xb]="undef", /* Undefined */ > - [0xf]="system" /* System */ > -}; > - > + [0x0]="user", /* User */ > + [0x1]="fiq", /* FIQ - Fast Interrupt Request */ > + [0x2]="irq", /* IRQ - Interrupt Request */ > + [0x3]="super", /* Supervisor */ > + [0x7]="abort", /* Abort */ > + [0xb]="undef", /* Undefined */ > + [0xf]="system" /* System */ > +}; > > void _print_full_context(uint32_t spsr) > { > @@ -82,7 +89,7 @@ void _print_full_context(uint32_t spsr) >: [arm_switch_reg] "=&r" (arm_switch_reg), [prev_sp] "=&r" > (prev_sp), [prev_lr] "=&r" (prev_lr), > [cpsr] "=&r" (cpsr) >: [spsr] "r" (spsr) > - : "cc"); > + : "cc"); > > printk("Previous sp=0x%08x lr=0x%08x and actual cpsr=%08x\n", > prev_sp, prev_lr, cpsr); > @@ -102,8 +109,11 @@ void _print_full_context(uint32_t spsr) > * All unhandled instructions cause the system to hang. > */ > > -void do_data_abort(uint32_t insn, uint32_t spsr, > -Context_Control *ctx) > +void do_data_abort( > + uint32_t insn, > + uint32_t spsr, > + Context_Control *ctx > +) > { > /* Clarify, which type is correct, CPU_Exception_frame or > Context_Control */ > uint8_t decode; > @@ -156,6 +166,6 @@ void do_data_abort(uint32_t insn, uint32_t spsr, > while(1) { > continue; > } > -return; > +(void) level; /* avoid set but unused warning */ I'd prefer to see this closer to where level was set. -Gedare > } > > -- > 1.9.3 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 32/52] m68k/uC5282/startup/bspstart.c: Add include of to fix warning and clean up
On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill wrote: > --- > c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c > b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c > index 15c9277..779e25b 100644 > --- a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c > +++ b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c > @@ -5,7 +5,9 @@ > * board, and monitor specific initialization and configuration. > * The generic CPU dependent initialization has been performed > * before this routine is invoked. > - * > + */ Why not change the comment in this file too like the others? > + > +/* > * Author: W. Eric Norum > * > * COPYRIGHT (c) 2005. > @@ -17,6 +19,7 @@ > */ > > #include > +#include > #include > #include > #include > -- > 1.9.3 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 04/52] gdbv850sim/console/console-io.c: Fix warnings
On 10/8/2014 3:10 PM, Gedare Bloom wrote: > On Wed, Oct 8, 2014 at 3:15 PM, Joel Sherrill > wrote: >> --- >> c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c | 9 - >> 1 file changed, 8 insertions(+), 1 deletion(-) >> >> diff --git a/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c >> b/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c >> index c178197..a66c800 100644 >> --- a/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c >> +++ b/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c >> @@ -12,6 +12,14 @@ >> #include >> >> /* >> + * Prototypes >> + */ >> +void console_initialize_hardware(void); >> +void console_outbyte_polled(int port, char ch); >> +int console_inbyte_nonblocking(int port); >> +void console_output_char(char c); >> + > These prototype additions should go to a header file, or the functions > should be made static. The first three are the assumed interface for the single port polled console driver framework. They can't be static. c/src/lib/libbsp/shared/console-polled.c Any suggestions for a new header file to add them to? I suppose we could add console-polled.h for private use? FWIW Adding this will impact 14 BSPs and likely fix 3*14 warnings. But only one other patch (0013-gdbamsim). The fourth should be able to be static. I should have caught that. >> +/* >> * console_initialize_hardware >> * >> * This routine initializes the console hardware. >> @@ -38,7 +46,6 @@ void console_outbyte_polled( >> * >> * This routine polls for a character. >> */ >> - >> int console_inbyte_nonblocking( >>int port >> ) >> -- >> 1.9.3 >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 48/52] samples/unlimited: Fix printf() warning and clean up
On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill wrote: > --- > testsuites/samples/unlimited/init.c | 23 ++- > testsuites/samples/unlimited/system.h | 2 +- > testsuites/samples/unlimited/test1.c | 2 +- > testsuites/samples/unlimited/test2.c | 28 > testsuites/samples/unlimited/test3.c | 2 +- > 5 files changed, 33 insertions(+), 24 deletions(-) > > diff --git a/testsuites/samples/unlimited/init.c > b/testsuites/samples/unlimited/init.c > index 06e0c3a..0fb5505 100644 > --- a/testsuites/samples/unlimited/init.c > +++ b/testsuites/samples/unlimited/init.c > @@ -55,20 +55,21 @@ rtems_task Init( > > rtems_task test_task( >rtems_task_argument my_number > - ) > +) > { >rtems_event_set out; > + unsigned intmy_n = (unsigned int) my_number; > > - printf( "task %" PRIdrtems_task_argument " has started.\n", my_number); > + printf( "task %" PRIdrtems_task_argument " has started.\n", my_n); > Should this just be %u now, since you converted the my_number? ditto below. >rtems_event_receive(1, RTEMS_WAIT | RTEMS_EVENT_ANY, 0, &out); > > - printf( "task %" PRIdrtems_task_argument " ending.\n", my_number); > + printf( "task %" PRIdrtems_task_argument " ending.\n", my_n); > >rtems_task_delete(RTEMS_SELF); > } > > -void destory_all_tasks( > +void destroy_all_tasks( >const char *who > ) > { > @@ -78,19 +79,23 @@ void destory_all_tasks( > * If the id is not zero, signal the task to delete. > */ > > - for (task = 0; task < MAX_TASKS; task++) > -if (task_id[task]) > -{ > - printf(" %s : signal task %08" PRIxrtems_id " to delete, ", who, > task_id[task]); > + for (task = 0; task < MAX_TASKS; task++) { > +if (task_id[task]) { > + printf( > +" %s : signal task %08" PRIxrtems_id " to delete, ", > + who, > + task_id[task] > + ); >fflush(stdout); >rtems_event_send(task_id[task], 1); >task_id[task] = 0; > } > + } > } > > bool status_code_bad( >rtems_status_code status_code > - ) > +) > { >if (status_code != RTEMS_SUCCESSFUL) >{ > diff --git a/testsuites/samples/unlimited/system.h > b/testsuites/samples/unlimited/system.h > index 911aa69..5da5d06 100644 > --- a/testsuites/samples/unlimited/system.h > +++ b/testsuites/samples/unlimited/system.h > @@ -24,7 +24,7 @@ rtems_task test_task( > ); > > void > -destory_all_tasks( > +destroy_all_tasks( >const char *who > ); > > diff --git a/testsuites/samples/unlimited/test1.c > b/testsuites/samples/unlimited/test1.c > index 9d90af0..f02857c 100644 > --- a/testsuites/samples/unlimited/test1.c > +++ b/testsuites/samples/unlimited/test1.c > @@ -99,7 +99,7 @@ void test1() > exit( 1 ); >} > > - destory_all_tasks("TEST1"); > + destroy_all_tasks("TEST1"); > >the_information->auto_extend = auto_extend; > > diff --git a/testsuites/samples/unlimited/test2.c > b/testsuites/samples/unlimited/test2.c > index 911451f..411a401 100644 > --- a/testsuites/samples/unlimited/test2.c > +++ b/testsuites/samples/unlimited/test2.c > @@ -95,7 +95,7 @@ void test2() > printf( " FAIL2 : not enough tasks created -\n" > " task created = %" PRIi32 ", required number = %i\n", > task_count, (TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET); > -destory_all_tasks("TEST2"); > +destroy_all_tasks("TEST2"); > exit( 1 ); >} > > @@ -112,7 +112,7 @@ void test2() > printf( " FAIL2 : remove task has a 0 id -\n" > " task number = %" PRIi32 "\n", > remove_task); > -destory_all_tasks("TEST2"); > +destroy_all_tasks("TEST2"); > exit( 1 ); >} > > @@ -122,7 +122,8 @@ void test2() > >removed_ids[task++] = task_id[remove_task]; > > - printf(" TEST2 : block %" PRIi32 " remove, signal task %08" > PRIxrtems_id ", ", block, task_id[remove_task]); > + printf(" TEST2 : block %" PRIi32 " remove, signal task %08" > + PRIxrtems_id ", ", block, task_id[remove_task]); >rtems_event_send(task_id[remove_task], 1); >task_id[remove_task] = 0; > } > @@ -144,7 +145,7 @@ void test2() > if (id_slot == MAX_TASKS) > { >printf( " FAIL2 : no free task id slot.\n"); > - destory_all_tasks("TEST2"); > + destroy_all_tasks("TEST2"); >exit( 1 ); > } > > @@ -164,11 +165,12 @@ void test2() >printf( " FAIL2 : re-creating a task -\n" >" task number = %" PRIi32 "\n", >id_slot); > - destory_all_tasks("TEST2"); > + destroy_all_tasks("TEST2"); >exit( 1 ); > } > > -printf("number = %3" PRIi32 ", id = %08" PRIxrtems_id ", starting, ", > task_count, task_id[id_slot]); > +printf("number = %3" PRIi32 ", id = %08" PRIxrtems_id ", starting, ", > + task_count, task_id[id_slot]); > > result = rtems_task_start(task_id[id_slot], >
Re: [PATCH 50/52] cpukit/score/src/ts64*: Return a value from non-void function
How did this stuff ever work, is it tested anywhere? -Gedare On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill wrote: > --- > cpukit/score/src/ts64equalto.c| 2 +- > cpukit/score/src/ts64getnanoseconds.c | 2 +- > cpukit/score/src/ts64getseconds.c | 2 +- > cpukit/score/src/ts64lessthan.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/cpukit/score/src/ts64equalto.c b/cpukit/score/src/ts64equalto.c > index 28c6fa4..fd07474 100644 > --- a/cpukit/score/src/ts64equalto.c > +++ b/cpukit/score/src/ts64equalto.c > @@ -26,6 +26,6 @@ bool _Timestamp64_Equal_to( >const Timestamp64_Control *_rhs > ) > { > - _Timestamp64_implementation_Equal_to( _lhs, _rhs ); > + return _Timestamp64_implementation_Equal_to( _lhs, _rhs ); > } > #endif > diff --git a/cpukit/score/src/ts64getnanoseconds.c > b/cpukit/score/src/ts64getnanoseconds.c > index 65a0b62..a5da43b 100644 > --- a/cpukit/score/src/ts64getnanoseconds.c > +++ b/cpukit/score/src/ts64getnanoseconds.c > @@ -25,6 +25,6 @@ uint32_t _Timestamp64_Get_nanoseconds( >const Timestamp64_Control *_time > ) > { > - _Timestamp64_implementation_Get_nanoseconds( _time ); > + return _Timestamp64_implementation_Get_nanoseconds( _time ); > } > #endif > diff --git a/cpukit/score/src/ts64getseconds.c > b/cpukit/score/src/ts64getseconds.c > index 0f102bc..eca0536 100644 > --- a/cpukit/score/src/ts64getseconds.c > +++ b/cpukit/score/src/ts64getseconds.c > @@ -25,6 +25,6 @@ uint32_t _Timestamp64_Get_seconds( >const Timestamp64_Control *_time > ) > { > - _Timestamp64_implementation_Get_seconds( _time ); > + return _Timestamp64_implementation_Get_seconds( _time ); > } > #endif > diff --git a/cpukit/score/src/ts64lessthan.c b/cpukit/score/src/ts64lessthan.c > index 5c518c0..d147814 100644 > --- a/cpukit/score/src/ts64lessthan.c > +++ b/cpukit/score/src/ts64lessthan.c > @@ -26,6 +26,6 @@ bool _Timestamp64_Less_than( >const Timestamp64_Control *_rhs > ) > { > - _Timestamp64_implementation_Less_than( _lhs, _rhs ); > + return _Timestamp64_implementation_Less_than( _lhs, _rhs ); > } > #endif > -- > 1.9.3 > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 18/52] arm/shared/abort/abort.c: Fix warnings and clean up
On 10/8/2014 3:14 PM, Gedare Bloom wrote: > On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill > wrote: >> --- >> c/src/lib/libbsp/arm/shared/abort/abort.c | 44 >> +++ >> 1 file changed, 27 insertions(+), 17 deletions(-) >> >> diff --git a/c/src/lib/libbsp/arm/shared/abort/abort.c >> b/c/src/lib/libbsp/arm/shared/abort/abort.c >> index a686a62..05432f8 100644 >> --- a/c/src/lib/libbsp/arm/shared/abort/abort.c >> +++ b/c/src/lib/libbsp/arm/shared/abort/abort.c >> @@ -1,6 +1,10 @@ >> /* >> * ARM CPU Dependent Source >> * >> + * If you want a small footprint RTEMS, pls use simple_abort.c >> + */ >> + >> +/* >> * COPYRIGHT (c) 2007 Ray Xu. >> * mailto: Rayx at gmail dot com >> * >> @@ -10,8 +14,6 @@ >> * Copyright (c) 2002 Advent Networks, Inc >> * Jay Monkman >> * >> - * If you want a small footprint RTEMS, pls use simple_abort.c >> - * >> * 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. >> @@ -44,21 +46,26 @@ >> #define SET_REG(r, ctx, v) (((uint32_t *)ctx)[r] = v) >> #define GET_OFFSET(insn) (insn & 0xfff) >> >> -uint32_t g_data_abort_cnt = 0; >> +/* >> + * Prototypes >> + */ >> +void _print_full_context(uint32_t); >> +void do_data_abort(uint32_t, uint32_t, Context_Control *); >> + >> +uint32_t g_data_abort_cnt = 0; >> /*this is a big overhead for MCU only got 16K RAM*/ >> -uint32_t g_data_abort_insn_list[1024]; >> +uint32_t g_data_abort_insn_list[1024]; >> >> >> char *_print_full_context_mode2txt[0x20]={ >> - [0x0]="user", /* User */ >> - [0x1]="fiq", /* FIQ - Fast Interrupt Request */ >> - [0x2]="irq", /* IRQ - Interrupt Request */ >> - [0x3]="super", /* Supervisor */ >> - [0x7]="abort", /* Abort */ >> - [0xb]="undef", /* Undefined */ >> - [0xf]="system" /* System */ >> -}; >> - >> + [0x0]="user", /* User */ >> + [0x1]="fiq", /* FIQ - Fast Interrupt Request */ >> + [0x2]="irq", /* IRQ - Interrupt Request */ >> + [0x3]="super", /* Supervisor */ >> + [0x7]="abort", /* Abort */ >> + [0xb]="undef", /* Undefined */ >> + [0xf]="system" /* System */ >> +}; >> >> void _print_full_context(uint32_t spsr) >> { >> @@ -82,7 +89,7 @@ void _print_full_context(uint32_t spsr) >>: [arm_switch_reg] "=&r" (arm_switch_reg), [prev_sp] "=&r" >> (prev_sp), [prev_lr] "=&r" (prev_lr), >> [cpsr] "=&r" (cpsr) >>: [spsr] "r" (spsr) >> - : "cc"); >> + : "cc"); >> >> printk("Previous sp=0x%08x lr=0x%08x and actual cpsr=%08x\n", >> prev_sp, prev_lr, cpsr); >> @@ -102,8 +109,11 @@ void _print_full_context(uint32_t spsr) >> * All unhandled instructions cause the system to hang. >> */ >> >> -void do_data_abort(uint32_t insn, uint32_t spsr, >> -Context_Control *ctx) >> +void do_data_abort( >> + uint32_t insn, >> + uint32_t spsr, >> + Context_Control *ctx >> +) >> { >> /* Clarify, which type is correct, CPU_Exception_frame or >> Context_Control */ >> uint8_t decode; >> @@ -156,6 +166,6 @@ void do_data_abort(uint32_t insn, uint32_t spsr, >> while(1) { >> continue; >> } >> -return; >> +(void) level; /* avoid set but unused warning */ > I'd prefer to see this closer to where level was set. Is immediately after the rtems_interrupt_disable() ok? > -Gedare >> } >> >> -- >> 1.9.3 >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 32/52] m68k/uC5282/startup/bspstart.c: Add include of to fix warning and clean up
On 10/8/2014 3:16 PM, Gedare Bloom wrote: > On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill > wrote: >> --- >> c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c >> b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c >> index 15c9277..779e25b 100644 >> --- a/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c >> +++ b/c/src/lib/libbsp/m68k/uC5282/startup/bspstart.c >> @@ -5,7 +5,9 @@ >> * board, and monitor specific initialization and configuration. >> * The generic CPU dependent initialization has been performed >> * before this routine is invoked. >> - * >> + */ > Why not change the comment in this file too like the others? I didn't spot the stupid comment until about half way through. :) Fixed. >> + >> +/* >> * Author: W. Eric Norum >> * >> * COPYRIGHT (c) 2005. >> @@ -17,6 +19,7 @@ >> */ >> >> #include >> +#include >> #include >> #include >> #include >> -- >> 1.9.3 >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 35/52] powerpc/haleakala/startup/bspstart.c: Add include of to fix warning and clean up
Fixed. Keep smacking me. On 10/8/2014 3:17 PM, Gedare Bloom wrote: > On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill > wrote: >> --- >> c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c | 9 - >> 1 file changed, 4 insertions(+), 5 deletions(-) >> >> diff --git a/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c >> b/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c >> index 3dfecb6..ef015fc 100644 >> --- a/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c >> +++ b/c/src/lib/libbsp/powerpc/haleakala/startup/bspstart.c >> @@ -4,11 +4,9 @@ >> * board, and monitor specific initialization and configuration. >> * The generic CPU dependent initialization has been performed >> * before this routine is invoked. >> - * >> - * INPUT: NONE >> - * >> - * OUTPUT: NONE >> - * >> + */ > And the same thing for the patches up til here, why not simplify the > comment too? > >> + >> +/* >> * Author: Thomas Doerfler >> * IMD Ingenieurbuero fuer Microcomputertechnik >> * >> @@ -62,6 +60,7 @@ >> #include >> >> #include >> +#include >> #include >> #include >> #include >> -- >> 1.9.3 >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 18/52] arm/shared/abort/abort.c: Fix warnings and clean up
On Wed, Oct 8, 2014 at 4:22 PM, Joel Sherrill wrote: > > On 10/8/2014 3:14 PM, Gedare Bloom wrote: >> On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill >> wrote: >>> --- >>> c/src/lib/libbsp/arm/shared/abort/abort.c | 44 >>> +++ >>> 1 file changed, 27 insertions(+), 17 deletions(-) >>> >>> diff --git a/c/src/lib/libbsp/arm/shared/abort/abort.c >>> b/c/src/lib/libbsp/arm/shared/abort/abort.c >>> index a686a62..05432f8 100644 >>> --- a/c/src/lib/libbsp/arm/shared/abort/abort.c >>> +++ b/c/src/lib/libbsp/arm/shared/abort/abort.c >>> @@ -1,6 +1,10 @@ >>> /* >>> * ARM CPU Dependent Source >>> * >>> + * If you want a small footprint RTEMS, pls use simple_abort.c >>> + */ >>> + >>> +/* >>> * COPYRIGHT (c) 2007 Ray Xu. >>> * mailto: Rayx at gmail dot com >>> * >>> @@ -10,8 +14,6 @@ >>> * Copyright (c) 2002 Advent Networks, Inc >>> * Jay Monkman >>> * >>> - * If you want a small footprint RTEMS, pls use simple_abort.c >>> - * >>> * 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. >>> @@ -44,21 +46,26 @@ >>> #define SET_REG(r, ctx, v) (((uint32_t *)ctx)[r] = v) >>> #define GET_OFFSET(insn) (insn & 0xfff) >>> >>> -uint32_t g_data_abort_cnt = 0; >>> +/* >>> + * Prototypes >>> + */ >>> +void _print_full_context(uint32_t); >>> +void do_data_abort(uint32_t, uint32_t, Context_Control *); >>> + >>> +uint32_t g_data_abort_cnt = 0; >>> /*this is a big overhead for MCU only got 16K RAM*/ >>> -uint32_t g_data_abort_insn_list[1024]; >>> +uint32_t g_data_abort_insn_list[1024]; >>> >>> >>> char *_print_full_context_mode2txt[0x20]={ >>> - [0x0]="user", /* User */ >>> - [0x1]="fiq", /* FIQ - Fast Interrupt Request */ >>> - [0x2]="irq", /* IRQ - Interrupt Request */ >>> - [0x3]="super", /* Supervisor */ >>> - [0x7]="abort", /* Abort */ >>> - [0xb]="undef", /* Undefined */ >>> - [0xf]="system" /* System */ >>> -}; >>> - >>> + [0x0]="user", /* User */ >>> + [0x1]="fiq", /* FIQ - Fast Interrupt Request */ >>> + [0x2]="irq", /* IRQ - Interrupt Request */ >>> + [0x3]="super", /* Supervisor */ >>> + [0x7]="abort", /* Abort */ >>> + [0xb]="undef", /* Undefined */ >>> + [0xf]="system" /* System */ >>> +}; >>> >>> void _print_full_context(uint32_t spsr) >>> { >>> @@ -82,7 +89,7 @@ void _print_full_context(uint32_t spsr) >>>: [arm_switch_reg] "=&r" (arm_switch_reg), [prev_sp] "=&r" >>> (prev_sp), [prev_lr] "=&r" (prev_lr), >>> [cpsr] "=&r" (cpsr) >>>: [spsr] "r" (spsr) >>> - : "cc"); >>> + : "cc"); >>> >>> printk("Previous sp=0x%08x lr=0x%08x and actual cpsr=%08x\n", >>> prev_sp, prev_lr, cpsr); >>> @@ -102,8 +109,11 @@ void _print_full_context(uint32_t spsr) >>> * All unhandled instructions cause the system to hang. >>> */ >>> >>> -void do_data_abort(uint32_t insn, uint32_t spsr, >>> -Context_Control *ctx) >>> +void do_data_abort( >>> + uint32_t insn, >>> + uint32_t spsr, >>> + Context_Control *ctx >>> +) >>> { >>> /* Clarify, which type is correct, CPU_Exception_frame or >>> Context_Control */ >>> uint8_t decode; >>> @@ -156,6 +166,6 @@ void do_data_abort(uint32_t insn, uint32_t spsr, >>> while(1) { >>> continue; >>> } >>> -return; >>> +(void) level; /* avoid set but unused warning */ >> I'd prefer to see this closer to where level was set. > Is immediately after the rtems_interrupt_disable() ok? Sure. >> -Gedare >>> } >>> >>> -- >>> 1.9.3 >>> >>> ___ >>> devel mailing list >>> devel@rtems.org >>> http://lists.rtems.org/mailman/listinfo/devel > > -- > Joel Sherrill, Ph.D. Director of Research & Development > joel.sherr...@oarcorp.comOn-Line Applications Research > Ask me about RTEMS: a free RTOS Huntsville AL 35805 > Support Available(256) 722-9985 > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 48/52] samples/unlimited: Fix printf() warning and clean up
On 10/8/2014 3:20 PM, Gedare Bloom wrote: > On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill > wrote: >> --- >> testsuites/samples/unlimited/init.c | 23 ++- >> testsuites/samples/unlimited/system.h | 2 +- >> testsuites/samples/unlimited/test1.c | 2 +- >> testsuites/samples/unlimited/test2.c | 28 >> testsuites/samples/unlimited/test3.c | 2 +- >> 5 files changed, 33 insertions(+), 24 deletions(-) >> >> diff --git a/testsuites/samples/unlimited/init.c >> b/testsuites/samples/unlimited/init.c >> index 06e0c3a..0fb5505 100644 >> --- a/testsuites/samples/unlimited/init.c >> +++ b/testsuites/samples/unlimited/init.c >> @@ -55,20 +55,21 @@ rtems_task Init( >> >> rtems_task test_task( >>rtems_task_argument my_number >> - ) >> +) >> { >>rtems_event_set out; >> + unsigned intmy_n = (unsigned int) my_number; >> >> - printf( "task %" PRIdrtems_task_argument " has started.\n", my_number); >> + printf( "task %" PRIdrtems_task_argument " has started.\n", my_n); >> > Should this just be %u now, since you converted the my_number? ditto below. Yeah. That's a good catch. Done. >>rtems_event_receive(1, RTEMS_WAIT | RTEMS_EVENT_ANY, 0, &out); >> >> - printf( "task %" PRIdrtems_task_argument " ending.\n", my_number); >> + printf( "task %" PRIdrtems_task_argument " ending.\n", my_n); >> >>rtems_task_delete(RTEMS_SELF); >> } >> >> -void destory_all_tasks( >> +void destroy_all_tasks( >>const char *who >> ) >> { >> @@ -78,19 +79,23 @@ void destory_all_tasks( >> * If the id is not zero, signal the task to delete. >> */ >> >> - for (task = 0; task < MAX_TASKS; task++) >> -if (task_id[task]) >> -{ >> - printf(" %s : signal task %08" PRIxrtems_id " to delete, ", who, >> task_id[task]); >> + for (task = 0; task < MAX_TASKS; task++) { >> +if (task_id[task]) { >> + printf( >> +" %s : signal task %08" PRIxrtems_id " to delete, ", >> + who, >> + task_id[task] >> + ); >>fflush(stdout); >>rtems_event_send(task_id[task], 1); >>task_id[task] = 0; >> } >> + } >> } >> >> bool status_code_bad( >>rtems_status_code status_code >> - ) >> +) >> { >>if (status_code != RTEMS_SUCCESSFUL) >>{ >> diff --git a/testsuites/samples/unlimited/system.h >> b/testsuites/samples/unlimited/system.h >> index 911aa69..5da5d06 100644 >> --- a/testsuites/samples/unlimited/system.h >> +++ b/testsuites/samples/unlimited/system.h >> @@ -24,7 +24,7 @@ rtems_task test_task( >> ); >> >> void >> -destory_all_tasks( >> +destroy_all_tasks( >>const char *who >> ); >> >> diff --git a/testsuites/samples/unlimited/test1.c >> b/testsuites/samples/unlimited/test1.c >> index 9d90af0..f02857c 100644 >> --- a/testsuites/samples/unlimited/test1.c >> +++ b/testsuites/samples/unlimited/test1.c >> @@ -99,7 +99,7 @@ void test1() >> exit( 1 ); >>} >> >> - destory_all_tasks("TEST1"); >> + destroy_all_tasks("TEST1"); >> >>the_information->auto_extend = auto_extend; >> >> diff --git a/testsuites/samples/unlimited/test2.c >> b/testsuites/samples/unlimited/test2.c >> index 911451f..411a401 100644 >> --- a/testsuites/samples/unlimited/test2.c >> +++ b/testsuites/samples/unlimited/test2.c >> @@ -95,7 +95,7 @@ void test2() >> printf( " FAIL2 : not enough tasks created -\n" >> " task created = %" PRIi32 ", required number = %i\n", >> task_count, (TASK_ALLOCATION_SIZE * 5) - TASK_INDEX_OFFSET); >> -destory_all_tasks("TEST2"); >> +destroy_all_tasks("TEST2"); >> exit( 1 ); >>} >> >> @@ -112,7 +112,7 @@ void test2() >> printf( " FAIL2 : remove task has a 0 id -\n" >> " task number = %" PRIi32 "\n", >> remove_task); >> -destory_all_tasks("TEST2"); >> +destroy_all_tasks("TEST2"); >> exit( 1 ); >>} >> >> @@ -122,7 +122,8 @@ void test2() >> >>removed_ids[task++] = task_id[remove_task]; >> >> - printf(" TEST2 : block %" PRIi32 " remove, signal task %08" >> PRIxrtems_id ", ", block, task_id[remove_task]); >> + printf(" TEST2 : block %" PRIi32 " remove, signal task %08" >> + PRIxrtems_id ", ", block, task_id[remove_task]); >>rtems_event_send(task_id[remove_task], 1); >>task_id[remove_task] = 0; >> } >> @@ -144,7 +145,7 @@ void test2() >> if (id_slot == MAX_TASKS) >> { >>printf( " FAIL2 : no free task id slot.\n"); >> - destory_all_tasks("TEST2"); >> + destroy_all_tasks("TEST2"); >>exit( 1 ); >> } >> >> @@ -164,11 +165,12 @@ void test2() >>printf( " FAIL2 : re-creating a task -\n" >>" task number = %" PRIi32 "\n", >>id_slot); >> - destory_all_tasks("TEST2"); >> + destroy_all_tasks("TEST2"); >>exit( 1 ); >> } >> >> -printf("number = %3" PRIi32 ", id = %08" PRIxrtems_id ", startin
Re: [PATCH 49/52] samples/base_sp: Fix printf() warning
Done. On 10/8/2014 3:20 PM, Gedare Bloom wrote: > On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill > wrote: >> --- >> testsuites/samples/base_sp/apptask.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/testsuites/samples/base_sp/apptask.c >> b/testsuites/samples/base_sp/apptask.c >> index c39d64f..aa1da14 100644 >> --- a/testsuites/samples/base_sp/apptask.c >> +++ b/testsuites/samples/base_sp/apptask.c >> @@ -32,13 +32,14 @@ rtems_task Application_task( >> { >>rtems_id tid; >>rtems_status_code status; >> + unsigned int a = (unsigned int) argument; >> >>status = rtems_task_ident( RTEMS_SELF, RTEMS_SEARCH_ALL_NODES, &tid ); >>directive_failed( status, "ident" ); >> >>printf( >> "Application task was invoked with argument (%" PRIdrtems_task_argument >> ") " > %u ? > >> -"and has id of 0x%" PRIxrtems_id "\n", argument, tid >> +"and has id of 0x%" PRIxrtems_id "\n", a, tid >>); >> >>TEST_END(); >> -- >> 1.9.3 >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 50/52] cpukit/score/src/ts64*: Return a value from non-void function
Adding Hesham On 10/8/2014 3:22 PM, Gedare Bloom wrote: > How did this stuff ever work, is it tested anywhere? This only showed up on the or1k build. I can only hope this explained some of his failures. Or.. the return value was just laying around in a register. :) > -Gedare > > On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill > wrote: >> --- >> cpukit/score/src/ts64equalto.c| 2 +- >> cpukit/score/src/ts64getnanoseconds.c | 2 +- >> cpukit/score/src/ts64getseconds.c | 2 +- >> cpukit/score/src/ts64lessthan.c | 2 +- >> 4 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/cpukit/score/src/ts64equalto.c b/cpukit/score/src/ts64equalto.c >> index 28c6fa4..fd07474 100644 >> --- a/cpukit/score/src/ts64equalto.c >> +++ b/cpukit/score/src/ts64equalto.c >> @@ -26,6 +26,6 @@ bool _Timestamp64_Equal_to( >>const Timestamp64_Control *_rhs >> ) >> { >> - _Timestamp64_implementation_Equal_to( _lhs, _rhs ); >> + return _Timestamp64_implementation_Equal_to( _lhs, _rhs ); >> } >> #endif >> diff --git a/cpukit/score/src/ts64getnanoseconds.c >> b/cpukit/score/src/ts64getnanoseconds.c >> index 65a0b62..a5da43b 100644 >> --- a/cpukit/score/src/ts64getnanoseconds.c >> +++ b/cpukit/score/src/ts64getnanoseconds.c >> @@ -25,6 +25,6 @@ uint32_t _Timestamp64_Get_nanoseconds( >>const Timestamp64_Control *_time >> ) >> { >> - _Timestamp64_implementation_Get_nanoseconds( _time ); >> + return _Timestamp64_implementation_Get_nanoseconds( _time ); >> } >> #endif >> diff --git a/cpukit/score/src/ts64getseconds.c >> b/cpukit/score/src/ts64getseconds.c >> index 0f102bc..eca0536 100644 >> --- a/cpukit/score/src/ts64getseconds.c >> +++ b/cpukit/score/src/ts64getseconds.c >> @@ -25,6 +25,6 @@ uint32_t _Timestamp64_Get_seconds( >>const Timestamp64_Control *_time >> ) >> { >> - _Timestamp64_implementation_Get_seconds( _time ); >> + return _Timestamp64_implementation_Get_seconds( _time ); >> } >> #endif >> diff --git a/cpukit/score/src/ts64lessthan.c >> b/cpukit/score/src/ts64lessthan.c >> index 5c518c0..d147814 100644 >> --- a/cpukit/score/src/ts64lessthan.c >> +++ b/cpukit/score/src/ts64lessthan.c >> @@ -26,6 +26,6 @@ bool _Timestamp64_Less_than( >>const Timestamp64_Control *_rhs >> ) >> { >> - _Timestamp64_implementation_Less_than( _lhs, _rhs ); >> + return _Timestamp64_implementation_Less_than( _lhs, _rhs ); >> } >> #endif >> -- >> 1.9.3 >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 39/52] powerpc/mvme5500/startup/bspstart.c: Add include of to fix warning and clean up
Done. On 10/8/2014 3:22 PM, Gedare Bloom wrote: > On Wed, Oct 8, 2014 at 3:16 PM, Joel Sherrill > wrote: >> --- >> c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c >> b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c >> index 1db27a6..792d38f 100644 >> --- a/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c >> +++ b/c/src/lib/libbsp/powerpc/mvme5500/startup/bspstart.c >> @@ -3,7 +3,9 @@ >> * board, and monitor specific initialization and configuration. >> * The generic CPU dependent initialization has been performed >> * before this routine is invoked. >> - * > Simplify comment? > >> + */ >> + >> +/* >> * COPYRIGHT (c) 1989-2007. >> * On-Line Applications Research Corporation (OAR). >> * >> @@ -31,6 +33,7 @@ >> >> #include/* registers.h is included here */ >> #include >> +#include >> #include >> #include >> #include >> -- >> 1.9.3 >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: GCC 4.9.1 changes.
On 10/5/2014 1:23 AM, Chris Johns wrote: > Hi, > > There are a few issues with 4.9.1 which need to be looked at. I have not > attempted a Windows build yet. > > My question is: > > Do we move the architectures that *do* build to 4.9.1 ? I would lean to yes or wait for 4.9.2 to be released since it should be close. > If there are patches or known option required to build the failing > architectures please let me know. > > Is anyone test builind gcc head on a regular basis ? http://toolchain.lug-owl.de/buildbot/ I think between Sebastian starting and me piling on, every target we have is built now. But.. I have issues with the website in that it appears to take a long time to display them. So long you think there aren't any results. Sebastian.. any comments based on the gcc buildbot? I personally have not been building the head recently. I have enough cycles devoted to warning killing. :) > This is the list of architectures do not build: > > bfin: > ../../../gcc-4.9.1/libgcc/fp-bit.c: In function '__divsf3': > ../../../gcc-4.9.1/libgcc/fp-bit.c:1082:1: internal compiler error: in > cfg_layout_initialize, at cfgrtl.c:4233 > > m32c: > configure: error: unable to detect exception model Is this trying C++? m32c does not support C++ at all. End of story. > mips: > xgcc: error: addsf3: No such file or directory > > moxie: > We are using binutils-2.24. Is there a later release ? > CC_TLS -DUSE_EMUTLS -o _gcov.o -MT _gcov.o -MD -MP -MF _gcov.dep > -DL_gcov -c ../../../../gcc-4.9.1/libgcc/libgcov-driver.c > /tmp//cc7Lxv5S.s: Assembler messages: > /tmp//cc7Lxv5S.s:176: Error: unknown opcode sex.b $r0,$r0 > >[ AG, a rather interesting name for an instruction ] > > powerpc: > ../../../../gcc-4.9.1/libgcc/fp-bit.c: In function '_fpadd_parts': > ../../../../gcc-4.9.1/libgcc/fp-bit.c:738:1: internal compiler error: in > dwf_regno, at dwarf2cfi.c:909 > > Chris > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH 04/52] gdbv850sim/console/console-io.c: Fix warnings
All of the BSPs using console-polled.c will be addressed by a single patch in the next revision. I added , included it from the appropriate driver, and added static to the printk() support method in all 14 BSPs. That should clobber a few more warnings. --joel On 10/8/2014 3:26 PM, Gedare Bloom wrote: > On Wed, Oct 8, 2014 at 4:20 PM, Joel Sherrill > wrote: >> On 10/8/2014 3:10 PM, Gedare Bloom wrote: >>> On Wed, Oct 8, 2014 at 3:15 PM, Joel Sherrill >>> wrote: --- c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c b/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c index c178197..a66c800 100644 --- a/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c +++ b/c/src/lib/libbsp/v850/gdbv850sim/console/console-io.c @@ -12,6 +12,14 @@ #include /* + * Prototypes + */ +void console_initialize_hardware(void); +void console_outbyte_polled(int port, char ch); +int console_inbyte_nonblocking(int port); +void console_output_char(char c); + >>> These prototype additions should go to a header file, or the functions >>> should be made static. >> The first three are the assumed interface for the single port >> polled console driver framework. They can't be static. >> >> c/src/lib/libbsp/shared/console-polled.c >> >> Any suggestions for a new header file to add them to? >> I suppose we could add console-polled.h for private use? > Sure. > >> FWIW Adding this will impact 14 BSPs and likely fix 3*14 warnings. >> But only one other patch (0013-gdbamsim). >> >> The fourth should be able to be static. I should have caught that. +/* * console_initialize_hardware * * This routine initializes the console hardware. @@ -38,7 +46,6 @@ void console_outbyte_polled( * * This routine polls for a character. */ - int console_inbyte_nonblocking( int port ) -- 1.9.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel >> -- >> Joel Sherrill, Ph.D. Director of Research & Development >> joel.sherr...@oarcorp.comOn-Line Applications Research >> Ask me about RTEMS: a free RTOS Huntsville AL 35805 >> Support Available(256) 722-9985 >> >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel -- Joel Sherrill, Ph.D. Director of Research & Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: GCC 4.9.1 changes.
[ Add AG for the moxie issue ] On 9/10/2014 8:31 am, Joel Sherrill wrote: On 10/5/2014 1:23 AM, Chris Johns wrote: Hi, There are a few issues with 4.9.1 which need to be looked at. I have not attempted a Windows build yet. My question is: Do we move the architectures that *do* build to 4.9.1 ? I would lean to yes or wait for 4.9.2 to be released since it should be close. I will move the ones we know build. Newlib is now at the very latest via git. m32c: configure: error: unable to detect exception model Is this trying C++? No ... http://git.rtems.org/rtems-source-builder/tree/rtems/config/4.11/rtems-m32c.bset#n14 It is building libgcc which wants to know the exception model for some reason. I do not know if there is a configure option to handle this or something in our target support that is different. m32c does not support C++ at all. End of story. Understood. moxie: We are using binutils-2.24. Is there a later release ? CC_TLS -DUSE_EMUTLS -o _gcov.o -MT _gcov.o -MD -MP -MF _gcov.dep -DL_gcov -c ../../../../gcc-4.9.1/libgcc/libgcov-driver.c /tmp//cc7Lxv5S.s: Assembler messages: /tmp//cc7Lxv5S.s:176: Error: unknown opcode sex.b $r0,$r0 [ AG, a rather interesting name for an instruction ] Anthony, any ideas here ? Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: m68k/m5484FireEngine and COBRA5475 strict alias warnings
Should be fixed now. -- 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