Re: How to run the full RTEMS testsuite
> On 11-Apr-2021, at 1:15 AM, Ida Delphine wrote: > > > For some reason I get this: > rtems-test: command not found > I've used this command a few times and it worked. I don't know what I am > doing wrong now... > Any idea what I am doing wrong? Did you add the path to the toolchain to your $PATH variable in the terminal ? (This might be a reason ) Or rtems-test isn’t built for the bsp you are using try looking into rtems-testing repo > >> On Sat, Apr 10, 2021 at 12:43 PM Eshan Dhawan >> wrote: >> Hi >> You can use rtems-test to run tests in a directory >> Eg : >> rtems-test --rtems-bsp=erc32-run --rtems-tools=$HOME/development/rtems/5 >> ~/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/testsuites/samples >> Thanks >> Eshan >>> On 10-Apr-2021, at 5:01 PM, Ida Delphine wrote: >>> >>> >>> Hello everyone, >>> I'm looking forward to work on automatic style checking and code formatting >>> for RTEMS as my GSoC project and will need to test that style changes do >>> not cause any implementation bugs. I will carryout this test by running the >>> full RTEMS testsuite. I've tried looking in the RTEMS documentation for a >>> detailed step by step guide on how to do this but I can't find anything >>> helpful. Can someone please guide me on how to achieve this? >>> >>> Cheers, >>> Ida. >>> ___ >>> 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] covoar/TargetBase.h: Remove unused member variables
Both flagged by CID #1399638. --- tester/covoar/TargetBase.h | 13 - 1 file changed, 13 deletions(-) diff --git a/tester/covoar/TargetBase.h b/tester/covoar/TargetBase.h index d13216d..6db08f2 100644 --- a/tester/covoar/TargetBase.h +++ b/tester/covoar/TargetBase.h @@ -122,19 +122,6 @@ namespace Target { std::stringtargetName_m; /*! - * This member variable indicates either the column that the instruction - * starts in the object dump file, when the objdump has no tabs; or the - * number of tabs to find the instruction. - */ -int objdumpInstructionLocation; - -/*! - * This member variable indicates whether or not the objdump has - * tabs as delemeters. - */ -bool objdumpHasTabs; - -/*! * This member variable is an array of all conditional branch instructions * for this target. */ -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: How to run the full RTEMS testsuite
For some reason I get this: rtems-test: command not found I've used this command a few times and it worked. I don't know what I am doing wrong now... Any idea what I am doing wrong? On Sat, Apr 10, 2021 at 12:43 PM Eshan Dhawan wrote: > Hi > You can use rtems-test to run tests in a directory > Eg : > > rtems-test --rtems-bsp=erc32-run --rtems-tools=$HOME/development/rtems/5 > ~/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/testsuites/samples > > Thanks > Eshan > > On 10-Apr-2021, at 5:01 PM, Ida Delphine wrote: > > > Hello everyone, > I'm looking forward to work on automatic style checking and code > formatting for RTEMS as my GSoC project and will need to test that style > changes do not cause any implementation bugs. I will carryout this test by > running the full RTEMS testsuite. I've tried looking in the RTEMS > documentation for a detailed step by step guide on how to do this but I > can't find anything helpful. Can someone please guide me on how to achieve > this? > > Cheers, > Ida. > ___ > 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 RTEMS v2 0/1] bsp/beagle: Refactored i2c driver and Updated
The following two patches update the Beagle BSP i2c driver to use device tree based initialization and the documentation related to it. G S Niteesh Babu (1): bsps/beagle: Refactored i2c driver bsps/arm/beagle/i2c/bbb-i2c.c | 122 ++ bsps/arm/beagle/include/bsp.h | 4 + bsps/arm/beagle/include/bsp/i2c.h | 32 +--- bsps/arm/beagle/start/bspstart.c | 51 + 4 files changed, 114 insertions(+), 95 deletions(-) -- 2.17.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH RTEMS v2 1/1] bsps/beagle: Refactored i2c driver
Refactored the i2c driver to parse register values from the device tree rather than hardcoding them. But still the clocks have to initialized manually. --- bsps/arm/beagle/i2c/bbb-i2c.c | 122 ++ bsps/arm/beagle/include/bsp.h | 4 + bsps/arm/beagle/include/bsp/i2c.h | 32 +--- bsps/arm/beagle/start/bspstart.c | 51 + 4 files changed, 114 insertions(+), 95 deletions(-) diff --git a/bsps/arm/beagle/i2c/bbb-i2c.c b/bsps/arm/beagle/i2c/bbb-i2c.c index b2a7cf814d..b842fd820a 100644 --- a/bsps/arm/beagle/i2c/bbb-i2c.c +++ b/bsps/arm/beagle/i2c/bbb-i2c.c @@ -25,6 +25,7 @@ #include #include #include +#include typedef struct bbb_i2c_bus { i2c_bus base; @@ -34,12 +35,6 @@ typedef struct bbb_i2c_bus { volatile uint32_t *i2c_clkctrl; volatile uint32_t *clkstctrl; } clkregs; - struct { -volatile uint32_t *conf_sda; -uint32_t mmode_sda; -volatile uint32_t *conf_scl; -uint32_t mmode_scl; - } pinregs; rtems_id task_id; rtems_vector_number irq; i2c_msg *buffer; @@ -56,19 +51,22 @@ typedef struct bbb_i2c_bus { #else #define debug_print(fmt, args...) #endif +/* + * Here we assume the number of i2c nodes + * will be less than 100. + */ +#define PATH_LEN (strlen("/dev/i2c-xx") + 1) static int am335x_i2c_fill_registers( bbb_i2c_bus *bus, - uintptr_t register_base + uint32_t base ) { - /* FIXME: The pin handling should be replaced by a proper pin handling during - * initialization. This one is heavily board specific. */ -#if ! IS_AM335X - printk ("The I2C driver currently only works on Beagle Bone. Please add your pin configs."); - return EINVAL; -#endif - bus->regs = (volatile bbb_i2c_regs *) register_base; + bus->regs = (volatile bbb_i2c_regs *)base; + + /* + * FIXME: Implement a clock driver to parse and setup clocks + */ switch ((intptr_t) bus->regs) { case AM335X_I2C0_BASE: bus->clkregs.ctrl_clkctrl = ®(AM335X_SOC_CM_WKUP_REGS + @@ -77,10 +75,6 @@ static int am335x_i2c_fill_registers( AM335X_CM_WKUP_I2C0_CLKCTRL); bus->clkregs.clkstctrl = ®(AM335X_SOC_CM_WKUP_REGS + AM335X_CM_WKUP_CLKSTCTRL); -bus->pinregs.conf_sda = ®(AM335X_PADCONF_BASE + AM335X_CONF_I2C0_SDA); -bus->pinregs.mmode_sda = 0; -bus->pinregs.conf_scl = ®(AM335X_PADCONF_BASE + AM335X_CONF_I2C0_SCL); -bus->pinregs.mmode_scl = 0; break; case AM335X_I2C1_BASE: bus->clkregs.ctrl_clkctrl = ®(AM335X_SOC_CM_WKUP_REGS + @@ -88,10 +82,6 @@ static int am335x_i2c_fill_registers( bus->clkregs.i2c_clkctrl = ®(AM335X_CM_PER_ADDR + AM335X_CM_PER_I2C1_CLKCTRL); bus->clkregs.clkstctrl = NULL; -bus->pinregs.conf_sda = ®(AM335X_PADCONF_BASE + AM335X_CONF_SPI0_D1); -bus->pinregs.mmode_sda = 2; -bus->pinregs.conf_scl = ®(AM335X_PADCONF_BASE + AM335X_CONF_SPI0_CS0); -bus->pinregs.mmode_scl = 2; break; case AM335X_I2C2_BASE: bus->clkregs.ctrl_clkctrl = ®(AM335X_SOC_CM_WKUP_REGS + @@ -99,24 +89,12 @@ static int am335x_i2c_fill_registers( bus->clkregs.i2c_clkctrl = ®(AM335X_CM_PER_ADDR + AM335X_CM_PER_I2C2_CLKCTRL); bus->clkregs.clkstctrl = NULL; -bus->pinregs.conf_sda = ®(AM335X_PADCONF_BASE + AM335X_CONF_UART1_CTSN); -bus->pinregs.mmode_sda = 3; -bus->pinregs.conf_scl = ®(AM335X_PADCONF_BASE + AM335X_CONF_UART1_RTSN); -bus->pinregs.mmode_scl = 3; break; default: return EINVAL; } - return 0; -} - -static void am335x_i2c_pinmux( bbb_i2c_bus *bus ) -{ - *bus->pinregs.conf_sda = -( BBB_RXACTIVE | BBB_SLEWCTRL | bus->pinregs.mmode_sda); - *bus->pinregs.conf_scl = -( BBB_RXACTIVE | BBB_SLEWCTRL | bus->pinregs.mmode_scl); + return 0; } static void am335x_i2c_module_clk_enable( bbb_i2c_bus *bus ) @@ -453,36 +431,34 @@ static void am335x_i2c_destroy( i2c_bus *base ) i2c_bus_destroy_and_free( &bus->base ); } -int am335x_i2c_bus_register( - const char *bus_path, - uintptr_t register_base, - uint32_tinput_clock, - rtems_vector_number irq +static int am335x_i2c_bus_register( + uint32_t reg_base, + rtems_vector_number irq, + const char *bus_path ) { - bbb_i2c_bus *bus; - rtems_status_code sc; - int err; - - (void) input_clock; /* FIXME: Unused. Left for compatibility. */ + bbb_i2c_bus*bus; + rtems_status_code sc; + int err; bus = (bbb_i2c_bus *) i2c_bus_alloc_and_init( sizeof( *bus ) ); + bus->irq = irq; if ( bus == NULL ) { return -1; } - bus->irq = irq; - - err = am335x_i2c_fill_registers(bus, register_base); + err = am335x_i2c_fill_registers(bus, reg_base); if (err != 0) { +printf("i2c: invalid register base\n"); ( *bus->base.destroy )( &bus->base ); rtems_set_errno_and_return_minus_one( err ); } - am335x_i2c_module_clk_enable(bus); - am335x_
[PATCH RTEMS-docs] user/bsps/arm/beagle: Update i2c initialization instructions
The new i2c driver in the beagle BSP uses FDT based initialization. This updates the documentation of the BSP about the same. --- user/bsps/arm/beagle.rst | 41 +++- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/user/bsps/arm/beagle.rst b/user/bsps/arm/beagle.rst index ac49b1c..d20942e 100644 --- a/user/bsps/arm/beagle.rst +++ b/user/bsps/arm/beagle.rst @@ -67,23 +67,38 @@ Add the following to a file named uEnv.txt: I2C Driver -- -The Beagle has the `i2c-0` device registered at initialization. For registering -`i2c-1` and `i2c-2` ``bbb_register_i2c_1()`` and -``bbb_register_i2c_2()`` wrapper functions are respectively used. +The Beagle i2c initialization is based on the device tree. To initialize a i2c +device, the user has to enable the respective node in the device tree using +overlays. -For registering an I2C device with a custom path (say `/dev/i2c-3`) the -function ``am335x_i2c_bus_register()`` has to be used. +For registering an I2C device with a custom path (say `/dev/i2c-eeprom`) an +overlay has to be provided. The overlay must add an additional attribute +`rtems,path` with the custom path as value to the respective i2c node. -The function prototype is given below: +For example, -.. code-block:: C +.. code-block:: + /dts-v1/; + + / { +compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; + +fragment@0 { + target = <0x>; + + __overlay__ { + compatible = "rtems,bsp-i2c", "ti,omap4-i2c"; + status = "okay"; + rtems,path = "/dev/i2c-eeprom"; + }; +}; + +__fixups__ { + i2c0 = "/fragment@0:target:0"; +}; + }; - int am335x_i2c_bus_register( - const char *bus_path, - uintptr_t register_base, - uint32_tinput_clock, - rtems_vector_number irq - ); +The above example registers a custom path `/dev/i2c-eeprom` for i2c0. SPI Driver -- -- 2.17.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: [PATCH v2 0/2] powerpc/shared/console: Console baud rate fixes
> On Apr 10, 2021, at 08:41 , wrote: > > The "powerpc/shared/console" code has the start-up console value fixed > at 9600 baud. This changes the hard-wired constant "9600" in the code > to the configuration setting "BSP_CONSOLE_BAUD" and adds configuration > support in both the "waf" and the legacy configuration systems. > > In addition, once the shared console baud rate can be set to start at > anything other than 9600 the termios code will reset it to 9600 at the > first open. I did this over incorporating both patches and using "git send-email" from my "git" server. Joel told me it appeared I'd cut-and-pasted the previous patch. I hadn't, I imported it into Apple mail as "mbox" format and then sent it. I don't know if it was the import or the fact it was digitally signed that looked odd. At any rate, this patch should at least be received properly. Peter - Peter Dufault HD Associates, Inc. Software and System Engineering This email is delivered through the public internet using protocols subject to interception and tampering. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2 0/2] powerpc/shared/console: Console baud rate fixes
From: Peter Dufault The "powerpc/shared/console" code has the start-up console value fixed at 9600 baud. This changes the hard-wired constant "9600" in the code to the configuration setting "BSP_CONSOLE_BAUD" and adds configuration support in both the "waf" and the legacy configuration systems. In addition, once the shared console baud rate can be set to start at anything other than 9600 the termios code will reset it to 9600 at the first open. Peter Dufault (2): powerpc/shared/console: Make console baud rate configurable. powerpc/shared/console: "termios" first open sets console baud to 9600 bsps/powerpc/shared/console/console.c | 4 ++-- bsps/powerpc/shared/console/uart.c | 5 - c/src/lib/libbsp/powerpc/beatnik/configure.ac | 4 c/src/lib/libbsp/powerpc/haleakala/configure.ac| 4 c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac | 4 c/src/lib/libbsp/powerpc/mvme3100/configure.ac | 4 c/src/lib/libbsp/powerpc/mvme5500/configure.ac | 4 spec/build/bsps/optconsolebaud.yml | 5 + spec/build/bsps/powerpc/beatnik/bspbeatnik.yml | 2 ++ spec/build/bsps/powerpc/haleakala/bsphaleakala.yml | 2 ++ spec/build/bsps/powerpc/motorola_powerpc/obj.yml | 4 +++- spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml | 2 ++ spec/build/bsps/powerpc/mvme5500/bspmvme5500.yml | 2 ++ 13 files changed, 42 insertions(+), 4 deletions(-) -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH v2 1/2] powerpc/shared/console: Make console baud rate configurable.
From: Peter Dufault The "powerpc/shared/console" code has the start-up console value fixed at 9600 baud. This changes the hard-wired constant "9600" in the code to the configuration setting "BSP_CONSOLE_BAUD" and adds configuration support in both the "waf" and the legacy configuration systems. Note that the VME BSPs beatnik, mvme3100, and mve5100 can be improved by adding a "mvme" BSP family. This configuration change, as well as future configuration changes, could then be made in a "grp.yml" file. --- bsps/powerpc/shared/console/console.c | 4 ++-- bsps/powerpc/shared/console/uart.c | 2 +- c/src/lib/libbsp/powerpc/beatnik/configure.ac | 4 c/src/lib/libbsp/powerpc/haleakala/configure.ac| 4 c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac | 4 c/src/lib/libbsp/powerpc/mvme3100/configure.ac | 4 c/src/lib/libbsp/powerpc/mvme5500/configure.ac | 4 spec/build/bsps/optconsolebaud.yml | 5 + spec/build/bsps/powerpc/beatnik/bspbeatnik.yml | 2 ++ spec/build/bsps/powerpc/haleakala/bsphaleakala.yml | 2 ++ spec/build/bsps/powerpc/motorola_powerpc/obj.yml | 4 +++- spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml | 2 ++ spec/build/bsps/powerpc/mvme5500/bspmvme5500.yml | 2 ++ 13 files changed, 39 insertions(+), 4 deletions(-) diff --git a/bsps/powerpc/shared/console/console.c b/bsps/powerpc/shared/console/console.c index f275683..f6c8021 100644 --- a/bsps/powerpc/shared/console/console.c +++ b/bsps/powerpc/shared/console/console.c @@ -153,8 +153,8 @@ static int console_first_open(int major, int minor, void *arg) /* must not open a minor device we have no ISR for */ assert( minor>=0 && minor < sizeof(ttyS)/sizeof(ttyS[0]) && ttyS[minor].isr ); - /* 9600-8-N-1 */ - BSP_uart_init(minor, 9600, 0); + /* BSP_CONSOLE_BAUD-8-N-1 */ + BSP_uart_init(minor, BSP_CONSOLE_BAUD, 0); status = BSP_uart_install_isr(minor, ttyS[minor].isr); if (!status) { printk("Error installing serial console interrupt handler for '%s'!\n", diff --git a/bsps/powerpc/shared/console/uart.c b/bsps/powerpc/shared/console/uart.c index 62212b9..41db52f 100644 --- a/bsps/powerpc/shared/console/uart.c +++ b/bsps/powerpc/shared/console/uart.c @@ -160,7 +160,7 @@ BSP_uart_init(int uart, int baud, int hwFlow) if ( (int)BSPBaseBaud <= 0 ) { /* Use current divisor assuming BSPBaseBaud gives us the current speed */ - BSPBaseBaud = BSPBaseBaud ? -BSPBaseBaud : 9600; + BSPBaseBaud = BSPBaseBaud ? -BSPBaseBaud : BSP_CONSOLE_BAUD; BSPBaseBaud *= ((uread(uart, DLM) << 8) | uread(uart, DLL)); } diff --git a/c/src/lib/libbsp/powerpc/beatnik/configure.ac b/c/src/lib/libbsp/powerpc/beatnik/configure.ac index b332aaa..584072d 100644 --- a/c/src/lib/libbsp/powerpc/beatnik/configure.ac +++ b/c/src/lib/libbsp/powerpc/beatnik/configure.ac @@ -34,6 +34,10 @@ Note that the policy can still be defined by the application CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK this feature is removed and a little memory is saved.]) +RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[9600]) +RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD], +[default console baud]) + AC_DEFINE(__ppc_generic, 1, [PowerPC model option]) # Explicitly list all Makefiles here diff --git a/c/src/lib/libbsp/powerpc/haleakala/configure.ac b/c/src/lib/libbsp/powerpc/haleakala/configure.ac index cf3a552..627625b 100644 --- a/c/src/lib/libbsp/powerpc/haleakala/configure.ac +++ b/c/src/lib/libbsp/powerpc/haleakala/configure.ac @@ -25,6 +25,10 @@ RTEMS_BSPOPTS_HELP([PPC_VECTOR_FILE_BASE], [This defines the base address of the exception table. NOTE: Vectors are actually at 0xFFF0 but file starts at offset.]) +RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[9600]) +RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD], +[default console baud]) + AC_DEFINE(ppc405, 1, [PowerPC model option]) RTEMS_BSP_CLEANUP_OPTIONS diff --git a/c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac b/c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac index 8b79309..56d550c 100644 --- a/c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac +++ b/c/src/lib/libbsp/powerpc/motorola_powerpc/configure.ac @@ -33,6 +33,10 @@ Note that the policy can still be defined by the application CONFIGURE_MALLOC_BSP_SUPPORTS_SBRK this feature is removed and a little memory is saved.]) +RTEMS_BSPOPTS_SET([BSP_CONSOLE_BAUD],[*],[9600]) +RTEMS_BSPOPTS_HELP([BSP_CONSOLE_BAUD], +[default console baud]) + RTEMS_BSPOPTS_SET([mvme2100],[mvme2100],[1]) RTEMS_BSPOPTS_SET([mvme2100],[*],[]) RTEMS_BSPOPTS_HELP([mvme2100], diff --git a/c/src/lib/libbsp/powerpc/mvme3100/configure.ac b/c/src/lib/libbsp/powerpc/mvme3100/configure.ac index 8b9a04f..cf35fd1 100644 --- a/c/src/lib/libbsp/powerpc/mvme3100/configure.ac +++ b/c/src/lib/libbsp/powerpc/mvme3100/configure.ac @@ -33,6 +33,10 @@ Note that the policy can still be defined by the application CONFIGURE_M
[PATCH v2 2/2] powerpc/shared/console: "termios" first open sets console baud to 9600
From: Peter Dufault When the PowerPC shared console baud rate starts at anything other than 9600 the termios code will set it to 9600 at the first open. --- bsps/powerpc/shared/console/uart.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bsps/powerpc/shared/console/uart.c b/bsps/powerpc/shared/console/uart.c index 41db52f..f30b6a3 100644 --- a/bsps/powerpc/shared/console/uart.c +++ b/bsps/powerpc/shared/console/uart.c @@ -536,6 +536,9 @@ BSP_uart_termios_set(int uart, void *p) uart_data[uart].ioMode = ttyp->device.outputUsesInterrupts; + /* Convert from the baud number to the "speed_t" termios setting. */ + ttyp->termios.c_ispeed = ttyp->termios.c_ospeed = rtems_termios_number_to_baud(uart_data[uart].baud); + return; } -- 1.8.3.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: How to run the full RTEMS testsuite
Hi You can use rtems-test to run tests in a directory Eg : rtems-test --rtems-bsp=erc32-run --rtems-tools=$HOME/development/rtems/5 ~/development/rtems/kernel/erc32/sparc-rtems5/c/erc32/testsuites/samples Thanks Eshan > On 10-Apr-2021, at 5:01 PM, Ida Delphine wrote: > > > Hello everyone, > I'm looking forward to work on automatic style checking and code formatting > for RTEMS as my GSoC project and will need to test that style changes do not > cause any implementation bugs. I will carryout this test by running the full > RTEMS testsuite. I've tried looking in the RTEMS documentation for a detailed > step by step guide on how to do this but I can't find anything helpful. Can > someone please guide me on how to achieve this? > > Cheers, > Ida. > ___ > 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
How to run the full RTEMS testsuite
Hello everyone, I'm looking forward to work on automatic style checking and code formatting for RTEMS as my GSoC project and will need to test that style changes do not cause any implementation bugs. I will carryout this test by running the full RTEMS testsuite. I've tried looking in the RTEMS documentation for a detailed step by step guide on how to do this but I can't find anything helpful. Can someone please guide me on how to achieve this? Cheers, Ida. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel