Re: CVA6 RISC-V support

2023-08-02 Thread Hesham Almatary
Hello,

Thanks for sending out the patches. Could you please send them as
emails instead of attachments? e.g., using git send-email [1]. That'll
be easier to review and comment on.

[1] https://docs.rtems.org/branches/master/user/support/contrib.html

Regards,
Hesham

On Tue, 1 Aug 2023 at 16:53, EYSSARTIER Kevin
 wrote:
>
> Classified as: {THALES GROUP LIMITED DISTRIBUTION}
>
>
> Hello,
>
>
>
> I am working on the port of RTEMS 6 on our RISC-V processor, the CORE-V CVA6 
> processor
>
> GitHub - ThalesGroup/cva6: The CORE-V CVA6 is an Application class 6-stage 
> RISC-V CPU capable of booting Linux
>
> The port is working and I think it is a good idea to publish my work on the 
> official repository.
>
> During the port I also found two bugs in the RISC-V generic BSP that I 
> corrected.
>
>
>
> I hope it satisfy the quality standards of RTEMS.
>
> Best regards,
>
> ---
>
> Kevin EYSSARTIER, Research Engineer
>
> Thales Research & Technology France – High Performance Computing Lab
> Campus Polytechnique - 1, avenue Augustin Fresnel  - 91767 Palaiseau cedex
> Phone : +33 (0)1 69 41 55 14  Internal : 341 55 14
>
>
>
>
> {THALES GROUP LIMITED DISTRIBUTION}
>
> ___
> 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-tools v3] tester/rtemstoolkit: add renode implementation

2023-08-02 Thread Chris Johns
On 2/8/2023 8:08 pm, Muhammad Sulthan Mazaya wrote:
> Add licensing for renode files and change the renode_scripts/ folder to
> renode/

Where is the license for the .bin file? I only saw a link to the script used to
build it but it was not clear what the license is because it downloads Linux and
that is GPL.

What is the license?

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


RE: CVA6 RISC-V support

2023-08-02 Thread EYSSARTIER Kevin
Classified as: {THALES GROUP LIMITED DISTRIBUTION}

Thanks for your quick answer Joel.
Sorry for not using the “git send-email” command, my company blocks smtp ports 
on dev machines.
Patch 0001:
I corrected the comment.
The modification in riscv/abi.yml is indeed not needed, it has been removed.
The copyright in bspcv32a6.yml is corrected.
Patch 0002:
I did not check if the stdout-path is correctly handled in 
other architectures.
I used the strlen function because it was the one used 
previously in fdt_path_offset.
Patch 0003:
Indeed, my modification will break things.
I observe that the interrupts are enabled here : 
cpukit/score/cpu/riscv/riscv-context-switch.S#L190
which depends on RTEMS_SMP flag. My bsp does not have multi-processor but I 
would like multi-tasking and ISR enabled.
I think something is wrong here, multi-tasking and SMP should be independent.


De : Joel Sherrill 
Envoyé : mardi 1 août 2023 20:54
À : EYSSARTIER Kevin 
Cc : devel@rtems.org
Objet : Re: CVA6 RISC-V support

Thanks for the submission. It's a bit hard to review with the patches as 
attachments rather than having been sent via git send-email but here goes.

Hopefully someone with more RISC-V knowledge can comment also.


0001 - long comment appears to be one line. Please break into multiple lines.

0001 - riscv/abi.yml is this just adding another set of compiler options? Hard 
to tell.

0001 - bspcv32a6.yml - Did this file end up with a copyright?

0002 - same issue with long comment. Blank line between paragraphs.

0002 - Is this a common issue which applies to other BSPs?

0002 - Is there a maximum length of the strings so strnlen() can be used 
instead of strlen()?

0002 - Call strlen/strnlen once on stdout_patch and assign to a variable of 
type size_t

0003 - This looks like it will break every other architecture since they will 
not have had restart renamed to start.
Can you explain what is really not working so we can find a solution that is 
strictly within the RISC-V? There is
also a context method which is invoked in the context of the thread once it 
begins execution. Maybe this will
work. See threadhandler.c for the call to 
_Context_Initialization_at_thread_begin.

I personally am ok for 01 and 02. 03 will require discussion.

--joel


On Tue, Aug 1, 2023 at 10:53 AM EYSSARTIER Kevin 
mailto:kevin.eyssart...@thalesgroup.com>> 
wrote:

Classified as: {THALES GROUP LIMITED DISTRIBUTION}

Hello,

I am working on the port of RTEMS 6 on our RISC-V processor, the CORE-V CVA6 
processor
GitHub - ThalesGroup/cva6: The CORE-V CVA6 is an Application class 6-stage 
RISC-V CPU capable of booting Linux
The port is working and I think it is a good idea to publish my work on the 
official repository.
During the port I also found two bugs in the RISC-V generic BSP that I 
corrected.

I hope it satisfy the quality standards of RTEMS.
Best regards,
---
Kevin EYSSARTIER, Research Engineer
Thales Research & Technology France – High Performance Computing Lab
Campus Polytechnique - 1, avenue Augustin Fresnel  - 91767 Palaiseau cedex
Phone : +33 (0)1 69 41 55 14  Internal : 341 55 14



{THALES GROUP LIMITED DISTRIBUTION}
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


{THALES GROUP LIMITED DISTRIBUTION}


0001-Adding-core-v-cv32a6-support.patch
Description: 0001-Adding-core-v-cv32a6-support.patch


0002-bsps-riscv-Handle-in-chosen-stdout-path.patch
Description: 0002-bsps-riscv-Handle-in-chosen-stdout-path.patch
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] bsps/shared: Fix Coverity warning in MCP7940M

2023-08-02 Thread Christian MAUDERER

On 2023-08-02 15:31, Joel Sherrill wrote:



On Wed, Aug 2, 2023 at 6:45 AM Christian MAUDERER 
> wrote:


Hello Joel,

thanks. Is the ID processed somewhere automatically so that I should
use
a special format? Otherwise I can just just add the error message from
covertity:

** CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time()


It is not processed special. The CID is just nice to have in the future 
and, if needed,

track back to what Coverity saw.

Especially given the history with some of these static analysis 
triggered fixes where

they are hard to get right.


Thanks. I'll add the message and push the patch tomorrow.



--joel


Best regards

Christian

On 2023-08-02 13:43, Joel Sherrill wrote:
 > Ok but out the Coverity Id number in the commit long message
 >
 > On Wed, Aug 2, 2023, 1:17 AM Christian Mauderer
 > mailto:christian.maude...@embedded-brains.de>
 > >> wrote:
 >
 >     Coverity warns that (buf[...] & 0x7) can't be bigger than 7.
This patch
 >     removes the unnecessary comparison.
 >     ---
 >       bsps/shared/dev/rtc/mcp7940m.c | 5 ++---
 >       1 file changed, 2 insertions(+), 3 deletions(-)
 >
 >     diff --git a/bsps/shared/dev/rtc/mcp7940m.c
 >     b/bsps/shared/dev/rtc/mcp7940m.c
 >     index 78a4f21b58..1abc5faaad 100644
 >     --- a/bsps/shared/dev/rtc/mcp7940m.c
 >     +++ b/bsps/shared/dev/rtc/mcp7940m.c
 >     @@ -312,9 +312,8 @@ static int mcp7940m_set_time(int minor, const
 >     rtems_time_of_day *time)
 >         }
 >
 >         if (rv == 0) {
 >     -    /* Make sure weekday is in range. Otherwise it's not
relevant. */
 >     -    if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1 ||
 >     -        RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) > 7) {
 >     +    /* Make sure weekday is not 0 (out of range). Otherwise it's
 >     not used. */
 >     +    if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1) {
 >             buf[REG_RTCWKDAY] &= ~RTCWKDAY_WKDAY_MASK;
 >             buf[REG_RTCWKDAY] |= RTCWKDAY_WKDAY(1);
 >           }
 >     --
 >     2.35.3
 >
 >     ___
 >     devel mailing list
 > devel@rtems.org  >
 > http://lists.rtems.org/mailman/listinfo/devel

 >     >
 >

-- 


embedded brains GmbH & Co. KG
Herr Christian MAUDERER
Dornierstr. 4
82178 Puchheim
Germany
email: christian.maude...@embedded-brains.de

phone:  +49-89-18 94 741 - 18
mobile: +49-176-152 206 08

Registergericht: Amtsgericht München
Registernummer: HRA 117265
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/




--

embedded brains GmbH & Co. KG
Herr Christian MAUDERER
Dornierstr. 4
82178 Puchheim
Germany
email:  christian.maude...@embedded-brains.de
phone:  +49-89-18 94 741 - 18
mobile: +49-176-152 206 08

Registergericht: Amtsgericht München
Registernummer: HRA 117265
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] bsps/shared: Fix Coverity warning in MCP7940M

2023-08-02 Thread Joel Sherrill
On Wed, Aug 2, 2023 at 6:45 AM Christian MAUDERER <
christian.maude...@embedded-brains.de> wrote:

> Hello Joel,
>
> thanks. Is the ID processed somewhere automatically so that I should use
> a special format? Otherwise I can just just add the error message from
> covertity:
>
> ** CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
> /bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time()
>

It is not processed special. The CID is just nice to have in the future
and, if needed,
track back to what Coverity saw.

Especially given the history with some of these static analysis triggered
fixes where
they are hard to get right.

--joel

>
> Best regards
>
> Christian
>
> On 2023-08-02 13:43, Joel Sherrill wrote:
> > Ok but out the Coverity Id number in the commit long message
> >
> > On Wed, Aug 2, 2023, 1:17 AM Christian Mauderer
> >  > > wrote:
> >
> > Coverity warns that (buf[...] & 0x7) can't be bigger than 7. This
> patch
> > removes the unnecessary comparison.
> > ---
> >   bsps/shared/dev/rtc/mcp7940m.c | 5 ++---
> >   1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/bsps/shared/dev/rtc/mcp7940m.c
> > b/bsps/shared/dev/rtc/mcp7940m.c
> > index 78a4f21b58..1abc5faaad 100644
> > --- a/bsps/shared/dev/rtc/mcp7940m.c
> > +++ b/bsps/shared/dev/rtc/mcp7940m.c
> > @@ -312,9 +312,8 @@ static int mcp7940m_set_time(int minor, const
> > rtems_time_of_day *time)
> > }
> >
> > if (rv == 0) {
> > -/* Make sure weekday is in range. Otherwise it's not relevant.
> */
> > -if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1 ||
> > -RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) > 7) {
> > +/* Make sure weekday is not 0 (out of range). Otherwise it's
> > not used. */
> > +if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1) {
> > buf[REG_RTCWKDAY] &= ~RTCWKDAY_WKDAY_MASK;
> > buf[REG_RTCWKDAY] |= RTCWKDAY_WKDAY(1);
> >   }
> > --
> > 2.35.3
> >
> > ___
> > devel mailing list
> > devel@rtems.org 
> > http://lists.rtems.org/mailman/listinfo/devel
> > 
> >
>
> --
> 
> embedded brains GmbH & Co. KG
> Herr Christian MAUDERER
> Dornierstr. 4
> 82178 Puchheim
> Germany
> email:  christian.maude...@embedded-brains.de
> phone:  +49-89-18 94 741 - 18
> mobile: +49-176-152 206 08
>
> Registergericht: Amtsgericht München
> Registernummer: HRA 117265
> Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> Unsere Datenschutzerklärung finden Sie hier:
> https://embedded-brains.de/datenschutzerklaerung/
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Sebastian Huber

On 02.08.23 13:53, Karel Gardas wrote:

A bit off-topic.

On 8/2/23 10:39, Sebastian Huber wrote:
Yes, but this would be another patch and it is a bit more work since 
you have to test the clang support.


Is building with clang already supported? I'm curious since this is 
something I'd like to test locally too but neither code nor tickets give 
me any hope on it. Hence asking directly.


There is some support to build with clang, but I guess this is not 
regularly tested/used. You can test it with:


[riscv/rv64imafdc]
COMPILER = clang

However, this quickly fails with:

[   1/1427] Compiling bsps/shared/dev/serial/mc68681_reg2.c
15:16:15 runner ['/usr/bin/clang', '-MMD', '-Wall', 
'-Wmissing-prototypes', '-Wimplicit-function-declaration', 
'-Wstrict-prototypes', '-Wnested-externs', 
'--target=riscv64-unknown-rtems6', '-march=rv64imafdc', '-mabi=lp64d', 
'-mcmodel=medany', '-O2', '-g', '-fdata-sections', 
'-ffunction-sections', '-Icpukit/include', 
'-I/home/EB/sebastian_h/src/rtems/cpukit/include', 
'-Icpukit/score/cpu/riscv/include', 
'-I/home/EB/sebastian_h/src/rtems/cpukit/score/cpu/riscv/include', 
'-Ibsps/include', '-I/home/EB/sebastian_h/src/rtems/bsps/include', 
'-Ibsps/riscv/include', 
'-I/home/EB/sebastian_h/src/rtems/bsps/riscv/include', 
'-Ibsps/riscv/riscv/include', 
'-I/home/EB/sebastian_h/src/rtems/bsps/riscv/riscv/include', 
'/home/EB/sebastian_h/src/rtems/bsps/shared/dev/serial/mc68681_reg2.c', 
'-c', 
'-o/tmp/sh/b-rtems/riscv/rv64imafdc/bsps/shared/dev/serial/mc68681_reg2.c.1.o', 
'-DHAVE_CONFIG_H=1']
In file included from 
/home/EB/sebastian_h/src/rtems/bsps/shared/dev/serial/mc68681_reg2.c:39:
In file included from 
/home/EB/sebastian_h/src/rtems/bsps/shared/dev/serial/mc68681_reg.c:35:
In file included from 
/home/EB/sebastian_h/src/rtems/cpukit/include/rtems.h:59:
In file included from 
/home/EB/sebastian_h/src/rtems/cpukit/include/rtems/config.h:62:
In file included from 
/home/EB/sebastian_h/src/rtems/cpukit/include/rtems/rtems/config.h:62:
/home/EB/sebastian_h/src/rtems/cpukit/include/rtems/rtems/tasks.h:62:10: 
fatal error: 'sys/cpuset.h' file not found

#include 
 ^~
1 error generated.

You still need Newlib somehow and also the compiler-rt library for your 
target.


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Karel Gardas



A bit off-topic.

On 8/2/23 10:39, Sebastian Huber wrote:
Yes, but this would be another patch and it is a bit more work since you 
have to test the clang support.


Is building with clang already supported? I'm curious since this is 
something I'd like to test locally too but neither code nor tickets give 
me any hope on it. Hence asking directly.


Thanks!
Karel


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


Re: [PATCH] bsps/shared: Fix Coverity warning in MCP7940M

2023-08-02 Thread Christian MAUDERER

Hello Joel,

thanks. Is the ID processed somewhere automatically so that I should use 
a special format? Otherwise I can just just add the error message from 
covertity:


** CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time()

Best regards

Christian

On 2023-08-02 13:43, Joel Sherrill wrote:

Ok but out the Coverity Id number in the commit long message

On Wed, Aug 2, 2023, 1:17 AM Christian Mauderer 
> wrote:


Coverity warns that (buf[...] & 0x7) can't be bigger than 7. This patch
removes the unnecessary comparison.
---
  bsps/shared/dev/rtc/mcp7940m.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/bsps/shared/dev/rtc/mcp7940m.c
b/bsps/shared/dev/rtc/mcp7940m.c
index 78a4f21b58..1abc5faaad 100644
--- a/bsps/shared/dev/rtc/mcp7940m.c
+++ b/bsps/shared/dev/rtc/mcp7940m.c
@@ -312,9 +312,8 @@ static int mcp7940m_set_time(int minor, const
rtems_time_of_day *time)
    }

    if (rv == 0) {
-    /* Make sure weekday is in range. Otherwise it's not relevant. */
-    if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1 ||
-        RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) > 7) {
+    /* Make sure weekday is not 0 (out of range). Otherwise it's
not used. */
+    if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1) {
        buf[REG_RTCWKDAY] &= ~RTCWKDAY_WKDAY_MASK;
        buf[REG_RTCWKDAY] |= RTCWKDAY_WKDAY(1);
      }
-- 
2.35.3


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




--

embedded brains GmbH & Co. KG
Herr Christian MAUDERER
Dornierstr. 4
82178 Puchheim
Germany
email:  christian.maude...@embedded-brains.de
phone:  +49-89-18 94 741 - 18
mobile: +49-176-152 206 08

Registergericht: Amtsgericht München
Registernummer: HRA 117265
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] bsps/shared: Fix Coverity warning in MCP7940M

2023-08-02 Thread Joel Sherrill
Ok but out the Coverity Id number in the commit long message

On Wed, Aug 2, 2023, 1:17 AM Christian Mauderer <
christian.maude...@embedded-brains.de> wrote:

> Coverity warns that (buf[...] & 0x7) can't be bigger than 7. This patch
> removes the unnecessary comparison.
> ---
>  bsps/shared/dev/rtc/mcp7940m.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/bsps/shared/dev/rtc/mcp7940m.c
> b/bsps/shared/dev/rtc/mcp7940m.c
> index 78a4f21b58..1abc5faaad 100644
> --- a/bsps/shared/dev/rtc/mcp7940m.c
> +++ b/bsps/shared/dev/rtc/mcp7940m.c
> @@ -312,9 +312,8 @@ static int mcp7940m_set_time(int minor, const
> rtems_time_of_day *time)
>}
>
>if (rv == 0) {
> -/* Make sure weekday is in range. Otherwise it's not relevant. */
> -if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1 ||
> -RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) > 7) {
> +/* Make sure weekday is not 0 (out of range). Otherwise it's not
> used. */
> +if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1) {
>buf[REG_RTCWKDAY] &= ~RTCWKDAY_WKDAY_MASK;
>buf[REG_RTCWKDAY] |= RTCWKDAY_WKDAY(1);
>  }
> --
> 2.35.3
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Fwd: New Defects reported by Coverity Scan for RTEMS

2023-08-02 Thread Joel Sherrill
New Coverity issue

-- Forwarded message -
From: 
Date: Wed, Aug 2, 2023, 12:22 AM
Subject: New Defects reported by Coverity Scan for RTEMS
To: 


Hi,

Please find the latest report on new defect(s) introduced to RTEMS found
with Coverity Scan.

1 new defect(s) introduced to RTEMS found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time()



*** CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
/bsps/shared/dev/rtc/mcp7940m.c: 317 in mcp7940m_set_time()
311 rv = mcp7940m_i2c_read(ctx, REG_RTCSEC, buf, sizeof(buf));
312   }
313
314   if (rv == 0) {
315 /* Make sure weekday is in range. Otherwise it's not relevant.
*/
316 if (RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) < 1 ||
>>> CID 1539495:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
>>> "((buf[3] & (7U /* 7U << 0U */)) >> 0U) > 7" is always false
regardless of the values of its operands. This occurs as the logical second
operand of "||".
317 RTCWKDAY_WKDAY_GET(buf[REG_RTCWKDAY]) > 7) {
318   buf[REG_RTCWKDAY] &= ~RTCWKDAY_WKDAY_MASK;
319   buf[REG_RTCWKDAY] |= RTCWKDAY_WKDAY(1);
320 }
321
322 buf[REG_RTCYEAR] &= ~RTCYEAR_YRBCD_MASK;



To view the defects in Coverity Scan visit,
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypUUzi-2FdSNmuyRB7BEFT8xQ4-2B8hpujh0hTgQljRGId4Dg-3D-3DcyWG_EU3W9teASMK00lBXX9WT4lsogDrkCcNZLvg-2FVxwAXMpYS-2B09LHsska0uyPzxh7uKKzrgmDf1f3-2BmDhHKIEFAROWH-2BDbWaJf1fkFUy9YO2BWhIOMEtmufkuQdoc6Ezm8QNR6E7LDB49TP6u3-2BSbC-2F41-2Fw23mpQ6qPqQmDGVCjb2ihRuh8TdBC3cxDcbTEcy5EoYr4gqciLZgtCrJFvedzgQ-3D-3D

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

[PATCH rtems-tools v3] tester/rtemstoolkit: add renode implementation

2023-08-02 Thread Muhammad Sulthan Mazaya
Add licensing for renode files and change the renode_scripts/ folder to
renode/

---
 .../testing/bsps/kendrytek210-renode.ini  |  38 
 tester/rtems/testing/bsps/leon3-renode.ini|  37 
 tester/rtems/testing/renode.cfg   |  64 +
 tester/rtems/testing/renode/kendrytek210.resc |  86 ++
 tester/rtems/testing/renode/leon3-prom.bin| Bin 0 -> 529 bytes
 tester/rtems/testing/renode/leon3.resc|  80 
 6 files changed, 305 insertions(+)
 create mode 100644 tester/rtems/testing/bsps/kendrytek210-renode.ini
 create mode 100644 tester/rtems/testing/bsps/leon3-renode.ini
 create mode 100644 tester/rtems/testing/renode.cfg
 create mode 100644 tester/rtems/testing/renode/kendrytek210.resc
 create mode 100755 tester/rtems/testing/renode/leon3-prom.bin
 create mode 100644 tester/rtems/testing/renode/leon3.resc

diff --git a/tester/rtems/testing/bsps/kendrytek210-renode.ini 
b/tester/rtems/testing/bsps/kendrytek210-renode.ini
new file mode 100644
index 000..8f7f673
--- /dev/null
+++ b/tester/rtems/testing/bsps/kendrytek210-renode.ini
@@ -0,0 +1,38 @@
+#
+# RTEMS Tools Project (http://www.rtems.org/)
+# Copyright (C) 2023, 2023 Muhammad Sulthan Mazaya (msulthanmaz...@gmail.com)
+# All rights reserved.
+#
+# This file is part of the RTEMS Tools package in 'rtems-tools'.
+#
+# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
+#
+
+#
+# The Kendrytek210 Renode BSP
+#
+[kendrytek210-renode]
+bsp = kendrytek210-renode
+arch= riscv
+tester  = %{_rtscripts}/renode.cfg
+bsp_resc_script = %{_rtscripts}/renode_scripts/kendrytek210.resc
diff --git a/tester/rtems/testing/bsps/leon3-renode.ini 
b/tester/rtems/testing/bsps/leon3-renode.ini
new file mode 100644
index 000..d5f7c17
--- /dev/null
+++ b/tester/rtems/testing/bsps/leon3-renode.ini
@@ -0,0 +1,37 @@
+#
+# RTEMS Tools Project (http://www.rtems.org/)
+# Copyright (C) 2023, 2023 Muhammad Sulthan Mazaya (msulthanmaz...@gmail.com)
+# All rights reserved.
+#
+# This file is part of the RTEMS Tools package in 'rtems-tools'.
+#
+# 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 COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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.
+#
+
+#
+# The Leon3 Renode BSP
+#
+[leon3-renode]
+bsp = leon3-renode
+arch= sparc
+tester  = %{_rtscripts}/renode.cfg
+bsp_resc_script = %{_rtscripts}/renode_scripts/leon3.resc
diff --git a/tester/rtems/testing/renode.cfg b/tester/rtems/testing/renode.cfg
new file mode 100644
index 000..c7fee25
--- /dev/null
++

Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Chris Johns
On 2/8/2023 6:56 pm, Sebastian Huber wrote:
> On 02.08.23 10:50, Chris Johns wrote:
>> On 2/8/2023 6:39 pm, Sebastian Huber wrote:
>>> On 02.08.23 10:33, Chris Johns wrote:
> diff --git a/spec/build/bsps/makeinc.yml b/spec/build/bsps/makeinc.yml
> index ac395f2f02..08fc75a8b9 100644
> --- a/spec/build/bsps/makeinc.yml
> +++ b/spec/build/bsps/makeinc.yml
> @@ -16,14 +16,14 @@ content: |
>  prefix = ${PREFIX}
>  exec_prefix = $${prefix}/${ARCH}-rtems${__RTEMS_MAJOR__}
>    -  CC_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc
> -  CXX_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
> -  AS_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-as
> -  AR_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
> -  NM_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-nm
> -  LD_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
> -  SIZE_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-size
> -  OBJCOPY_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
> +  CC_FOR_TARGET = ${PROGRAM_PREFIX}gcc
> +  CXX_FOR_TARGET = ${PROGRAM_PREFIX}g++
 Is it worth doing the same to gcc and g++ as well so these can be replaced 
 as
 well?
>>> Yes, but this would be another patch and it is a bit more work since you 
>>> have to
>>> test the clang support.
>>>
> +  AS_FOR_TARGET = ${PROGRAM_PREFIX}as
> +  AR_FOR_TARGET = ${PROGRAM_PREFIX}ar
> +  NM_FOR_TARGET = ${PROGRAM_PREFIX}nm
> +  LD_FOR_TARGET = ${PROGRAM_PREFIX}ld
> +  SIZE_FOR_TARGET = ${PROGRAM_PREFIX}size
> +  OBJCOPY_FOR_TARGET = ${PROGRAM_PREFIX}objcopy
 Where is PROGRAM_PFREFIX set?
>>> It is a new configuration option:
>>>
>>> [sparc/gr740]
>>> PROGRAM_PREFIX = ${ARCH}-rtems7-
>>>
>> Yes, but if these files are installed does it need to be in defined in those
>> files?
> 
> The option substitution takes place before the files are installed. For 
> example:

Ah OK. I did not pick that up in the patch.

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

Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Sebastian Huber



On 02.08.23 10:50, Chris Johns wrote:

On 2/8/2023 6:39 pm, Sebastian Huber wrote:

On 02.08.23 10:33, Chris Johns wrote:

diff --git a/spec/build/bsps/makeinc.yml b/spec/build/bsps/makeinc.yml
index ac395f2f02..08fc75a8b9 100644
--- a/spec/build/bsps/makeinc.yml
+++ b/spec/build/bsps/makeinc.yml
@@ -16,14 +16,14 @@ content: |
     prefix = ${PREFIX}
     exec_prefix = $${prefix}/${ARCH}-rtems${__RTEMS_MAJOR__}
   -  CC_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc
-  CXX_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
-  AS_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-as
-  AR_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
-  NM_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-nm
-  LD_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
-  SIZE_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-size
-  OBJCOPY_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
+  CC_FOR_TARGET = ${PROGRAM_PREFIX}gcc
+  CXX_FOR_TARGET = ${PROGRAM_PREFIX}g++

Is it worth doing the same to gcc and g++ as well so these can be replaced as
well?

Yes, but this would be another patch and it is a bit more work since you have to
test the clang support.


+  AS_FOR_TARGET = ${PROGRAM_PREFIX}as
+  AR_FOR_TARGET = ${PROGRAM_PREFIX}ar
+  NM_FOR_TARGET = ${PROGRAM_PREFIX}nm
+  LD_FOR_TARGET = ${PROGRAM_PREFIX}ld
+  SIZE_FOR_TARGET = ${PROGRAM_PREFIX}size
+  OBJCOPY_FOR_TARGET = ${PROGRAM_PREFIX}objcopy

Where is PROGRAM_PFREFIX set?

It is a new configuration option:

[sparc/gr740]
PROGRAM_PREFIX = ${ARCH}-rtems7-


Yes, but if these files are installed does it need to be in defined in those 
files?


The option substitution takes place before the files are installed. For 
example:


cat /opt/rtems/6/arm-rtems6/xilinx_zynq_a9_qemu/Makefile.inc
#
# BSP specific settings. To be included in application Makefiles
#
# This support will be removed from RTEMS. Please consider other
# ways to build applications.
#

RTEMS_API = 6

RTEMS_CPU = arm
RTEMS_BSP = xilinx_zynq_a9_qemu

prefix = /opt/rtems/6
exec_prefix = ${prefix}/arm-rtems6

CC_FOR_TARGET = arm-rtems7-gcc
CXX_FOR_TARGET = arm-rtems7-g++
AS_FOR_TARGET = arm-rtems7-as
AR_FOR_TARGET = arm-rtems7-ar
NM_FOR_TARGET = arm-rtems7-nm
LD_FOR_TARGET = arm-rtems7-ld
SIZE_FOR_TARGET = arm-rtems7-size
OBJCOPY_FOR_TARGET = arm-rtems7-objcopy

CC= $(CC_FOR_TARGET)
CXX= $(CXX_FOR_TARGET)
AS= $(AS_FOR_TARGET)
LD= $(LD_FOR_TARGET)
NM= $(NM_FOR_TARGET)
AR= $(AR_FOR_TARGET)
SIZE= $(SIZE_FOR_TARGET)
OBJCOPY= $(OBJCOPY_FOR_TARGET)

export CC
export CXX
export AS
export LD
export NM
export AR
export SIZE
export OBJCOPY

RTEMS_ROOT  ?= $(prefix)
PROJECT_ROOT = $(RTEMS_ROOT)
RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
RTEMS_SHARE  = $(RTEMS_ROOT)/share/rtems$(RTEMS_API)

RTEMS_USE_OWN_PDIR = no
RTEMS_HAS_POSIX_API =
RTEMS_HAS_ITRON_API = no
RTEMS_HAS_CPLUSPLUS = yes

export RTEMS_BSP
export RTEMS_CUSTOM
export PROJECT_ROOT


--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Chris Johns
On 2/8/2023 6:39 pm, Sebastian Huber wrote:
> On 02.08.23 10:33, Chris Johns wrote:
>>> diff --git a/spec/build/bsps/makeinc.yml b/spec/build/bsps/makeinc.yml
>>> index ac395f2f02..08fc75a8b9 100644
>>> --- a/spec/build/bsps/makeinc.yml
>>> +++ b/spec/build/bsps/makeinc.yml
>>> @@ -16,14 +16,14 @@ content: |
>>>     prefix = ${PREFIX}
>>>     exec_prefix = $${prefix}/${ARCH}-rtems${__RTEMS_MAJOR__}
>>>   -  CC_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc
>>> -  CXX_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
>>> -  AS_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-as
>>> -  AR_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
>>> -  NM_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-nm
>>> -  LD_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
>>> -  SIZE_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-size
>>> -  OBJCOPY_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
>>> +  CC_FOR_TARGET = ${PROGRAM_PREFIX}gcc
>>> +  CXX_FOR_TARGET = ${PROGRAM_PREFIX}g++
>> Is it worth doing the same to gcc and g++ as well so these can be replaced as
>> well?
> 
> Yes, but this would be another patch and it is a bit more work since you have 
> to
> test the clang support.
> 
>>
>>> +  AS_FOR_TARGET = ${PROGRAM_PREFIX}as
>>> +  AR_FOR_TARGET = ${PROGRAM_PREFIX}ar
>>> +  NM_FOR_TARGET = ${PROGRAM_PREFIX}nm
>>> +  LD_FOR_TARGET = ${PROGRAM_PREFIX}ld
>>> +  SIZE_FOR_TARGET = ${PROGRAM_PREFIX}size
>>> +  OBJCOPY_FOR_TARGET = ${PROGRAM_PREFIX}objcopy
>> Where is PROGRAM_PFREFIX set?
> 
> It is a new configuration option:
> 
> [sparc/gr740]
> PROGRAM_PREFIX = ${ARCH}-rtems7-
> 

Yes, but if these files are installed does it need to be in defined in those 
files?

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

Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Chris Johns
On 2/8/2023 6:42 pm, Sebastian Huber wrote:
> On 02.08.23 10:40, Chris Johns wrote:
>> On 2/8/2023 6:33 pm, Chris Johns wrote:
>>> On 2/8/2023 3:49 pm, Sebastian Huber wrote:
 Replace --rtems-version with a PROGRAM_PREFIX option.  This allows also
 the use of vendor tools.> ---
>> One further thing to consider is if PROGRAM_PREFIX could clash with something
>> else in a user's environment because it is not in any RTEMS name space, ie
>> RTEMS_PROGRAM_PREFIX?
> 
> No, this could not clash. The options have their own namespace.

What about Makefile.inc when installed?

I am concerned about the compatibility to the ecosystem we have. Have you built
all the tests in the testsuite with this value set to something that is not
RTEMS default? I think a few things will break because of hard coding in them.

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

Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Sebastian Huber

On 02.08.23 10:40, Chris Johns wrote:

On 2/8/2023 6:33 pm, Chris Johns wrote:

On 2/8/2023 3:49 pm, Sebastian Huber wrote:

Replace --rtems-version with a PROGRAM_PREFIX option.  This allows also
the use of vendor tools.> ---

One further thing to consider is if PROGRAM_PREFIX could clash with something
else in a user's environment because it is not in any RTEMS name space, ie
RTEMS_PROGRAM_PREFIX?


No, this could not clash. The options have their own namespace.

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Chris Johns
On 2/8/2023 6:33 pm, Chris Johns wrote:
> On 2/8/2023 3:49 pm, Sebastian Huber wrote:
>> Replace --rtems-version with a PROGRAM_PREFIX option.  This allows also
>> the use of vendor tools.> ---

One further thing to consider is if PROGRAM_PREFIX could clash with something
else in a user's environment because it is not in any RTEMS name space, ie
RTEMS_PROGRAM_PREFIX?

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


Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Sebastian Huber



On 02.08.23 10:33, Chris Johns wrote:

diff --git a/spec/build/bsps/makeinc.yml b/spec/build/bsps/makeinc.yml
index ac395f2f02..08fc75a8b9 100644
--- a/spec/build/bsps/makeinc.yml
+++ b/spec/build/bsps/makeinc.yml
@@ -16,14 +16,14 @@ content: |
prefix = ${PREFIX}
exec_prefix = $${prefix}/${ARCH}-rtems${__RTEMS_MAJOR__}
  
-  CC_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc

-  CXX_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
-  AS_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-as
-  AR_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
-  NM_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-nm
-  LD_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
-  SIZE_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-size
-  OBJCOPY_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
+  CC_FOR_TARGET = ${PROGRAM_PREFIX}gcc
+  CXX_FOR_TARGET = ${PROGRAM_PREFIX}g++

Is it worth doing the same to gcc and g++ as well so these can be replaced as 
well?


Yes, but this would be another patch and it is a bit more work since you 
have to test the clang support.





+  AS_FOR_TARGET = ${PROGRAM_PREFIX}as
+  AR_FOR_TARGET = ${PROGRAM_PREFIX}ar
+  NM_FOR_TARGET = ${PROGRAM_PREFIX}nm
+  LD_FOR_TARGET = ${PROGRAM_PREFIX}ld
+  SIZE_FOR_TARGET = ${PROGRAM_PREFIX}size
+  OBJCOPY_FOR_TARGET = ${PROGRAM_PREFIX}objcopy

Where is PROGRAM_PFREFIX set?


It is a new configuration option:

[sparc/gr740]
PROGRAM_PREFIX = ${ARCH}-rtems7-

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH] build: Add PROGRAM_PREFIX option

2023-08-02 Thread Chris Johns
On 2/8/2023 3:49 pm, Sebastian Huber wrote:
> Replace --rtems-version with a PROGRAM_PREFIX option.  This allows also
> the use of vendor tools.> ---
>  spec/build/bsps/makeinc.yml| 16 
>  spec/build/bsps/maketarget.yml | 22 +++---
>  spec/build/bsps/optobjcopy.yml |  2 +-
>  spec/build/cpukit/cpuopts.yml  |  2 ++
>  spec/build/cpukit/optgcc.yml   |  8 
>  spec/build/cpukit/optprogramprefix.yml | 18 ++
>  spec/build/testsuites/ada/optgnat.yml  |  2 +-
>  wscript| 24 ++--
>  8 files changed, 47 insertions(+), 47 deletions(-)
>  create mode 100644 spec/build/cpukit/optprogramprefix.yml
> 
> diff --git a/spec/build/bsps/makeinc.yml b/spec/build/bsps/makeinc.yml
> index ac395f2f02..08fc75a8b9 100644
> --- a/spec/build/bsps/makeinc.yml
> +++ b/spec/build/bsps/makeinc.yml
> @@ -16,14 +16,14 @@ content: |
>prefix = ${PREFIX}
>exec_prefix = $${prefix}/${ARCH}-rtems${__RTEMS_MAJOR__}
>  
> -  CC_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc
> -  CXX_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
> -  AS_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-as
> -  AR_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
> -  NM_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-nm
> -  LD_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
> -  SIZE_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-size
> -  OBJCOPY_FOR_TARGET = ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
> +  CC_FOR_TARGET = ${PROGRAM_PREFIX}gcc
> +  CXX_FOR_TARGET = ${PROGRAM_PREFIX}g++

Is it worth doing the same to gcc and g++ as well so these can be replaced as 
well?

> +  AS_FOR_TARGET = ${PROGRAM_PREFIX}as
> +  AR_FOR_TARGET = ${PROGRAM_PREFIX}ar
> +  NM_FOR_TARGET = ${PROGRAM_PREFIX}nm
> +  LD_FOR_TARGET = ${PROGRAM_PREFIX}ld
> +  SIZE_FOR_TARGET = ${PROGRAM_PREFIX}size
> +  OBJCOPY_FOR_TARGET = ${PROGRAM_PREFIX}objcopy

Where is PROGRAM_PFREFIX set?

>CC= $$(CC_FOR_TARGET)
>CXX= $$(CXX_FOR_TARGET)
> diff --git a/spec/build/bsps/maketarget.yml b/spec/build/bsps/maketarget.yml
> index 798b64fa22..7a7b0c3d35 100644
> --- a/spec/build/bsps/maketarget.yml
> +++ b/spec/build/bsps/maketarget.yml
> @@ -11,17 +11,17 @@ content: |
>LIBS =
>  
>RTEMS_API = ${__RTEMS_MAJOR__}
> -  CC = ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc --pipe
> -  AS = ${ARCH}-rtems${__RTEMS_MAJOR__}-as
> -  AR = ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
> -  NM = ${ARCH}-rtems${__RTEMS_MAJOR__}-nm
> -  LD = ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
> -  SIZE = ${ARCH}-rtems${__RTEMS_MAJOR__}-size
> -  STRIP = ${ARCH}-rtems${__RTEMS_MAJOR__}-strip
> -  OBJCOPY = ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
> -  RANLIB = ${ARCH}-rtems${__RTEMS_MAJOR__}-ranlib
> -
> -  CXX = ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
> +  CC = ${PROGRAM_PREFIX}gcc --pipe
> +  AS = ${PROGRAM_PREFIX}as
> +  AR = ${PROGRAM_PREFIX}ar
> +  NM = ${PROGRAM_PREFIX}nm
> +  LD = ${PROGRAM_PREFIX}ld
> +  SIZE = ${PROGRAM_PREFIX}size
> +  STRIP = ${PROGRAM_PREFIX}strip
> +  OBJCOPY = ${PROGRAM_PREFIX}objcopy
> +  RANLIB = ${PROGRAM_PREFIX}ranlib
> +
> +  CXX = ${PROGRAM_PREFIX}g++

Same here with setting PROGRAM_PREFIX?

Chris

>  
>export CC
>export AS
> diff --git a/spec/build/bsps/optobjcopy.yml b/spec/build/bsps/optobjcopy.yml
> index 3387e23794..63fab08ac6 100644
> --- a/spec/build/bsps/optobjcopy.yml
> +++ b/spec/build/bsps/optobjcopy.yml
> @@ -1,6 +1,6 @@
>  SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
>  actions:
> -- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
> +- set-value: ${PROGRAM_PREFIX}objcopy
>  - substitute: null
>  - find-program: null
>  - env-assign: OBJCOPY
> diff --git a/spec/build/cpukit/cpuopts.yml b/spec/build/cpukit/cpuopts.yml
> index f1b30eec55..1d28ace552 100644
> --- a/spec/build/cpukit/cpuopts.yml
> +++ b/spec/build/cpukit/cpuopts.yml
> @@ -7,6 +7,8 @@ guard: _RTEMS_SCORE_CPUOPTS_H
>  include-headers: []
>  install-path: ${BSP_INCLUDEDIR}/rtems/score
>  links:
> +- role: build-dependency
> +  uid: optprogramprefix
>  - role: build-dependency
>uid: optgcc
>  - role: build-dependency
> diff --git a/spec/build/cpukit/optgcc.yml b/spec/build/cpukit/optgcc.yml
> index 3afb909444..94af494af4 100644
> --- a/spec/build/cpukit/optgcc.yml
> +++ b/spec/build/cpukit/optgcc.yml
> @@ -1,21 +1,21 @@
>  SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
>  actions:
> -- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-gcc
> +- set-value: ${PROGRAM_PREFIX}gcc
>  - substitute: null
>  - find-program: null
>  - env-assign: AS
>  - env-assign: CC
>  - env-assign: LINK_CC
> -- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-g++
> +- set-value: ${PROGRAM_PREFIX}g++
>  - substitute: null
>  - find-program: null
>  - env-assign: CXX
>  - env-assign: LINK_CXX
> -- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-ar
> +- set-value: ${PROGRAM_PREFIX}ar
>  - substitute: null
>  - find-program: null
>  - env-assign: AR
> -- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-ld
> +- se