buf == NULL in BSP_uart_termios_write_com() when compiled on a FreeBSD host

Joel Sherrill joel.sherrill at OARcorp.com
Mon Jun 24 13:48:39 UTC 2013


The original post also had an error message regarding the
libi2c support.

As Gedare pointed out, it is possible the recent changes
broke something.

Sebastian.. did your recent changes in termios break this?

--joel

On 6/24/2013 7:37 AM, Gedare Bloom wrote:
> For new development work we advise using the Git head. It is
> relatively stable and should (!) be released soon as 4.11.
>
> The (shared bsp) console code did have some recent changes committed
> to it. Maybe they broke something between when you built with ubuntu
> and freebsd. Also I would double-check the versions of the tools along
> your toolchain, since the problem happens with freebsd but not ubuntu
> it sounds like a possible host tools issue. You might be interested in
> the RTEMS Source Builder as a way to automate much of the tool build
> process [1] [2].
>
> [1] http://www.rtems.org/wiki/index.php/RTEMS_Source_Builder
> [2] http://git.rtems.org/rtems-source-builder/
>
> -Gedare
>
> On Mon, Jun 24, 2013 at 3:16 AM, Nick Withers <nick.withers at anu.edu.au> wrote:
>> Hullo again RTEMSers!
>>
>> I'm running into an assertion failure in RTEMS (Git HEAD, brought up to
>> date today) running sample apps on the MVME3100 (as well as my own one,
>> such that it currently is!) compiled on a FreeBSD 9.1-STABLE (r252020)
>> machine.
>>
>> I've had no such problems with the binaries produced on a Ubuntu 12.04
>> box (and loading 'em from the FreeBSD machine's TFTP server works fine).
>>
>> In both cases, everything's compiled from source (including tools),
>> following http://wiki.rtems.org/wiki/index.php/Quick_Start and
>> http://wiki.rtems.org/wiki/index.php/Building_Tools . I've run through
>> the procedure a couple o' times and tried using Bash as the shell during
>> the build (instead of tcsh) to no avail.
>>
>> Here's the complete serial output booting the MVME and trying to run
>> ticker.ralf:
>> ____
>>
>>> Copyright Motorola Inc. 1999-2005, All Rights Reserved
>>> MOTLoad RTOS Version 2.0,  PAL Version 1.1 RM03
>>> Wed Oct 19 17:29:08 MST 2005
>>>
>>> MPU-Type             =MPC8540
>>> MPU-Int Clock Speed  =666MHz
>>> MPU-CCB Clock Speed  =333MHz
>>> MPU-DDR Clock Speed  =166MHz
>>> MPU-PCI Clock Speed  =66MHz, PCI, 64-bit
>>> MPU-Int Cache(L2) Enabled, 256KB, L2CTL =A8000300
>>>
>>> Reset/Boot Vector    =Flash0
>>>
>>> Local Memory Found   =10000000 (&268435456)
>>> User Download Buffer =014D3000:016D2FFF
>>>
>>> MVME3100> tftpGet -c150.203.19.212 -s150.203.19.211 -fticker.ralf
>>> Network Loading from: /dev/enet0
>>> Loading File: ticker.ralf
>>> Load Address: 014D3000
>>> Download Buffer Size = 00200000
>>>
>>> Client IP Address      = 150.203.19.212
>>> Server IP Address      = 150.203.19.211
>>> Gateway IP Address     = 150.203.19.253
>>> Subnet IP Address Mask = 255.255.255.0
>>>
>>> Network File Load in Progress...
>>>
>>> Bytes Received =&248436, Bytes Loaded =&248436
>>> Bytes/Second   =&248436, Elapsed Time =1 Second(s)
>>> MVME3100> go
>>> -----------------------------------------
>>> Welcome to rtems-4.10.99.0(PowerPC/Generic (no FPU)/mvme3100)
>>> BSP: mvme3100, CVS Release ($Name$)
>>> CPU 0x8020 - rev 0x20
>>> Additionnal boot options are H
>>> Initial system stack at 3FDD8
>>> Software IRQ stack starts at 3FEC0 with size 16384
>>> Going to start PCI buses scanning and initialization
>>> Board Type: MVME3100-1152 (S/N E01230A)
>>> External (=PCI Bus) Clock Freq   :   66666666 Hz
>>> Core Complex Bus (CCB) Clock Freq:  333333330 Hz
>>> CPU Clock Freq:                     133333332 Hz
>>> Ethernet 0                  00:01:AF:30:54:3D
>>> Ethernet 1                  00:01:AF:30:54:3E
>>> Ethernet 2                  00:01:AF:30:54:3F
>>> Number of PCI buses found is : 2
>>> BUS:SLOT:FUN  VENDOR-DEV_ID: COMMAND STATUS BASE_ADDR0 BASE_ADDR1 IRQ_PIN -> IRQ_LINE
>>>    0:0x00:0    0x1057-0x0008:  0x0006 0x20B0 0x80000000 0x00000000       0 ->   0 (=0x00)
>>>    0:0x11:0    0x10E3-0x0148:  0x0146 0x02B0 0x80100004 0x00000000       1 ->   0 (=0x00)
>>>    0:0x12:0    0x10B5-0x6520:  0x0147 0x02B0 0x00000000 0x00000000       0 ->   0 (=0x00)
>>>    0:0x14:0    0x8086-0x3200:  0x0145 0x02B0 0x00011001 0x00012001       1 ->   2 (=0x02)
>>> Memory:                             268435456 bytes
>>> Cleared PCI errors: pci_stat was 0x20B0
>>> OpenPIC Version 1.2 (1 CPUs and 56 IRQ sources) at 0xE1040000
>>> OpenPIC Vendor 0 (Unknown), Device 0 (Unknown), Stepping 0
>>> OpenPIC timer frequency is 41666666 Hz
>>> MSR is 0x00001000, TCR 0x04000000
>>> -----------------------------------------
>>> Exit from bspstart
>>> Tundra Tsi148 PCI-VME bridge detected at 0x80100000, IRQ 0
>>> Tsi148 Outbound Ports:
>>> Port  VME-Addr   Size       PCI-Adrs   Mode:
>>> 0:    0x20000000 0x0E000000 0xC0000000 A32, SUP, D32, SCT
>>> 1:    0x00000000 0x00FF0000 0xCF000000 A24, SUP, D32, SCT
>>> 2:    0x00000000 0x00010000 0xCFFF0000 A16, SUP, D32, SCT
>>> 7:    0x00000000 0x01000000 0xCE000000 CSR, SUP, D32, SCT
>>> Tsi148 Inbound Ports:
>>> Port  VME-Addr   Size       PCI-Adrs   Mode:
>>> 0:    0xC0000000 0x10000000 0x00000000 A32, PGM, DAT, SUP, USR, MBLT, BLT
>>> vmeTsi148 IRQ manager: looking for registers on VME...
>>> Trying to find CSR on VME...
>>> vmeTsi148 - IRQ manager using VME CSR to flush FIFO
>>> libi2c: Claiming driver slot failed (rtems status code 5)
>>> Initializing I2C library failed
>>> Registering /dev/console as minor 0 (==/dev/ttyS0)
>>> assertion "buf != NULL" failed: file "../../../../../../../../../rtems/c/src/lib/libbsp/powerpc/mvme3100/../../powerpc/shared/console/uart.c", line 574, function: BSP_uart_termios_write_com
>> ____
>>
>> I ran my own code, with a fatal exception handler configured and a
>> CPU_Stack_Trace(). The addresses it spits out seem to be offset somewhat
>> (I tried subtracting up to 16 bytes off the e.g., the 0x100C8 address
>> and that didn't seem to work well), so I've used a combination of
>> powerpc-rtems4.11-addr2line and "powerpc-rtems4.11-nm -n" to arrive at
>> the following (which I hope is correct! I'm not really up-to-scratch on
>> these tools, I'm afraid...) for call history:
>> ____
>>
>> 0x00018B94 - CPU_print_stack()
>> 0x00003A3C - fatal_extension() [in my code]
>> 0x0004BA28 - _User_extensions_Iterate()
>> 0x00048D8C - _Internal_error_Occurred()
>> 0x00047624 - rtems_fatal()
>> 0x000248B8 - __assert_func()
>> 0x000100C8 - BSP_uart_termios_write_com()
>> 0x000283EC - rtems_termios_refill_transmitter()
>> 0x0001027C - BSP_uart_termios_isr_com()
>> 0x00019488 - C_dispatch_irq_handler()
>> 0x000125B4 - ppc_exc_wrap_async_normal()
>> ____
>>
>> (Any tips for getting a better trace appreciated!)
>>
>> Anyone got any suggestions? Hopefully I just did something simple and
>> dumb! :-P
>>
>> Also, I should probably not be using Git HEAD...? Might start building
>> up 4.10.2 just to check, at least.
>>
>> Cheers again for your time!
>> --
>> Nick Withers
>>
>> Embedded Systems Programmer
>> Room 2.26, Building 57
>> Department of Nuclear Physics
>> Research School of Physics and Engineering
>> The Australian National University (CRICOS: 00120C)
>>
>> eMail: nick.withers at anu.edu.au
>> Phone: +61 2 6125 2091
>> Mobile: +61 414 397 446
>>
>>
>> _______________________________________________
>> rtems-users mailing list
>> rtems-users at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-users
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the users mailing list