E-LAB Computers
 

unverständlicher Compiler Error

  • 1
  • 2
  • Seite 1 von 2
jomixl
Benutzer
Avatar
Geschlecht:
Beiträge: 234
Dabei seit: 02 / 2008
Betreff:

unverständlicher Compiler Error

 · 
Gepostet: 18.10.2018 - 18:39 Uhr  ·  #1
hallo Rolf,
der Compiler meldet den Fehler: "BEGIN expected" am Ende der ersten Zeile des Programms,
d.h. direkt nach dem Namen. In der Folge kommen noch weitere Fehlermeldungen wie
"var oder symbol expected".....
Das Programm lif gestern noch ..... Ich kann keinen Fehler feststellen, hab schon die erste Zeile gelöscht und neu geschrieben, aber der Fehler bleibt.
Hab keine Idee mehr woher der Fehler kommt bzw. was ich da machen kann.

Gruß Joachim
Thomas.AC
Benutzer
Avatar
Geschlecht: keine Angabe
Alter: 45
Beiträge: 308
Dabei seit: 07 / 2013
Betreff:

Re: unverständlicher Compiler Error

 · 
Gepostet: 18.10.2018 - 19:32 Uhr  ·  #2
Bitte poste das Programm. Welche Compilerversion? Welche Windows Version. Kompatibiltätsmodus eingestellt bei AVRco? Als Administrator ausgeführt?

Gruß
Thomas
Gunter
Administrator
Avatar
Geschlecht:
Herkunft: Frankfurt Main / Germany
Beiträge: 1697
Dabei seit: 02 / 2003
Betreff:

Re: unverständlicher Compiler Error

 · 
Gepostet: 18.10.2018 - 19:50 Uhr  ·  #3
und:
wurde seit gestern ein Update gemacht? Wurde sonst etwas seitdem geändert ?

Gunter
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 26
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: unverständlicher Compiler Error

 · 
Gepostet: 18.10.2018 - 20:46 Uhr  ·  #4
manchmal kann ein defektes xxx.ppro File zu seltsamen
Ergebnissen führen.

rolf
jomixl
Benutzer
Avatar
Geschlecht:
Beiträge: 234
Dabei seit: 02 / 2008
Betreff:

Re: unverständlicher Compiler Error

 · 
Gepostet: 19.10.2018 - 16:03 Uhr  ·  #5
Hallo zusammen,
der Fehler hängt mit der BootApp.traps Datei zusammen.
Wenn ich diese Datei auskommentiere ist der Compiler zufrieden.

Der Fehler muss aber erst kürzlich entstanden sein denn vor kurzem war alles noch ok.

schönes WE
Joachim
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 26
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: unverständlicher Compiler Error

 · 
Gepostet: 19.10.2018 - 16:51 Uhr  ·  #6
und wie wärs mit einem kleinen Testprogramm
zum nachvollziehen des Problems ???
rolf
jomixl
Benutzer
Avatar
Geschlecht:
Beiträge: 234
Dabei seit: 02 / 2008
Betreff:

Re: unverständlicher Compiler Error

 · 
Gepostet: 21.10.2018 - 17:14 Uhr  ·  #7
hallo Rolf,
im Anhang findest du Main- und BootApp und die .traps Datei.

Ich hoffe das hilft weiter ....

Gruß Joachim
Anhänge an diesem Beitrag
unit globals;

interface
// global part

{ $W+} // enable/disable warnings for this unit

uses;

{--------------------------------------------------------------}
{ Const Declarations }
const
UCorr : integer = 2;

// CellTypen
ctLiFePo : byte = 0;
ctBleiGel : byte = 2;

// LoadStati
LdOff : boolean = false;
LdOn : boolean = true;

{$IDATA}
{--------------------------------------------------------------}
{ Type Declarations }
type

{--------------------------------------------------------------}
{ Var Declarations }
var
//
uv_err, ov_err : boolean;
uv_res, ov_res : boolean;
uv_off : boolean;

// Zell-Spannungen
Ucell : array[0..3] of integer;
Uabs : array[0..3] of word;

RelLoad[@portC, 2] : bit;
RelCharge[@portC, 3] : bit;

pwr_on[@portD, 3] : bit;
led[@PortB, 7] : bit;

LoadStat,ChargeStat : boolean;

CellType : byte;
RelayMode : byte;
ChkStart : boolean;

FC0 : AVfilter[0..3] of word;
FC1 : AVfilter[0..3] of word;
FC2 : AVfilter[0..3] of word;
FC3 : AVfilter[0..3] of word;

cell : byte;
nextAdc : boolean;

tBlink : Systimer;
t500ms : Systimer;
tAdcDelay : Systimer;

ResIn[@pinD, 2] : bit; // Pwr-On Schalter oder Reset
ResInCnt : byte;


{--------------------------------------------------------------}
{ functions }

implementation
// local part

{--------------------------------------------------------------}
{ Type Declarations }
type

{--------------------------------------------------------------}
{ Const Declarations }
const

{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
var

{--------------------------------------------------------------}
{ functions }


initialization
// at StartUp

// finalization // optional
Dateiname: globals.pas
Dateigröße: 2.1 KB
Titel:
Heruntergeladen: 198
program BCU12smd;


{$NOSHADOW}
{ $WG} {global Warnings off}

Device = mega168p, VCC = 5;
{ $BOOTRST $03800} {Reset Jump to $03800}

define_fuses
Override_Fuses;
NoteBook = A;
COMport = USB;
LockBits0 = [];
FuseBits0 = [CKSEL3, CKSEL2, CKSEL0, SUT0, CKDIV8];
FuseBits1 = [BODLEVEL1, BODLEVEL0];
FuseBits2 = [BOOTSZ1, BOOTSZ0, BOOTRST];
ProgMode = SPI;

ProgFuses = true;// or false – program FCse Bits
ProgLock = true;// or false – program Lock Bits
ProgFlash = true;// or false – program Flash
ProgEEprom = false;// or false – program EEprom
AutoRelease = true;// or false – Release Target

AddApp = '..\BootAppM168\BootAppM168';
CalByte = 0, $3FFE;

import SysTick, SerPort, SysLEDblink;

from System import Traps, longword, float;
from SysLEDblink import LEDmessage;


ExternalTraps '..\BootAppM168\BootAppM168.traps';

define
ProcClock = 1000000; {Hertz}
SysTick = 10; {msec}
StackSize = $0100, iData;
FrameSize = $0100, iData;
SerPort = 4800, Stop2; {Baud, StopBits|Parity}
RxBuffer = 32, iData;
TxBuffer = 128, iData;

SysLEDblink = 30;
SysLEDBlink0 = PortB, 7, low;


uses globals in 'globals.pas';

implementation

{$IDATA}

{--------------------------------------------------------------}
{ Type Declarations }

type


{--------------------------------------------------------------}
{ Const Declarations }
const
BootCheckF[@$37FE] : word = $AA55; // in the standard app area
OscCalByte[@$3FFE] : byte = $A7;

tBlinkLoad : word = 5000 div SysTick;

var
{$EEPROM}

{--------------------------------------------------------------}
{ Var Declarations }
{$IDATA}
var

{--------------------------------------------------------------}
{ FCnctions }
procedure InitPorts;
begin
PortB:= %00101000; //led,nc,sck,miso,mosi,c,b,a
ddrB:= %10101111;

Dateiname: BCU12smd.PAS
Dateigröße: 3.63 KB
Titel:
Heruntergeladen: 203
// **********************************************************************
// This application runs completely in the boot section of the AVR.
// Some library functions and drivers are used and also interrupts
// are running. If the FlashDownloader is started then also here
// the standard interrupt driven UART/SerPort is used for communication.
// Please note that the constant "BootCheckF" is placed to a fixed
// address, but is outside of the boot area. A valid main application
// residing in the "normal" code area $0000 and up must provide this
// constant in order do an immediate jump to $0000 into the standard
// application area.
// The Main Application must be build and compiled separately and can
// be downloaded with this Application/Bootloader
// **********************************************************************

program BootAppMega16;

{$NOSHADOW}
{ $WG} {global Warnings off}

Device = mega168, VCC = 5;
{$BOOTAPPLICATION $1c00} // 8kByte Boot size

define_fuses
Override_Fuses;
NoteBook = A;
COMport = USB;
LockBits0 = [];
FuseBits0 = [CKSEL3, CKSEL2, CKSEL0, SUT0, CKDIV8];
FuseBits1 = [BODLEVEL1, BODLEVEL0];
FuseBits2 = [BOOTSZ1, BOOTSZ0, BOOTRST];
ProgMode = SPI;

ProgFuses = true;
ProgLock = true;
ProgFlash = true;
ProgEEprom = true;
// AddApp = 'c:\PROJEKTE\Pascal_sc\AVR\EvaBoard\AVR EvaBoardI';
// Info for programmer, joining hexfiles, using this project name

import SysTick, FlashWrite, SerPort;

from System import Traps;

define
ProcClock = 4000000; {Hertz}
SysTick = 10; {msec}
StackSize = $0030, iData;
FrameSize = $0064, iData;
SerPort = 19200, Stop2; {Baud, StopBits|Parity}
RxBuffer = 8, iData;
TxBuffer = 8, iData;

implementation

{$IDATA}

{--------------------------------------------------------------}
{ Type Declarations }
Dateiname: BootAppM168.PAS
Dateigröße: 4.43 KB
Titel:
Heruntergeladen: 207
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 26
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: unverständlicher Compiler Error

 · 
Gepostet: 21.10.2018 - 18:13 Uhr  ·  #8
Hallo Joachim,
die Traps Datei fehlt noch.
rolf
  • 1
  • 2
  • Seite 1 von 2
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Thema

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.