Problem mit Simulator

  • 1
  • 2
  • 3
  • 4
  • Page 2 of 4
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Problem mit Simulator

 · 
Posted: 23.12.2011 - 19:32  ·  #9
I will take a look.

In meantime, you can examine the attachment. I am sure it will be interesting to you since it's an AvrCo astronomy project (telescope GOTO positioner). It is basically an AvrFreaks project from http://www.avrfreaks.net/index…pe=project, but since then author has changed the compiler and you can no longer find it on his site. SkyCharts 2.76 is made with AvrCo astronomy application in mind, and if you want it but can't find it then PM me with your e-mail address and I will send it to you. You can also take a look at this: topic.php?t=2523&page=fst_unread&highlight=sun.
Attachments
Filename: Astronomy telescope  … ioner.7z
Filesize: 1.93 MB
Title: AvrCo telescope GOTO positioner
Download counter: 6
Avra
Schreiberling
Avatar
Gender:
Location: Belgrade, Serbia
Age: 53
Homepage: rs.linkedin.com/in…
Posts: 653
Registered: 07 / 2002
Subject:

Re: Problem mit Simulator

 · 
Posted: 24.12.2011 - 01:18  ·  #10
Root of the problem was found and I have prepared all the details for Rolf. You will hear from him soon if my results are confirmed.

Your VARIABLEN.PAS has some constants already delivered with uFix64 library. This is from the library:
Code
const
  FIX_INT_DIGITS: byte = 10 + 1; // number of digits used for representation of integer part plus 1 digit for sign
  FIX_FRACT_DIGITS: byte =  9;   // number of digits used for representation of fractional part
  FIX_MAX_STRING_LENGTH: byte = FIX_INT_DIGITS + 1 {decimal point} + FIX_FRACT_DIGITS; // 21 is max length of all strings that contain fixed point numbers

  FIX_MAX: fix64 = Max(int64); // biggest number  $7FFFFFFFFFFFFFFF =  2147483647.999999999
  FIX_MIN: fix64 = Min(int64); // smallest number $8000000000000000 = -2147483648.000000000

  FIX_ONE: fix64             = 1.00; // number neutral in multiplication and division
  FIX_ONEHALF: fix64         = 0.50; // int64(FIX_ONE) div 2;
  FIX_ONEQUATER: fix64       = 0.25; // int64(FIX_ONE) div 4;
  FIX_ONETHREEQUATERS: fix64 = 0.75; // FIX_ONEHALF + FIX_ONEQUATER;  // 3*FIX_ONE/4
  FIX_PI: fix64              = 3.141592654; // 3.14159265358979323846264338327950288 I know this is a little too much ;-)
  FIX_PIHALF: fix64          = 1.570796327; // int64(FIX_PI) div 2;
  FIX_PIQUATER: fix64        = 0.785398163; // int64(FIX_PI) div 4;
  FIX_PITHREEHALFS: fix64    = 2.356194490; // FIX_PI + FIX_PIHALF;
  FIX_PITWO: fix64           = 6.283185307; // FIX_PI + FIX_PI;
  FIX_180: fix64             = 180.0;
  FIX_90: fix64              =  90.0; // int64(FIX_180) div 2;
  FIX_360: fix64             = 360.0; // FIX_180 + FIX_180;
  FIX_E: fix64               = 2.71828182845904523536;

Btw, do you really have LX200? :love:

I have always wanted to connect astronomy application to some DIY step motor based telescope, but the best I did so far was to run Stellarium from netbook and teach my twins stars in the sky. That was real fun with images from this software:
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Problem mit Simulator

 · 
Posted: 24.12.2011 - 16:13  ·  #11
Hello Avra, Thomas,

the simulator is the problem here. After a 64bit compare a flag gets destroyed and the result becomes invalide. In this special case (Fix64Sin) the program enters an endless loop.
Bug is fixed now. Update next week.
btw.
The generated code is ok and will work in real hardware.

rolf
Thomas
Benutzer
Avatar
Gender:
Location: Gera
Age: 61
Posts: 123
Registered: 04 / 2003
Subject:

Re: Problem mit Simulator

 · 
Posted: 26.12.2011 - 10:48  ·  #12
Hallo Rolf,

ich hoffe, Sie hatten und haben trotz all der Arbeit ein besinnliches Weihnachtsfest.
Gerade habe ich die Version 4.99.65 installiert und kurz angetestet.
Das Problem mit den Leerzeichen im Pfad zu den PCU-Dateien besteht leider noch.

Ich habe ein leeres Projekt mit einem XMega angelegt und nur FAT16 eingebunden.
Das Projekt kompiliert ohne Probleme. Beim Start des Simulators kommt zuerst die Meldung
Quote
Project Date/Time has changed! Reload File?

Wenn ich dort "Cancel" anklicke, folgt
Quote
File c:\program not found

Wenn ich "Yes" anklicke, werden es ein paar Fehlermeldungen mehr.

Mein AVRco ist unter "C:\Program Files (x86)\AVRco" installiert (Win 7 64 bit).
Ich habe nun eine Kopie des Verzeichnisses "C:\Program Files (x86)\AVRco\AVRco\System"
in welchem die *.pcu-Dateien liegen erstellt. Der Pfad ist "E:\AVR-Projekte\_System".

Wenn ich in der Datei "XMega.u" nun die Zeile
Quote
FILE c:\program files (x86)\avrco\avrco\System\UFAT16.PCU UNIT;29;

in
Quote
FILE e:\avr-projekte\_system\UFAT16.PCU UNIT;29;

ändere, startet der Simulator ohne Probleme.

Ich denke, dass die Leerzeichen im Pfad dazu führen, dass der Simulator statt der Datei "c:\program files (x86)\avrco\avrco\System\UFAT16.PCU" nur "c:\program" zu laden versucht und damit logischerweise auf die Nase fällt.

Mit besten Wünschen für einen Guten Rutsch ins neue Jahr
Thomas
Attachments
Filename: XMega-Test.zip
Filesize: 346.05 KB
Title: Testprojekt
Download counter: 3
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Problem mit Simulator

 · 
Posted: 26.12.2011 - 16:10  ·  #13
Hallo Thomas,

das Problem ist mir inzwischen bekannt, aber ich hatte mich im letzten Update auf das XMega Compare und das XMega Application codesize Problem konsentriert. Das Pfad Problem mit den Spaces ist im nächsten Update auch erledigt.

ein schönes, gesundes und erfolgreiches Neues Jahr an alle User
a happy, successful and healthy new year to all users here
rolf
ThomasW69
 
Avatar
 
Subject:

Re: Problem mit Simulator

 · 
Posted: 02.01.2012 - 13:54  ·  #14
Hallo Zusammen.

Ich wünsche allen Forenmitgliedern erst mal ein gesundes neues Jahr 2012.
Gerade habe ich mir das aktuellste update heruntergezogen. Leider bekomme ich eine Fehlermeldung beim Compilieren meines Codes

internal assembler error 82341
Danach wird angezeigt, dass
Error:Code exceeds romsize: 20CCFh > 1FFFFh

Das war vorher nicht so. Mit dem Merlin Optimiser kann ich es compilieren und im Simulator läuft es auch. Woran kann der neue Fehler jetzt liegen?
mc-electronic
Benutzer
Avatar
Gender: n/a
Location: Sauerland NRW
Posts: 372
Registered: 03 / 2008
Subject:

Re: Problem mit Simulator

 · 
Posted: 02.01.2012 - 15:48  ·  #15
Hallo Thomas,

das ist die typische Meldung, wenn der Code größer als der Flash-Speicher des angegebenen Controllers wird. Da hilft nur Code kleiner machen oder mit dem Optimizer arbeiten.
Du kannst ggf. die folgenden Direktiven aktivieren (die Blanks hinter { herausnehmen), um den Optimizer anzuweisen, weniger zu optimieren:

{ $OPTI SMARTLINK_ONLY} // This is a quick Optimizing to throw out unused procedures and functions
{ $OPTI_QUICK} // This makes only one Optimization Loop

Gruß, Michael
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Problem mit Simulator

 · 
Posted: 02.01.2012 - 20:32  ·  #16
Hallo Thomas,

weiter oben steht:
Quote
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.

Und im neuesten AVRco readme file
Quote
XMega
-----
Bug in Simulator fixed.(XMega 64bit compare).
Application codesize limit reduced. Boot area excluded.

rolf
  • 1
  • 2
  • 3
  • 4
  • Page 2 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: 10 · Cache Hits: 15   134   149 · Page-Gen-Time: 0.015392s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI