Using COM Port as console in building RTEMS for SMDK2410

Joel Sherrill joel.sherrill at OARcorp.com
Wed May 23 15:15:54 UTC 2012


On 05/23/2012 10:10 AM, SAeeD wrote:
> Thanks for your reply, Joel.
>
> I wonder why there is no warning or error while configuring SMDK2410 
> to use an unaffected option, that is USE_COM1_AS_CONSOLE=1.
> But I'm curious that why this is so? I mean why this option has no 
> impact while building the OS for SMDK2410? Is it for that COM naming 
> is specific to Windows systems?
It is just a specific option for the pc386 and follows the name that
is usually found on the connectors (when they are labelled at all.

It is ignored because it is really setting an arbitrary variable. It could
just as easily have been SAeeD=42 and nothing would know to look
for that. :)
> So how is it possible that one attaches the standard console to serial 
> port, while building RTEMS for SMDK2410?
>
> Thanks for noticing about the baud rate but I guess the baud rate on 
> Mini2440 can be configured to be the same as SMDK2410 by running uart 
> initialization function but I will check it out to make sure.
>
This is the type of thing that often changes between "BSP variants".
Sometimes a board from two vendors with the same core HW
uses different baud rates for the boot monitor.  The BSP will usually
adopt the setting of the ROM monitor by default since that is convenient
from a user's perspective -- you don't change baud from running
ROM monitor to running RTEMS.

But it is also possible that the baud rate clock has changed between
the board this was developed for and the board you are using.

I don't really know.
> SAeeD
>
>
> On Wed, May 23, 2012 at 6:07 PM, Joel Sherrill 
> <joel.sherrill at oarcorp.com <mailto:joel.sherrill at oarcorp.com>> wrote:
>
>     On 05/23/2012 02:49 AM, SAeeD wrote:
>
>         Hello every one,
>
>         I am building RTEMS for SMDK2410 these days and I want to test
>         the simple "hello" application, available in "testsuites"
>         folder of RTEMS.
>         But the problem is that I want to use the board's COM port as
>         the console, so that output of those printf lines in "hello"
>         application goes through COM port and I see the output on my
>         laptop's screen.
>         I configured RTEMS as follows:
>         ../configure --enable-rtems-debug USE_COM1_AS_CONSOLE=1
>         BSP_PRESS_KEY_FOR_RESET=0 --target=arm-rtems4.10
>         --enable-rtemsbsp=smdk2410 --enable-tests=samples
>         --prefix=/home/rtems/rtems-4.10-src/rtems-4.10.2/mini2440/build
>
>     USE_COM1_AS_CONSOLE=1 is pc386 specific and has no impact on this BSP.
>
>     It looks like the console always is the first (only?) UART on this.
>
>
>         Then I transferred "hello.exe" image to board and connected
>         the board's COM port to my laptop's COM port and started a
>         terminal for serial connection with baud rate:115200, data: 8
>         bits, 1 stop bit, no parity and no flow control.
>
>         I powered on the board but there was nothing received from the
>         serial port!
>         I guess USE_COM1_AS_CONSOLE=1 is not enough to configure the
>         OS to send console output to COM port. But I am not sure.
>
>         Does any one have any idea or experience about this?
>
>     No personal experience here but looking at the code, I wonder if
>     the baud rate
>     clock is the same on your board as on the board it was developed for.
>
>        /* value is calculated so : (int)(PCLK/16./baudrate) -1 */
>        reg = get_PCLK() / (16 * 115200) - 1;
>
>
>
>
>         * Please notice that although I build RTEMS for SMDK2410, my
>         board is Mini2440.
>
>     If there is a boot monitor on this, you can always disable
>     initializing
>     the UART and use the same baud rate it used.
>
>         Thanks in advance
>         SAeeD
>
>
>
>     -- 
>     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
>
>
>


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120523/ad39cc0d/attachment-0001.html>


More information about the users mailing list