Problem mit Simulator

  • 1
  • 2
  • 3
  • 4
  • Page 1 of 4
ThomasW69
 
Avatar
 
Subject:

Problem mit Simulator

 · 
Posted: 22.12.2011 - 12:21  ·  #1
Ich versuche gerade ein älters Projekt welches jetzt ein paar monate "auf Halde" gelegen hat weiter zu bearbeiten.
Da bin ich beim Simulator auf ein problem gestossen.

Zunächst bekomme ich beim Start des Simulator immer die Meldung
File c:\program not found

Dann fange ich an zu debuggen mit F8 und irgendwann (meist beim Aufruf einer Fix64 Winkelfunktion) bleit der Simulator scheinbar hängen. Die Uhr in der Menüleiste blinkt. Irgendwann hat es mir gereicht und ich habe F2 gedrückt. Da standen aber unten schon 14sek bei time inder Statuszeile.

Hat jemand ne Idee woran das liegen könnte?
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Problem mit Simulator

 · 
Posted: 22.12.2011 - 15:07  ·  #2
Hallo Thomas,

"program not found" ist das eine WIN Meldung? Ich kenne das nicht....

Endlos Schleife im Program? SIM wartet auf ein Ereignis? Haben Sie den SIM mal da angehalten und nachgeschaut wo er sich gerade aufhält?

rolf
ThomasW69
 
Avatar
 
Subject:

Re: Problem mit Simulator

 · 
Posted: 22.12.2011 - 15:43  ·  #3
Ich habe mal nachgeschaut wegen der Fehlermeldung. Der AVRCo ist installiert unter "c:\program files (x86)\AVRCo". Es könnte sein, dass da irgendwas versucht unter window7 auf DOS-Pfade zuzugreifen und da dort keine Leerzeichen erlaubt sind die Fehlermeldung "c:\program" erzeugt.

Eine Schleife abe ich an dieser Stelle nicht im programm
Code

//******************************************************************************
//Berechnet Sonnenposition im Bogenmaß  (Genauer)
//******************************************************************************

procedure SunPos(var RA:fix64; var DE:fix64);
  CONST P2  :fix64 = 6.283185307;
        COSEPS:fix64 =0.91748;
        SINEPS:fix64 =0.39778;
        
  VAR   L,M,DL,SL,X,Y,Z,RHO: fix64;
  BEGIN
    M  := P2*Fix64Frac(0.993133+99.997361*location.T);
    DL := 6893.0*Fix64SIN(M)+72.0*fix64sin(2*M);
    L  := P2*Fix64Frac(0.7859453 + M/P2 + (6191.2*location.T+DL)/1296000.0);
    SL := fix64sin(L);
    X:=Fix64COS(L); Y:=COSEPS*SL; Z:=SINEPS*SL; RHO:=SQRT(1.0-Z*Z);
    DE := (360.0/P2)*Fix64ArcTan(Z/RHO);
    RA  := ( 48.0/P2)*Fix64ArcTan(Y/(X+RHO)); IF (RA<0) THEN RA:=RA+24.0;  endif;
    DE:=DE*DEG_RAD;
    RA:=RA*HRS_Rad;
  END;

Das Phänomen tritt beim Ausführen der Zeile
DL := 6893.0*Fix64SIN(M)+72.0*fix64sin(2*M);
auf. Kommentiere ich diese aus, so tritt es bei
SL := fix64sin(L);
auf was mich zu der Annahme führte, dass es sich um ein problem in den Fix64 Winkelfunktionen handelt.
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Problem mit Simulator

 · 
Posted: 22.12.2011 - 18:52  ·  #4
Hallo Thomas,

ich habe getestet und bekam zuerst einen Frame overflow. Nach der Erweiterung von Frame lief bei mir alles durch. Leider konnte ich diese Prozedur nicht komplett austesten, da mir dazu ein paar Support Funktionen fehlen.

rolf
ThomasW69
 
Avatar
 
Subject:

Re: Problem mit Simulator

 · 
Posted: 23.12.2011 - 09:21  ·  #5
Hallo Rolf
Hier mal die kompletten Quellen. Ich hoffe ich habe nichts vergessen.
Attachments
Filename: Xmegadrive.rar
Filesize: 48.91 KB
Title: XMEgaDrive
Download counter: 5
ThomasW69
 
Avatar
 
Subject:

Re: Problem mit Simulator

 · 
Posted: 23.12.2011 - 10:08  ·  #6
So ich habe mal noch ein Video gemacht.
Den Stack und den Frame habe ich auf 0500h stehen. Dann Comiliert und den Simulator gestartet.
Da kommt dann erst mal die besagte Fehlermeldung. Mein Ausgaben erfolgen auf SerportC1, weshalb ich den mal aktiviere. Mir ist allerdings aufgefallen, dass da nur Mist angezeigt wird.
Dann klicke ich mich mit F8 durchs Programm. bis zur besagten Zeile. Sobald ich da dann F8 drücke passiert nichts mehr weiter. Beim Click auf den Stop button lande ich irgendwo bei 0102F4 im Code.
Meine Simulatorversion ist die 6.70. Die vom Compiler ist die 4.99.64 vom 12.12.2011 (Profi- Version). Als Programmer habe ich den ISP3-USB.
Attachments
Filename: Video.rar
Filesize: 1.09 MB
Title: Bildschirmvideo
Download counter: 13
Thomas
Benutzer
Avatar
Gender:
Location: Gera
Age: 61
Posts: 123
Registered: 04 / 2003
Subject:

Re: Problem mit Simulator

 · 
Posted: 23.12.2011 - 13:32  ·  #7
Hallo Thomas,

ich kann das geschilderte Verhalten mit Deinem Projekt nachvollziehen.
(AVRco 4.99.64, Win 7 64bit)

Die Ursache für die Fehlermeldung mit "File c:\program" konnte ich finden.
In der *.u-Datei stehen offensichtlich Informationen für den Simulator.
Unter Anderem auch Einträge, die auf die *.pcu-Dateien der eingebundenen Units verweisen.
Quote
FILE c:\program files (x86)\avrco\avrco\System\uFix64.PCU UNIT;26;

Offensichtlich stolpert der Simulator über die Leerzeichen im Pfad.
Ich habe die Dateien zum Test in einen Pfad ohne Leerzeichen kopiert und die Xmegadrive.u an den 2 Stellen geändert. Danach startet der Simulator ohne Fehlermeldung.
Am Rest ändert sich leider nichts.

Fröhliche Weihnachten und einen guten Rutsch
Thomas
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Problem mit Simulator

 · 
Posted: 23.12.2011 - 18:37  ·  #8
Hello Thomas,

the main problem here is that with an XMega128 the application flash ends at $1FFFF and the flash above this address is used as a Boot ROM. The AVRco always expects that the application+constants end below the Boot area. With your application the application exceeds the border to the boot area.
This is valid for the XMegas but the AVRco doesn't support this border crossing at this time.
One of the effects is that the string constants are not in the page as expected. Using the Merlin Optimiser the code size is heavily reduced and this limit is not axceeded. But there is still an endless loop in the function Fix64SinCos in the Fix64 library (with XMegas) which must be inspected by AVRA.

rolf
  • 1
  • 2
  • 3
  • 4
  • Page 1 of 4
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 17 · Cache Hits: 15   138   153 · Page-Gen-Time: 0.027533s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI