Personal tools
You are here: Home Forums M32C M32C and Segger and KD3083

M32C and Segger and KD3083

Up to M32C

M32C and Segger and KD3083

Posted by Eike Herwig at July 23. 2008

Hello all,

i want to use the Segger embOS demo. I am using the IAR compiler and the KD3083 simulator. The problem is that the communication aborts though i included the assembler file for the KD3083 connection. Has anyone an idea what i am doing wrong? By stepping through, the communication aborts at the fourth line ( LDC FF0000H, INTB).

Re: M32C and Segger and KD3083

Posted by FrankL at July 23. 2008

KD3083 is not a simulator, but it is an old serial on-chip debugger. It uses a small monitor software in the target processor. If it aborts at this line you do not have the UART interrupt vector for your debug interface initialised in your application. The interrupt vector for your debug interface must be set to 0FFFD00h.

Which UART do you use4 for debugging, and which processor do you have?

Re: M32C and Segger and KD3083

Posted by Eike Herwig at July 23. 2008
I am using UART1. In the demo project from Segger there is a file called KD3083Vect.asm. In that file the interrupt vector for UART1 is set.
Code:
         COMMON    INTVEC
         .BLKB      19<<2
        .LWORD    0FFFD00H          ; UART 1 rx for KD3083
        .LWORD    0FFFD00H          ; UART 1 tx for KD3083
        END
But it does not work.

Re: M32C and Segger and KD3083

Posted by FrankL at July 23. 2008

Did you check if the vector has been entered in the table?

Which processor do you use? M32C/84/87/88 and most 85 can use a special debug mode. Then you don't have to care about the UART interrupt any more (but you need a new monitor software).

Re: M32C and Segger and KD3083

Posted by Eike Herwig at July 23. 2008
I use the M32C83 processor. In my older projects i had to care to the UART interrupts and it worked. But now the EmbOs demo from segger doesn't work anymore. How do i check if the vector has been changed in the table? I never had to do that.

Re: M32C and Segger and KD3083

Posted by FrankL at July 23. 2008

Have a look at the memory window. You see that the interrupt table starts at 0xFF0000. You can change the view to long view (or 4 byte view) and then you see all entries. Just count to 19 (starting with 0) and see if FFFD00 has been added.

Re: M32C and Segger and KD3083

Posted by Eike Herwig at July 24. 2008
In the first place thank you for the tip how to control the interrupt table. The vector has not been entered in the table. I checked it against my older, running projects. In these projects the vector was entered. The question is now what went wrong when I included the asm file in IAR which should enter the right vector in the interrupt table? The code of the asm file you can see in my first answer. It's the code of the Segger EmbOS example.

Re: M32C and Segger and KD3083

Posted by FrankL at July 24. 2008

My be you have another file, where all interrupt vectors are defined? And this other file is linked later than the assembler file you mentioned before?

The common section in the IAR compiler does not complain if an entry is overwritten. So if you have different data written at the same address the file linked last wins...

Re: M32C and Segger and KD3083

Posted by Eike Herwig at July 24. 2008
Many thanks for your tips. You're absolutely right. Now the example runs in the debugger. Thank you also for the tip how to control the interrupt vectors. After a renewed compilation I first checked this parameters and they where correct. Then I started stepping  through application.

Powered by Ploneboard