[PATCH 5/6] rtems-docs: Edit command to test BSP and sample output

2021-03-14 Thread Ida Delphine
---
 user/start/bsp-test.rst | 49 +++--
 1 file changed, 27 insertions(+), 22 deletions(-)

diff --git a/user/start/bsp-test.rst b/user/start/bsp-test.rst
index 9243f5d..cad6f23 100644
--- a/user/start/bsp-test.rst
+++ b/user/start/bsp-test.rst
@@ -30,37 +30,42 @@ by ``$BASE``.
 .. code-block:: none
 
 RTEMS Testing - Tester, 5.1.0
- Command Line: $BASE/rtems/5/bin/rtems-test --rtems-bsp=erc32-sis 
build/sparc/erc32
- Python: 2.7.15 (default, Jan 10 2019, 01:14:47) [GCC 4.2.1 Compatible 
FreeBSD Clang 6.0.1 (tags/RELEASE_601/final 335540)]
+ Command Line: $BASE/rtems/6/bin/rtems-test --rtems-bsp=erc32-sis 
build/sparc/erc32
+ Python: 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]
 Host: FreeBSD-12.0-RELEASE-p2-amd64-64bit-ELF (FreeBSD Build_FreeBSD12 
12.0-RELEASE-p2 FreeBSD 12.0-RELEASE-p2 GENERIC amd64 amd64)
-[  1/589] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | 
sparc/erc32: dhrystone.exe
+[  1/570] p:0   f:0   u:0   e:0   I:0   B:0   t:0   L:0   i:0   W:0   | 
sparc/erc32: dhrystone.exe
 ...
-[589/589] p:574 f:0   u:5   e:0   I:0   B:3   t:0   i:0   W:0   | 
sparc/erc32: tmtimer01.exe
+[570/570] p:554 f:2   u:6   e:1   I:0   B:3   t:0   L:0   i:0   W:0   | 
sparc/erc32: ts-validation-1.exe
 
-Passed:580
-Failed:  0
-User Input:  5
-Expected Fail:   0
+Passed:558
+Failed:  2
+User Input:  6
+Expected Fail:   1
 Indeterminate:   0
 Benchmark:   3
-Timeout: 1
+Timeout: 0
+Test too long:   0
 Invalid: 0
 Wrong Version:   0
 Wrong Build: 0
 Wrong Tools: 0
 --
-Total: 589
+Total: 570
+Failures:
+dl06.exe
+minimum.exe
 User Input:
- monitor.exe
- termios.exe
- top.exe
- fileio.exe
- capture.exe
+dl10.exe
+monitor.exe
+termios.exe
+top.exe
+capture.exe
+fileio.exe
+Expected Fail:
+psxfenv01.exe
 Benchmark:
- whetstone.exe
- linpack.exe
- dhrystone.exe
-Timeouts:
- pppd.exe
-Average test time: 0:00:00.437773
-Testing time : 0:04:17.848557
+dhrystone.exe
+linpack.exe
+whetstone.exe
+Average test time: 0:00:00.371256
+Testing time : 0:03:31.616055
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 4/6] rtems-docs: Edit command to build BSP and sample output

2021-03-14 Thread Ida Delphine
---
 user/start/bsp-build.rst | 74 
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/user/start/bsp-build.rst b/user/start/bsp-build.rst
index 137b3ab..c4d6db6 100644
--- a/user/start/bsp-build.rst
+++ b/user/start/bsp-build.rst
@@ -11,7 +11,7 @@ Build a Board Support Package (BSP)
 You installed the tool suite in your installation prefix, made ready the source
 for two RTEMS source packages and if you are using a Git clone bootstrapped the
 RTEMS sources in the previous sections.  We installed the tool suite in
-:file:`$HOME/quick-start/rtems/5` and unpacked the source in
+:file:`$HOME/quick-start/rtems/6` and unpacked the source in
 :file:`$HOME/quick-start/src`.
 
 You are now able to build :ref:`Board Support Packages (BSPs) ` for all
@@ -44,24 +44,24 @@ To build the BSP with all the tests run this command:
 .. code-block:: none
 
 cd $HOME/quick-start/src/rsb/rtems
-../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5 \
---target=sparc-rtems5 --with-rtems-bsp=erc32 --with-rtems-tests=yes 
5/rtems-kernel
+../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/6 \
+--target=sparc-rtems6 --with-rtems-bsp=erc32 --with-rtems-tests=yes 
6/rtems-kernel
 
 This command should output something like this:
 
 .. code-block:: none
 
-RTEMS Source Builder - Set Builder, 5.1.0
-Build Set: 5/rtems-kernel
+RTEMS Source Builder - Set Builder, 6
+Build Set: 6/rtems-kernel
 config: tools/rtems-kernel-5.cfg
-package: sparc-rtems5-kernel-erc32-1
-building: sparc-rtems5-kernel-erc32-1
-sizes: sparc-rtems5-kernel-erc32-1: 2.279GB (installed: 44.612MB)
-cleaning: sparc-rtems5-kernel-erc32-1
-reporting: tools/rtems-kernel-5.cfg -> sparc-rtems5-kernel-erc32-1.txt
-reporting: tools/rtems-kernel-5.cfg -> sparc-rtems5-kernel-erc32-1.xml
-installing: sparc-rtems5-kernel-erc32-1 -> $BASE/
-cleaning: sparc-rtems5-kernel-erc32-1
+package: sparc-rtems6-kernel-erc32-1
+building: sparc-rtems6-kernel-erc32-1
+sizes: sparc-rtems6-kernel-erc32-1: 2.279GB (installed: 44.612MB)
+cleaning: sparc-rtems6-kernel-erc32-1
+reporting: tools/rtems-kernel-5.cfg -> sparc-rtems6-kernel-erc32-1.txt
+reporting: tools/rtems-kernel-5.cfg -> sparc-rtems6-kernel-erc32-1.xml
+installing: sparc-rtems6-kernel-erc32-1 -> $BASE/
+cleaning: sparc-rtems6-kernel-erc32-1
 Build Set: Time 0:03:09.896961
 
 The RSB BSP build can be customised with following RSB command line options:
@@ -112,13 +112,13 @@ directory to your ``$PATH`` throughout the remaining 
steps. Run the command:
 
 .. code-block:: none
 
-export PATH=$HOME/quick-start/rtems/5/bin:"$PATH"
+export PATH=$HOME/quick-start/rtems/6/bin:"$PATH"
 
 Check your installed tools can be found by running:
 
 .. code-block:: none
 
-command -v sparc-rtems5-gcc && echo "found" || echo "not found"
+command -v sparc-rtems6-gcc && echo "found" || echo "not found"
 
 The output should be:
 
@@ -128,7 +128,7 @@ The output should be:
 
 If ``not found`` is printed the tools are not correctly installed or the path
 has not been correctly set. Check the contents of the path
-:file:`$HOME/quick-start/rtems/5/bin` manually and if :file:`sparc-rtems5-gcc`
+:file:`$HOME/quick-start/rtems/6/bin` manually and if :file:`sparc-rtems6-gcc`
 is present the path is wrong. If the file cannot be found return to
 :ref:`QuickStartTools` and install the tools again.
 
@@ -145,7 +145,7 @@ everything else.  For detailed information about the BSP 
build system, see
 cd $HOME/quick-start/src/rtems
 echo "[sparc/erc32]" > config.ini
 echo "BUILD_TESTS = True" >> config.ini
-./waf configure --prefix=$HOME/quick-start/rtems/5
+./waf configure --prefix=$HOME/quick-start/rtems/6
 
 The first invocation of ``./waf`` needs a bit of time (e.g. 10 seconds) since 
an
 internal cache file is populated.  This command should output something like
@@ -158,24 +158,24 @@ by ``$BASE``.
 Setting out to   : $BASE/src/rtems/build
 Regenerate build specification cache (needs a couple of seconds)...
 Configure board support package (BSP): sparc/erc32
-Checking for program 'sparc-rtems5-gcc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
-Checking for program 'sparc-rtems5-g++'  : 
$BASE/rtems/5/bin/sparc-rtems5-g++
-Checking for program 'sparc-rtems5-ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
-Checking for program 'sparc-rtems5-ld'   : 
$BASE/rtems/5/bin/sparc-rtems5-ld
-Checking for program 'ar': 
$BASE/rtems/5/bin/sparc-rtems5-ar
-Checking for program 'g++, c++'  : 
$BASE/rtems/5/bin/sparc-rtems5-g++
-Checking for program 'ar': 
$BASE/rtems/5/bin/sparc-rtems5-ar
-Checking for program 'gas, gcc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
-Checking for program 'ar': 
$BASE/rtems/5/bin/sparc-rtems5-ar
-Chec

All (18) RSB tool failures on rtems6 (details on m68k)

2021-03-14 Thread Joel Sherrill
Hi

Most (all?) of the targets for rtems6 fail to build right now. I decided to
pick on the m68k and it looks like a mismatch between gcc and as on
arguments. These should all be on the build@ list since Chris increased the
allowed size of posts.

Does anyone know what we might have out of sync?

configure:3804:
/home/joel/rtems-cron-6/rtems-source-builder/rtems/build/m68k-rtems6-gcc-6051af8-newlib-d10d0d9-x86_64-linux-gnu-1/build/./gcc/xgcc
-B/home/joel/rtems-cron-6/rtems-source-builder/rtems/build/m68k-rtems6-gcc-6051af8-newlib-d10d0d9-x86_64-linux-gnu-1/build/./gcc/
-nostdinc
-B/home/joel/rtems-cron-6/rtems-source-builder/rtems/build/m68k-rtems6-gcc-6051af8-newlib-d10d0d9-x86_64-linux-gnu-1/build/m68k-rtems6/newlib/
-isystem
/home/joel/rtems-cron-6/rtems-source-builder/rtems/build/m68k-rtems6-gcc-6051af8-newlib-d10d0d9-x86_64-linux-gnu-1/build/m68k-rtems6/newlib/targ-include
-isystem
/home/joel/rtems-cron-6/rtems-source-builder/rtems/build/m68k-rtems6-gcc-6051af8-newlib-d10d0d9-x86_64-linux-gnu-1/gnu-mirror-gcc-6051af8/newlib/libc/include
-B/home/joel/rtems-cron-6/tools/6/m68k-rtems6/bin/
-B/home/joel/rtems-cron-6/tools/6/m68k-rtems6/lib/ -isystem
/home/joel/rtems-cron-6/tools/6/m68k-rtems6/include -isystem
/home/joel/rtems-cron-6/tools/6/m68k-rtems6/sys-include-c -g -O2
 conftest.c >&5
/home/joel/rtems-cron-6/rtems-source-builder/rtems/build/m68k-rtems6-gcc-6051af8-newlib-d10d0d9-x86_64-linux-gnu-1/build/./gcc/as:
line 106: exec: -m: invalid option
exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection
...]
configure:3808: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/";
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3822: error: in
`/home/joel/rtems-cron-6/rtems-source-builder/rtems/build/m68k-rtems6-gcc-6051af8-newlib-d10d0d9-x86_64-linux-gnu-1/build/m68k-rtems6/libgcc':

I also checked the sparc and it was a different argument to as and the as
it invoked in the tree was a shell script. I don't know if that was right
or wrong.

I don't think this is failing on Ubuntu or FreeBSD. This is on CentOS 7.

I going to try
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 4/6] rtems-docs: Edit command to build BSP and sample output

2021-03-14 Thread Ida Delphine
---
 user/start/bsp-build.rst | 74 
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/user/start/bsp-build.rst b/user/start/bsp-build.rst
index 137b3ab..c4d6db6 100644
--- a/user/start/bsp-build.rst
+++ b/user/start/bsp-build.rst
@@ -11,7 +11,7 @@ Build a Board Support Package (BSP)
 You installed the tool suite in your installation prefix, made ready the source
 for two RTEMS source packages and if you are using a Git clone bootstrapped the
 RTEMS sources in the previous sections.  We installed the tool suite in
-:file:`$HOME/quick-start/rtems/5` and unpacked the source in
+:file:`$HOME/quick-start/rtems/6` and unpacked the source in
 :file:`$HOME/quick-start/src`.
 
 You are now able to build :ref:`Board Support Packages (BSPs) ` for all
@@ -44,24 +44,24 @@ To build the BSP with all the tests run this command:
 .. code-block:: none
 
 cd $HOME/quick-start/src/rsb/rtems
-../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5 \
---target=sparc-rtems5 --with-rtems-bsp=erc32 --with-rtems-tests=yes 
5/rtems-kernel
+../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/6 \
+--target=sparc-rtems6 --with-rtems-bsp=erc32 --with-rtems-tests=yes 
6/rtems-kernel
 
 This command should output something like this:
 
 .. code-block:: none
 
-RTEMS Source Builder - Set Builder, 5.1.0
-Build Set: 5/rtems-kernel
+RTEMS Source Builder - Set Builder, 6
+Build Set: 6/rtems-kernel
 config: tools/rtems-kernel-5.cfg
-package: sparc-rtems5-kernel-erc32-1
-building: sparc-rtems5-kernel-erc32-1
-sizes: sparc-rtems5-kernel-erc32-1: 2.279GB (installed: 44.612MB)
-cleaning: sparc-rtems5-kernel-erc32-1
-reporting: tools/rtems-kernel-5.cfg -> sparc-rtems5-kernel-erc32-1.txt
-reporting: tools/rtems-kernel-5.cfg -> sparc-rtems5-kernel-erc32-1.xml
-installing: sparc-rtems5-kernel-erc32-1 -> $BASE/
-cleaning: sparc-rtems5-kernel-erc32-1
+package: sparc-rtems6-kernel-erc32-1
+building: sparc-rtems6-kernel-erc32-1
+sizes: sparc-rtems6-kernel-erc32-1: 2.279GB (installed: 44.612MB)
+cleaning: sparc-rtems6-kernel-erc32-1
+reporting: tools/rtems-kernel-5.cfg -> sparc-rtems6-kernel-erc32-1.txt
+reporting: tools/rtems-kernel-5.cfg -> sparc-rtems6-kernel-erc32-1.xml
+installing: sparc-rtems6-kernel-erc32-1 -> $BASE/
+cleaning: sparc-rtems6-kernel-erc32-1
 Build Set: Time 0:03:09.896961
 
 The RSB BSP build can be customised with following RSB command line options:
@@ -112,13 +112,13 @@ directory to your ``$PATH`` throughout the remaining 
steps. Run the command:
 
 .. code-block:: none
 
-export PATH=$HOME/quick-start/rtems/5/bin:"$PATH"
+export PATH=$HOME/quick-start/rtems/6/bin:"$PATH"
 
 Check your installed tools can be found by running:
 
 .. code-block:: none
 
-command -v sparc-rtems5-gcc && echo "found" || echo "not found"
+command -v sparc-rtems6-gcc && echo "found" || echo "not found"
 
 The output should be:
 
@@ -128,7 +128,7 @@ The output should be:
 
 If ``not found`` is printed the tools are not correctly installed or the path
 has not been correctly set. Check the contents of the path
-:file:`$HOME/quick-start/rtems/5/bin` manually and if :file:`sparc-rtems5-gcc`
+:file:`$HOME/quick-start/rtems/6/bin` manually and if :file:`sparc-rtems6-gcc`
 is present the path is wrong. If the file cannot be found return to
 :ref:`QuickStartTools` and install the tools again.
 
@@ -145,7 +145,7 @@ everything else.  For detailed information about the BSP 
build system, see
 cd $HOME/quick-start/src/rtems
 echo "[sparc/erc32]" > config.ini
 echo "BUILD_TESTS = True" >> config.ini
-./waf configure --prefix=$HOME/quick-start/rtems/5
+./waf configure --prefix=$HOME/quick-start/rtems/6
 
 The first invocation of ``./waf`` needs a bit of time (e.g. 10 seconds) since 
an
 internal cache file is populated.  This command should output something like
@@ -158,24 +158,24 @@ by ``$BASE``.
 Setting out to   : $BASE/src/rtems/build
 Regenerate build specification cache (needs a couple of seconds)...
 Configure board support package (BSP): sparc/erc32
-Checking for program 'sparc-rtems5-gcc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
-Checking for program 'sparc-rtems5-g++'  : 
$BASE/rtems/5/bin/sparc-rtems5-g++
-Checking for program 'sparc-rtems5-ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
-Checking for program 'sparc-rtems5-ld'   : 
$BASE/rtems/5/bin/sparc-rtems5-ld
-Checking for program 'ar': 
$BASE/rtems/5/bin/sparc-rtems5-ar
-Checking for program 'g++, c++'  : 
$BASE/rtems/5/bin/sparc-rtems5-g++
-Checking for program 'ar': 
$BASE/rtems/5/bin/sparc-rtems5-ar
-Checking for program 'gas, gcc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
-Checking for program 'ar': 
$BASE/rtems/5/bin/sparc-rtems5-ar
-Chec

[PATCH 6/6] rtems-docs: Edit commands to build first app

2021-03-14 Thread Ida Delphine
---
 user/start/app.rst | 104 ++---
 1 file changed, 52 insertions(+), 52 deletions(-)

diff --git a/user/start/app.rst b/user/start/app.rst
index 8900f78..c343551 100644
--- a/user/start/app.rst
+++ b/user/start/app.rst
@@ -8,7 +8,7 @@ Build Your Application
 ==
 
 You tested a BSP in the previous section.  We built the ``erc32`` BSP
-and it is installed under :file:`$HOME/quick-start/rtems/5`.
+and it is installed under :file:`$HOME/quick-start/rtems/6`.
 
 We will now create a simple Hello World application with a Git
 repository and using the `Waf `_ build system.
@@ -107,7 +107,7 @@ and copy the Waf script:
 #
 from __future__ import print_function
 
-rtems_version = "5"
+rtems_version = "6"
 
 try:
 import rtems_waf.rtems as rtems
@@ -142,52 +142,52 @@ Configure the application using Waf's ``configure`` 
command:
 
 .. code-block:: none
 
-./waf configure --rtems=$HOME/quick-start/rtems/5 --rtems-bsp=sparc/erc32
+./waf configure --rtems=$HOME/quick-start/rtems/6 --rtems-bsp=sparc/erc32 
--rtems-version=6
 
 The output will be something close to:
 
 .. code-block:: none
 
- Setting top to   : $BASE/app/hello
- Setting out to   : $BASE/app/hello/build
- RTEMS Version: 5
- Architectures: sparc-rtems5
- Board Support Package (BSP)  : sparc-rtems5-erc32
- Show commands: no
- Long commands: no
- Checking for program 'sparc-rtems5-gcc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
- Checking for program 'sparc-rtems5-g++'  : 
$BASE/rtems/5/bin/sparc-rtems5-g++
- Checking for program 'sparc-rtems5-gcc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
- Checking for program 'sparc-rtems5-ld'   : 
$BASE/rtems/5/bin/sparc-rtems5-ld
- Checking for program 'sparc-rtems5-ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
- Checking for program 'sparc-rtems5-nm'   : 
$BASE/rtems/5/bin/sparc-rtems5-nm
- Checking for program 'sparc-rtems5-objdump' : 
$BASE/rtems/5/bin/sparc-rtems5-objdump
- Checking for program 'sparc-rtems5-objcopy' : 
$BASE/rtems/5/bin/sparc-rtems5-objcopy
- Checking for program 'sparc-rtems5-readelf' : 
$BASE/rtems/5/bin/sparc-rtems5-readelf
- Checking for program 'sparc-rtems5-strip'   : 
$BASE/rtems/5/bin/sparc-rtems5-strip
- Checking for program 'sparc-rtems5-ranlib'  : 
$BASE/rtems/5/bin/sparc-rtems5-ranlib
- Checking for program 'rtems-ld' : $BASE/rtems/5/bin/rtems-ld
- Checking for program 'rtems-tld': $BASE/rtems/5/bin/rtems-tld
- Checking for program 'rtems-syms'   : $BASE/rtems/5/bin/rtems-syms
- Checking for program 'rtems-bin2c'  : 
$BASE/rtems/5/bin/rtems-bin2c
- Checking for program 'tar'  : /usr/bin/tar
- Checking for program 'gcc, cc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
- Checking for program 'ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
- Checking for program 'g++, c++' : 
$BASE/rtems/5/bin/sparc-rtems5-g++
- Checking for program 'ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
- Checking for program 'gas, gcc' : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
- Checking for program 'ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
- Checking for c flags '-MMD' : yes
- Checking for cxx flags '-MMD'   : yes
- Compiler version (sparc-rtems5-gcc) : 7.5.0 20191114 (RTEMS 5, 
RSB 5.1.0, Newlib fbaa096)
- Checking for a valid RTEMS BSP installation : yes
- Checking for RTEMS_DEBUG: no
- Checking for RTEMS_MULTIPROCESSING  : no
- Checking for RTEMS_NEWLIB   : yes
- Checking for RTEMS_POSIX_API: yes
- Checking for RTEMS_SMP  : no
- Checking for RTEMS_NETWORKING   : no
- 'configure' finished successfully (0.686s)
+Setting top to   : $BASE/app/hello 
+Setting out to   : $BASE/app/hello/build 
+RTEMS Version: 6 
+Architectures: sparc-rtems6 
+Board Support Package (BSP)  : sparc-rtems6-erc32 
+Show commands: no 
+Long commands: no 
+Checking for program 'sparc-rtems6-gcc'  : 
$BASE/rtems/6/bin/sparc-rtems6-gcc 
+Checking for program 'sparc-rtems6-g++'  : 
$BASE/rtems/6/bin/sparc-rtems6-g++ 
+Checking for program 'sparc-rtems6-gcc'  : 
$BASE/rtems/6/bin/sparc-rtems6-gcc 
+Checking for program 'sparc-rtems6-ld'   : 
$BASE/rtems/6/bin/sparc-rtems6-ld 
+Checking for program 'sparc-rtems6-ar'   : 
$BASE/rtems/6/bin/sparc-rtems6-a

[PATCH 5/6] rtems-docs: Edit command to test BSP and sample output

2021-03-14 Thread Ida Delphine
---
 user/start/bsp-test.rst | 49 +++--
 1 file changed, 27 insertions(+), 22 deletions(-)

diff --git a/user/start/bsp-test.rst b/user/start/bsp-test.rst
index 9243f5d..cad6f23 100644
--- a/user/start/bsp-test.rst
+++ b/user/start/bsp-test.rst
@@ -30,37 +30,42 @@ by ``$BASE``.
 .. code-block:: none
 
 RTEMS Testing - Tester, 5.1.0
- Command Line: $BASE/rtems/5/bin/rtems-test --rtems-bsp=erc32-sis 
build/sparc/erc32
- Python: 2.7.15 (default, Jan 10 2019, 01:14:47) [GCC 4.2.1 Compatible 
FreeBSD Clang 6.0.1 (tags/RELEASE_601/final 335540)]
+ Command Line: $BASE/rtems/6/bin/rtems-test --rtems-bsp=erc32-sis 
build/sparc/erc32
+ Python: 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]
 Host: FreeBSD-12.0-RELEASE-p2-amd64-64bit-ELF (FreeBSD Build_FreeBSD12 
12.0-RELEASE-p2 FreeBSD 12.0-RELEASE-p2 GENERIC amd64 amd64)
-[  1/589] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | 
sparc/erc32: dhrystone.exe
+[  1/570] p:0   f:0   u:0   e:0   I:0   B:0   t:0   L:0   i:0   W:0   | 
sparc/erc32: dhrystone.exe
 ...
-[589/589] p:574 f:0   u:5   e:0   I:0   B:3   t:0   i:0   W:0   | 
sparc/erc32: tmtimer01.exe
+[570/570] p:554 f:2   u:6   e:1   I:0   B:3   t:0   L:0   i:0   W:0   | 
sparc/erc32: ts-validation-1.exe
 
-Passed:580
-Failed:  0
-User Input:  5
-Expected Fail:   0
+Passed:558
+Failed:  2
+User Input:  6
+Expected Fail:   1
 Indeterminate:   0
 Benchmark:   3
-Timeout: 1
+Timeout: 0
+Test too long:   0
 Invalid: 0
 Wrong Version:   0
 Wrong Build: 0
 Wrong Tools: 0
 --
-Total: 589
+Total: 570
+Failures:
+dl06.exe
+minimum.exe
 User Input:
- monitor.exe
- termios.exe
- top.exe
- fileio.exe
- capture.exe
+dl10.exe
+monitor.exe
+termios.exe
+top.exe
+capture.exe
+fileio.exe
+Expected Fail:
+psxfenv01.exe
 Benchmark:
- whetstone.exe
- linpack.exe
- dhrystone.exe
-Timeouts:
- pppd.exe
-Average test time: 0:00:00.437773
-Testing time : 0:04:17.848557
+dhrystone.exe
+linpack.exe
+whetstone.exe
+Average test time: 0:00:00.371256
+Testing time : 0:03:31.616055
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 3/6] rtems-docs: Edit command to install tool suite

2021-03-14 Thread Ida Delphine
Edit edit sample output of tool suite installation.
Edit command to check if C cross compiler works and sample output of this 
command.
---
 user/start/tools.rst | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/user/start/tools.rst b/user/start/tools.rst
index baa2387..9a915ab 100644
--- a/user/start/tools.rst
+++ b/user/start/tools.rst
@@ -12,7 +12,7 @@ Install the Tool Suite
 
 You have chosen an installation prefix, the BSP to build, the tool's
 architecure and prepared the source for the RSB in the previous sections.  We
-have chosen :file:`$HOME/quick-start/rtems/5` as the installation prefix, the
+have chosen :file:`$HOME/quick-start/rtems/6` as the installation prefix, the
 ``erc32`` BSP and the SPARC architecture name of ``sparc-rtems5``, and unpacked
 the RSB source in :file:`$HOME/quick-start/src`.
 
@@ -25,7 +25,7 @@ Build and install the tool suite:
 .. code-block:: none
 
 cd $HOME/quick-start/src/rsb/rtems
-../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5 
5/rtems-sparc
+../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/6 
6/rtems-sparc
 
 This command should output something like this (omitted lines are denoted by
 ...). The build host appears as part of the name of the package being
@@ -33,19 +33,19 @@ built. The name you see may vary depending on the host you 
are using:
 
 .. code-block:: none
 
-RTEMS Source Builder - Set Builder, 5.1.0
-Build Set: 5/rtems-sparc
+RTEMS Source Builder - Set Builder, 6
+Build Set: 6/rtems-sparc
 ...
 config: tools/rtems-binutils-2.34.cfg
-package: sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1
-building: sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1
-sizes: sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1: 305.866MB 
(installed: 29.966MB)
-cleaning: sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1
+package: sparc-rtems6=-binutils-2.34-x86_64-freebsd12.1-1
+building: sparc-rtems6-binutils-2.34-x86_64-freebsd12.1-1
+sizes: sparc-rtems6-binutils-2.34-x86_64-freebsd12.1-1: 305.866MB 
(installed: 29.966MB)
+cleaning: sparc-rtems6-binutils-2.34-x86_64-freebsd12.1-1
 reporting: tools/rtems-binutils-2.34.cfg -> 
sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1.txt
 reporting: tools/rtems-binutils-2.34.cfg -> 
sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1.xml
 config: tools/rtems-gcc-7.5.0-newlib-fbaa096.cfg
-package: sparc-rtems5-gcc-7.5.0-newlib-fbaa096-x86_64-freebsd12.1-1
-building: sparc-rtems5-gcc-7.5.0-newlib-fbaa096-x86_64-freebsd12.1-1
+package: sparc-rtems6-gcc-7.5.0-newlib-fbaa096-x86_64-freebsd12.1-1
+building: sparc-rtems6-gcc-7.5.0-newlib-fbaa096-x86_64-freebsd12.1-1
 
 Build Sizes: usage: 5.684GB total: 1.112GB (sources: 143.803MB, patches: 
21.348KB, installed 995.188MB)
 Build Set: Time 0:21:35.626294
@@ -55,7 +55,7 @@ works with the following command:
 
 .. code-block:: none
 
-$HOME/quick-start/rtems/5/bin/sparc-rtems5-gcc --version
+$HOME/quick-start/rtems/6/bin/sparc-rtems6-gcc --version
 
 This command should output something like below.  The version informtion helps
 you to identify the exact sources used to build the cross compiler of your
@@ -69,8 +69,8 @@ source code used.
 
 .. code-block:: none
 
-sparc-rtems5-gcc (GCC) 7.5.0 20191114 (RTEMS 5, RSB 5.1.0, Newlib fbaa096)
-Copyright (C) 2017 Free Software Foundation, Inc.
+sparc-rtems6-gcc (GCC) 10.2.1 20210309 (RTEMS 6, RSB 
5e449fb5c2cb6812a238f9f9764fd339cbbf05c2, Newlib d10d0d9)
+Copyright (C) 2020 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 3/6] rtems-docs: Edit command to install tool suite

2021-03-14 Thread Ida Delphine
Edit edit sample output of tool suite installation.
Edit command to check if C cross compiler works and sample output of this 
command.
---
 user/start/tools.rst | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/user/start/tools.rst b/user/start/tools.rst
index baa2387..9a915ab 100644
--- a/user/start/tools.rst
+++ b/user/start/tools.rst
@@ -12,7 +12,7 @@ Install the Tool Suite
 
 You have chosen an installation prefix, the BSP to build, the tool's
 architecure and prepared the source for the RSB in the previous sections.  We
-have chosen :file:`$HOME/quick-start/rtems/5` as the installation prefix, the
+have chosen :file:`$HOME/quick-start/rtems/6` as the installation prefix, the
 ``erc32`` BSP and the SPARC architecture name of ``sparc-rtems5``, and unpacked
 the RSB source in :file:`$HOME/quick-start/src`.
 
@@ -25,7 +25,7 @@ Build and install the tool suite:
 .. code-block:: none
 
 cd $HOME/quick-start/src/rsb/rtems
-../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5 
5/rtems-sparc
+../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/6 
6/rtems-sparc
 
 This command should output something like this (omitted lines are denoted by
 ...). The build host appears as part of the name of the package being
@@ -33,19 +33,19 @@ built. The name you see may vary depending on the host you 
are using:
 
 .. code-block:: none
 
-RTEMS Source Builder - Set Builder, 5.1.0
-Build Set: 5/rtems-sparc
+RTEMS Source Builder - Set Builder, 6
+Build Set: 6/rtems-sparc
 ...
 config: tools/rtems-binutils-2.34.cfg
-package: sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1
-building: sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1
-sizes: sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1: 305.866MB 
(installed: 29.966MB)
-cleaning: sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1
+package: sparc-rtems6=-binutils-2.34-x86_64-freebsd12.1-1
+building: sparc-rtems6-binutils-2.34-x86_64-freebsd12.1-1
+sizes: sparc-rtems6-binutils-2.34-x86_64-freebsd12.1-1: 305.866MB 
(installed: 29.966MB)
+cleaning: sparc-rtems6-binutils-2.34-x86_64-freebsd12.1-1
 reporting: tools/rtems-binutils-2.34.cfg -> 
sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1.txt
 reporting: tools/rtems-binutils-2.34.cfg -> 
sparc-rtems5-binutils-2.34-x86_64-freebsd12.1-1.xml
 config: tools/rtems-gcc-7.5.0-newlib-fbaa096.cfg
-package: sparc-rtems5-gcc-7.5.0-newlib-fbaa096-x86_64-freebsd12.1-1
-building: sparc-rtems5-gcc-7.5.0-newlib-fbaa096-x86_64-freebsd12.1-1
+package: sparc-rtems6-gcc-7.5.0-newlib-fbaa096-x86_64-freebsd12.1-1
+building: sparc-rtems6-gcc-7.5.0-newlib-fbaa096-x86_64-freebsd12.1-1
 
 Build Sizes: usage: 5.684GB total: 1.112GB (sources: 143.803MB, patches: 
21.348KB, installed 995.188MB)
 Build Set: Time 0:21:35.626294
@@ -55,7 +55,7 @@ works with the following command:
 
 .. code-block:: none
 
-$HOME/quick-start/rtems/5/bin/sparc-rtems5-gcc --version
+$HOME/quick-start/rtems/6/bin/sparc-rtems6-gcc --version
 
 This command should output something like below.  The version informtion helps
 you to identify the exact sources used to build the cross compiler of your
@@ -69,8 +69,8 @@ source code used.
 
 .. code-block:: none
 
-sparc-rtems5-gcc (GCC) 7.5.0 20191114 (RTEMS 5, RSB 5.1.0, Newlib fbaa096)
-Copyright (C) 2017 Free Software Foundation, Inc.
+sparc-rtems6-gcc (GCC) 10.2.1 20210309 (RTEMS 6, RSB 
5e449fb5c2cb6812a238f9f9764fd339cbbf05c2, Newlib d10d0d9)
+Copyright (C) 2020 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] rtems-examples: Add CoreMark Benchmark

2021-03-14 Thread Joel Sherrill
I don't see any RTEMS specific instructions added. Especially
since I think you need them to deal with the submodule.

What happens when you haven't dealt with the submodule? Is the
error reasonable? I would think a directory is missing and the waf
build will die.

I am thrilled to see these added. Any advice for how we can use
these in the project. Compare architectures? RTEMS versions?

--joel

On Sat, Mar 13, 2021 at 1:50 AM Hesham Almatary <
hesham.almat...@cl.cam.ac.uk> wrote:

> CoreMark's primary goals are simplicity and providing a method for
> testing only a processor's core features. It is used primarily here as
> a performance benchmark.
>
> Built and tested for RISC-V rv64imafdc_medany on QEMU and HW
> ---
>  .gitmodules  |  3 +++
>  benchmarks/coremark/coremark |  1 +
>  benchmarks/coremark/wscript  | 50 
>  benchmarks/wscript   |  2 +-
>  4 files changed, 55 insertions(+), 1 deletion(-)
>  create mode 16 benchmarks/coremark/coremark
>  create mode 100644 benchmarks/coremark/wscript
>
> diff --git a/.gitmodules b/.gitmodules
> index ae86e49..d7e52b9 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -1,3 +1,6 @@
>  [submodule "rtems_waf"]
> path = rtems_waf
> url = git://git.rtems.org/rtems_waf.git
> +[submodule "benchmarks/coremark/coremark"]
> +   path = benchmarks/coremark/coremark
> +   url = g...@github.com:eembc/coremark.git
> diff --git a/benchmarks/coremark/coremark b/benchmarks/coremark/coremark
> new file mode 16
> index 000..1541482
> --- /dev/null
> +++ b/benchmarks/coremark/coremark
> @@ -0,0 +1 @@
> +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0
> diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript
> new file mode 100644
> index 000..2ec5f1e
> --- /dev/null
> +++ b/benchmarks/coremark/wscript
> @@ -0,0 +1,50 @@
> +#-
> +# SPDX-License-Identifier: BSD-2-Clause
> +#
> +# Copyright (c) 2021 Hesham Almatary
> +#
> +# This software was developed by SRI International and the University of
> +# Cambridge Computer Laboratory (Department of Computer Science and
> +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of
> the
> +# DARPA SSITH research programme.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +# 1. Redistributions of source code must retain the above copyright
> +#notice, this list of conditions and the following disclaimer.
> +# 2. Redistributions in binary form must reproduce the above copyright
> +#notice, this list of conditions and the following disclaimer in the
> +#documentation and/or other materials provided with the distribution.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
> PURPOSE
> +# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> CONSEQUENTIAL
> +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
> STRICT
> +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
> WAY
> +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> +# SUCH DAMAGE.
> +#
> +
> +import rtems_waf.rtems as rtems
> +
> +def build(bld):
> +rtems.build(bld)
> +
> +bld(features = 'c cprogram',
> +target = 'coremark.bin',
> +includes = ['coremark/', 'coremark/posix/'],
> +source = ['coremark/rtems/init.c', 'coremark/posix/core_portme.c',
> +  'coremark/core_list_join.c', 'coremark/core_main.c',
> +  'coremark/core_matrix.c', 'coremark/core_state.c',
> +  'coremark/core_util.c'],
> +
> +defines = [
> +# FLAGS_STR is used within CoreMark to print the compiler flags
> used
> +'FLAGS_STR="'+' '.join([str(flag) for flag in bld.env.CFLAGS])+'"'
> +]
> +)
> diff --git a/benchmarks/wscript b/benchmarks/wscript
> index 12741e7..0947060 100644
> --- a/benchmarks/wscript
> +++ b/benchmarks/wscript
> @@ -7,4 +7,4 @@ import rtems_waf.rtems as rtems
>
>  def build(bld):
>  bld.recurse('nbench')
> -
> +bld.recurse('coremark')
> --
> 2.25.1
>
> ___
> 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

[PATCH 2/6] rtems-docs: Update command for offline download

2021-03-14 Thread Ida Delphine
Changed command from ../source-builder/sb-set-builder --source-only-download 
5/rtems-sparc to ../source-builder/sb-set-builder --source-only-download 
6/rtems-sparc.
Updated sample output as well
---
 user/start/sources.rst | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/user/start/sources.rst b/user/start/sources.rst
index 8c40aa0..f4cb8ae 100644
--- a/user/start/sources.rst
+++ b/user/start/sources.rst
@@ -10,7 +10,7 @@ Obtain the Sources
 ==
 
 You have considered and chosen a suitable installation prefix in the previous
-section.  We have chosen :file:`$HOME/quick-start/rtems/5` as the installation
+section.  We have chosen :file:`$HOME/quick-start/rtems/6` as the installation
 prefix. We will show how to use a released version of RTEMS and then as an
 alternative we will show you using the :ref:`RSB Git repository
 `. Consider using a Git clone if you wish to make
@@ -114,17 +114,17 @@ the sources to build the ERC 32 BSP before building run 
the following commands:
 .. code-block:: none
 
 cd $HOME/quick-start/src/rsb/rtems
-../source-builder/sb-set-builder --source-only-download 5/rtems-sparc
+../source-builder/sb-set-builder --source-only-download 6/rtems-sparc
 
 This command should output something like this (omitted lines are denoted by
 ``...``):
 
 .. code-block:: none
 
-RTEMS Source Builder - Set Builder, 5.1.0
-Build Set: 5/rtems-sparc
+RTEMS Source Builder - Set Builder, 6
+Build Set: 6/rtems-sparc
 ...
-download: 
https://ftp.rtems.org/pub/rtems/releases/5/5.1.0/5.1.0/sources/gcc-7.5.0.tar.xz 
-> sources/gcc-7.5.0.tar.xz
+download: https://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 -> 
sources/gmp-6.1.0.tar.bz2
 ...
 Build Sizes: usage: 0.000B total: 143.814MB (sources: 143.793MB, patches: 
21.348KB, installed 0.000B)
 Build Set: Time 0:05:52.617958
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 1/6] rtems-docs: Update installation prefix

2021-03-14 Thread Ida Delphine
---
 user/start/prefixes.rst | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/user/start/prefixes.rst b/user/start/prefixes.rst
index 67255d0..826ce85 100644
--- a/user/start/prefixes.rst
+++ b/user/start/prefixes.rst
@@ -40,7 +40,7 @@ applications and systems.
 You build and install the tool suite with the :ref:`RTEMS Source Builder (RSB)
 `.  By default, the RSB will start the prefix path with a host operating
 system specific path plus :file:`rtems`, and the RTEMS version, e.g.
-:file:`/opt/rtems/5` on Linux, and :file:`/usr/local/rtems/5` on FreeBSD and
+:file:`/opt/rtems/6` on Linux, and :file:`/usr/local/rtems/6` on FreeBSD and
 macOS. Placing the RTEMS version number in the path lets you manage and
 migrate RTEMS versions as they are released.
 
@@ -50,10 +50,10 @@ make sure that your normal user has sufficient privileges 
to create files and
 directories under the prefix.  For example, you can create a directory
 :file:`/opt/rtems` and give it to a developer group with read, write, and
 execute permissions.  Alternatively, you can choose a prefix in your home
-directory, e.g. :file:`$HOME/rtems/5` or with a project-specific component
-:file:`$HOME/project-x/rtems/5`.  For more ideas, see the :ref:`project
+directory, e.g. :file:`$HOME/rtems/6` or with a project-specific component
+:file:`$HOME/project-x/rtems/6`.  For more ideas, see the :ref:`project
 sandboxing ` section.  In this quick start chapter, we will
-choose :file:`$HOME/quick-start/rtems/5` for the RTEMS tool suite prefix.
+choose :file:`$HOME/quick-start/rtems/6` for the RTEMS tool suite prefix.
 
 .. warning::
 
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH 6/6] rtems-docs: Edit commands to build first app

2021-03-14 Thread Ida Delphine
---
 user/start/app.rst | 104 ++---
 1 file changed, 52 insertions(+), 52 deletions(-)

diff --git a/user/start/app.rst b/user/start/app.rst
index 8900f78..c343551 100644
--- a/user/start/app.rst
+++ b/user/start/app.rst
@@ -8,7 +8,7 @@ Build Your Application
 ==
 
 You tested a BSP in the previous section.  We built the ``erc32`` BSP
-and it is installed under :file:`$HOME/quick-start/rtems/5`.
+and it is installed under :file:`$HOME/quick-start/rtems/6`.
 
 We will now create a simple Hello World application with a Git
 repository and using the `Waf `_ build system.
@@ -107,7 +107,7 @@ and copy the Waf script:
 #
 from __future__ import print_function
 
-rtems_version = "5"
+rtems_version = "6"
 
 try:
 import rtems_waf.rtems as rtems
@@ -142,52 +142,52 @@ Configure the application using Waf's ``configure`` 
command:
 
 .. code-block:: none
 
-./waf configure --rtems=$HOME/quick-start/rtems/5 --rtems-bsp=sparc/erc32
+./waf configure --rtems=$HOME/quick-start/rtems/6 --rtems-bsp=sparc/erc32 
--rtems-version=6
 
 The output will be something close to:
 
 .. code-block:: none
 
- Setting top to   : $BASE/app/hello
- Setting out to   : $BASE/app/hello/build
- RTEMS Version: 5
- Architectures: sparc-rtems5
- Board Support Package (BSP)  : sparc-rtems5-erc32
- Show commands: no
- Long commands: no
- Checking for program 'sparc-rtems5-gcc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
- Checking for program 'sparc-rtems5-g++'  : 
$BASE/rtems/5/bin/sparc-rtems5-g++
- Checking for program 'sparc-rtems5-gcc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
- Checking for program 'sparc-rtems5-ld'   : 
$BASE/rtems/5/bin/sparc-rtems5-ld
- Checking for program 'sparc-rtems5-ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
- Checking for program 'sparc-rtems5-nm'   : 
$BASE/rtems/5/bin/sparc-rtems5-nm
- Checking for program 'sparc-rtems5-objdump' : 
$BASE/rtems/5/bin/sparc-rtems5-objdump
- Checking for program 'sparc-rtems5-objcopy' : 
$BASE/rtems/5/bin/sparc-rtems5-objcopy
- Checking for program 'sparc-rtems5-readelf' : 
$BASE/rtems/5/bin/sparc-rtems5-readelf
- Checking for program 'sparc-rtems5-strip'   : 
$BASE/rtems/5/bin/sparc-rtems5-strip
- Checking for program 'sparc-rtems5-ranlib'  : 
$BASE/rtems/5/bin/sparc-rtems5-ranlib
- Checking for program 'rtems-ld' : $BASE/rtems/5/bin/rtems-ld
- Checking for program 'rtems-tld': $BASE/rtems/5/bin/rtems-tld
- Checking for program 'rtems-syms'   : $BASE/rtems/5/bin/rtems-syms
- Checking for program 'rtems-bin2c'  : 
$BASE/rtems/5/bin/rtems-bin2c
- Checking for program 'tar'  : /usr/bin/tar
- Checking for program 'gcc, cc'  : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
- Checking for program 'ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
- Checking for program 'g++, c++' : 
$BASE/rtems/5/bin/sparc-rtems5-g++
- Checking for program 'ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
- Checking for program 'gas, gcc' : 
$BASE/rtems/5/bin/sparc-rtems5-gcc
- Checking for program 'ar'   : 
$BASE/rtems/5/bin/sparc-rtems5-ar
- Checking for c flags '-MMD' : yes
- Checking for cxx flags '-MMD'   : yes
- Compiler version (sparc-rtems5-gcc) : 7.5.0 20191114 (RTEMS 5, 
RSB 5.1.0, Newlib fbaa096)
- Checking for a valid RTEMS BSP installation : yes
- Checking for RTEMS_DEBUG: no
- Checking for RTEMS_MULTIPROCESSING  : no
- Checking for RTEMS_NEWLIB   : yes
- Checking for RTEMS_POSIX_API: yes
- Checking for RTEMS_SMP  : no
- Checking for RTEMS_NETWORKING   : no
- 'configure' finished successfully (0.686s)
+Setting top to   : $BASE/app/hello 
+Setting out to   : $BASE/app/hello/build 
+RTEMS Version: 6 
+Architectures: sparc-rtems6 
+Board Support Package (BSP)  : sparc-rtems6-erc32 
+Show commands: no 
+Long commands: no 
+Checking for program 'sparc-rtems6-gcc'  : 
$BASE/rtems/6/bin/sparc-rtems6-gcc 
+Checking for program 'sparc-rtems6-g++'  : 
$BASE/rtems/6/bin/sparc-rtems6-g++ 
+Checking for program 'sparc-rtems6-gcc'  : 
$BASE/rtems/6/bin/sparc-rtems6-gcc 
+Checking for program 'sparc-rtems6-ld'   : 
$BASE/rtems/6/bin/sparc-rtems6-ld 
+Checking for program 'sparc-rtems6-ar'   : 
$BASE/rtems/6/bin/sparc-rtems6-a

Re: [PATCH] covoar: Fix DWARF reading

2021-03-14 Thread Joel Sherrill
On Fri, Mar 12, 2021 at 5:47 PM Chris Johns  wrote:

> These are design question and not review issues 
>
> On 12/3/21 5:33 am, Alex White wrote:
> > +  // Create data based on target.
> > +  TargetInfo = Target::TargetFactory( buildTarget );
>
> Any pointers in this object given there is a copy operator at work here?
>

There shouldn't be.


>
> > +  // Create the set of desired symbols.
> > +  SymbolsToAnalyze = new Coverage::DesiredSymbols();
>
> How hard would it be to convert these types of allocations in covoar to
> std::shared_ptr<> or std::unique_ptr<> (if that is suitable or possible)?
>

We probably need to have a data flow discussion as part of evaluating this.
When (if) this code is parallellized like Alex and I would love to see
done,
the base information gathering will happen upfront and then the analysis
and report generation can happen in separate threads for each symbol
set. This reduces the objdump for sure. I thinkTargetinfo is a shared
read-only
class once created and all threads can share it.

SymbolSet would become a thread local variable since a thread would be
created per SymbolSet.


>
> Chris
> ___
> 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

[PATCH 1/6] rtems-docs: Update installation prefix

2021-03-14 Thread Ida Delphine
---
 user/start/prefixes.rst | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/user/start/prefixes.rst b/user/start/prefixes.rst
index 67255d0..826ce85 100644
--- a/user/start/prefixes.rst
+++ b/user/start/prefixes.rst
@@ -40,7 +40,7 @@ applications and systems.
 You build and install the tool suite with the :ref:`RTEMS Source Builder (RSB)
 `.  By default, the RSB will start the prefix path with a host operating
 system specific path plus :file:`rtems`, and the RTEMS version, e.g.
-:file:`/opt/rtems/5` on Linux, and :file:`/usr/local/rtems/5` on FreeBSD and
+:file:`/opt/rtems/6` on Linux, and :file:`/usr/local/rtems/6` on FreeBSD and
 macOS. Placing the RTEMS version number in the path lets you manage and
 migrate RTEMS versions as they are released.
 
@@ -50,10 +50,10 @@ make sure that your normal user has sufficient privileges 
to create files and
 directories under the prefix.  For example, you can create a directory
 :file:`/opt/rtems` and give it to a developer group with read, write, and
 execute permissions.  Alternatively, you can choose a prefix in your home
-directory, e.g. :file:`$HOME/rtems/5` or with a project-specific component
-:file:`$HOME/project-x/rtems/5`.  For more ideas, see the :ref:`project
+directory, e.g. :file:`$HOME/rtems/6` or with a project-specific component
+:file:`$HOME/project-x/rtems/6`.  For more ideas, see the :ref:`project
 sandboxing ` section.  In this quick start chapter, we will
-choose :file:`$HOME/quick-start/rtems/5` for the RTEMS tool suite prefix.
+choose :file:`$HOME/quick-start/rtems/6` for the RTEMS tool suite prefix.
 
 .. warning::
 
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH] covoar: Fix DWARF reading

2021-03-14 Thread Chris Johns
On 14/3/21 8:43 am, Joel Sherrill wrote:
> On Fri, Mar 12, 2021 at 5:47 PM Chris Johns  > wrote:
> 
> These are design question and not review issues 
> 
> On 12/3/21 5:33 am, Alex White wrote:
> > +  // Create data based on target.
> > +  TargetInfo = Target::TargetFactory( buildTarget );
> 
> Any pointers in this object given there is a copy operator at work here?
> 
> There shouldn't be.
> 
> > +  // Create the set of desired symbols.
> > +  SymbolsToAnalyze = new Coverage::DesiredSymbols();
> 
> How hard would it be to convert these types of allocations in covoar to
> std::shared_ptr<> or std::unique_ptr<> (if that is suitable or possible)?
> 
> We probably need to have a data flow discussion as part of evaluating this.

Sure happy too, but I currently only considering the code in front of me.

> When (if) this code is parallellized like Alex and I would love to see done, 
> the base information gathering will happen upfront and then the analysis
> and report generation can happen in separate threads for each symbol
> set. This reduces the objdump for sure. I thinkTargetinfo is a shared 
> read-only 
> class once created and all threads can share it.

I am wondering about using references or shared pointers and not using any
pointers to objects. This is not related to const or read only attributes.

> SymbolSet would become a thread local variable since a thread would be
> created per SymbolSet.

I would discourage TLS and do not support using it in this case. If you add
threading you can support thread bodies as methods of instances of a class and
that is a better model than TLS.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 2/6] rtems-docs: Update command for offline download

2021-03-14 Thread Ida Delphine
Changed command from ../source-builder/sb-set-builder --source-only-download 
5/rtems-sparc to ../source-builder/sb-set-builder --source-only-download 
6/rtems-sparc.
Updated sample output as well
---
 user/start/sources.rst | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/user/start/sources.rst b/user/start/sources.rst
index 8c40aa0..f4cb8ae 100644
--- a/user/start/sources.rst
+++ b/user/start/sources.rst
@@ -10,7 +10,7 @@ Obtain the Sources
 ==
 
 You have considered and chosen a suitable installation prefix in the previous
-section.  We have chosen :file:`$HOME/quick-start/rtems/5` as the installation
+section.  We have chosen :file:`$HOME/quick-start/rtems/6` as the installation
 prefix. We will show how to use a released version of RTEMS and then as an
 alternative we will show you using the :ref:`RSB Git repository
 `. Consider using a Git clone if you wish to make
@@ -114,17 +114,17 @@ the sources to build the ERC 32 BSP before building run 
the following commands:
 .. code-block:: none
 
 cd $HOME/quick-start/src/rsb/rtems
-../source-builder/sb-set-builder --source-only-download 5/rtems-sparc
+../source-builder/sb-set-builder --source-only-download 6/rtems-sparc
 
 This command should output something like this (omitted lines are denoted by
 ``...``):
 
 .. code-block:: none
 
-RTEMS Source Builder - Set Builder, 5.1.0
-Build Set: 5/rtems-sparc
+RTEMS Source Builder - Set Builder, 6
+Build Set: 6/rtems-sparc
 ...
-download: 
https://ftp.rtems.org/pub/rtems/releases/5/5.1.0/5.1.0/sources/gcc-7.5.0.tar.xz 
-> sources/gcc-7.5.0.tar.xz
+download: https://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 -> 
sources/gmp-6.1.0.tar.bz2
 ...
 Build Sizes: usage: 0.000B total: 143.814MB (sources: 143.793MB, patches: 
21.348KB, installed 0.000B)
 Build Set: Time 0:05:52.617958
-- 
2.25.1

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/1] Hello World - Ida's proof to work on rtems

2021-03-14 Thread Gedare Bloom
Hi Ida,

This is acceptable for your proof and no further revisions are
required, but please see my notes below:

On Fri, Mar 12, 2021 at 9:13 PM Ida Delphine  wrote:
>
> From: Meh Mbeh Ida Delphine 
>
Author info looks good, thanks.

> Modified rtems/testsuites/samples/hello/init.c to prove I can work on the 
> RTEMS project for GSoC.
See https://devel.rtems.org/wiki/Developer/Git#GitCommits for more
about preparing "real commits" in the future. This one is acceptable
for the proof.

(We need to merge that text from
https://devel.rtems.org/wiki/Developer/Git#GitCommits into a suitable
subsection in 
https://docs.rtems.org/branches/master/eng/vc-users.html#creating-a-patch
someday.)

> ---
>  testsuites/samples/hello/init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c
> index 34ded37c55..fa581fd447 100644
> --- a/testsuites/samples/hello/init.c
> +++ b/testsuites/samples/hello/init.c
> @@ -22,7 +22,7 @@ static rtems_task Init(
>  {
>rtems_print_printer_fprintf_putc(&rtems_test_printer);
>TEST_BEGIN();
> -  printf( "Hello World\n" );
> +  printf( "Hello World, I'm Ida Deslphine and this is th main proof I can 
> officially work on the RTEMS Project for GSoC. I'm so excited. Thank you all 
> for the help you rendered when I ran into several errors!\n" );

The message is great! :) Now you can start to see why we make this
task part of our proposal preparation!

Note that our code style adheres to a maximum of 80 characters per
line: https://docs.rtems.org/branches/master/eng/coding.html

We are still working toward automated code style checking (which is by
the way a GSoC project: https://devel.rtems.org/ticket/3860 that does
not require strong C/asm skills).

Please add your info to https://devel.rtems.org/wiki/GSoC/2021#StudentsProposals

I guess so far none of the other students who did the proof have added
themselves, but feel free to be first! If you need help on the
formatting, you can go in the prior year's GSoC and see how the table
is set up. (Click Edit on the bottom of the page to find the wiki
source.)

Gedare

>TEST_END();
>rtems_test_exit( 0 );
>  }
> --
> 2.25.1
>
> ___
> 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] GSoC initial Work Proof

2021-03-14 Thread Gedare Bloom
Hi Daman Bir Singh,

This is acceptable for your patch proof and no further revisions are
required. I will send you separate instructions regarding your
screenshot.

Please add your info to https://devel.rtems.org/wiki/GSoC/2021#StudentsProposals
.
I guess so far none of the other students who did the proof have added
themselves, but feel free to be first! If you need help on the
formatting, you can go in the prior year's GSoC and see how the table
is set up. (Click Edit on the bottom of the page to find the wiki
source.)

Gedare

On Fri, Mar 12, 2021 at 11:45 PM Daman Bir Singh
 wrote:
>
> ---
>  testsuites/samples/hello/hello.scn | 3 ++-
>  testsuites/samples/hello/init.c| 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/testsuites/samples/hello/hello.scn 
> b/testsuites/samples/hello/hello.scn
> index d9e92d81d5..e9fc49520f 100644
> --- a/testsuites/samples/hello/hello.scn
> +++ b/testsuites/samples/hello/hello.scn
> @@ -1,3 +1,4 @@
>  *** HELLO WORLD TEST ***
> -Hello World
> +Hello from the Dark Side
> +By Daman Bir Singh, GSoC 2021 applicant
>  *** END OF HELLO WORLD TEST ***
> diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c
> index 34ded37c55..dc79226f42 100644
> --- a/testsuites/samples/hello/init.c
> +++ b/testsuites/samples/hello/init.c
> @@ -22,7 +22,8 @@ static rtems_task Init(
>  {
>rtems_print_printer_fprintf_putc(&rtems_test_printer);
>TEST_BEGIN();
> -  printf( "Hello World\n" );
> +  printf( "Hello from the Dark Side\n" );
> +  printf( "By Daman Bir Singh, GSoC 2021 applicant\n");
>TEST_END();
>rtems_test_exit( 0 );
>  }
> --
> 2.30.1
>
> ___
> 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] rtems-examples: Add CoreMark Benchmark

2021-03-14 Thread Gedare Bloom
Hi Hesham,

Nice work getting this integrated in the upstream. I guess that the
git submodule instructions for building with waf will work for this,
but not Make. How hard would it be for you to integrate the submodule
with Make?

This is fine with me as-is, I just want to know if we can keep it
supporting both build systems.

On Sat, Mar 13, 2021 at 12:50 AM Hesham Almatary
 wrote:
>
> CoreMark's primary goals are simplicity and providing a method for
> testing only a processor's core features. It is used primarily here as
> a performance benchmark.
>
> Built and tested for RISC-V rv64imafdc_medany on QEMU and HW
> ---
>  .gitmodules  |  3 +++
>  benchmarks/coremark/coremark |  1 +
>  benchmarks/coremark/wscript  | 50 
>  benchmarks/wscript   |  2 +-
>  4 files changed, 55 insertions(+), 1 deletion(-)
>  create mode 16 benchmarks/coremark/coremark
>  create mode 100644 benchmarks/coremark/wscript
>
> diff --git a/.gitmodules b/.gitmodules
> index ae86e49..d7e52b9 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -1,3 +1,6 @@
>  [submodule "rtems_waf"]
> path = rtems_waf
> url = git://git.rtems.org/rtems_waf.git
> +[submodule "benchmarks/coremark/coremark"]
> +   path = benchmarks/coremark/coremark
> +   url = g...@github.com:eembc/coremark.git
> diff --git a/benchmarks/coremark/coremark b/benchmarks/coremark/coremark
> new file mode 16
> index 000..1541482
> --- /dev/null
> +++ b/benchmarks/coremark/coremark
> @@ -0,0 +1 @@
> +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0
> diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript
> new file mode 100644
> index 000..2ec5f1e
> --- /dev/null
> +++ b/benchmarks/coremark/wscript
> @@ -0,0 +1,50 @@
> +#-
> +# SPDX-License-Identifier: BSD-2-Clause
> +#
> +# Copyright (c) 2021 Hesham Almatary
> +#
> +# This software was developed by SRI International and the University of
> +# Cambridge Computer Laboratory (Department of Computer Science and
> +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the
> +# DARPA SSITH research programme.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +# 1. Redistributions of source code must retain the above copyright
> +#notice, this list of conditions and the following disclaimer.
> +# 2. Redistributions in binary form must reproduce the above copyright
> +#notice, this list of conditions and the following disclaimer in the
> +#documentation and/or other materials provided with the distribution.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
> +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
> +# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
> +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
> +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
> +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
> +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
> +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> +# SUCH DAMAGE.
> +#
> +
> +import rtems_waf.rtems as rtems
> +
> +def build(bld):
> +rtems.build(bld)
> +
> +bld(features = 'c cprogram',
> +target = 'coremark.bin',
> +includes = ['coremark/', 'coremark/posix/'],
> +source = ['coremark/rtems/init.c', 'coremark/posix/core_portme.c',
> +  'coremark/core_list_join.c', 'coremark/core_main.c',
> +  'coremark/core_matrix.c', 'coremark/core_state.c',
> +  'coremark/core_util.c'],
> +
> +defines = [
> +# FLAGS_STR is used within CoreMark to print the compiler flags used
> +'FLAGS_STR="'+' '.join([str(flag) for flag in bld.env.CFLAGS])+'"'
> +]
> +)
> diff --git a/benchmarks/wscript b/benchmarks/wscript
> index 12741e7..0947060 100644
> --- a/benchmarks/wscript
> +++ b/benchmarks/wscript
> @@ -7,4 +7,4 @@ import rtems_waf.rtems as rtems
>
>  def build(bld):
>  bld.recurse('nbench')
> -
> +bld.recurse('coremark')

I think we usually keep the blank line at the end of the wscript file.
Not a hard rule.

> --
> 2.25.1
>
> ___
> 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: GSoC Introduction, completed getting started guide.

2021-03-14 Thread Gedare Bloom
Hi Daman,

On Fri, Mar 12, 2021 at 10:50 PM Daman Bir Singh
 wrote:
>
> Hello everyone,
>
> I am Daman from Bits Pilani, K K Birla Campus Goa, India. I am very 
> interested in working with your organization for GSoC 2021. I have followed 
> the GSoC Getting Started Guide  and was successfully able to build and change 
> the 'hello' test case.(screenshots and patch attached).
> It would be a great help if you could guide me how to proceed further.
>
This screenshot is acceptable, you can ignore my other email about the
screenshot. Please proceed to update the tracking table with your
info, and start to investigate which open projects you might like to
consider. You will need to engage on this mailing list with the
potential mentors about those projects, as some of the projects may be
no longer available or suitable, and in general the projects need to
be scoped appropriately.

Gedare

> Thanks & Regards,
> Daman Bir Singh
> ___
> 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] rtems-examples: Add CoreMark Benchmark

2021-03-14 Thread Hesham Almatary
On Sat, 13 Mar 2021 at 23:38, Joel Sherrill  wrote:
>
> I don't see any RTEMS specific instructions added. Especially
> since I think you need them to deal with the submodule.
>
I relied on the existing README.waf which gives instructions to init
and update submodules (including rtems-waf itself being a submodule)
https://github.com/RTEMS/rtems-examples/blob/master/README.waf#L26

> What happens when you haven't dealt with the submodule? Is the
> error reasonable? I would think a directory is missing and the waf
> build will die.
>
> I am thrilled to see these added. Any advice for how we can use
> these in the project. Compare architectures? RTEMS versions?
>
Yeah, we used it to measure CPU performance for baremetal applications
between different processor implementations and compiler toolchains.
It reports iterations/second as a final number for a particular
operation. The benchmark is a bit configurable though; you can specify
the number of iterations, threading, FPU support, memory locations,
etc. That can be further customised in wscript or a header file, but I
just submitted this patch with the minimum default changes.


> --joel
>
> On Sat, Mar 13, 2021 at 1:50 AM Hesham Almatary 
>  wrote:
>>
>> CoreMark's primary goals are simplicity and providing a method for
>> testing only a processor's core features. It is used primarily here as
>> a performance benchmark.
>>
>> Built and tested for RISC-V rv64imafdc_medany on QEMU and HW
>> ---
>>  .gitmodules  |  3 +++
>>  benchmarks/coremark/coremark |  1 +
>>  benchmarks/coremark/wscript  | 50 
>>  benchmarks/wscript   |  2 +-
>>  4 files changed, 55 insertions(+), 1 deletion(-)
>>  create mode 16 benchmarks/coremark/coremark
>>  create mode 100644 benchmarks/coremark/wscript
>>
>> diff --git a/.gitmodules b/.gitmodules
>> index ae86e49..d7e52b9 100644
>> --- a/.gitmodules
>> +++ b/.gitmodules
>> @@ -1,3 +1,6 @@
>>  [submodule "rtems_waf"]
>> path = rtems_waf
>> url = git://git.rtems.org/rtems_waf.git
>> +[submodule "benchmarks/coremark/coremark"]
>> +   path = benchmarks/coremark/coremark
>> +   url = g...@github.com:eembc/coremark.git
>> diff --git a/benchmarks/coremark/coremark b/benchmarks/coremark/coremark
>> new file mode 16
>> index 000..1541482
>> --- /dev/null
>> +++ b/benchmarks/coremark/coremark
>> @@ -0,0 +1 @@
>> +Subproject commit 1541482bf3e6ef7f5c69f5be76b14537b60833d0
>> diff --git a/benchmarks/coremark/wscript b/benchmarks/coremark/wscript
>> new file mode 100644
>> index 000..2ec5f1e
>> --- /dev/null
>> +++ b/benchmarks/coremark/wscript
>> @@ -0,0 +1,50 @@
>> +#-
>> +# SPDX-License-Identifier: BSD-2-Clause
>> +#
>> +# Copyright (c) 2021 Hesham Almatary
>> +#
>> +# This software was developed by SRI International and the University of
>> +# Cambridge Computer Laboratory (Department of Computer Science and
>> +# Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of 
>> the
>> +# DARPA SSITH research programme.
>> +#
>> +# Redistribution and use in source and binary forms, with or without
>> +# modification, are permitted provided that the following conditions
>> +# are met:
>> +# 1. Redistributions of source code must retain the above copyright
>> +#notice, this list of conditions and the following disclaimer.
>> +# 2. Redistributions in binary form must reproduce the above copyright
>> +#notice, this list of conditions and the following disclaimer in the
>> +#documentation and/or other materials provided with the distribution.
>> +#
>> +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
>> +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
>> +# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
>> +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
>> +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
>> +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
>> +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
>> +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
>> +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>> +# SUCH DAMAGE.
>> +#
>> +
>> +import rtems_waf.rtems as rtems
>> +
>> +def build(bld):
>> +rtems.build(bld)
>> +
>> +bld(features = 'c cprogram',
>> +target = 'coremark.bin',
>> +includes = ['coremark/', 'coremark/posix/'],
>> +source = ['coremark/rtems/init.c', 'coremark/posix/core_portme.c',
>> +  'coremark/core_list_join.c', 'coremark/core_main.c',
>> +  'coremark/core_matrix.c', 'coremark/core_state.c',
>> +  'coremark/core_util.c'],
>> +
>> +defines = [
>> +# FLAGS_STR is used within CoreMark to print the comp

Re: Call for GSoC Mentors and Ideas

2021-03-14 Thread Gedare Bloom
Hey everyone,

RTEMS was officially accepted to GSoC (hooray!) and I am starting the
process to invite mentors. I think I have invited everyone who
volunteered so far. If you volunteered and don't have an invite,
please let me know. If you would like to volunteer to mentor (review
proposals, co-mentor, or primary mentor) please reply to me so I can
invite you. This year's GSoC is a bit different with less
scope/expectations, although it's not yet clear to me if that will
translate to less time needed to mentor ;)

Gedare

On Fri, Jan 29, 2021 at 3:06 PM Gedare Bloom  wrote:
>
> Hello all,
>
> I'm preparing RTEMS Project application to participate in GSoC. This year 
> will be a bit different, with project scopes reduced by 50% to 175hr (and 
> less stipends too), going back to two halves instead of three phases, and 
> also expanding the pool of eligibility to some non-traditional "students" 
> (such as certificate-seeking). So the experience will be different I guess.
>
> If you're interested in being a potential mentor, please let me know so I can 
> add you to the list and invite you later if we are officially accepted as a 
> mentoring org.
>
> Also, please take a look at 
> https://devel.rtems.org/wiki/Developer/OpenProjects to see if any projects 
> are done/dead or should be added.
>
> Thanks,
> Gedare
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/1] Hello World - Ida's proof to work on rtems

2021-03-14 Thread Ida Delphine
Thanks for the feedback!

On Sun, Mar 14, 2021 at 5:32 PM Gedare Bloom  wrote:

> Hi Ida,
>
> This is acceptable for your proof and no further revisions are
> required, but please see my notes below:
>
> On Fri, Mar 12, 2021 at 9:13 PM Ida Delphine  wrote:
> >
> > From: Meh Mbeh Ida Delphine 
> >
> Author info looks good, thanks.
>
> > Modified rtems/testsuites/samples/hello/init.c to prove I can work on
> the RTEMS project for GSoC.
> See https://devel.rtems.org/wiki/Developer/Git#GitCommits for more
> about preparing "real commits" in the future. This one is acceptable
> for the proof.
>
> (We need to merge that text from
> https://devel.rtems.org/wiki/Developer/Git#GitCommits into a suitable
> subsection in
> https://docs.rtems.org/branches/master/eng/vc-users.html#creating-a-patch
> someday.)
>
> > ---
> >  testsuites/samples/hello/init.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/testsuites/samples/hello/init.c
> b/testsuites/samples/hello/init.c
> > index 34ded37c55..fa581fd447 100644
> > --- a/testsuites/samples/hello/init.c
> > +++ b/testsuites/samples/hello/init.c
> > @@ -22,7 +22,7 @@ static rtems_task Init(
> >  {
> >rtems_print_printer_fprintf_putc(&rtems_test_printer);
> >TEST_BEGIN();
> > -  printf( "Hello World\n" );
> > +  printf( "Hello World, I'm Ida Deslphine and this is th main proof I
> can officially work on the RTEMS Project for GSoC. I'm so excited. Thank
> you all for the help you rendered when I ran into several errors!\n" );
>
> The message is great! :) Now you can start to see why we make this
> task part of our proposal preparation!
>
> Note that our code style adheres to a maximum of 80 characters per
> line: https://docs.rtems.org/branches/master/eng/coding.html
>
> We are still working toward automated code style checking (which is by
> the way a GSoC project: https://devel.rtems.org/ticket/3860 that does
> not require strong C/asm skills).
>
> Please add your info to
> https://devel.rtems.org/wiki/GSoC/2021#StudentsProposals
>
> I guess so far none of the other students who did the proof have added
> themselves, but feel free to be first! If you need help on the
> formatting, you can go in the prior year's GSoC and see how the table
> is set up. (Click Edit on the bottom of the page to find the wiki
> source.)
>
> Gedare
>
> >TEST_END();
> >rtems_test_exit( 0 );
> >  }
> > --
> > 2.25.1
> >
> > ___
> > 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] shell.c: Dereference after null check (CID #26083)

2021-03-14 Thread Chris Johns
On 12/3/21 2:56 am, Ryan Long wrote:
> After talking with Joel, we determined that 'out' shouldn’t be NULL by the 
> time it gets to rtems_shell_login(). 

Did you examine telnet use cases, nested shell calls (eg nesting joel scripts),
telnet and joel scripts, and then the various options that can be set?

> We think that we should put in an assert to check whether stdin and stdout is 
> NULL at https://git.rtems.org/rtems/tree/cpukit/libmisc/shell/shell.c#n968.
> Instead of the check that I put in for this patch, we think it's better to 
> just put another assert at 
> https://git.rtems.org/rtems/tree/cpukit/libmisc/shell/shell.c#n791 for 'out' 
> out of paranoia and to get rid of the Coverity issue.

The semantics around this area with nesting thread calls is complicated and it
took me a while to converge on a workable solution. I suggest you consider
testing with libbsd and telnet if you are not completely sure.

https://devel.rtems.org/ticket/3859

I think any assert needs to placed once an understanding of all the use cases
has been done. I needed to run code and debug things to figure this out. I
thought I understood the code and was tripped up more than once. I did have
applications that support telnet and that helped.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH v2 1/2] covoar: Fix NOP execution marking

2021-03-14 Thread Chris Johns



On 12/3/21 3:14 am, Alex White wrote:
> Some NOP instructions were not being marked as executed because they
> are located at the end of uncovered ranges. This has been fixed.
> ---
>  tester/covoar/CoverageMapBase.cc  |  10 +++
>  tester/covoar/CoverageMapBase.h   |   4 ++
>  tester/covoar/DesiredSymbols.cc   |  38 --
>  tester/covoar/DesiredSymbols.h|  11 ++-
>  tester/covoar/ObjdumpProcessor.cc | 114 +++---
>  5 files changed, 142 insertions(+), 35 deletions(-)
> 
> diff --git a/tester/covoar/CoverageMapBase.cc 
> b/tester/covoar/CoverageMapBase.cc
> index ad0080d..6ca5cf7 100644
> --- a/tester/covoar/CoverageMapBase.cc
> +++ b/tester/covoar/CoverageMapBase.cc
> @@ -142,6 +142,11 @@ namespace Coverage {
>  return size;
>}
>  
> +  uint32_t CoverageMapBase::getSizeOfRange( size_t index ) const
> +  {
> +return Ranges.at(index).size();
> +  }
> +
>bool CoverageMapBase::getBeginningOfInstruction(
>  uint32_t  address,
>  uint32_t* beginning
> @@ -178,6 +183,11 @@ namespace Coverage {
>  return Ranges.front().lowAddress;
>}
>  
> +  uint32_t CoverageMapBase::getLowAddressOfRange( size_t index ) const
> +  {
> +return Ranges.at(index).lowAddress;
> +  }
> +
>bool CoverageMapBase::getRange( uint32_t address, AddressRange& range ) 
> const
>{
>  for ( auto r : Ranges ) {
> diff --git a/tester/covoar/CoverageMapBase.h b/tester/covoar/CoverageMapBase.h
> index 6ad76d3..a58c696 100644
> --- a/tester/covoar/CoverageMapBase.h
> +++ b/tester/covoar/CoverageMapBase.h
> @@ -156,6 +156,8 @@ namespace Coverage {
>   */
>  int32_t getFirstLowAddress() const;
>  
> +uint32_t getLowAddressOfRange( size_t index ) const;
> +
>  /*!
>   *  This method returns true and sets the address range if
>   *  the address falls with the bounds of an address range
> @@ -177,6 +179,8 @@ namespace Coverage {
>   */
>  uint32_t getSize() const;
>  
> +uint32_t getSizeOfRange( size_t index ) const;
> +
>  /*!
>   *  This method returns the address of the beginning of the
>   *  instruction that contains the specified address.
> diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc
> index b9a5bb7..c97b25c 100644
> --- a/tester/covoar/DesiredSymbols.cc
> +++ b/tester/covoar/DesiredSymbols.cc
> @@ -142,7 +142,7 @@ namespace Coverage {
>CoverageMapBase* theCoverageMap = s.second.unifiedCoverageMap;
>if (theCoverageMap)
>{
> -// Increment the total sizeInBytes byt the bytes in the symbol
> +// Increment the total sizeInBytes by the bytes in the symbol
>  stats.sizeInBytes += s.second.stats.sizeInBytes;
>  
>  // Now scan through the coverage map of this symbol.
> @@ -202,6 +202,26 @@ namespace Coverage {
>  uint32_t count;
>  
>  // Mark NOPs as executed
> +a = s.second.stats.sizeInBytes - 1;
> +count = 0;
> +while (a > 0) {
> +  if (theCoverageMap->isStartOfInstruction( a )) {
> +break;
> +  }
> +
> +  count++;
> +
> +  if (theCoverageMap->isNop( a )) {
> +for (la = a; la < (a + count); la++) {
> +  theCoverageMap->setWasExecuted( la );
> +}
> +
> +count = 0;
> +  }
> +
> +  a--;
> +}
> +
>  endAddress = s.second.stats.sizeInBytes - 1;
>  a = 0;
>  while (a < endAddress) {
> @@ -223,12 +243,13 @@ namespace Coverage {
>ha++;
>if ( ha >= endAddress )
>  break;
> -} while ( !theCoverageMap->isStartOfInstruction( ha ) );
> +} while ( !theCoverageMap->isStartOfInstruction( ha ) ||
> +  theCoverageMap->isNop( ha ) );
>a = ha;
>  }
>  
>  // Now scan through the coverage map of this symbol.
> -endAddress = s.second.stats.sizeInBytes - 1;
> +endAddress = s.second.stats.sizeInBytesWithoutNops - 1;
>  a = 0;
>  while (a <= endAddress) {
>// If an address was NOT executed, find consecutive unexecuted
> @@ -316,7 +337,8 @@ namespace Coverage {
>void DesiredSymbols::createCoverageMap(
>  const std::string& exefileName,
>  const std::string& symbolName,
> -uint32_t   size
> +uint32_t   size,
> +uint32_t   sizeWithoutNops
>)
>{
>  CoverageMapBase* aCoverageMap;
> @@ -354,9 +376,10 @@ namespace Coverage {
><< '/' << size << ')'
><< std::endl;
>  
> -if ( itr->second.stats.sizeInBytes < size )
> +if ( itr->second.stats.sizeInBytes < size ) {
>itr->second.stats.sizeInBytes = size;
> -else
> +  itr->second.stats.sizeInBytesWithoutNops = sizeWithoutNops;
> +} else
>size = itr->second.stats.sizeInBytes;
>}
>  }
> @@ -376,6 +399,7 @@ namespace

Re: [PATCH 1/2] covoar: Fix NOP execution marking

2021-03-14 Thread Chris Johns
On 12/3/21 3:18 am, Gedare Bloom wrote:
> On Thu, Mar 11, 2021 at 9:01 AM Alex White  wrote:
>>
>> Hi Chris,
>>
>> Good catch. That looks to be left over from some debugging I was doing.
>>
> I caught what you did there. Ha, ha, ha, I hope you don't take
> exception to my pun. I tried to restrain myself.

I have been left wondering where you derive your sense of humour from ...
std::dad_jokes?

Chris

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/2] covoar/CoverageReaderQEMU: Fix infinite loop

2021-03-14 Thread Chris Johns
On 12/3/21 5:30 am, Alex White wrote:
> There was a potential that the branch info loop never terminated.
> This has been fixed by adding a more reliable termination condition
> and logging an error if it cannot find the branch target.
> ---
>  tester/covoar/CoverageReaderQEMU.cc | 11 +--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/tester/covoar/CoverageReaderQEMU.cc 
> b/tester/covoar/CoverageReaderQEMU.cc
> index 7c344e4..fb1709d 100644
> --- a/tester/covoar/CoverageReaderQEMU.cc
> +++ b/tester/covoar/CoverageReaderQEMU.cc
> @@ -76,7 +76,7 @@ namespace Coverage {
>  //
>  // Read ENTRIES number of trace entries.
>  //
> -#define ENTRIES 1024
> +#define ENTRIES 2

1024 sure, 20,000 ... hmmm ... I am not so sure. If you need more would is the
change 200,000? Maybe a better solution exists.

>  while (true) {
>CoverageMapBase *aCoverageMap = NULL;
>struct trace_entry  entries[ENTRIES];

Can an array or resized vector be used here?

> @@ -118,8 +118,15 @@ namespace Coverage {
>  // Determine if additional branch information is available.
>  if ( (entry->op & branchInfo) != 0 ) {
>uint32_t  a = entry->pc + entry->size - 1;

An aside ... more pointers being used.

Chris

> -while (!aCoverageMap->isStartOfInstruction(a))
> +while (a > entry->pc && !aCoverageMap->isStartOfInstruction(a))
>a--;
> +if (a == entry->pc && !aCoverageMap->isStartOfInstruction(a)) {
> +  // Something went wrong parsing the objdump.
> +  std::ostringstream what;
> +  what << "Reached beginning of range in " << file
> +<< " at " << entry->pc << " with no start of instruction.";
> +  throw rld::error( what, "CoverageReaderQEMU::processFile" );
> +}
>  if (entry->op & taken) {
>aCoverageMap->setWasTaken( a );
>  } else if (entry->op & notTaken) {
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v2] shell.c: Fix Dereference after null check (CID #26083)

2021-03-14 Thread Chris Johns
Sorry, this patch is blocked by the v1 thread.

Chris

On 12/3/21 9:17 am, Ryan Long wrote:
> CID 26083: Dereference after null check in rtems_shell_login().
> 
> Closes #4327
> ---
>  cpukit/libmisc/shell/shell.c | 5 +
>  1 file changed, 5 insertions(+)
> 
> diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
> index 1e5962b..ad47460 100644
> --- a/cpukit/libmisc/shell/shell.c
> +++ b/cpukit/libmisc/shell/shell.c
> @@ -789,6 +789,8 @@ static bool rtems_shell_login(rtems_shell_env_t *env, 
> FILE * in,FILE * out)
>  }
>}
>  
> +  _Assert(out != NULL);
> +
>return rtems_shell_login_prompt(in, out, env->devname, env->login_check);
>  }
>  
> @@ -966,6 +968,9 @@ bool rtems_shell_main_loop(
>  "shell: cannot allocate prompt memory\n");
>}
>  
> +  _Assert(stdin != NULL);
> +  _Assert(stdout != NULL);
> +
>shell_std_debug("child out: %d (%p)\n", fileno(stdout), stdout);
>shell_std_debug("child  in: %d (%p)\n", fileno(stdin), stdin);
>  
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 4/5] flashdisk.c: Fix Resource leak (CID #1439298)

2021-03-14 Thread Chris Johns



On 13/3/21 2:18 am, Ryan Long wrote:
> CID 1439298: Resource leak in rtems_fdisk_initialize().
> 
> Closes #4299
> ---
>  cpukit/libblock/src/flashdisk.c | 42 
> ++---
>  1 file changed, 31 insertions(+), 11 deletions(-)
> 
> diff --git a/cpukit/libblock/src/flashdisk.c b/cpukit/libblock/src/flashdisk.c
> index 91f99e0..c4bac82 100644
> --- a/cpukit/libblock/src/flashdisk.c
> +++ b/cpukit/libblock/src/flashdisk.c
> @@ -2463,6 +2463,7 @@ rtems_fdisk_initialize (rtems_device_major_number major,
>{
>  char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
>  uint32_t device;
> +uint32_t device_to_free;
>  uint32_t blocks = 0;
>  int  ret;
>  
> @@ -2485,18 +2486,27 @@ rtems_fdisk_initialize (rtems_device_major_number 
> major,
>   * One copy buffer of a page size.
>   */
>  fd->copy_buffer = malloc (c->block_size);
> -if (!fd->copy_buffer)
> +if (!fd->copy_buffer) {
> +  free(fd);
>return RTEMS_NO_MEMORY;
> +}
>  
>  fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
> -if (!fd->blocks)
> +if (!fd->blocks) {
> +  free(fd->copy_buffer);
> +  free(fd);
>return RTEMS_NO_MEMORY;
> +}
>  
>  fd->block_count = blocks;
>  
>  fd->devices = calloc (c->device_count, sizeof (rtems_fdisk_device_ctl));
> -if (!fd->devices)
> +if (!fd->devices) {
> +  free (fd->blocks);
> +  free (fd->copy_buffer);
> +  free (fd);
>return RTEMS_NO_MEMORY;
> +}
>  
>  rtems_mutex_init (&fd->lock, "Flash Disk");
>  
> @@ -2505,9 +2515,10 @@ rtems_fdisk_initialize (rtems_device_major_number 
> major,
>  if (sc != RTEMS_SUCCESSFUL)
>  {
>rtems_mutex_destroy (&fd->lock);
> -  free (fd->copy_buffer);
> -  free (fd->blocks);
>free (fd->devices);
> +  free (fd->blocks);
> +  free (fd->copy_buffer);

Why the order change?

> +  free (fd);

What happens to the created blkdev the fd is passed into? Does that need to be
destroyed before this is released?

Same for the other cases below?

Chris

>rtems_fdisk_error ("disk create phy failed");
>return sc;
>  }
> @@ -2524,11 +2535,14 @@ rtems_fdisk_initialize (rtems_device_major_number 
> major,
>   sizeof 
> (rtems_fdisk_segment_ctl));
>if (!fd->devices[device].segments)
>{
> +for (device_to_free = device - 1; device_to_free >= 0; 
> device_to_free--)
> +   free(fd->devices[device_to_free].segments);
>  unlink (name);
>  rtems_mutex_destroy (&fd->lock);
> -free (fd->copy_buffer);
> -free (fd->blocks);
>  free (fd->devices);
> +free (fd->blocks);
> +free (fd->copy_buffer);
> +free (fd);
>  return RTEMS_NO_MEMORY;
>}
>  
> @@ -2559,11 +2573,14 @@ rtems_fdisk_initialize (rtems_device_major_number 
> major,
>  ret = rtems_fdisk_recover_block_mappings (fd);
>  if (ret)
>  {
> +  for (device_to_free = device - 1; device_to_free >= 0; 
> device_to_free--)
> +free(fd->devices[device_to_free].segments);
>unlink (name);
>rtems_mutex_destroy (&fd->lock);
> -  free (fd->copy_buffer);
> -  free (fd->blocks);
>free (fd->devices);
> +  free (fd->blocks);
> +  free (fd->copy_buffer);
> +  free (fd);
>rtems_fdisk_error ("recovery of disk failed: %s (%d)",
>   strerror (ret), ret);
>return ret;
> @@ -2572,11 +2589,14 @@ rtems_fdisk_initialize (rtems_device_major_number 
> major,
>  ret = rtems_fdisk_compact (fd);
>  if (ret)
>  {
> +  for (device_to_free = device - 1; device_to_free >= 0; 
> device_to_free--)
> +free(fd->devices[device_to_free].segments);
>unlink (name);
>rtems_mutex_destroy (&fd->lock);
> -  free (fd->copy_buffer);
> -  free (fd->blocks);
>free (fd->devices);
> +  free (fd->blocks);
> +  free (fd->copy_buffer);
> +  free (fd);
>rtems_fdisk_error ("compacting of disk failed: %s (%d)",
>   strerror (ret), ret);
>return ret;
> 
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 5/5] rtl-shell.c: Resource leak (CID #1444140)

2021-03-14 Thread Chris Johns
On 13/3/21 2:18 am, Ryan Long wrote:
> CID 1444140: Resource leak in rtems_rtl_shell_object().
> 
> Closes #4300
> ---
>  cpukit/libdl/rtl-shell.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/cpukit/libdl/rtl-shell.c b/cpukit/libdl/rtl-shell.c
> index 9f8a136..bcecdd4 100644
> --- a/cpukit/libdl/rtl-shell.c
> +++ b/cpukit/libdl/rtl-shell.c
> @@ -733,14 +733,17 @@ rtems_rtl_shell_object (const rtems_printer* printer, 
> int argc, char* argv[])
>  if (dlinfo (RTLD_SELF, RTLD_DI_UNRESOLVED, &unresolved) < 0)
>  {
>rtems_printf (printer, "error: %s: %s\n", argv[arg], dlerror ());
> +  (void) dlclose (handle);
>return 1;
>  }
>  
>  if (unresolved != 0)
>  {
>rtems_printf (printer, "warning: unresolved symbols present\n");
> +  (void) dlclose (handle);
>return 1;
>  }
> +  (void) dlclose (handle);
>}
>else if (strcmp (argv[arg], "unload") == 0)
>{
> 

The handle should be not closed in any of these cases. Have you run the command
after making these changes and played with command?

This shell command is a tool to load and play with loaded modules and one
command is to load a module and others let you play with it. The handle address
is printed on the console. Coverity may like to track and nag you about things
like this but it is not always right.

In relation to all these Coverity changes ... are all these changes being
tested? Is the boarder context of the change being examined in relation to the
specific change?

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH v3 1/2] covoar: Fix NOP execution marking

2021-03-14 Thread Chris Johns
This v3 set is blocked by the v2 questions I have raised.

Chris

On 13/3/21 2:48 am, Alex White wrote:
> Some NOP instructions were not being marked as executed because they
> are located at the end of uncovered ranges. This has been fixed.
> ---
>  tester/covoar/CoverageMapBase.cc  |  10 +++
>  tester/covoar/CoverageMapBase.h   |   4 ++
>  tester/covoar/DesiredSymbols.cc   |  38 --
>  tester/covoar/DesiredSymbols.h|  11 ++-
>  tester/covoar/ObjdumpProcessor.cc | 112 +++---
>  5 files changed, 140 insertions(+), 35 deletions(-)
> 
> diff --git a/tester/covoar/CoverageMapBase.cc 
> b/tester/covoar/CoverageMapBase.cc
> index ad0080d..6ca5cf7 100644
> --- a/tester/covoar/CoverageMapBase.cc
> +++ b/tester/covoar/CoverageMapBase.cc
> @@ -142,6 +142,11 @@ namespace Coverage {
>  return size;
>}
>  
> +  uint32_t CoverageMapBase::getSizeOfRange( size_t index ) const
> +  {
> +return Ranges.at(index).size();
> +  }
> +
>bool CoverageMapBase::getBeginningOfInstruction(
>  uint32_t  address,
>  uint32_t* beginning
> @@ -178,6 +183,11 @@ namespace Coverage {
>  return Ranges.front().lowAddress;
>}
>  
> +  uint32_t CoverageMapBase::getLowAddressOfRange( size_t index ) const
> +  {
> +return Ranges.at(index).lowAddress;
> +  }
> +
>bool CoverageMapBase::getRange( uint32_t address, AddressRange& range ) 
> const
>{
>  for ( auto r : Ranges ) {
> diff --git a/tester/covoar/CoverageMapBase.h b/tester/covoar/CoverageMapBase.h
> index 6ad76d3..a58c696 100644
> --- a/tester/covoar/CoverageMapBase.h
> +++ b/tester/covoar/CoverageMapBase.h
> @@ -156,6 +156,8 @@ namespace Coverage {
>   */
>  int32_t getFirstLowAddress() const;
>  
> +uint32_t getLowAddressOfRange( size_t index ) const;
> +
>  /*!
>   *  This method returns true and sets the address range if
>   *  the address falls with the bounds of an address range
> @@ -177,6 +179,8 @@ namespace Coverage {
>   */
>  uint32_t getSize() const;
>  
> +uint32_t getSizeOfRange( size_t index ) const;
> +
>  /*!
>   *  This method returns the address of the beginning of the
>   *  instruction that contains the specified address.
> diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc
> index b9a5bb7..c97b25c 100644
> --- a/tester/covoar/DesiredSymbols.cc
> +++ b/tester/covoar/DesiredSymbols.cc
> @@ -142,7 +142,7 @@ namespace Coverage {
>CoverageMapBase* theCoverageMap = s.second.unifiedCoverageMap;
>if (theCoverageMap)
>{
> -// Increment the total sizeInBytes byt the bytes in the symbol
> +// Increment the total sizeInBytes by the bytes in the symbol
>  stats.sizeInBytes += s.second.stats.sizeInBytes;
>  
>  // Now scan through the coverage map of this symbol.
> @@ -202,6 +202,26 @@ namespace Coverage {
>  uint32_t count;
>  
>  // Mark NOPs as executed
> +a = s.second.stats.sizeInBytes - 1;
> +count = 0;
> +while (a > 0) {
> +  if (theCoverageMap->isStartOfInstruction( a )) {
> +break;
> +  }
> +
> +  count++;
> +
> +  if (theCoverageMap->isNop( a )) {
> +for (la = a; la < (a + count); la++) {
> +  theCoverageMap->setWasExecuted( la );
> +}
> +
> +count = 0;
> +  }
> +
> +  a--;
> +}
> +
>  endAddress = s.second.stats.sizeInBytes - 1;
>  a = 0;
>  while (a < endAddress) {
> @@ -223,12 +243,13 @@ namespace Coverage {
>ha++;
>if ( ha >= endAddress )
>  break;
> -} while ( !theCoverageMap->isStartOfInstruction( ha ) );
> +} while ( !theCoverageMap->isStartOfInstruction( ha ) ||
> +  theCoverageMap->isNop( ha ) );
>a = ha;
>  }
>  
>  // Now scan through the coverage map of this symbol.
> -endAddress = s.second.stats.sizeInBytes - 1;
> +endAddress = s.second.stats.sizeInBytesWithoutNops - 1;
>  a = 0;
>  while (a <= endAddress) {
>// If an address was NOT executed, find consecutive unexecuted
> @@ -316,7 +337,8 @@ namespace Coverage {
>void DesiredSymbols::createCoverageMap(
>  const std::string& exefileName,
>  const std::string& symbolName,
> -uint32_t   size
> +uint32_t   size,
> +uint32_t   sizeWithoutNops
>)
>{
>  CoverageMapBase* aCoverageMap;
> @@ -354,9 +376,10 @@ namespace Coverage {
><< '/' << size << ')'
><< std::endl;
>  
> -if ( itr->second.stats.sizeInBytes < size )
> +if ( itr->second.stats.sizeInBytes < size ) {
>itr->second.stats.sizeInBytes = size;
> -else
> +  itr->second.stats.sizeInBytesWithoutNops = sizeWithoutNops;
> +} else
>size = itr->second.stats.s

Re: [PATCH] covoar: Handle periods in symbols from objdump

2021-03-14 Thread Chris Johns



On 13/3/21 3:37 am, Alex White wrote:
> Occasionally the compiler will generate symbols that look similar to
> symbols defined in RTEMS code except that they contain some suffix.
> This looks to be related to compiler optimizations. Such symbols were
> being treated as unique. For our purposes, they should be mapped to
> the equivalent symbols in the DWARF info. This has been fixed.
> ---
>  tester/covoar/ExecutableInfo.cc   | 35 ++-
>  tester/covoar/ObjdumpProcessor.cc |  6 ++
>  tester/covoar/SymbolTable.cc  | 12 ---
>  3 files changed, 49 insertions(+), 4 deletions(-)
> 
> diff --git a/tester/covoar/ExecutableInfo.cc b/tester/covoar/ExecutableInfo.cc
> index c4257f0..1396519 100644
> --- a/tester/covoar/ExecutableInfo.cc
> +++ b/tester/covoar/ExecutableInfo.cc
> @@ -119,6 +119,22 @@ namespace Coverage {
>  itsSymbol = theSymbolTable.getSymbol( address );
>  if (itsSymbol != "") {
>it = coverageMaps.find( itsSymbol );
> +  if (it == coverageMaps.end()) {
> +size_t periodIndex = itsSymbol.find(".");
> +
> +if (periodIndex == std::string::npos) {
> +  // Symbol name has no '.', can't do another lookup.
> +  throw rld::error (itsSymbol, "ExecutableInfo::getCoverageMap");
> +}
> +
> +it = coverageMaps.find(
> +  itsSymbol.substr(0, periodIndex)
> +);
> +
> +if (it == coverageMaps.end()) {
> +  throw rld::error (itsSymbol, "ExecutableInfo::getCoverageMap");
> +}
> +  }
>aCoverageMap = (*it).second;
>  }
>  
> @@ -150,8 +166,25 @@ namespace Coverage {
>)
>{
>  CoverageMaps::iterator cmi = coverageMaps.find( symbolName );
> -if ( cmi == coverageMaps.end() )
> +if ( cmi != coverageMaps.end() ) {
> +  return *(cmi->second);
> +}
> +
> +size_t periodIndex = symbolName.find(".");
> +
> +if (periodIndex == std::string::npos) {
> +  // Symbol name has no '.', can't do another lookup.
>throw rld::error (symbolName, "ExecutableInfo::findCoverageMap");
> +}
> +
> +cmi = coverageMaps.find(
> +  symbolName.substr(0, periodIndex)
> +);
> +
> +if ( cmi == coverageMaps.end() ) {
> +  throw rld::error (symbolName, "ExecutableInfo::findCoverageMap");

The exception takes a what message and this looks like a label?

Is the exception being treated as signal to be caught in another place? I hope
this is _not_ the case. Herb Sutter's write up is good place to start ...

https://www.drdobbs.com/when-and-how-to-use-exceptions/184401836

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 1/5] hexdump-parse.c: Fix Resource leak (CID #26032)

2021-03-14 Thread Chris Johns
On 13/3/21 2:18 am, Ryan Long wrote:
> CID 26032: Resource leak in rtems_shell_hexdump_rewrite().
> 
> Closes #4296
> ---
>  cpukit/libmisc/shell/hexdump-parse.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/cpukit/libmisc/shell/hexdump-parse.c 
> b/cpukit/libmisc/shell/hexdump-parse.c
> index 88b9d56..5b56bbf 100644
> --- a/cpukit/libmisc/shell/hexdump-parse.c
> +++ b/cpukit/libmisc/shell/hexdump-parse.c
> @@ -462,6 +462,9 @@ isint2:   
> switch(fu->bcnt) {
>   (void)printf("\n");
>   }
>  #endif
> +#ifdef __rtems__
> + free(nextpr);
> +#endif

I know this has not been done in imported code in rtems.git before but should we
adopt the libbsd standard of adding /* __rtems__ */ to the #else and #endif?

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH 4/5] flashdisk.c: Fix Resource leak (CID #1439298)

2021-03-14 Thread Joel Sherrill
On Sun, Mar 14, 2021, 9:27 PM Chris Johns  wrote:

>
>
> On 13/3/21 2:18 am, Ryan Long wrote:
> > CID 1439298: Resource leak in rtems_fdisk_initialize().
> >
> > Closes #4299
> > ---
> >  cpukit/libblock/src/flashdisk.c | 42
> ++---
> >  1 file changed, 31 insertions(+), 11 deletions(-)
> >
> > diff --git a/cpukit/libblock/src/flashdisk.c
> b/cpukit/libblock/src/flashdisk.c
> > index 91f99e0..c4bac82 100644
> > --- a/cpukit/libblock/src/flashdisk.c
> > +++ b/cpukit/libblock/src/flashdisk.c
> > @@ -2463,6 +2463,7 @@ rtems_fdisk_initialize (rtems_device_major_number
> major,
> >{
> >  char name[] = RTEMS_FLASHDISK_DEVICE_BASE_NAME "a";
> >  uint32_t device;
> > +uint32_t device_to_free;
> >  uint32_t blocks = 0;
> >  int  ret;
> >
> > @@ -2485,18 +2486,27 @@ rtems_fdisk_initialize
> (rtems_device_major_number major,
> >   * One copy buffer of a page size.
> >   */
> >  fd->copy_buffer = malloc (c->block_size);
> > -if (!fd->copy_buffer)
> > +if (!fd->copy_buffer) {
> > +  free(fd);
> >return RTEMS_NO_MEMORY;
> > +}
> >
> >  fd->blocks = calloc (blocks, sizeof (rtems_fdisk_block_ctl));
> > -if (!fd->blocks)
> > +if (!fd->blocks) {
> > +  free(fd->copy_buffer);
> > +  free(fd);
> >return RTEMS_NO_MEMORY;
> > +}
> >
> >  fd->block_count = blocks;
> >
> >  fd->devices = calloc (c->device_count, sizeof
> (rtems_fdisk_device_ctl));
> > -if (!fd->devices)
> > +if (!fd->devices) {
> > +  free (fd->blocks);
> > +  free (fd->copy_buffer);
> > +  free (fd);
> >return RTEMS_NO_MEMORY;
> > +}
> >
> >  rtems_mutex_init (&fd->lock, "Flash Disk");
> >
> > @@ -2505,9 +2515,10 @@ rtems_fdisk_initialize (rtems_device_major_number
> major,
> >  if (sc != RTEMS_SUCCESSFUL)
> >  {
> >rtems_mutex_destroy (&fd->lock);
> > -  free (fd->copy_buffer);
> > -  free (fd->blocks);
> >free (fd->devices);
> > +  free (fd->blocks);
> > +  free (fd->copy_buffer);
>
> Why the order change?


Does the change make it exactly the opposite order of creation or do you
see it not being in inverse order?

This was a hard one. It was missing a LOT of cleanup.

>
> > +  free (fd);
>
> What happens to the created blkdev the fd is passed into? Does that need
> to be
> destroyed before this is released?
>

I didn't recognise that as an allocation. What's the destroy call for that?

>
> Same for the other cases below?
>
> Chris
>
> >rtems_fdisk_error ("disk create phy failed");
> >return sc;
> >  }
> > @@ -2524,11 +2535,14 @@ rtems_fdisk_initialize
> (rtems_device_major_number major,
> >   sizeof
> (rtems_fdisk_segment_ctl));
> >if (!fd->devices[device].segments)
> >{
> > +for (device_to_free = device - 1; device_to_free >= 0;
> device_to_free--)
> > +   free(fd->devices[device_to_free].segments);
> >  unlink (name);
> >  rtems_mutex_destroy (&fd->lock);
> > -free (fd->copy_buffer);
> > -free (fd->blocks);
> >  free (fd->devices);
> > +free (fd->blocks);
> > +free (fd->copy_buffer);
> > +free (fd);
> >  return RTEMS_NO_MEMORY;
> >}
> >
> > @@ -2559,11 +2573,14 @@ rtems_fdisk_initialize
> (rtems_device_major_number major,
> >  ret = rtems_fdisk_recover_block_mappings (fd);
> >  if (ret)
> >  {
> > +  for (device_to_free = device - 1; device_to_free >= 0;
> device_to_free--)
> > +free(fd->devices[device_to_free].segments);
> >unlink (name);
> >rtems_mutex_destroy (&fd->lock);
> > -  free (fd->copy_buffer);
> > -  free (fd->blocks);
> >free (fd->devices);
> > +  free (fd->blocks);
> > +  free (fd->copy_buffer);
> > +  free (fd);
> >rtems_fdisk_error ("recovery of disk failed: %s (%d)",
> >   strerror (ret), ret);
> >return ret;
> > @@ -2572,11 +2589,14 @@ rtems_fdisk_initialize
> (rtems_device_major_number major,
> >  ret = rtems_fdisk_compact (fd);
> >  if (ret)
> >  {
> > +  for (device_to_free = device - 1; device_to_free >= 0;
> device_to_free--)
> > +free(fd->devices[device_to_free].segments);
> >unlink (name);
> >rtems_mutex_destroy (&fd->lock);
> > -  free (fd->copy_buffer);
> > -  free (fd->blocks);
> >free (fd->devices);
> > +  free (fd->blocks);
> > +  free (fd->copy_buffer);
> > +  free (fd);
> >rtems_fdisk_error ("compacting of disk failed: %s (%d)",
> >   strerror (ret), ret);
> >return ret;
> >
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/li

Linking error with powerpc/beatnik

2021-03-14 Thread Vijay Kumar Banerjee
Hello,

I'm trying to build EPICS7 with RTEMS 6 and legacy-net stack but I'm
getting link errors (posted at the end of the email) from librtemscpu and
librtemsbsp. I'm not sure what's wrong but I think this might be related to
this ticket: https://devel.rtems.org/ticket/3698

There's also an error with multiple definitions of __getreent and that
looks similar to a discussion that happened in 2015:
https://lists.rtems.org/pipermail/devel/2015-June/011587.html

I would appreciate any help or suggestions on how to fix these issues.


Best regards,
Vijay

```
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libdl/rtl-mdreloc-powerpc.c:78:
undefined reference to `bsp_section_sdata_libdl_begin'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libdl/rtl-mdreloc-powerpc.c:79:
undefined reference to `bsp_section_sdata_libdl_end'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libdl/rtl-mdreloc-powerpc.c:79:
undefined reference to `bsp_section_sdata_libdl_end'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/rtems/6/powerpc-rtems6/beatnik/lib/librtemscpu.a(rtl-mdreloc-powerpc.c.63.o):
in function `get_sdata_sbss_size':
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libdl/rtl-mdreloc-powerpc.c:68:
undefined reference to `bsp_section_sdata_begin'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libdl/rtl-mdreloc-powerpc.c:68:
undefined reference to `bsp_section_sdata_begin'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libdl/rtl-mdreloc-powerpc.c:69:
undefined reference to `bsp_section_sbss_end'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libdl/rtl-mdreloc-powerpc.c:69:
undefined reference to `bsp_section_sbss_end'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/rtems/6/powerpc-rtems6/beatnik/lib/librtemscpu.a(rtems_putc.c.70.o):
in function `rtems_putc':
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libcsupport/src/rtems_putc.c:29:
undefined reference to `BSP_output_char'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libcsupport/src/rtems_putc.c:31:
undefined reference to `BSP_output_char'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libcsupport/src/rtems_putc.c:34:
undefined reference to `BSP_output_char'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
/home/vijay/development/rtems/6/powerpc-rtems6/beatnik/lib/librtemscpu.a(cachealignedalloc.c.70.o):
in function `rtems_cache_aligned_malloc':
/home/vijay/development/kernel/rtems/build/powerpc/beatnik/../../../cpukit/libcsupport/src/cachealignedalloc.c:18:
undefined reference to `rtems_cache_get_maximal_line_size'
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
libComTestHarness: hidden symbol `__dso_handle' isn't defined
/home/vijay/development/rtems/6/lib/gcc/powerpc-rtems6/10.2.1/../../../../powerpc-rtems6/bin/ld:
final link failed: bad value

```
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

#3860 - GSoC enquiries

2021-03-14 Thread Ida Delphine
Hello everyone,
This ticket(https://devel.rtems.org/ticket/3860) was proposed to me and I'm
interested in it for GSoC.
The first task there is to find a code checker or formater that can produce
results that match the RTEMS coding conventions. It also made mention some
tools have been discussed in the past. Please I will love suggestions on
possible tools I could use to achieve this.


Cheers,
Ida.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Current master fails make

2021-03-14 Thread Richi Dubey
Hi,

When I run make, I get this error
/home/richi/quick-start/LatestStrong/src/rtems/c/src/../../testsuites/psxtests/psxftw01/init.c:44:10:
fatal error: ftw.h: No such file or directory
   44 | #include 

I think its because of this commit;
https://git.rtems.org/rtems/commit/testsuites/psxtests/psxftw01/init.c?id=a26a326e55922f3d52639d361e49c3ed0c3834c0

Please let me know how to resolve this.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Current master fails make

2021-03-14 Thread Amaan Cheval
Hey Richi,

You probably need to upgrade and rebuild your toolchain using RSB to
support these new ftw.h related tests.

See this relevant mail from the list announcing this:
https://lists.rtems.org/pipermail/users/2021-March/068264.html

Hope that helps!

On Mon, Mar 15, 2021, 12:02 PM Richi Dubey  wrote:

> Hi,
>
> When I run make, I get this error
> /home/richi/quick-start/LatestStrong/src/rtems/c/src/../../testsuites/psxtests/psxftw01/init.c:44:10:
> fatal error: ftw.h: No such file or directory
>44 | #include 
>
> I think its because of this commit;
> https://git.rtems.org/rtems/commit/testsuites/psxtests/psxftw01/init.c?id=a26a326e55922f3d52639d361e49c3ed0c3834c0
>
> Please let me know how to resolve this.
> ___
> 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