Topic : error launching debug session

Forum : ST7/STM8

Original Post
Post Information Post
November 13, 2009 - 11:30am
Guest

Hi I´m new here

I want to do a project with the STM8S207R8 and I have downloaded the Ride and Rkit. It works all fine, but when I try to debug it shows an error message: "error launching the debug session"
what is the reason for this? how can I fix it?

Thank you very much!

P.D. Sorry for my english

Replies
Post Information Post
+1
0
-1
November 16, 2009 - 10:01am
Guest

Hi

Usually before the error message "error launching debug session" there is another error message
which explain what is going wrong.

If you do not get it then I suggest you try to find step by step where the problem is.
We would need to know if you are able to:

1. Debug using the simulator instead of the RLink on real board
2. Connect to RLink and read serial number from RLink advanced options
3. Connect to target from RLink advanced options
4. Erase target from RLink advanced options
5. Program target without debugging (uncheck Debug check box) in RLink advanced options.

Regards,
Matloub

+1
0
-1
November 16, 2009 - 2:32pm
Guest

Hi thank you for the answer,

Today when I have initialized the Ride7 the debugging works so I think maybe the last day the program had an internal conflict and didn´t work.

Now I have another problem :), when I try debugging something, in order to learn how it works, I make a simple program and it builds correctly:


#include 
    
    
void main (void)
    {
    int epa;
    long result;
    int epa2;
    
    epa = 0;
    epa2 = 7;
    result = 56*3;
   
    }

When I debug it I try to see the variables and the watch window is:

epa -256 (0xFF00)
epa2 0 (0x0)
result 0 (0x0)

and the Debug Outbut is:
-starting debug process...
-loading...
-Run
-STACK UNDERFLOW //red colored
-write acces out of physical memory (address:FFFFH)
-write acces out of physical memory (address:FFFFH)
-Stop
-OUT OF CODE //red colored too

the ASM code is also very strange:

RCSTM8 COMPILER V2.24.09.238,  PROGRAMA_PRINCIPAL2    11/16/09  16:17:05

QCW(0x009638A0)

RCSTM8 COMPILER V2.24.09.238, COMPILATION OF MODULE PROGRAMA_PRINCIPAL2
OBJECT MODULE PLACED IN C:\Trabajos_Alberto\Trabajos ST\Prueba instalacion\programa_principal2.obj
COMPILER INVOKED BY: QUIET GENERATEDEPFILE CODE DB OJ(C:\Trabajos_Alberto\Trabajos ST\Prueba instalacion\programa_principal2.obj) PR(C:\Trabajos_Alberto\Trabajos ST\Prueba instalacion\programa_principal2.lst) PIN(C:\Archivos de programa\Raisonance\Ride\Inc;C:\Archivos de programa\Raisonance\Ride\Inc\ST7) STM8(SMALL) O(0,SIZE) NOINITSTATICVAR SMALLOBJECT ET(INT) 

stmt level    source
   1          #include 
   2              
   3              
   4          void main (void)
   5              {
   6   1          int epa;
   7   1          long result;
   8   1          int epa2;
   9   1          
  10   1          epa = 0;
  11   1          epa2 = 7;
  12   1          result = 56*3;
  13   1         
  14   1          }
RCSTM8 COMPILER V2.24.09.238
ASSEMBLY LISTING OF GENERATED OBJECT CODE

              ; FUNCTION main (BEGIN)
              ; SOURCE LINE # 4 
0000 5208                              SUB    SP,#008H
0002         ?EPILOG_0000:
              ; SOURCE LINE # 12 
0002 5B08                              ADD    SP,#008H
0004 81                                RET    
              ; epa          short  (size=2-Alg). Automatic variable  in AUTO
              ; result       long  (size=4-Alg). Automatic variable  in AUTO
              ; epa2         short  (size=2-Alg). Automatic variable  in AUTO

              ; FUNCTION main (END)

RCSTM8 COMPILER V2.24.09.238


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =      5    ----
   CONSTANT SIZE    =   ----    ----
   DATA SIZE        =   ----    ----
   PAGE0 SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.

RCSTM8 COMPILATION COMPLETE.  0 WARNING,  0 ERROR

why is it? maybe I am doing some configuration wrongly?

P.D. This things occur when I set "No optimization" if I set it the debug output is the same but the variables are "error(3) undefined symbol"

P.P.D I am using: Ride7 7.24.09.0251
Rkit 2.24.09.0238 with de patch

+1
0
-1
November 16, 2009 - 6:05pm
Raisonance Support Team

Hi Alberto,

Even if you selected "No optimization", there is no code to be generated, as the compiler recognizes that you only have affectations.

This is why you variables do not have any real existence.

If you really use your variables they will re-appear in, the debugger.

Regards,
Bruno

+1
0
-1
November 17, 2009 - 8:36am
Guest

thank you bruno,

I try a little more complex program and still happens the same, why in the debugging session when I run it says "stack underflow" and "write access out of physical memory (addres FF00H)"?

maybe I have to change some configuration?, thank you!

+1
0
-1
November 17, 2009 - 8:51am
Guest

I think I know what my problem was, I have tried to do so simple program that I forget to put a "while" in the main function so the main ends and the simulator still runs and I think it is when it "fails". Now with a "while(1)" it seems to work fine, thank you very much!!