public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Hitachi SH3 port questions
@ 2000-12-07 17:07 Brian.Danilko
  2000-12-07 18:02 ` Jonathan Larmour
  0 siblings, 1 reply; 6+ messages in thread
From: Brian.Danilko @ 2000-12-07 17:07 UTC (permalink / raw)
  To: ecos-discuss

Hello All,

I have been using ecos on an Hitachi SH3 based board happily for a
couple of months now. Thanks to the community for the quality product!

To get it to work I have been applying some patches -- the number has
been slowly whittled down as I do cvs updates. Only 2 questions
remain:

1) In packages/hal/sh/arch/current/src/vectors.S there is a reference 
to the symbol cyg_scheduler_sched_lock that always comes up undefined
in my links. I have to change it to _cyg_scheduler_sched_lock 
(Note the leading underscore) to get it to link. Is this normal?

2) In packages/io/serial/current/src/common/serial.c there is check to 
see if some flow control fields should be present in a structure:

static void serial_data_xmt_done(serial_channel *chan, int chars_sent);
# ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
SERIAL_CALLBACKS(cyg_io_serial_callbacks, 
                 serial_init, 
                 serial_xmt_char, 

My compiler doesn't recognise CYGOPT_IO_SERIAL_FLOW_CONTROL_HW and so
I ended up replacing it with CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS 
(which seemed to make more sense and be more consistent anyway). 
Have I missed something? 

For both of these problems I have work arounds that work for my board
and application but would like to stop applying patches. So any
enlightenment would be appreciated.  

Thanks,

Brian

-- 
Brian Danilko - Software Design and Implementation
  @ Inspiration Technology P/L (Brian.Danilko@instech.com.au)
       Signal Processing Research & Design
  @ Formal Solutions (bdanilko@formalsolutions.com.au)
       Software Development, Technical Writing & Training

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Hitachi SH3 port questions
  2000-12-07 17:07 [ECOS] Hitachi SH3 port questions Brian.Danilko
@ 2000-12-07 18:02 ` Jonathan Larmour
  2000-12-08  0:52   ` Jesper Skov
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Larmour @ 2000-12-07 18:02 UTC (permalink / raw)
  To: Brian.Danilko; +Cc: ecos-discuss

Brian.Danilko@instech.com.au wrote:
> 
> 1) In packages/hal/sh/arch/current/src/vectors.S there is a reference
> to the symbol cyg_scheduler_sched_lock that always comes up undefined
> in my links. I have to change it to _cyg_scheduler_sched_lock
> (Note the leading underscore) to get it to link. Is this normal?

You're using anoncvs I guess? Try updating your sources to the latest
version.

> 2) In packages/io/serial/current/src/common/serial.c there is check to
> see if some flow control fields should be present in a structure:
> 
> static void serial_data_xmt_done(serial_channel *chan, int chars_sent);
> # ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW
> SERIAL_CALLBACKS(cyg_io_serial_callbacks,
>                  serial_init,
>                  serial_xmt_char,
> 
> My compiler doesn't recognise CYGOPT_IO_SERIAL_FLOW_CONTROL_HW and so
> I ended up replacing it with CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS
> (which seemed to make more sense and be more consistent anyway).
> Have I missed something?

Nope you're right, it was a typo. I've fixed that in the internal sources
and it will be in the next anoncvs release.
 
Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Hitachi SH3 port questions
  2000-12-07 18:02 ` Jonathan Larmour
@ 2000-12-08  0:52   ` Jesper Skov
  2000-12-08 14:39     ` Jonathan Larmour
  0 siblings, 1 reply; 6+ messages in thread
From: Jesper Skov @ 2000-12-08  0:52 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: Brian.Danilko, ecos-discuss

>>>>> "Jonathan" == Jonathan Larmour <jlarmour@cygnus.co.uk> writes:

Jonathan> Brian.Danilko@instech.com.au wrote:
>>  1) In packages/hal/sh/arch/current/src/vectors.S there is a
>> reference to the symbol cyg_scheduler_sched_lock that always comes
>> up undefined in my links. I have to change it to
>> _cyg_scheduler_sched_lock (Note the leading underscore) to get it
>> to link. Is this normal?

Jonathan> You're using anoncvs I guess? Try updating your sources to
Jonathan> the latest version.

Nah, it was b0rken. I've fixed it now (patch below).

Thanks,
Jesper

Index: ChangeLog
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/hal/sh/arch/current/ChangeLog,v
retrieving revision 1.131
diff -u -5 -r1.131 ChangeLog
--- ChangeLog	2000/11/24 16:48:48	1.131
+++ ChangeLog	2000/12/08 08:51:11
@@ -1,5 +1,10 @@
+2000-12-08  Jesper Skov  <jskov@redhat.com>
+
+	* src/vectors.S (cyg_scheduler_sched_lock): Changed to use
+	SYM_PTR_REF. Brian Danilko spotted this.
+
 2000-11-24  Jonathan Larmour  <jlarmour@redhat.com>
 
 	* src/sh.ld: _reset should be adorned with CYG_LABEL_DEFN
 	* src/vectors.S: CYG_LABEL_DEFN should have been used everywhere
 	that CYG_LABEL_NAME was used, except for the scheduler lock which
Index: src/vectors.S
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/hal/sh/arch/current/src/vectors.S,v
retrieving revision 1.64
diff -u -5 -r1.64 vectors.S
--- src/vectors.S	2000/11/24 16:48:49	1.64
+++ src/vectors.S	2000/12/08 08:50:07
@@ -629,15 +629,11 @@
         
         
 #ifdef CYGFUN_HAL_COMMON_KERNEL_SUPPORT
         SYM_PTR_REF(cyg_interrupt_call_pending_DSRs)
         SYM_PTR_REF(interrupt_end)
-        # cyg_scheduler_sched_lock is special as it is defined as an asm alias
-        
-        .globl cyg_scheduler_sched_lock
-$cyg_scheduler_sched_lock:	.long	cyg_scheduler_sched_lock
-        
+        SYM_PTR_REF(cyg_scheduler_sched_lock)
 #endif
 
 #---------------------------------------------------------------------------
 # Platform initialization (reset)
 FUNC_START(_reset_platform)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Hitachi SH3 port questions
  2000-12-08  0:52   ` Jesper Skov
@ 2000-12-08 14:39     ` Jonathan Larmour
  2000-12-08 15:02       ` Jesper Skov
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Larmour @ 2000-12-08 14:39 UTC (permalink / raw)
  To: Jesper Skov; +Cc: Brian.Danilko, ecos-discuss

Jesper Skov wrote:
> 
> >>>>> "Jonathan" == Jonathan Larmour <jlarmour@cygnus.co.uk> writes:
> 
> Jonathan> Brian.Danilko@instech.com.au wrote:
> >>  1) In packages/hal/sh/arch/current/src/vectors.S there is a
> >> reference to the symbol cyg_scheduler_sched_lock that always comes
> >> up undefined in my links. I have to change it to
> >> _cyg_scheduler_sched_lock (Note the leading underscore) to get it
> >> to link. Is this normal?
> 
> Jonathan> You're using anoncvs I guess? Try updating your sources to
> Jonathan> the latest version.
> 
> Nah, it was b0rken. I've fixed it now (patch below).
[snip]

Odd. When I fixed this stuff earlier, there was a problem with the
scheduler lock which I thought I had fixed. I wonder why it reappeared (and
why it didn't cause fatal problems building this stuff in the farm).

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Hitachi SH3 port questions
  2000-12-08 14:39     ` Jonathan Larmour
@ 2000-12-08 15:02       ` Jesper Skov
  2000-12-08 15:10         ` Jesper Skov
  0 siblings, 1 reply; 6+ messages in thread
From: Jesper Skov @ 2000-12-08 15:02 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: Jesper Skov, Brian.Danilko, ecos-discuss

>>>>> "Jonathan" == Jonathan Larmour <jlarmour@cygnus.co.uk> writes:

Jonathan> Jesper Skov wrote:
>>  >>>>> "Jonathan" == Jonathan Larmour <jlarmour@cygnus.co.uk>
>> writes:
>> 
Jonathan> Brian.Danilko@instech.com.au wrote:
>> >> 1) In packages/hal/sh/arch/current/src/vectors.S there is a >>
>> reference to the symbol cyg_scheduler_sched_lock that always comes
>> >> up undefined in my links. I have to change it to >>
>> _cyg_scheduler_sched_lock (Note the leading underscore) to get it
>> >> to link. Is this normal?
>> 
Jonathan> You're using anoncvs I guess? Try updating your sources to
Jonathan> the latest version.
>>  Nah, it was b0rken. I've fixed it now (patch below).
Jonathan> [snip]

Jonathan> Odd. When I fixed this stuff earlier, there was a problem
Jonathan> with the scheduler lock which I thought I had fixed. I
Jonathan> wonder why it reappeared (and why it didn't cause fatal
Jonathan> problems building this stuff in the farm).

Duh. I didn't test the change building a test - just the library. Now
I really broke it.

... It's actually the CYGBLD_ATTRIB_ASM_ALIAS macro that's
broken. Surely it should be:

# define CYGBLD_ATTRIB_ASM_ALIAS(__symbol__) \
            __asm__ ( CYG_LABEL_DEFN(__symbol__) )

or some magic derivative like that. The above does not work due to
missing stringification.

Jesper

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ECOS] Hitachi SH3 port questions
  2000-12-08 15:02       ` Jesper Skov
@ 2000-12-08 15:10         ` Jesper Skov
  0 siblings, 0 replies; 6+ messages in thread
From: Jesper Skov @ 2000-12-08 15:10 UTC (permalink / raw)
  To: Jesper Skov; +Cc: Jonathan Larmour, Brian.Danilko, ecos-discuss

>>>>> "Jesper" == Jesper Skov <jskov@redhat.com> writes:

Jesper> ... It's actually the CYGBLD_ATTRIB_ASM_ALIAS macro that's
Jesper> broken. Surely it should be:
[snip]

I think this is it. If you agree, please apply it. I'm headed for bed.

Cheers,
Jesper

Index: ChangeLog
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/infra/current/ChangeLog,v
retrieving revision 1.91
diff -u -5 -r1.91 ChangeLog
--- ChangeLog	2000/09/11 01:42:29	1.91
+++ ChangeLog	2000/12/08 23:09:13
@@ -1,5 +1,10 @@
+2000-12-09  Jesper Skov  <jskov@redhat.com>
+
+	* include/cyg_type.h (CYGBLD_ATTRIB_ASM_ALIAS): Mangle assembler
+	symbols properly.
+
 2000-09-08  Jonathan Larmour  <jlarmour@redhat.com>
 
 	* include/cyg_type.h (CYGBLD_ATTRIB_SECTION): Don't stringify arg.
 
 2000-09-04  Jonathan Larmour  <jlarmour@redhat.com>
Index: include/cyg_type.h
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/infra/current/include/cyg_type.h,v
retrieving revision 1.41
diff -u -5 -r1.41 cyg_type.h
--- include/cyg_type.h	2000/09/11 01:42:29	1.41
+++ include/cyg_type.h	2000/12/08 23:08:53
@@ -291,12 +291,14 @@
         __attribute__ ((alias (#__symbol__)))
 
 // This effectively does the reverse of the previous macro. It defines
 // a name that the attributed variable or function will actually have
 // in assembler.
+#define __Str(x) #x
+#define __Xstr(x) __Str(x)
 # define CYGBLD_ATTRIB_ASM_ALIAS(__symbol__) \
-            __asm__ ( #__symbol__ )
+            __asm__ ( __Xstr( CYG_LABEL_DEFN( __symbol__ ) ) )
 
 // Shows that a function returns the same value when given the same args, but
 // note this can't be used if there are pointer args
 # define CYGBLD_ATTRIB_CONST __attribute__((const))
 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-12-08 15:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-07 17:07 [ECOS] Hitachi SH3 port questions Brian.Danilko
2000-12-07 18:02 ` Jonathan Larmour
2000-12-08  0:52   ` Jesper Skov
2000-12-08 14:39     ` Jonathan Larmour
2000-12-08 15:02       ` Jesper Skov
2000-12-08 15:10         ` Jesper Skov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).