unverständlicher Compiler Error

  • 1
  • 2
  • Page 1 of 2
jomixl
Benutzer
Avatar
Gender:
Posts: 225
Registered: 02 / 2008
Subject:

unverständlicher Compiler Error

 · 
Posted: 18.10.2018 - 18:39  ·  #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
Gender: n/a
Age: 43
Posts: 308
Registered: 07 / 2013
Subject:

Re: unverständlicher Compiler Error

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

Gruß
Thomas
Gunter
Administrator
Avatar
Gender:
Location: Frankfurt Main / Germany
Posts: 1697
Registered: 02 / 2003
Subject:

Re: unverständlicher Compiler Error

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

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

Re: unverständlicher Compiler Error

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

rolf
jomixl
Benutzer
Avatar
Gender:
Posts: 225
Registered: 02 / 2008
Subject:

Re: unverständlicher Compiler Error

 · 
Posted: 19.10.2018 - 16:03  ·  #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
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: unverständlicher Compiler Error

 · 
Posted: 19.10.2018 - 16:51  ·  #6
und wie wärs mit einem kleinen Testprogramm
zum nachvollziehen des Problems ???
rolf
jomixl
Benutzer
Avatar
Gender:
Posts: 225
Registered: 02 / 2008
Subject:

Re: unverständlicher Compiler Error

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

Ich hoffe das hilft weiter ....

Gruß Joachim
Attachments
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
Filename: globals.pas
Filesize: 2.1 KB
Title:
Download counter: 42
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
Filename: BCU12smd.PAS
Filesize: 3.63 KB
Title:
Download counter: 49
// **********************************************************************
// 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 }
Filename: BootAppM168.PAS
Filesize: 4.43 KB
Title:
Download counter: 46
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: unverständlicher Compiler Error

 · 
Posted: 21.10.2018 - 18:13  ·  #8
Hallo Joachim,
die Traps Datei fehlt noch.
rolf
  • 1
  • 2
  • Page 1 of 2
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: 15 · Cache Hits: 15   144   159 · Page-Gen-Time: 0.040053s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI