Re: [PATCH] Add new (first) OpenRISC BSP called or1ksim.
On 8/19/2014 1:00 PM, Hesham ALMatary wrote: This BSP is intended to run on or1ksim (the main OpenRISC emulator). --- c/src/aclocal/rtems-cpu-subdirs.m4 | 1 + c/src/lib/libbsp/or1k/Makefile.am | 10 + c/src/lib/libbsp/or1k/acinclude.m4 | 10 + c/src/lib/libbsp/or1k/configure.ac | 19 ++ c/src/lib/libbsp/or1k/or1ksim/Makefile.am | 109 +++ c/src/lib/libbsp/or1k/or1ksim/README | 17 ++ c/src/lib/libbsp/or1k/or1ksim/bsp_specs| 12 + c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c | 104 +++ c/src/lib/libbsp/or1k/or1ksim/configure.ac | 31 ++ .../libbsp/or1k/or1ksim/console/console-config.c | 58 c/src/lib/libbsp/or1k/or1ksim/console/uart.c | 144 ++ c/src/lib/libbsp/or1k/or1ksim/include/bsp.h| 47 +++ c/src/lib/libbsp/or1k/or1ksim/include/irq.h| 45 +++ c/src/lib/libbsp/or1k/or1ksim/include/or1ksim.h| 118 c/src/lib/libbsp/or1k/or1ksim/include/tm27.h | 16 ++ c/src/lib/libbsp/or1k/or1ksim/include/uart.h | 42 +++ c/src/lib/libbsp/or1k/or1ksim/irq/irq.c| 42 +++ .../or1k/or1ksim/make/custom/or1k_or1ksim.cfg | 7 + c/src/lib/libbsp/or1k/or1ksim/preinstall.am| 111 +++ c/src/lib/libbsp/or1k/or1ksim/start/start.S| 182 c/src/lib/libbsp/or1k/or1ksim/startup/bspreset.c | 14 + c/src/lib/libbsp/or1k/or1ksim/startup/bspstart.c | 15 + c/src/lib/libbsp/or1k/or1ksim/startup/linkcmds | 320 + c/src/lib/libbsp/or1k/or1ksim/timer/timer.c| 63 c/src/lib/libbsp/or1k/preinstall.am| 7 + .../libbsp/or1k/shared/include/linker-symbols.h| 79 + 26 files changed, 1623 insertions(+) create mode 100644 c/src/lib/libbsp/or1k/Makefile.am create mode 100644 c/src/lib/libbsp/or1k/acinclude.m4 create mode 100644 c/src/lib/libbsp/or1k/configure.ac create mode 100644 c/src/lib/libbsp/or1k/or1ksim/Makefile.am create mode 100644 c/src/lib/libbsp/or1k/or1ksim/README create mode 100644 c/src/lib/libbsp/or1k/or1ksim/bsp_specs create mode 100644 c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c create mode 100644 c/src/lib/libbsp/or1k/or1ksim/configure.ac create mode 100644 c/src/lib/libbsp/or1k/or1ksim/console/console-config.c create mode 100644 c/src/lib/libbsp/or1k/or1ksim/console/uart.c create mode 100644 c/src/lib/libbsp/or1k/or1ksim/include/bsp.h create mode 100644 c/src/lib/libbsp/or1k/or1ksim/include/irq.h create mode 100644 c/src/lib/libbsp/or1k/or1ksim/include/or1ksim.h create mode 100644 c/src/lib/libbsp/or1k/or1ksim/include/tm27.h create mode 100644 c/src/lib/libbsp/or1k/or1ksim/include/uart.h create mode 100644 c/src/lib/libbsp/or1k/or1ksim/irq/irq.c create mode 100644 c/src/lib/libbsp/or1k/or1ksim/make/custom/or1k_or1ksim.cfg create mode 100644 c/src/lib/libbsp/or1k/or1ksim/preinstall.am create mode 100644 c/src/lib/libbsp/or1k/or1ksim/start/start.S create mode 100644 c/src/lib/libbsp/or1k/or1ksim/startup/bspreset.c create mode 100644 c/src/lib/libbsp/or1k/or1ksim/startup/bspstart.c create mode 100644 c/src/lib/libbsp/or1k/or1ksim/startup/linkcmds create mode 100644 c/src/lib/libbsp/or1k/or1ksim/timer/timer.c create mode 100644 c/src/lib/libbsp/or1k/preinstall.am create mode 100644 c/src/lib/libbsp/or1k/shared/include/linker-symbols.h diff --git a/c/src/aclocal/rtems-cpu-subdirs.m4 b/c/src/aclocal/rtems-cpu-subdirs.m4 index c5a4a19..9593d34 100644 --- a/c/src/aclocal/rtems-cpu-subdirs.m4 +++ b/c/src/aclocal/rtems-cpu-subdirs.m4 @@ -23,6 +23,7 @@ _RTEMS_CPU_SUBDIR([mips],[$1]);; _RTEMS_CPU_SUBDIR([moxie],[$1]);; _RTEMS_CPU_SUBDIR([nios2],[$1]);; _RTEMS_CPU_SUBDIR([no_cpu],[$1]);; +_RTEMS_CPU_SUBDIR([or1k],[$1]);; _RTEMS_CPU_SUBDIR([powerpc],[$1]);; _RTEMS_CPU_SUBDIR([sh],[$1]);; _RTEMS_CPU_SUBDIR([sparc],[$1]);; diff --git a/c/src/lib/libbsp/or1k/Makefile.am b/c/src/lib/libbsp/or1k/Makefile.am new file mode 100644 index 000..0ce20e6 --- /dev/null +++ b/c/src/lib/libbsp/or1k/Makefile.am @@ -0,0 +1,10 @@ +ACLOCAL_AMFLAGS = -I ../../../aclocal + +## Descend into the @RTEMS_BSP_FAMILY@ directory +## Currently, the shared directory is not explicitly +## added but it is present in the source tree. +SUBDIRS = @RTEMS_BSP_FAMILY@ + +include $(srcdir)/preinstall.am +include $(top_srcdir)/../../../automake/subdirs.am +include $(top_srcdir)/../../../automake/local.am diff --git a/c/src/lib/libbsp/or1k/acinclude.m4 b/c/src/lib/libbsp/or1k/acinclude.m4 new file mode 100644 index 000..c593670 --- /dev/null +++ b/c/src/lib/libbsp/or1k/acinclude.m4 @@ -0,0 +1,10 @@ +# RTEMS_CHECK_BSPDIR(RTEMS_BSP_FAMILY) +AC_DEFUN([RTEMS_CHECK_BSPDIR], +[ + case $1 in + or1ksim ) +AC_CONFIG_SUBDIRS([or1ksim]);; + *) +AC_MSG_ERROR([Invalid BSP]);; + esac +]) diff --git
Re: [GSoC2014] arinc653 on rtems (using pok) patches
On 8/19/2014 4:34 PM, Janek van Oirschot wrote: On Mon, Aug 18, 2014 at 3:13 PM, Gedare Bloom ged...@rtems.org wrote: If you're using git for your development, you can use 'git format-patch' to convert a set of commits into a set of patches. Some properly formatted git patches can make it easier to review and merge your code. Some other notes follow. Yeah, I knew git is able to generate patches but I was worried that it would also take the virtualpok bsp and paravirt patches along with my patches. When you rebase, you get the list of patches. format-patch will generate a file for each of them. Just use git send-email for the ones you want reviewed and merged first. When you rebase, they should magically be eliminated. Worst case, you make a new branch from master and apply the remaining ones. virtualpok_arinc653.patch: * it seems the only part of this patch specific to the arinc653 code is the Makefile.am and preinstall.am changes? It seems so, I did include some small edits and adjustments I needed to apply to get my RTEMS on POK enviroment running. * The virtualizationlayercpu.h is missing. Is this supposed to come from another patch already? Yeah, I thought it was included by one of the earlier virtualpok BSP patches. It's simply the virtualizationlayercpu.h located in $POK/examples/rtems-guest/ but can be added to my patch. * You comment out a few lines in bspstart.c, are these things that were broken? Not so much broken but in my case the rtems on pok enviroment broke after a git pull so it got recommended to me at some point to disable those as I don't need them for my application. * Is the linkcmds change required for running pok-rtems? For me, it was required. The old linkcmd script was causing undefined TLS errors while building RTEMS. Please report this. This sounds like an independent issue which needs to be run down. hello_init_c.patch: * This would be much improved if you provided a new example instead of replacing the existing one, like 'arinc653_test.c' or similar. No problem, was working with the default hello world because the setup for working with hello world was already there. Now that I know this method works to get arinc653 calls working a new and separate example program for arinc653 is the next step and definitely on my TODO list. :) libpok_rtems_arinc653.patch: It seems incorrect to remove extern from all of these arrays. Usually for global variables in C code, there should be one declaration of the variable with the 'extern' attribute in a header file that gets included in every c source file that needs that variable, and then one definition of the variable without 'extern' in just one of the .c files. Please explain your changes. The 'extern' variables would cause compilation errors. I also couldn't find any definition of those arrays without the 'extern'. I temporarily removed them and since I only tested CREATE_* of each arinc653 subset so since the scope was one source file this wasn't a problem. After some debugging of e.g. CREATE_BLACKBOARD and it works without returning an error a better structure for all 'extern' variables in combination with rtems will be implemented as then they then need to be global. Thanks for the feedback, Janek ___ 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