Problems with starting new BSP

Radzislaw Galler rgaller at ET.PUT.Poznan.PL
Tue Jul 3 15:58:50 UTC 2001


Hi,

Recently I built a board with SH2 processor (SH7044). I also developed 
application using Hitachi EVB7045 and gensh2 BSP. Now it's time to port it to 
my board. Idecided to make my own BSP, because it was necessary to change 
linkcmds and start routine (my board differs from EVB in memory layout and 
size).

According to Fernando Ruiz Casas guide I created my BSP and had no problem 
with adding it to RTEMS tree and build it. But the same application that runs 
with no problems on EVB doesn't want to run my board. After a looooong 
investigation I found out that disabling clock driver would help for a while: 
the application is able to start all tasks and switch context to every one... 
but only once. After that all tasks become waiting on timeout.

I found it out thanks to RTEMS extension I made. The procedure connected to 
context switch just prints heir and current tasks names and states.

Also if I enable clock driver and disable interrupts soon enough I am able to 
see some debugging info on terminal. But reenabling interrupts casues some 
infinite loop somewhere. If I leave interrupts enabled the system hangs after 
printing first three letters on terminal.

On EVB I am able to debug application or even RTEMS itself but not on my 
board. After the failure even NMI doesn't work.

Because the same application (even with this extension) works without any 
problem on EVB I believe the bug is somewhere in my BSP initialization. Here 
is an information I get on terminal from my board:

-------------------Start------------------------

VBR: 0x2015c0 vectab: 0x2015c0 _ISR_Vector_table: 0x23fbc4
vectab[88]: 0x59d4 __ISR_Handler: 0x54d0
_ISR_Vector_table[88]: 0x2f60 Clock_isr: 0x2f60
_mtua0_isp: 0x59d4

WorkSpaceStart = 0x207d6c; WorkSpace size = 00038294 (230036)
Malloc stats
  avail:20k  allocated:3k (19%) max:3k (19%) lifetime:0k freed:3k
  Call counts:   malloc:5   free:0   realloc:0   calloc:10
Install monitor success
ALRM task creation success
ALRM task start success
Malloc stats
  avail:20k  allocated:5k (29%) max:5k (29%) lifetime:0k freed:5k
  Call counts:   malloc:7   free:0   realloc:0   calloc:12


=========== Configuration registers ============
BSC_BCR1   =  200F
BSC_BCR2   =  FFFF

BSC_WCR1   =  FF33
BSC_WCR2   =  000F

BSC_DCR    =  0000
BSC_RTCSR  =  0000

BSC_RTCNT  =  0000
BSC_RTCOR  =  0000

PFC_PACRL1 =  1555
PFC_PACRL2 =  AD45

PFC_PBCR1  =  0000
PFC_PBCR2  =  2005

PFC_PCCR   =  FFFF
PFC_PDCRL  =  FFFF

PFC_IFCR   =  0000
PFC_PECR1  =  0000

PFC_PECR2  =  0000
PFC_PEIOR  =  00FF
[Here the application hangs]
--------------------------------
And here is output from the EVB (the same untouched application - only BSP 
differs):

-------------------Start------------------------

VBR: 0x442000 vectab: 0x442000 _ISR_Vector_table: 0x47fbc4
vectab[88]: 0x4495a4 __ISR_Handler: 0x4490a0
_ISR_Vector_table[88]: 0x446b30 Clock_isr: 0x446b30
_mtua0_isp: 0x4495a4

WorkSpaceStart = 0x46ca8c; WorkSpace size = 00013574 (79220)
Malloc stats
  avail:20k  allocated:3k (19%) max:3k (19%) lifetime:0k freed:3k
  Call counts:   malloc:5   free:0   realloc:0   calloc:10
Install monitor success
ALRM task creation success
ALRM task start success
Malloc stats
  avail:20k  allocated:5k (29%) max:5k (29%) lifetime:0k freed:5k
  Call counts:   malloc:7   free:0   realloc:0   calloc:12


=========== Configuration registers ============
BSC_BCR1   =  2020
BSC_BCR2   =  F3DD

BSC_WCR1   =  FF3F
BSC_WCR2   =  000F

BSC_DCR    =  0000
BSC_RTCSR  =  0000

BSC_RTCNT  =  0000
BSC_RTCOR  =  0000

PFC_PACRL1 =  1550
PFC_PACRL2 =  0145

PFC_PBCR1  =  0000
PFC_PBCR2  =  2005

PFC_PCCR   =  FFFF
PFC_PDCRL  =  FFFF

PFC_IFCR   =  0000
PFC_PECR1  =  0000

PFC_PECR2  =  0000
PFC_PEIOR  =  0020
*<<*s:47D0C8 *p: st*: 4 n:RM*ON st: 0>*>

Mon*itor read*y, press *enter to* login.
*
<<s:47*BC1C p:RM*ON st: 0 *n:ALRM s*t: 0>>
<*<s:479FD*4 p:ALRM *st: 8 n:R*MON st: *0>>
<<s:*47BC1C p*:RMON st:* 0 n:IDLE* st: 0>>*
<<s:47E*1A8 p:ID*LE st: 0 *n:RMON st*: 0>>
<*<s:47BC1C* p:RMON *st: 0 n:I*DLE st: 0*>>
*<s:*47E1A8 p:*IDLE st:* 0 n:RMON* st: 0>>
 <<s:47B*C1C p:RMO*N st: 0 *n:IDLE st*: 0>>
<<*s:47E1A8* p:IDLE s*t: 0 n:R*MON st: 0*>>
*<s:4*7BC1C p:*RMON st: *0 n:IDLE* st: 0>>
 <<s:47E1*A8 p:IDL*E st: 0 n*:RMON st*: 0>>
<<*s:47BC1C *p:RMON s*t: 0 n:ID*LE st: 0*>>
*<s:4*7E1A8 p:I*DLE st: *0 n:RMON *st: 0>>
 <<s:47BC*1C p:RMON* st: 0 n*:IDLE st:* 0>>
<<*s:47E1A8 *p:IDLE st*: 0 n:RM*ON st: 0>*>
<<s:4*7BC1C p:R*MON st: 0* n:IDLE *st: 0>>
*<<s:47E1*A8 p:IDLE* st: 0 n:*RMON st:* 0>>
<<s*:47BC1C *p:RMON st*: 0 n:IDL*E st: 0>*>
<<s:47*E1A8 p:I*DLE st: 0* n:RMON s*t: 0>>
*<<s:47BC1*C p:RMON* st: 0 n:*IDLE st: *0>>
<<s*:47E1A8 p*:IDLE st*: 0 n:RMO*N st: 0>>*
<<s:47*BC1C p:RM*ON st: 0* n:IDLE s*t: 0>>
<*<s:47E1A*8 p:IDLE *st: 0 n:*RMON st: *0>>
<<s:*47BC1C p*:RMON st:* 0 n:IDL*E st: 0>>*
<<s:47E*1A8 p:ID*LE st: 0 *n:RMON s*t: 0>>
<*<s:47BC1C* p:RMON *st: 0 n:A*LRM st: *0>>
*<s:*479FD4 p:*ALRM st:* 8 n:RMON* st: 0>>
 <<s:47B*C1C p:RMO*N st: 0 *n:IDLE st*: 0>>
<<*s:47E1A8* p:IDLE s*t: 0 n:R*MON st: 0*>>
[snip]
--------------------------------
The asterisk (*) indicates that clock ISR has reached some countdown (see 
code in ckinit.c)

Attached you will find files that have some meaning in this case. I will 
appreciate any clue.

Thanks

Radzislaw Galler
rgaller at et.put.poznan.pl 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mybsp.tgz
Type: application/x-gzip
Size: 20893 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20010703/097b494d/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myapp.tgz
Type: application/x-gzip
Size: 46905 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20010703/097b494d/attachment-0003.bin>


More information about the users mailing list