AVR embedded für verschiedene Controllertypen - geht!

Für alles, was in den übrigen Lazarusthemen keinen Platz, aber mit Lazarus zutun hat.

Re: AVR embedded für verschiedene Controllertypen - geht!

Beitragvon Mathias » 27. Sep 2018, 22:11 Re: AVR embedded für verschiedene Controllertypen - geht!

Vielen Dank, für deine Bemühungen. :wink:

I will also monitor the changes in FPC and Lazarus to be able to install multiple subarchs the easy way.
And to auto-update them when needed.
(the reason to post here)


Dies würde uns schon einiges weiter helfen.

PS: arm-embedded, lässt sich noch nicht mit fpcupdeluxe erstellen.
Mit Lazarus sehe ich gün
Mit Java und C/C++ sehe ich rot
Mathias
 
Beiträge: 4342
Registriert: 2. Jan 2014, 17:21
Wohnort: Schweiz
OS, Lazarus, FPC: Linux (die neusten Trunc) | 
CPU-Target: 64Bit
Nach oben

Beitragvon DonAlfredo » 28. Sep 2018, 05:19 Re: AVR embedded für verschiedene Controllertypen - geht!

PS: arm-embedded, lässt sich noch nicht mit fpcupdeluxe erstellen.

That is very strange ! This whole new release and new FPC/Laz sources are focussed on arm-embedded.
I checked it on many systems.

Could you please enlighten me with a bit more details about this failure.
Its important (for me) to have this working for 100% !!
DonAlfredo
 
Beiträge: 16
Registriert: 28. Sep 2017, 09:26

Beitragvon kupferstecher » 28. Sep 2018, 16:42 Re: AVR embedded für verschiedene Controllertypen - geht!

Hello DonAlfredo,

first of all: Thanks for the development of fpcupdelux!

I just tried to create a cross compiler for arm-embedded using fpcupdeluxe. I had a crosscompiler before, build with a batch-script. I "deactivated" that installation by changing its folder names.

In fpcupdeluxe I pressed the "Embedded"-button with the ic-icon. The installation went through (installed Laz 2.1.0), but I couldn't compile my example project, the error message said there is no such fpc for target arm-embedded.

Again I opened fpcupdeluxe and installed the crosscompiler with settings cpu:arm and os:embedded by pressing "Install cross-compiler". It downloaded binutils and went through, also there was no error message when opening the example project (STM32F103).

But I couldn't compile the project, the processor parameter was wrong, seems there were changes in the names.
Running "ppcrossarm.exe -i" showed the supported microcontroller types. I modified the parameter in Lazarus Project options/Custom Options to "-Wpstm32f103C8". When compiling there is an error message Can't find unit "STM32F103XB". There seems something wrong, also a lot of units in the rtl are missing in comparisson to my old installation.

But I guess thats not related to fpcupdeluxe but to fpc.


PS: System Win7/64bit
kupferstecher
 
Beiträge: 166
Registriert: 17. Nov 2016, 11:52

Beitragvon Mathias » 28. Sep 2018, 17:20 Re: AVR embedded für verschiedene Controllertypen - geht!

Could you please enlighten me with a bit more details about this failure.
Its important (for me) to have this working for 100% !!

Code: Alles auswählen
New try building a cross-compiler for embedded-arm
fpcupdeluxe: info: FPC arm-embedded cross-builder: Detected source version FPC (compiler): 3.3.1
fpcupdeluxe: info: TAny_embedded-arm: Found correct binary utilities in directory /home/tux/fpcupdeluxe_arm/cross/bin/arm-embedded
fpcupdeluxe: info: TAny_embedded-arm: Found correct library in directory /home/tux/fpcupdeluxe_arm/cross/lib/arm-embedded/armv6m
fpcupdeluxe: info: FPC arm-embedded cross-builder: Using compiler with version: 3.3.1
fpcupdeluxe: Start of compile error summary.
system.pp(325) Error: Compilation raised exception internally
fpcupdeluxe: Start of compile error summary.
Fatal: I/O error: File not found
system.pp(325) Error: Compilation raised exception internally
fpcupdeluxe: Start of compile error summary.
fpcupdeluxe: ERROR: FPCCrossInstaller (BuildModuleCustom: FPC): Running cross compiler fpc make all for arm-embedded failed with an error code.


Detailliert im Anhang.

Ich verwende Linux Mint 19 64Bit.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Mit Lazarus sehe ich gün
Mit Java und C/C++ sehe ich rot
Mathias
 
Beiträge: 4342
Registriert: 2. Jan 2014, 17:21
Wohnort: Schweiz
OS, Lazarus, FPC: Linux (die neusten Trunc) | 
CPU-Target: 64Bit
Nach oben

Beitragvon DonAlfredo » 29. Sep 2018, 06:16 Re: AVR embedded für verschiedene Controllertypen - geht!

To build a cross-compiler for any embedded target, you need to define a sub-arch !
The basic setting of fpcupdeluxe for arm-embedded is to build for armv6m.

However, stm32f103 is armv7m !!
So, to build for this MCU, you need to define armv7m as subarch.

To instruct fpcupdeluxe to build for armv7m:
Click setup+
Have a look (at the right) at "Custom tools location and build options".
Select arm and embedded as CPU and OS combo.
Enter armv7m into "Cross Subarch Override"
Build cross-compiler.

See included screenshot.

@mathias
As of yet, this is an unexplainable error unfortunately. And I cannot reproduce it either.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
DonAlfredo
 
Beiträge: 16
Registriert: 28. Sep 2017, 09:26

Beitragvon kupferstecher » 29. Sep 2018, 11:06 Re: AVR embedded für verschiedene Controllertypen - geht!

DonAlfredo hat geschrieben:However, stm32f103 is armv7m !!

Of course... I should have known. Thanks!

There are rtl-files for the certain controllers now, but the structure quite changed, also register names and types (e.g. GPIOA instead of PortA and TGPIO_Register instead of TPortRegister as before).
A minimum project finally resulted in a linker error.
Code: Alles auswählen
...\cross\bin\arm-embedded\arm-embedded-objcopy.exe: invalid option --\


Were there discussions about the changes, is there anything to read about it?

Regards
kupferstecher
 
Beiträge: 166
Registriert: 17. Nov 2016, 11:52

Beitragvon DonAlfredo » 29. Sep 2018, 11:21 Re: AVR embedded für verschiedene Controllertypen - geht!

No central discussion yet.
But you can always ask questions about this special FPC and Lazarus on GitHub, the place where these repo's are hosted.

https://github.com/LongDirtyAnimAlf/freepascal
https://github.com/LongDirtyAnimAlf/lazarus

The goal of these efforts is to check, test and use these embedded extensions.
And, if all quirks have been solved, an official request will be done to include the necessary changes into the official FPC and Lazarus.
DonAlfredo
 
Beiträge: 16
Registriert: 28. Sep 2017, 09:26

Beitragvon Mathias » 29. Sep 2018, 19:12 Re: AVR embedded für verschiedene Controllertypen - geht!

DonAlfredo hat geschrieben:To build a cross-compiler for any embedded target, you need to define a sub-arch !
The basic setting of fpcupdeluxe for arm-embedded is to build for armv6m.

However, stm32f103 is armv7m !!
So, to build for this MCU, you need to define armv7m as subarch.

To instruct fpcupdeluxe to build for armv7m:
Click setup+
Have a look (at the right) at "Custom tools location and build options".
Select arm and embedded as CPU and OS combo.
Enter armv7m into "Cross Subarch Override"
Build cross-compiler.

See included screenshot.

@mathias
As of yet, this is an unexplainable error unfortunately. And I cannot reproduce it either.

Es geht leider immer noch nicht.
Könnte dies an Linux liegen, so wie ich sehe, hast du Windows verwendet.

Noch etwas, bei mir sind immer Fehler wegen fehlenden Goto gekommen, dies auch bei älteren Versionen. Dies konnte ich mit Setup+ --> Option Override "-Sg" umgehen. Aber so wie ich sehe, hast du dies nicht verwenden müssen.

Immerhin, sieht die Fehlermeldung unterdessen etwas anders aus.
Code: Alles auswählen
Valid subarch(s) for arm embedded are: armv4, armv4t, armv6m, armv7a, armv7em, armv7m
Fpcupdeluxe: FPC cross-builder: Building compiler for embedded-arm (OPT: -Sg ) {SUBARCH: armv7m}.
fpcupdeluxe: info: FPC arm-embedded cross-builder: Detected source version FPC (compiler): 3.3.1
fpcupdeluxe: info: TAny_embedded-arm: Found correct binary utilities in directory /home/tux/fpcupdeluxe_arm/cross/bin/arm-embedded
fpcupdeluxe: info: TAny_embedded-arm: Found correct library in directory /home/tux/fpcupdeluxe_arm/cross/lib/arm-embedded/armv7m
fpcupdeluxe: info: FPC arm-embedded cross-builder: Using compiler with version: 3.3.1
fpcupdeluxe: Start of compile error summary.
/home/tux/fpcupdeluxe_arm/fpcsrc/rtl/units/arm-embedded/system.s:3555: Error: unknown pseudo-op: `.l'
fpcupdeluxe: Start of compile error summary.
system.pp(325) Error: Error while assembling exitcode 1
fpcupdeluxe: Start of compile error summary.
system.pp(325) Fatal: There were 2 errors compiling module, stopping
system.pp(325) Error: Error while assembling exitcode 1
fpcupdeluxe: Start of compile error summary.
Fatal: Compilation aborted
system.pp(325) Fatal: There were 2 errors compiling module, stopping
fpcupdeluxe: Start of compile error summary.
sysutils.pp(34,4) Fatal: Cannot open include file "sysutilh.inc"
make[3]: *** Auf noch nicht beendete Prozesse wird gewartet …
fpcupdeluxe: Start of compile error summary.
Fatal: Compilation aborted
sysutils.pp(34,4) Fatal: Cannot open include file "sysutilh.inc"
fpcupdeluxe: Start of compile error summary.
fpcupdeluxe: ERROR: FPCCrossInstaller (BuildModuleCustom: FPC): Running cross compiler fpc make all for arm-embedded failed with an error code.
Done !!


Im Anhang die komplette Fehlermeldung.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Mit Lazarus sehe ich gün
Mit Java und C/C++ sehe ich rot
Mathias
 
Beiträge: 4342
Registriert: 2. Jan 2014, 17:21
Wohnort: Schweiz
OS, Lazarus, FPC: Linux (die neusten Trunc) | 
CPU-Target: 64Bit
Nach oben

Beitragvon DonAlfredo » 30. Sep 2018, 05:37 Re: AVR embedded für verschiedene Controllertypen - geht!

@Mathias
I have tried to reproduce your error on Windows and Linux, but still did not succeed.
Install on my system run flawless.
So, I have no clue whatsoever.

In these situations only one thing remain: a vanilla install.
Meaning: a new directory with latest fpcupdeluxe and new sources.
Sorry I can't help you at this moment. Will keep investigating.
DonAlfredo
 
Beiträge: 16
Registriert: 28. Sep 2017, 09:26

Beitragvon Mathias » 30. Sep 2018, 16:27 Re: AVR embedded für verschiedene Controllertypen - geht!

Ich habe es nochmals in einem leeren Ordner probiert.

Code: Alles auswählen
New try building a cross-compiler for embedded-arm
fpcupdeluxe: info: FPC arm-embedded cross-builder: Detected source version FPC (compiler): 3.3.1
fpcupdeluxe: info: TAny_embedded-arm: Found correct binary utilities in directory /home/tux/fpcupdeluxe_arm/cross/bin/arm-embedded
fpcupdeluxe: info: TAny_embedded-arm: Found correct library in directory /home/tux/fpcupdeluxe_arm/cross/lib/arm-embedded/armv7m
fpcupdeluxe: info: FPC arm-embedded cross-builder: Using compiler with version: 3.3.1
fpcupdeluxe: Start of compile error summary.
softfpu.pp(653,5) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(678,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(1830,7) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(1843,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(1963,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(1976,13) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(2080,5) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(2093,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3598,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3674,9) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3702,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3703,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3704,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3705,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3706,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3715,29) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3716,29) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3733,29) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3734,29) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(3762,5) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4152,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4201,13) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4415,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4428,13) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4433,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4511,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4524,13) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4894,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4895,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4973,9) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(4979,8) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5003,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5004,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5005,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5006,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5007,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5018,29) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5019,29) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5038,31) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5039,31) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5040,31) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5041,31) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5069,5) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5162,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5181,62) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5252,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5277,13) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5369,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5386,9) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5506,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
softfpu.pp(5506,11) Fatal: There were 50 errors compiling module, stopping
softfpu.pp(5506,11) Error: GOTO and LABEL are not supported (use switch -Sg)
fpcupdeluxe: Start of compile error summary.
Fatal: Compilation aborted
softfpu.pp(5506,11) Fatal: There were 50 errors compiling module, stopping
fpcupdeluxe: Start of compile error summary.
fpcupdeluxe: ERROR: FPCCrossInstaller (BuildModuleCustom: FPC): Running cross compiler fpc make all for arm-embedded failed with an error code.
Done !!


Die Grundinstallation von FPC /Lazarus geht ohne Fehler.

Dabei habe ich folgendes eingestellt:
FPC version --> embedded
Lazarus version --> embedded
Button [Embedded] gedrückt.
Wie gesagt, dies geht ohne Fehler.

Anschliessend [Setup+]
"Custom tools location and build options" --> arm / embedded
"Cross Subarch Override (i....." --> armv7m
[Ok]

CPU --> arm
OS --> embedded
[Install cross-compiler]

Die Fehler mit dem Goto sind mir ein Rätsel, da dies bei dir nicht auftreten. Dieser Goto Fehler besteht schon seit über einem Monat.

PS: Kann sonst ein Lazarusler dies mal ausprobieren ? :wink:
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Mit Lazarus sehe ich gün
Mit Java und C/C++ sehe ich rot
Mathias
 
Beiträge: 4342
Registriert: 2. Jan 2014, 17:21
Wohnort: Schweiz
OS, Lazarus, FPC: Linux (die neusten Trunc) | 
CPU-Target: 64Bit
Nach oben

Beitragvon Mathias » 30. Sep 2018, 17:27 Re: AVR embedded für verschiedene Controllertypen - geht!

Nachtrag:
Ich habe es mit Win10 64Bit und Mint 19 64Bit in der VB probiert. Dort konnte ich bei beiden OS auf Anhieb den Cross-Compiler erzeugen. 8)

Im Anhang ein Auschnitt von Mint 19.

So wie es scheint, ist mit mit meinem Mint etwas nicht in Ordnung, aber was ? :wink:
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Mit Lazarus sehe ich gün
Mit Java und C/C++ sehe ich rot
Mathias
 
Beiträge: 4342
Registriert: 2. Jan 2014, 17:21
Wohnort: Schweiz
OS, Lazarus, FPC: Linux (die neusten Trunc) | 
CPU-Target: 64Bit
Nach oben

Beitragvon DonAlfredo » 1. Okt 2018, 09:22 Re: AVR embedded für verschiedene Controllertypen - geht!

It remains a very strange error.

I have used Google a bit.
And Google came up with:
http://lists.freepascal.org/pipermail/f ... 44603.html
The above could be of interest enough to test it.

I have prepared a pre-release for linux x64.
https://github.com/newpascal/fpcupdelux ... tag/1.6.1n
Setup+ has now an option (checkbox) to disable the use of jobs by GNU make.

Could you please give this a try ?
Thanks.
DonAlfredo
 
Beiträge: 16
Registriert: 28. Sep 2017, 09:26

Beitragvon Mathias » 1. Okt 2018, 17:49 Re: AVR embedded für verschiedene Controllertypen - geht!

Ich habe nochmals von vorn begonnen, und den Hacken "Use jobs for GNU make" entfernt.
Jetzt hat es geklappt. :wink:

Vielen Dank für deine Mühe.

Jetzt muss ich nur noch rausfinden, wie ich die *.hex in den STM32 bringe.
Mit Lazarus sehe ich gün
Mit Java und C/C++ sehe ich rot
Mathias
 
Beiträge: 4342
Registriert: 2. Jan 2014, 17:21
Wohnort: Schweiz
OS, Lazarus, FPC: Linux (die neusten Trunc) | 
CPU-Target: 64Bit
Nach oben

• Themenende •
Vorherige

Zurück zu Sonstiges



Wer ist online?

Mitglieder in diesem Forum: Google [Bot] und 6 Gäste

porpoises-institution
accuracy-worried