Fehler beim Kompilieren von startup_LPC177x_8x.s

#5209609
Lesenswert?

Hallo Gemeinde,

setze gerade ein leeres Projekt für
einen NXP-Controller auf.

Target: LCP1778 cortex-m3

verwende:
CMSIS Cortex-M3 Core Device Startup File
for the NXP LPC177x_8x Device Series
V1.20
07. October 2010

IDE/Compiler Embitz / ARM GCC

das kompilieren von "startup_LPC177x_8x.s"
wirft Fehler ohne Ende, z.B.

Src\startup_LPC177x_8x.s:23: Error: junk at end of line, first 
unrecognized character is `<'
Src\startup_LPC177x_8x.s:24: Error: junk at end of line, first 
unrecognized character is `<'
Src\startup_LPC177x_8x.s:25: Error: junk at end of line, first 
unrecognized character is `<'
Src\startup_LPC177x_8x.s:27: Error: bad instruction `stack_size EQU 
0x00000800'
Src\startup_LPC177x_8x.s:29: Error: bad instruction `area 
STACK,NOINIT,READWRITE,ALIGN=3'
Src\startup_LPC177x_8x.s:30: Error: bad instruction `stack_mem SPACE 
Stack_Size'
Src\startup_LPC177x_8x.s:31: Error: bad instruction `__initial_sp'
Src\startup_LPC177x_8x.s:34: Error: junk at end of line, first 
unrecognized character is `<'
Src\startup_LPC177x_8x.s:35: Error: junk at end of line, first 
unrecognized character is `<'

Nach einiger Recherche wird wohl das Assembler-File nicht richtig 
interpretiert. (speziell Kommentare)

Gibt es einen Kompilerschalter der ";" als Kommentar interpretiert?

Mit einem LPC1768-Projekt wird alles fehlerfrei übersetzt...

Ratlos Runout
#5210285
Lesenswert?

Thomas T. schrieb:
> IDE/Compiler Embitz / ARM GCC

Thomas T. schrieb:
> das kompilieren von "startup_LPC177x_8x.s"
> wirft Fehler ohne Ende, z.B.
> [...]
> Src\startup_LPC177x_8x.s:27: Error: bad instruction `stack_size EQU
> 0x00000800'

Der startup-code ist ja offenbar nicht für den GCC, sondern für den 
ARMCC von Keil. Die beiden Assembler sind grundsätzlich nicht 
kompatibel. Da hilft nur ein passendes Startup-File für den GCC zu 
nehmen.
Gast #5210608
Lesenswert?

Hallo Christopher,

ja habe ich gemacht.

Eine "startup_ARMCM3.S" und dann
die Interruptvektoren für den LPC1778 angepasst.
Der Compiler von Embitz ist wohl ein
ARM-GCC (arm-none-eabi)

Die Extension "*.S" der Startupdatei
ist übrigens Case-Sensitive.
Also muss groß geschrieben sein.
strange...

grüße
runout
#5210898
Lesenswert?

runout schrieb:
> Die Extension "*.S" der Startupdatei
> ist übrigens Case-Sensitive.
> Also muss groß geschrieben sein.
> strange...

Das ist nicht "strange", sondern völlig normal.

Der gcc schickt nur die Assembler-Sourcen durch den Präprozessor (und Du 
hast offensichtlich eine, die so behandelt werden will), die ein grosses 
"S" haben.
Die mit dem "kleinen S" werden direkt an den Assembler übergeben und der 
kann mit Präprozessor-Direktiven nichts anfangen.
Beitrag #5216029 wurde von einem Moderator gelöscht.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren