[ECOS] Re: diag_printf via serial port

Alexey Shusharin mrfinch@mail.ru
Mon Jun 4 07:40:00 GMT 2007


Sergei Gavrikov wrote:
> On Fri, Jun 01, 2007 at 11:35:39PM +0700, Alexey Shusharin wrote:
> 
>> It's strange, that your board works via serial. Maybe in your
>> configuration interrupt driven serial driver is enabled. It overwrites
>> variant implementation. In that case, my board works too. But, it
>> doesn't matter now.
> 
> At least one time in a week I rsync the eCos anonymous cvs tree with my
> worked copy of the ECOS_REPOSITORY. I've done that today too. I'd done
> no changes in Olimex plf HAL since 2007/01/31. So, I would want be sure
> that your RedBoot, eCos test and your eCos repository is a freshmeat.
> AFAIK, default ecos.ecc (configuration) uses ROM monitor (ROM calling
> interface). Therefore, any out dated RedBoot stuff can be a reason of
> the difference. 
> 
> So, 1) do cvs checkout; 2) download the latest epk, add it to ecos db
> (ecosadmin.tcl), apply that CS8900A patch; 3) rebuild/upgrade RedBoot;
> 4) build the 'examples/twothreads'.
> 
> Note: Be sure that you didn't mess any sources in $ECOS_REPOSITORY
> before. As I did note, it's better to rsync cvs tree with your worked
> tree.
> 
> Only in such a case, it will be possible to compare our lab's results. 
> 
> A moment ago, I did repeat that lab with 1 only difference. I began do
> that with line a 'ecosconfig new olpce2294' instead of that 'ecosconfig
> new olpch2294' :-) The results are same (as I got for LPC-H2294). The
> 'twothreads' worked as expected. I even didn't connect RJ-45 for the
> lab :-)
> 
> Kind regards,
> 
> -- Sergei
> 

Hello Sergei,

I found a differences in our results. It was my inattentiveness :-( . I 
got a olpce2294.epk via a reference in your article, which points to the 
old epk. Then I had gotten the latest one our results had coincided.

static void first_thread(CYG_ADDRESS data)
{
	while(1)
	{
		cyg_thread_delay(100);
		diag_printf("\nWe should see this string\n");
	}
}

arm-elf-gdb -q -nx /home/alex/smalltest.elf
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyUSB0
Remote debugging using /dev/ttyUSB0
0x00007e20 in ?? ()
(gdb) load
Loading section .rom_vectors, size 0x40 lma 0x81010000
Loading section .text, size 0x69a4 lma 0x81010040
Loading section .rodata, size 0x2dc lma 0x810169e4
Loading section .data, size 0x348 lma 0x81016cc0
Start address 0x81010040, load size 28680
Transfer rate: 25493 bits/sec, 295 bytes/write.
(gdb) cont
Continuing.
enter cyg_user_start()
exit cyg_user_start()

We should see this string

We should see this string

We should see this string                 <---------- press Ctrl + C

[New Thread 3]

Program received signal SIGINT, Interrupt.
[Switching to Thread 3]
cyg_hal_user_break (regs=0x0) at 
/opt/ecos/packages/hal/common/current/src/hal_misc.c:138
138         CYGARC_HAL_GET_RETURN_ADDRESS_BACKUP(_cyg_hal_compiler_dummy);
Current language:  auto; currently c
(gdb) cont
Continuing.
We should see this string

We should see this string

We should see this string


As far as I understand, In the latest epk you masked the interrupt to 
prevent unceasing calling. But the error isn't in your code and changes 
in your layer are not necessary. Moreover, this changes leads to other 
issues. As example:

RedBoot> load -m xmodem 

CEntry point: 0x81010040, address range: 0x81010000-0x81017008 

xyzModem - CRC mode, 482(SOH)/0(STX)/0(CAN) packets, 1 retries 

RedBoot> go 

enter cyg_user_start() 

exit cyg_user_start() 


We should see this string 


We should see this string

We should see this string                 <---------- press Ctrl + C

We should see this string                 <---------- oops

We should see this string


Then I use your epk v1.0 with my patch of cyg_hal_plf_serial_isr 
application works as provided.

RedBoot> load -m xmodem 

CEntry point: 0x81010040, address range: 0x81010000-0x81016efc 

xyzModem - CRC mode, 478(SOH)/0(STX)/0(CAN) packets, 2 retries 

RedBoot> go 

enter cyg_user_start() 

exit cyg_user_start() 


We should see this string 


We should see this string

We should see this string                 <---------- press Ctrl + C
$T02thread:00000001;0f:40300181;0d:0ca40181;#bb

:-)

Best regards
Alexey Shusharin


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list