[PATCH] cpukit: occured -> occurred
--- cpukit/include/rtems/score/coremsgimpl.h | 8 cpukit/include/rtems/score/corerwlockimpl.h | 2 +- cpukit/include/rtems/score/coresemimpl.h | 2 +- cpukit/include/rtems/score/heapimpl.h| 2 +- cpukit/include/rtems/score/mrspimpl.h| 4 ++-- cpukit/include/rtems/score/objectimpl.h | 8 cpukit/include/rtems/score/profiling.h | 2 +- cpukit/include/rtems/score/protectedheap.h | 2 +- cpukit/libblock/src/bdbuf.c | 2 +- cpukit/libdrvmgr/drvmgr.c| 2 +- cpukit/libdrvmgr/drvmgr_unregister.c | 2 +- cpukit/libfs/src/dosfs/fat.c | 16 cpukit/libfs/src/dosfs/fat_fat_operations.c | 8 cpukit/libfs/src/dosfs/fat_file.c| 20 ++-- cpukit/libfs/src/dosfs/msdos_create.c| 2 +- cpukit/libfs/src/dosfs/msdos_dir.c | 4 ++-- cpukit/libfs/src/dosfs/msdos_file.c | 10 +- cpukit/libfs/src/dosfs/msdos_init.c | 2 +- cpukit/libfs/src/dosfs/msdos_initsupp.c | 2 +- cpukit/libfs/src/dosfs/msdos_misc.c | 18 +- cpukit/score/cpu/mips/cpu_asm.S | 4 ++-- cpukit/score/cpu/nios2/nios2-iic-low-level.S | 4 ++-- cpukit/score/src/heapallocate.c | 2 +- 23 files changed, 64 insertions(+), 64 deletions(-) diff --git a/cpukit/include/rtems/score/coremsgimpl.h b/cpukit/include/rtems/score/coremsgimpl.h index 6f6a01bea6..161cf8f124 100644 --- a/cpukit/include/rtems/score/coremsgimpl.h +++ b/cpukit/include/rtems/score/coremsgimpl.h @@ -261,7 +261,7 @@ Status_Control _CORE_message_queue_Broadcast( * @retval STATUS_MESSAGE_INVALID_SIZE The message size was too big. * @retval STATUS_TOO_MANY No message buffers were available. * @retval STATUS_MESSAGE_QUEUE_WAIT_IN_ISR The caller is in an ISR, do not block! - * @retval STATUS_TIMEOUT A timeout occured. + * @retval STATUS_TIMEOUT A timeout occurred. */ Status_Control _CORE_message_queue_Submit( CORE_message_queue_Control *the_message_queue, @@ -298,7 +298,7 @@ Status_Control _CORE_message_queue_Submit( * * @retval STATUS_SUCCESSFUL The message was successfully seized from the message queue. * @retval STATUS_UNSATISFIED Wait was set to false and there is currently no pending message. - * @retval STATUS_TIMEOUT A timeout occured. + * @retval STATUS_TIMEOUT A timeout occurred. * * @note Returns message priority via return area in TCB. * @@ -351,7 +351,7 @@ void _CORE_message_queue_Insert_message( * @retval STATUS_MESSAGE_INVALID_SIZE The message size was too big. * @retval STATUS_TOO_MANY No message buffers were available. * @retval STATUS_MESSAGE_QUEUE_WAIT_IN_ISR The caller is in an ISR, do not block! - * @retval STATUS_TIMEOUT A timeout occured. + * @retval STATUS_TIMEOUT A timeout occurred. */ RTEMS_INLINE_ROUTINE Status_Control _CORE_message_queue_Send( CORE_message_queue_Control *the_message_queue, @@ -387,7 +387,7 @@ RTEMS_INLINE_ROUTINE Status_Control _CORE_message_queue_Send( * @retval STATUS_MESSAGE_INVALID_SIZE The message size was too big. * @retval STATUS_TOO_MANY No message buffers were available. * @retval STATUS_MESSAGE_QUEUE_WAIT_IN_ISR The caller is in an ISR, do not block! - * @retval STATUS_TIMEOUT A timeout occured. + * @retval STATUS_TIMEOUT A timeout occurred. */ RTEMS_INLINE_ROUTINE Status_Control _CORE_message_queue_Urgent( CORE_message_queue_Control *the_message_queue, diff --git a/cpukit/include/rtems/score/corerwlockimpl.h b/cpukit/include/rtems/score/corerwlockimpl.h index b182ebeeeb..dc1f375be6 100644 --- a/cpukit/include/rtems/score/corerwlockimpl.h +++ b/cpukit/include/rtems/score/corerwlockimpl.h @@ -169,7 +169,7 @@ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Release( * @retval STATUS_SUCCESSFUL The RWlock was successfully seized. * @retval STATUS_UNAVAILABLE The RWlock is currently locked for writing * and the calling thread is not willing to wait. - * @retval STATUS_TIMEOUT A timeout occured. + * @retval STATUS_TIMEOUT A timeout occurred. */ Status_Control _CORE_RWLock_Seize_for_reading( diff --git a/cpukit/include/rtems/score/coresemimpl.h b/cpukit/include/rtems/score/coresemimpl.h index 587afc6ff3..40b58cbda7 100644 --- a/cpukit/include/rtems/score/coresemimpl.h +++ b/cpukit/include/rtems/score/coresemimpl.h @@ -193,7 +193,7 @@ RTEMS_INLINE_ROUTINE uint32_t _CORE_semaphore_Get_count( * @retval STATUS_SUCCESSFUL The semaphore was successfully seized. * @retval STATUS_UNSATISFIED The semaphore is currently not free and the * calling thread not willing to wait. - * @retval STATUS_TIMEOUT A timeout occured. + * @retval STATUS_TIMEOUT A timeout occurred. */ RTEMS_INLINE_ROUTINE Status_Control _CORE_semaphore_Seize( CORE_semaphore_Control*the_semaphore, diff --git a/cpukit/include/rtems/score/heapimpl.h b/cpukit/include/rtems/score/heapimpl.h index 76b9da8d5d..4403f186
Re: [PATCH] Fixes for TMS570 BSP
Hello, I think this patch was forgotten. Pushing it up :-) Kind regards Robin On Tue, 20 Apr 2021 at 16:56, Robin Müller wrote: > I am currently extending the lwIP port provided by you for the > STM32H743ZI-Nucleo. I am also extending it to be more easily adaptable to > other BSPs and new ports: > https://github.com/rmspacefish/rtems-lwip/tree/78ec73e89644c2ffa3b66c94239e1dc6ccf8a2f8 > . > > I've managed to receive UDP packets via RAW Api, and I will test the other > lwIP APIs and TCP soon as well. It would be amazing if you can test > whether your port still works properly after I have tested everything. > I managed to compile it with the BSP fixes some time ago, but some other > files have changed again.. I can notify you when I have tested everything. > > Kind Regards > Robin > > On Mon, 19 Apr 2021 at 21:02, Pavel Pisa wrote: > >> Hello Robin and Gedare, >> >> (sent again to pass into the list) >> >> On Monday 19 of April 2021 19:13:29 Gedare Bloom wrote: >> > Hi Robin, Pavel: >> > >> > On Mon, Apr 19, 2021 at 2:57 AM Robin Müller >> wrote: >> > > If this was intentional, I can also adapt the lwIP port sources to use >> > > ti/herc. I was not sure about that. >> > >> > I think Pavel should comment. I believe at the time care was taken to >> > avoid importing TI HalCoGen code generation, and maybe this missing >> > ti_herc is an artifact from that. I think over time TI has moved >> > toward providing a slightly better license (2-clause BSD with hardware >> > restriction) on their HAL/SOC libs. We won't merge code with the >> > hardware restriction clause. So it can be a little problematic to get >> > things working nicely, it has to be well documented the steps to >> > reproduce setups based on restrictive vendor-provided code. >> > >> > That's what I remember anyway. Pavel may explain better. >> >> Yes, the main problem has been incompatible license, other problem >> is that HalCoGen header files was and probably is still different >> for different family members. It seems to make header files to be >> generated >> partly by hand and by different people, some code fills hexadecimal >> numbers >> into registers without using predefined bit fields etc., basically >> basically the code quality which should never go into any safety related >> application. >> >> Premysl Houdek has workend o project as part of thesis work and GSoC. >> He converted complete fields description from the manual to the JSON >> files and then generated all header files according to format, >> which has been declared as the best one by Embedded Brains for other >> BSPs. Se the project with headers generation >> >> https://github.com/AoLaD/rtems-tms570-utils >> >> But we have added option to compile RTEMS BSP with HalCoGen >> generated files the first. Then we have written UART >> and other parts from scratch, because there was not full documentation >> for test subsystem init, there has been some parts taken >> from Ti example files and where possible tidied up to use >> symbols for bitfields. When BSP is compiled with >> >> TMS570_USE_HWINIT_STARTUP=1 >> >> it can start without external initialization or loader. >> >> Long term plan has been to add support for TMS570LC4357 >> as well but cooperation with other universities, open-source >> and RTEMS has been of no interrest of my former head... >> >> The work on this BSP is on my very long todo list, but >> with very low priority >> >> Anyway, we achieved to port LwIP to RTEMS BSP, TMS570 part >> is generally rewrite from scratch, we have failde many times >> at that time with Ti provided code even with their FreeRTOS >> code. Our port is in omk-devel branch of the next repo >> >> https://sourceforge.net/p/ulan/lwip-omk/ci/omk-devel/tree/ >> >> Code worked with FreeRTOS and HalCoGen BSP as well as with RTEMS >> >> >> https://sourceforge.net/p/ulan/lwip-omk/ci/omk-devel/tree/ports/driver/tms570_emac/ >> >> https://sourceforge.net/p/ulan/lwip-omk/ci/omk-devel/tree/ports/os/rtems/ >> >> But on RTEMS there is some way to go still to integrate LwIP >> with RTEMS+NEWLIB to be usable same way as old included BSD >> and new external BSD stack. I hope that things move forward >> during this year GSoC. >> >> As for changes, I have not worked with TMS570 RTEMS for long time. >> Again, I would like to check that BSP runs correctly before next >> release, but time is a problem, so no promise there. >> >> If there is problem with defines collision, I ACK to change >> names. In the fact, it seems to be incorrect even in past. >> >> I have worked with BSP before switch to YAML based build, >> so I cannot say what is right for now. But ti_herc seems >> to be consistet with headers location in the BSP sources, >> so I think that the change is correct as well. >> >> >> > > On Mon, 19 Apr 2021 at 10:55, Robin Mueller < >> robin.muelle...@gmail.com> wrote: >> > >> When compiling the lwIP port for the TMS570, there >> > >> were issues with the BSP. Headers are expected in a folder >>
[PATCH v2] setbuilder minor list-host option
This adds a way to print the host triplet Can be useful for cross-compiling toolchains --- Change from v1 to v2: Removed "Displaying" in printout on first line. source-builder/sb/setbuilder.py | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py index c8c8fee..63392fe 100644 --- a/source-builder/sb/setbuilder.py +++ b/source-builder/sb/setbuilder.py @@ -673,6 +673,16 @@ def list_bset_cfg_files(opts, configs): return True return False +def list_host(opts): +if opts.get_arg('--list-host'): +print('Host operating system information:') +print('Operating system: %s' % macro_expand(opts.defaults, '%{_os}')) +print('Number of processors: %s' % macro_expand(opts.defaults, '%{_ncpus}')) +print('Build architecture: %s' % macro_expand(opts.defaults, '%{_host_arch}')) +print('Host triplet: %s' % macro_expand(opts.defaults, '%{_host}')) +return True +return False + def run(): import sys ec = 0 @@ -683,6 +693,7 @@ def run(): '--list-bsets':'List available build sets', '--list-configs': 'List available configuration files.', '--list-deps': 'List the dependent files.', +'--list-host': 'List host information and the host triplet.', '--bset-tar-file': 'Create a build set tar file', '--pkg-tar-files': 'Create package tar files', '--no-report': 'Do not create a package report.', @@ -720,7 +731,8 @@ def run(): deps = [] else: deps = None -if not list_bset_cfg_files(opts, configs): + +if not list_bset_cfg_files(opts, configs) and not list_host(opts): prefix = macro_expand(opts.defaults, '%{_prefix}') if opts.canadian_cross(): opts.disable_install() -- 2.30.2 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] STM32H7 ethernet pin corrections
These patches were submitted a few months ago, but it was found out that the default-by-family: [] were missing in the GPIO .yml lines. This was fixed in this patch. This patch accounts for different pins for the ETH peripheral on STM32H7 devices. For example, the Nucleo H743ZI has slightly different pins than other STM32H7 boards. --- bsps/arm/stm32h7/start/stm32h7-hal-eth.c | 22 ++- spec/build/bsps/arm/stm32h7/grp.yml | 4 .../bsps/arm/stm32h7/optethgpiobregs.yml | 20 + .../bsps/arm/stm32h7/optethgpiogregs.yml | 20 + 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 spec/build/bsps/arm/stm32h7/optethgpiobregs.yml create mode 100644 spec/build/bsps/arm/stm32h7/optethgpiogregs.yml diff --git a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c index 46475f4316..b9dac6d7f9 100644 --- a/bsps/arm/stm32h7/start/stm32h7-hal-eth.c +++ b/bsps/arm/stm32h7/start/stm32h7-hal-eth.c @@ -31,10 +31,12 @@ #include +#include + static const stm32h7_gpio_config gpiog = { .regs = GPIOG, .config = { -.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13, +.Pin = STM32H7_ETH_GPIOG_PINS, .Mode = GPIO_MODE_AF_PP, .Pull = GPIO_NOPULL, .Speed = GPIO_SPEED_FREQ_LOW, @@ -64,6 +66,21 @@ static const stm32h7_gpio_config gpioa = { } }; +#ifdef STM32H7_ETH_GPIOB_PINS + +static const stm32h7_gpio_config gpiob = { + .regs = GPIOB, + .config = { +.Pin = STM32H7_ETH_GPIOB_PINS, +.Mode = GPIO_MODE_AF_PP, +.Pull = GPIO_NOPULL, +.Speed = GPIO_SPEED_FREQ_LOW, +.Alternate = GPIO_AF11_ETH + } +}; + +#endif + void HAL_ETH_MspInit(ETH_HandleTypeDef *heth) { @@ -73,4 +90,7 @@ HAL_ETH_MspInit(ETH_HandleTypeDef *heth) stm32h7_gpio_init(&gpiog); stm32h7_gpio_init(&gpioc); stm32h7_gpio_init(&gpioa); +#ifdef STM32H7_ETH_GPIOB_PINS + stm32h7_gpio_init(&gpiob); +#endif } diff --git a/spec/build/bsps/arm/stm32h7/grp.yml b/spec/build/bsps/arm/stm32h7/grp.yml index 2147cdec88..a7e7affa05 100644 --- a/spec/build/bsps/arm/stm32h7/grp.yml +++ b/spec/build/bsps/arm/stm32h7/grp.yml @@ -83,6 +83,10 @@ links: uid: optusart3gpioregs - role: build-dependency uid: optvariant +- role: build-dependency + uid: optethgpiogregs +- role: build-dependency + uid: optethgpiobregs - role: build-dependency uid: ../../optconsolebaud - role: build-dependency diff --git a/spec/build/bsps/arm/stm32h7/optethgpiobregs.yml b/spec/build/bsps/arm/stm32h7/optethgpiobregs.yml new file mode 100644 index 00..d9898cbc79 --- /dev/null +++ b/spec/build/bsps/arm/stm32h7/optethgpiobregs.yml @@ -0,0 +1,20 @@ +actions: +- get-string: null +- define-unquoted: null +build-type: option +default: null +default-by-family: [] +default-by-variant: +- value: GPIO_PIN_13 + variants: + - arm/nucleo-h743zi +enabled-by: true +format: '{}' +links: [] +name: STM32H7_ETH_GPIOB_PINS +description: | + GPIO B pins used for the ETH pin configuration. +type: build +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) diff --git a/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml b/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml new file mode 100644 index 00..6a79082927 --- /dev/null +++ b/spec/build/bsps/arm/stm32h7/optethgpiogregs.yml @@ -0,0 +1,20 @@ +actions: +- get-string: null +- define-unquoted: null +build-type: option +default: ( GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 ) +default-by-family: [] +default-by-variant: +- value: ( GPIO_PIN_2 | GPIO_PIN_11 | GPIO_PIN_13 ) + variants: + - arm/nucleo-h743zi +enabled-by: true +format: '{}' +links: [] +name: STM32H7_ETH_GPIOG_PINS +description: | + GPIO G pins used for the ETH pin configuration. +type: build +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause +copyrights: +- Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de) -- 2.30.2 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH] cpukit: occured -> occurred
OK to push. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v4] bsps: Move optfdt* files to shared parent directory
--- .../arm/altera-cyclone-v/bspalteracyclonev.yml | 8 spec/build/bsps/arm/beagle/grp.yml | 8 spec/build/bsps/arm/beagle/optfdtcpyro.yml | 16 spec/build/bsps/arm/beagle/optfdtmxsz.yml | 17 - spec/build/bsps/arm/beagle/optfdtro.yml | 16 spec/build/bsps/arm/beagle/optfdtuboot.yml | 16 spec/build/bsps/arm/imx/bspimx.yml | 8 spec/build/bsps/arm/imx/optfdtcpyro.yml | 16 spec/build/bsps/arm/imx/optfdtmxsz.yml | 17 - spec/build/bsps/arm/imx/optfdtro.yml| 16 spec/build/bsps/arm/imx/optfdtuboot.yml | 16 spec/build/bsps/arm/raspberrypi/grp.yml | 8 .../{arm/altera-cyclone-v => }/optfdtcpyro.yml | 0 .../{arm/altera-cyclone-v => }/optfdtmxsz.yml | 0 .../{arm/altera-cyclone-v => }/optfdtro.yml | 0 .../{arm/altera-cyclone-v => }/optfdtuboot.yml | 0 spec/build/bsps/powerpc/qoriq/grp.yml | 4 ++-- spec/build/bsps/powerpc/qoriq/optfdtmxsz.yml| 17 - spec/build/bsps/powerpc/qoriq/optfdtro.yml | 16 spec/build/bsps/riscv/riscv/grp.yml | 8 spec/build/bsps/riscv/riscv/optfdtcpyro.yml | 16 spec/build/bsps/riscv/riscv/optfdtmxsz.yml | 17 - spec/build/bsps/riscv/riscv/optfdtro.yml| 16 spec/build/bsps/riscv/riscv/optfdtuboot.yml | 16 24 files changed, 26 insertions(+), 246 deletions(-) delete mode 100644 spec/build/bsps/arm/beagle/optfdtcpyro.yml delete mode 100644 spec/build/bsps/arm/beagle/optfdtmxsz.yml delete mode 100644 spec/build/bsps/arm/beagle/optfdtro.yml delete mode 100644 spec/build/bsps/arm/beagle/optfdtuboot.yml delete mode 100644 spec/build/bsps/arm/imx/optfdtcpyro.yml delete mode 100644 spec/build/bsps/arm/imx/optfdtmxsz.yml delete mode 100644 spec/build/bsps/arm/imx/optfdtro.yml delete mode 100644 spec/build/bsps/arm/imx/optfdtuboot.yml rename spec/build/bsps/{arm/altera-cyclone-v => }/optfdtcpyro.yml (100%) rename spec/build/bsps/{arm/altera-cyclone-v => }/optfdtmxsz.yml (100%) rename spec/build/bsps/{arm/altera-cyclone-v => }/optfdtro.yml (100%) rename spec/build/bsps/{arm/altera-cyclone-v => }/optfdtuboot.yml (100%) delete mode 100644 spec/build/bsps/powerpc/qoriq/optfdtmxsz.yml delete mode 100644 spec/build/bsps/powerpc/qoriq/optfdtro.yml delete mode 100644 spec/build/bsps/riscv/riscv/optfdtcpyro.yml delete mode 100644 spec/build/bsps/riscv/riscv/optfdtmxsz.yml delete mode 100644 spec/build/bsps/riscv/riscv/optfdtro.yml delete mode 100644 spec/build/bsps/riscv/riscv/optfdtuboot.yml diff --git a/spec/build/bsps/arm/altera-cyclone-v/bspalteracyclonev.yml b/spec/build/bsps/arm/altera-cyclone-v/bspalteracyclonev.yml index da567ddd79..a9f3f7dabf 100644 --- a/spec/build/bsps/arm/altera-cyclone-v/bspalteracyclonev.yml +++ b/spec/build/bsps/arm/altera-cyclone-v/bspalteracyclonev.yml @@ -73,15 +73,15 @@ links: - role: build-dependency uid: optconuart1 - role: build-dependency - uid: optfdtcpyro + uid: ../../optfdtcpyro - role: build-dependency uid: optfdten - role: build-dependency - uid: optfdtmxsz + uid: ../../optfdtmxsz - role: build-dependency - uid: optfdtro + uid: ../../optfdtro - role: build-dependency - uid: optfdtuboot + uid: ../../optfdtuboot - role: build-dependency uid: opti2cspeed - role: build-dependency diff --git a/spec/build/bsps/arm/beagle/grp.yml b/spec/build/bsps/arm/beagle/grp.yml index 1375913fd0..3452c3e5c8 100644 --- a/spec/build/bsps/arm/beagle/grp.yml +++ b/spec/build/bsps/arm/beagle/grp.yml @@ -22,13 +22,13 @@ links: - role: build-dependency uid: optdm3730 - role: build-dependency - uid: optfdtcpyro + uid: ../../optfdtcpyro - role: build-dependency - uid: optfdtmxsz + uid: ../../optfdtmxsz - role: build-dependency - uid: optfdtro + uid: ../../optfdtro - role: build-dependency - uid: optfdtuboot + uid: ../../optfdtuboot - role: build-dependency uid: ../grp - role: build-dependency diff --git a/spec/build/bsps/arm/beagle/optfdtcpyro.yml b/spec/build/bsps/arm/beagle/optfdtcpyro.yml deleted file mode 100644 index 5ec59adf4d..00 --- a/spec/build/bsps/arm/beagle/optfdtcpyro.yml +++ /dev/null @@ -1,16 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause -actions: -- get-boolean: null -- define-condition: null -build-type: option -copyrights: -- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) -default: true -default-by-family: [] -default-by-variant: [] -description: | - copy the FDT blob into the read-only load area via bsp_fdt_copy() -enabled-by: true -links: [] -name: BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA -type: build diff --git a/spec/build/bsps/arm/beagle/optfdtmxsz.yml b/spec/build/bsps/arm/beagle/optfdtmxsz.yml deleted file
Re: [PATCH v4] bsps: Move optfdt* files to shared parent directory
I'm doing a build sweep of all BSPs. When that completes, I plan to push this unless there are comments. On Fri, Jul 16, 2021 at 9:51 AM pranav wrote: > > --- > .../arm/altera-cyclone-v/bspalteracyclonev.yml | 8 > spec/build/bsps/arm/beagle/grp.yml | 8 > spec/build/bsps/arm/beagle/optfdtcpyro.yml | 16 > spec/build/bsps/arm/beagle/optfdtmxsz.yml | 17 - > spec/build/bsps/arm/beagle/optfdtro.yml | 16 > spec/build/bsps/arm/beagle/optfdtuboot.yml | 16 > spec/build/bsps/arm/imx/bspimx.yml | 8 > spec/build/bsps/arm/imx/optfdtcpyro.yml | 16 > spec/build/bsps/arm/imx/optfdtmxsz.yml | 17 - > spec/build/bsps/arm/imx/optfdtro.yml| 16 > spec/build/bsps/arm/imx/optfdtuboot.yml | 16 > spec/build/bsps/arm/raspberrypi/grp.yml | 8 > .../{arm/altera-cyclone-v => }/optfdtcpyro.yml | 0 > .../{arm/altera-cyclone-v => }/optfdtmxsz.yml | 0 > .../{arm/altera-cyclone-v => }/optfdtro.yml | 0 > .../{arm/altera-cyclone-v => }/optfdtuboot.yml | 0 > spec/build/bsps/powerpc/qoriq/grp.yml | 4 ++-- > spec/build/bsps/powerpc/qoriq/optfdtmxsz.yml| 17 - > spec/build/bsps/powerpc/qoriq/optfdtro.yml | 16 > spec/build/bsps/riscv/riscv/grp.yml | 8 > spec/build/bsps/riscv/riscv/optfdtcpyro.yml | 16 > spec/build/bsps/riscv/riscv/optfdtmxsz.yml | 17 - > spec/build/bsps/riscv/riscv/optfdtro.yml| 16 > spec/build/bsps/riscv/riscv/optfdtuboot.yml | 16 > 24 files changed, 26 insertions(+), 246 deletions(-) > delete mode 100644 spec/build/bsps/arm/beagle/optfdtcpyro.yml > delete mode 100644 spec/build/bsps/arm/beagle/optfdtmxsz.yml > delete mode 100644 spec/build/bsps/arm/beagle/optfdtro.yml > delete mode 100644 spec/build/bsps/arm/beagle/optfdtuboot.yml > delete mode 100644 spec/build/bsps/arm/imx/optfdtcpyro.yml > delete mode 100644 spec/build/bsps/arm/imx/optfdtmxsz.yml > delete mode 100644 spec/build/bsps/arm/imx/optfdtro.yml > delete mode 100644 spec/build/bsps/arm/imx/optfdtuboot.yml > rename spec/build/bsps/{arm/altera-cyclone-v => }/optfdtcpyro.yml (100%) > rename spec/build/bsps/{arm/altera-cyclone-v => }/optfdtmxsz.yml (100%) > rename spec/build/bsps/{arm/altera-cyclone-v => }/optfdtro.yml (100%) > rename spec/build/bsps/{arm/altera-cyclone-v => }/optfdtuboot.yml (100%) > delete mode 100644 spec/build/bsps/powerpc/qoriq/optfdtmxsz.yml > delete mode 100644 spec/build/bsps/powerpc/qoriq/optfdtro.yml > delete mode 100644 spec/build/bsps/riscv/riscv/optfdtcpyro.yml > delete mode 100644 spec/build/bsps/riscv/riscv/optfdtmxsz.yml > delete mode 100644 spec/build/bsps/riscv/riscv/optfdtro.yml > delete mode 100644 spec/build/bsps/riscv/riscv/optfdtuboot.yml > > diff --git a/spec/build/bsps/arm/altera-cyclone-v/bspalteracyclonev.yml > b/spec/build/bsps/arm/altera-cyclone-v/bspalteracyclonev.yml > index da567ddd79..a9f3f7dabf 100644 > --- a/spec/build/bsps/arm/altera-cyclone-v/bspalteracyclonev.yml > +++ b/spec/build/bsps/arm/altera-cyclone-v/bspalteracyclonev.yml > @@ -73,15 +73,15 @@ links: > - role: build-dependency >uid: optconuart1 > - role: build-dependency > - uid: optfdtcpyro > + uid: ../../optfdtcpyro > - role: build-dependency >uid: optfdten > - role: build-dependency > - uid: optfdtmxsz > + uid: ../../optfdtmxsz > - role: build-dependency > - uid: optfdtro > + uid: ../../optfdtro > - role: build-dependency > - uid: optfdtuboot > + uid: ../../optfdtuboot > - role: build-dependency >uid: opti2cspeed > - role: build-dependency > diff --git a/spec/build/bsps/arm/beagle/grp.yml > b/spec/build/bsps/arm/beagle/grp.yml > index 1375913fd0..3452c3e5c8 100644 > --- a/spec/build/bsps/arm/beagle/grp.yml > +++ b/spec/build/bsps/arm/beagle/grp.yml > @@ -22,13 +22,13 @@ links: > - role: build-dependency >uid: optdm3730 > - role: build-dependency > - uid: optfdtcpyro > + uid: ../../optfdtcpyro > - role: build-dependency > - uid: optfdtmxsz > + uid: ../../optfdtmxsz > - role: build-dependency > - uid: optfdtro > + uid: ../../optfdtro > - role: build-dependency > - uid: optfdtuboot > + uid: ../../optfdtuboot > - role: build-dependency >uid: ../grp > - role: build-dependency > diff --git a/spec/build/bsps/arm/beagle/optfdtcpyro.yml > b/spec/build/bsps/arm/beagle/optfdtcpyro.yml > deleted file mode 100644 > index 5ec59adf4d..00 > --- a/spec/build/bsps/arm/beagle/optfdtcpyro.yml > +++ /dev/null > @@ -1,16 +0,0 @@ > -SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause > -actions: > -- get-boolean: null > -- define-condition: null > -build-type: option > -copyrights: > -- Copyright (C) 2020 embedded brains GmbH (http://www.em
[PATCH] AddressToLineMapper.h: Remove pointer to temporary string
CID 1505281: Pointer to local outside scope Closes #4473 --- tester/covoar/AddressToLineMapper.cc | 11 --- tester/covoar/AddressToLineMapper.h | 21 - 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/tester/covoar/AddressToLineMapper.cc b/tester/covoar/AddressToLineMapper.cc index c305e3b..838b156 100644 --- a/tester/covoar/AddressToLineMapper.cc +++ b/tester/covoar/AddressToLineMapper.cc @@ -19,9 +19,13 @@ namespace Coverage { return is_end_sequence; } - const std::string& SourceLine::path() const + const std::string SourceLine::path() const { -return path_; +if (!path_) { + return "unknown"; +} else { + return *path_; +} } int SourceLine::line() const @@ -31,7 +35,8 @@ namespace Coverage { void AddressLineRange::addSourceLine(const rld::dwarf::address& address) { -auto insertResult = sourcePaths.insert(address.path()); +auto insertResult = sourcePaths.insert( + std::make_shared(address.path())); sourceLines.emplace_back( SourceLine ( diff --git a/tester/covoar/AddressToLineMapper.h b/tester/covoar/AddressToLineMapper.h index 88bf475..308925a 100644 --- a/tester/covoar/AddressToLineMapper.h +++ b/tester/covoar/AddressToLineMapper.h @@ -8,6 +8,7 @@ #define __ADDRESS_TO_LINE_MAPPER_H__ #include +#include #include #include #include @@ -26,7 +27,7 @@ namespace Coverage { SourceLine() : address(0), - path_("unknown"), + path_(nullptr), line_num(-1), is_end_sequence(true) { @@ -34,7 +35,7 @@ namespace Coverage { SourceLine( uint64_t addr, - const std::string& src, + const std::shared_ptr& src, int line, bool end_sequence ) : address(addr), @@ -64,7 +65,7 @@ namespace Coverage { * * @return Returns the source file path of this address */ -const std::string& path() const; +const std::string path() const; /*! * This method gets the source line number of this address. @@ -84,7 +85,7 @@ namespace Coverage { * An iterator pointing to the location in the set that contains the * source file path of the address. */ -const std::string& path_; +const std::shared_ptr path_; /*! * The source line number of the address. @@ -100,7 +101,17 @@ namespace Coverage { typedef std::vector SourceLines; - typedef std::set SourcePaths; + /* This allows comparison of strings owned by shared_ptrs. */ + struct SharedStringCmp { +bool operator()( + const std::shared_ptr& lhs, + const std::shared_ptr& rhs +) const { + return *lhs < *rhs; +} + }; + + typedef std::set, SharedStringCmp> SourcePaths; /*! @class AddressLineRange * -- 2.27.0 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH v2] libc: Added implementations for sig2str/str2sig methods
This looks OK to me. GO ahead and submit to newlib@ for their review. --joel On Fri, Jul 9, 2021 at 3:01 AM Matt Joyce wrote: > > Added implementations for sig2str() and str2sig() in libc/signal in order > to improve POSIX compliance. Added function prototypes added to > sys/signal.h. > --- > newlib/libc/include/sys/signal.h | 12 ++ > newlib/libc/signal/sig2str.c | 235 +++ > 2 files changed, 247 insertions(+) > create mode 100644 newlib/libc/signal/sig2str.c > > diff --git a/newlib/libc/include/sys/signal.h > b/newlib/libc/include/sys/signal.h > index 45cc0366c..847dc59bd 100644 > --- a/newlib/libc/include/sys/signal.h > +++ b/newlib/libc/include/sys/signal.h > @@ -238,6 +238,18 @@ int sigqueue (pid_t, int, const union sigval); > > #endif /* __POSIX_VISIBLE >= 199309 */ > > +#if __GNU_VISIBLE > + > +/* POSIX Issue 8 adds sig2str() and str2sig(). */ > + > +/* This allows for the max length of the error message and longest integer. > */ > +#define SIG2STR_MAX sizeof("Unknown signal 4294967295 ") > + > +int sig2str(int, char *); > +int str2sig(const char *__restrict, int *__restrict); > + > +#endif /* __GNU_VISIBLE */ > + > #if defined(___AM29K__) > /* These all need to be defined for ANSI C, but I don't think they are > meaningful. */ > diff --git a/newlib/libc/signal/sig2str.c b/newlib/libc/signal/sig2str.c > new file mode 100644 > index 0..04b4bb1be > --- /dev/null > +++ b/newlib/libc/signal/sig2str.c > @@ -0,0 +1,235 @@ > +/* SPDX-License-Identifier: BSD-2-Clause */ > +/* > + * Copyright (C) 2021 Matthew Joyce > + * > + * 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 OWNER 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. > + */ > + > +/* Defining _GNU_SOURCE to have access to SIG2STR_MAX in signal.h. */ > +#define _GNU_SOURCE > +#include > +#include > +#include > +#include > + > +#define SPACES_TO_N 6 /* Allows indexing to RT Signal number in str2sig */ > +#define NUM_OF_SIGS (sizeof(sig_array) / sizeof(sig_name_and_num)) > + > +typedef struct sig_name_and_num { > + const char *sig_name; > + const int sig_num; > +} sig_name_and_num; > + > +static const sig_name_and_num sig_array[] = { > +#ifdef SIGHUP > + { "HUP", SIGHUP}, > +#endif > +#ifdef SIGINT > + { "INT", SIGINT }, > +#endif > +#ifdef SIGQUIT > + { "QUIT", SIGQUIT }, > +#endif > +#ifdef SIGILL > + { "ILL", SIGILL }, > +#endif > +#ifdef SIGTRAP > + { "TRAP", SIGTRAP }, > +#endif > +#ifdef SIGABRT > + { "ABRT", SIGABRT }, > +#endif > +#ifdef SIGIOT > + { "IOT", SIGIOT}, > +#endif > +#ifdef SIGEMT > + { "EMT", SIGEMT }, > +#endif > +#ifdef SIGFPE > + { "FPE", SIGFPE }, > +#endif > +#ifdef SIGKILL > + { "KILL", SIGKILL }, > +#endif > +#ifdef SIGBUS > + { "BUS", SIGBUS }, > +#endif > +#ifdef SIGSEGV > + { "SEGV", SIGSEGV }, > +#endif > +#ifdef SIGSYS > + { "SYS", SIGSYS }, > +#endif > +#ifdef SIGPIPE > + { "PIPE", SIGPIPE }, > +#endif > +#ifdef SIGALRM > + { "ALRM", SIGALRM }, > +#endif > +#ifdef SIGTERM > + { "TERM", SIGTERM }, > +#endif > +#ifdef SIGURG > + { "URG", SIGURG }, > +#endif > +#ifdef SIGSTOP > + { "STOP", SIGSTOP }, > +#endif > +#ifdef SIGTSTP > + { "TSTP", SIGTSTP }, > +#endif > +#ifdef SIGCONT > + { "CONT", SIGCONT }, > +#endif > +#ifdef SIGCHLD > + { "CHLD", SIGCHLD }, > +#endif > +#ifdef SIGCLD > + { "CLD", SIGCLD }, > +#endif > +#ifdef SIGTTIN > + { "TTIN", SIGTTIN }, > +#endif > +#ifdef SIGTTOU > + { "TTOU", SIGTTOU }, > +#endif >
Re: [PATCH 1/2] libc: Added implementations for sig2str/str2sig
On Wed, Jul 7, 2021 at 5:46 AM Matt Joyce wrote: > > Added function implementations for sig2str() and str2sig() in libc/signal in > order > to improve POSIX compliance. > --- > newlib/libc/signal/sig2str.c | 156 +++ > 1 file changed, 156 insertions(+) > create mode 100644 newlib/libc/signal/sig2str.c > > diff --git a/newlib/libc/signal/sig2str.c b/newlib/libc/signal/sig2str.c > new file mode 100644 > index 0..a07fa2a38 > --- /dev/null > +++ b/newlib/libc/signal/sig2str.c > @@ -0,0 +1,156 @@ > +/* Placeholder */ This must be fixed. > +//#define __GNU_VISIBLE // defining it to have access to SIG2STR_MAX > + > +#include > +#include > +#include > + > +typedef struct sig_name_and_num { > + const char *sig_name; > + const int sig_num; > +} sig_name_and_num; > + > +static sig_name_and_num sig_array[] = { > +#ifdef EXIT > +{ "EXIT", 0 }, > +#endif The {} part needs indenting > +#ifdef SIGHUP > +{ "HUP", SIGHUP}, > +#endif > +#ifdef SIGINT > +{ "INT", SIGINT }, > +#endif > +#ifdef SIGQUIT > +{ "QUIT", SIGQUIT }, > +#endif > +#ifdef SIGILL > +{ "ILL", SIGILL }, > +#endif > +#ifdef SIGTRAP > +{ "TRAP", SIGTRAP }, > +#endif > +#ifdef SIGABRT > +{ "ABRT", SIGABRT }, > +#endif > +#ifdef SIGIOT > +{ "IOT", SIGIOT}, > +#endif > +#ifdef SIGEMT > +{ "EMT", SIGEMT }, > +#endif > +#ifdef SIGFPE > +{ "FPE", SIGFPE }, > +#endif > +#ifdef SIGKILL > +{ "KILL", SIGKILL }, > +#endif > +#ifdef SIGBUS > +{ "BUS", SIGBUS }, > +#endif > +#ifdef SIGSEGV > +{ "SEGV", SIGSEGV }, > +#endif > +#ifdef SIGSYS > +{ "SYS", SIGSYS }, > +#endif > +#ifdef SIGPIPE > +{ "PIPE", SIGPIPE }, > +#endif > +#ifdef SIGALRM > +{ "ALRM", SIGALRM }, > +#endif > +#ifdef SIGTERM > +{ "TERM", SIGTERM }, > +#endif > +#ifdef SIGURG > +{ "URG", SIGURG }, > +#endif > +#ifdef SIGSTOP > +{ "STOP", SIGSTOP }, > +#endif > +#ifdef SIGTSTP > +{ "TSTP", SIGTSTP }, > +#endif > +#ifdef SIGCONT > +{ "CONT", SIGCONT }, > +#endif > +#ifdef SIGCHLD > +{ "CHLD", SIGCHLD }, > +#endif > +#ifdef SIGCLD > +{ "CLD", SIGCLD }, > +#endif > +#ifdef SIGTTIN > +{ "TTIN", SIGTTIN }, > +#endif > +#ifdef SIGTTOU > +{ "TTOU", SIGTTOU }, > +#endif > +#ifdef SIGIO > +{ "IO", SIGIO }, > +#endif > +#ifdef SIGPOLL > +{ "POLL", SIGPOLL }, > +#endif > +#ifdef SIGWINCH > +{ "WINCH", SIGWINCH }, > +#endif > +#ifdef SIGUSR1 > +{ "USR1", SIGUSR1 }, > +#endif > +#ifdef SIGUSR2 > +{ "USR2", SIGUSR2 }, > +#endif > +// #ifdef SIGRTMIN > +// { "RTMIN", SIGRTMIN }, > +// #endif > +// #ifdef SIGRTMAX > +// { "RTMAX", SIGRTMAX }, > +// #endif > +#ifdef SIGPWR > +{ "PWR", SIGPWR }, > +#endif > +#ifdef SIGXCPU > +{ "XCPU", SIGXCPU }, > +#endif > +#ifdef SIGXFSZ > +{ "XFSZ", SIGXFSZ }, > +#endif > +#ifdef SIGVTALRM > +{ "VTALRM", SIGVTALRM }, > +#endif > +#ifdef SIGPROF > +{ "PROF", SIGPROF }, > +#endif > +#ifdef SIGLOST > +{ "LOST", SIGLOST } > +#endif > +}; > + > +#define NUM_OF_SIGS (sizeof(sig_array) / sizeof(sig_name_and_num)) > + > +int > +sig2str(int signum, char *str) > +{ > + > + for (sig_name_and_num *i = sig_array; i < &sig_array[NUM_OF_SIGS]; i++){ > +if (i->sig_num == signum){ Space between the ) and the { > +strcpy(str, i->sig_name); > +return 0; > +} > + } > + sprintf(str, "Unknown signal %d", signum); > + return -1; > +} > + > +int > +str2sig(const char *__restrict str, int *__restrict pnum) > +{ > + for (sig_name_and_num *i = sig_array; i < &sig_array[NUM_OF_SIGS]; i++){ > +if (strcmp(i->sig_name, str) == 0){ Two more ){ needing a space. > +*pnum = i->sig_num; > +return 0; > +} > + } > + return -1; > +} > -- > 2.31.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 v3] testsuites: Added tests for sig2str/str2sig methods
On Fri, Jul 9, 2021 at 4:01 AM Matt Joyce wrote: > > Fixed newline error at end of psxsignal09.yml. Added psxsignal09 in > psxtests and compile only test in psxhdrs in order to evaluate newly > added POSIX standard methods in Newlib. > --- > spec/build/testsuites/psxtests/grp.yml| 2 + > spec/build/testsuites/psxtests/libpsxhdrs.yml | 1 + > .../build/testsuites/psxtests/psxsignal09.yml | 21 ++ > testsuites/psxtests/Makefile.am | 11 + > testsuites/psxtests/configure.ac | 1 + > testsuites/psxtests/psxhdrs/signal/sig2str.c | 57 > testsuites/psxtests/psxsignal09/init.c| 249 ++ > .../psxtests/psxsignal09/psxsignal09.doc | 35 +++ > .../psxtests/psxsignal09/psxsignal09.scn | 32 +++ > 9 files changed, 409 insertions(+) > create mode 100644 spec/build/testsuites/psxtests/psxsignal09.yml > create mode 100644 testsuites/psxtests/psxhdrs/signal/sig2str.c > create mode 100644 testsuites/psxtests/psxsignal09/init.c > create mode 100644 testsuites/psxtests/psxsignal09/psxsignal09.doc > create mode 100644 testsuites/psxtests/psxsignal09/psxsignal09.scn > > diff --git a/spec/build/testsuites/psxtests/grp.yml > b/spec/build/testsuites/psxtests/grp.yml > index fb7ce465ae..f61f45dbe9 100644 > --- a/spec/build/testsuites/psxtests/grp.yml > +++ b/spec/build/testsuites/psxtests/grp.yml > @@ -205,6 +205,8 @@ links: >uid: psxsignal07 > - role: build-dependency >uid: psxsignal08 > +- role: build-dependency > + uid: psxsignal09 > - role: build-dependency >uid: psxspin01 > - role: build-dependency > diff --git a/spec/build/testsuites/psxtests/libpsxhdrs.yml > b/spec/build/testsuites/psxtests/libpsxhdrs.yml > index 6a0ab6d4f7..5767bcdacd 100644 > --- a/spec/build/testsuites/psxtests/libpsxhdrs.yml > +++ b/spec/build/testsuites/psxtests/libpsxhdrs.yml > @@ -513,6 +513,7 @@ source: > - testsuites/psxtests/psxhdrs/signal/sigtimedwait.c > - testsuites/psxtests/psxhdrs/signal/sigwait.c > - testsuites/psxtests/psxhdrs/signal/sigwaitinfo.c > +- testsuites/psxtests/psxhdrs/signal/sig2str.c > - testsuites/psxtests/psxhdrs/stddef/offsetof.c > - testsuites/psxtests/psxhdrs/stdio/clearerr.c > - testsuites/psxtests/psxhdrs/stdio/ctermid.c > diff --git a/spec/build/testsuites/psxtests/psxsignal09.yml > b/spec/build/testsuites/psxtests/psxsignal09.yml > new file mode 100644 > index 00..08a29c7c5b > --- /dev/null > +++ b/spec/build/testsuites/psxtests/psxsignal09.yml > @@ -0,0 +1,21 @@ > +SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause > +build-type: test-program > +cflags: [] > +copyrights: > +- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de) > +cppflags: [] > +cxxflags: [] > +enabled-by: > +- RTEMS_POSIX_API > +features: c cprogram > +includes: [] > +ldflags: [] > +links: [] > +source: > +- testsuites/psxtests/psxsignal09/init.c > +stlib: [] > +target: testsuites/psxtests/psxsignal09.exe > +type: build > +use-after: [] > +use-before: [] > + > diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am > index a35f00b665..b62d5cab59 100755 > --- a/testsuites/psxtests/Makefile.am > +++ b/testsuites/psxtests/Makefile.am > @@ -924,6 +924,17 @@ psxsignal08_CPPFLAGS = $(AM_CPPFLAGS) > $(TEST_FLAGS_psxsignal08) \ > endif > endif > > +if HAS_POSIX > +if TEST_psxsignal09 > +psx_tests += psxsignal09 > +psx_screens += psxsignal09/psxsignal09.scn > +psx_docs += psxsignal09/psxsignal09.doc > +psxsignal09_SOURCES = psxsignal09/init.c > +psxsignal09_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxsignal09) \ > + $(support_includes) -I$(top_srcdir)/include > +endif > +endif > + > if TEST_psxspin01 > psx_tests += psxspin01 > psx_screens += psxspin01/psxspin01.scn > diff --git a/testsuites/psxtests/configure.ac > b/testsuites/psxtests/configure.ac > index 3f95010cd3..7b9a1027ca 100644 > --- a/testsuites/psxtests/configure.ac > +++ b/testsuites/psxtests/configure.ac > @@ -138,6 +138,7 @@ RTEMS_TEST_CHECK([psxsignal05]) > RTEMS_TEST_CHECK([psxsignal06]) > RTEMS_TEST_CHECK([psxsignal07]) > RTEMS_TEST_CHECK([psxsignal08]) > +RTEMS_TEST_CHECK([psxsignal09]) > RTEMS_TEST_CHECK([psxspin01]) > RTEMS_TEST_CHECK([psxstack01]) > RTEMS_TEST_CHECK([psxstack02]) > diff --git a/testsuites/psxtests/psxhdrs/signal/sig2str.c > b/testsuites/psxtests/psxhdrs/signal/sig2str.c > new file mode 100644 > index 00..520a0db740 > --- /dev/null > +++ b/testsuites/psxtests/psxhdrs/signal/sig2str.c > @@ -0,0 +1,57 @@ > +/* SPDX-License-Identifier: BSD-2-Clause */ > + > +/** > + * @file > + * @brief Header File Conformance Test > + * > + * This test file is used to verify that the header files associated with > + * invoking this function are correct. > + */ > + > +/* > + * Copyright (C) 2021 Matthew Joyce > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of
Re: [PATCH v2] setbuilder minor list-host option
Pushed and thanks Chris On 16/7/21 10:15 pm, Robin Mueller wrote: > This adds a way to print the host triplet > Can be useful for cross-compiling toolchains > --- > Change from v1 to v2: Removed "Displaying" in printout on first line. > > source-builder/sb/setbuilder.py | 14 +- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py > index c8c8fee..63392fe 100644 > --- a/source-builder/sb/setbuilder.py > +++ b/source-builder/sb/setbuilder.py > @@ -673,6 +673,16 @@ def list_bset_cfg_files(opts, configs): > return True > return False > > +def list_host(opts): > +if opts.get_arg('--list-host'): > +print('Host operating system information:') > +print('Operating system: %s' % macro_expand(opts.defaults, '%{_os}')) > +print('Number of processors: %s' % macro_expand(opts.defaults, > '%{_ncpus}')) > +print('Build architecture: %s' % macro_expand(opts.defaults, > '%{_host_arch}')) > +print('Host triplet: %s' % macro_expand(opts.defaults, '%{_host}')) > +return True > +return False > + > def run(): > import sys > ec = 0 > @@ -683,6 +693,7 @@ def run(): > '--list-bsets':'List available build sets', > '--list-configs': 'List available configuration files.', > '--list-deps': 'List the dependent files.', > +'--list-host': 'List host information and the host > triplet.', > '--bset-tar-file': 'Create a build set tar file', > '--pkg-tar-files': 'Create package tar files', > '--no-report': 'Do not create a package report.', > @@ -720,7 +731,8 @@ def run(): > deps = [] > else: > deps = None > -if not list_bset_cfg_files(opts, configs): > + > +if not list_bset_cfg_files(opts, configs) and not list_host(opts): > prefix = macro_expand(opts.defaults, '%{_prefix}') > if opts.canadian_cross(): > opts.disable_install() > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel