Recent

Author Topic: Cross-compiling for AVR (90S8515 or Mega8515)  (Read 3032 times)

alberich

  • New member
  • *
  • Posts: 9
Cross-compiling for AVR (90S8515 or Mega8515)
« on: December 15, 2020, 05:26:02 pm »
Hello everybody ... I am new on this forum and used Lazarus in the past as a RAD alternative to Delphi. Now I installed the last version available on SourceForge (for Win7 x64) and, in "Project > Options > Target" (translated from French), I selected "avr" and de-selected "Graphic application" (look at attachments, Screen copy 1). But with "OK" I got ... Screen copy 2 ! Choosing "embedded" for the target OS and "avr2" in third selector showed the same type of message. Are there some more configurations to be done, or some files to be added (and where should I copy them ? ). Thanks for any answer ...
« Last Edit: December 15, 2020, 05:30:04 pm by alberich »

nouzi

  • Sr. Member
  • ****
  • Posts: 296
Re: Cross-compiling for AVR (90S8515 or Mega8515)
« Reply #1 on: December 15, 2020, 07:20:50 pm »
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

alberich

  • New member
  • *
  • Posts: 9
Re: Cross-compiling for AVR (90S8515 or Mega8515)
« Reply #2 on: December 15, 2020, 08:23:52 pm »
I jumped (or surfed) form one page to the next and finally came, three steps later, again to GCC (or gcc), which in my eyes, sorry to say it, is a "gaseous plant". For comparison, GCBasic needs 157Mo, and it has most features common with Pascal (and supports both AVR's and PIC's) . Why does nobody develop such a compiler, but with the Pascal syntax and dedicated to a family of processors ? BTW I will never develop for Linux or BSD, so why should I use a compiler with these features, but without those that I really need ?
« Last Edit: December 15, 2020, 08:27:57 pm by alberich »

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Cross-compiling for AVR (90S8515 or Mega8515)
« Reply #3 on: December 15, 2020, 08:32:29 pm »
I jumped (or surfed) form one page to the next and finally came, three steps later, again to GCC (or gcc), which in my eyes, sorry to say it, is a "gaseous plant". For comparison, GCBasic needs 157Mo, and it has most features common with Pascal (and supports both AVR's and PIC's) . Why does nobody develop such a compiler, but with the Pascal syntax and dedicated to a family of processors ? BTW I will never develop for Linux or BSD, so why should I use a compiler with these features, but without those that I really need ?

It's unclear from your posting what point you're trying to make. Have you installed the appropriate cross compiler?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

alberich

  • New member
  • *
  • Posts: 9
Re: Cross-compiling for AVR (90S8515 or Mega8515)
« Reply #4 on: December 15, 2020, 08:55:36 pm »
Thanks for Your answer, that was exactly my question : what must I add to the "base" Lazarus to compile for AVR (and "native" Lazarus could replace Delphi, too, when I need a Windows executable) ? And HOW must I install it ? Is it simply a kind of "setup.exe" ? Meanwhile I installed both WinAVR and FPC for AVR, but Lazarus still does not work ; I am near of starting a "reimaging" of my system partition in a previous version  !

 >:D
« Last Edit: December 15, 2020, 09:30:49 pm by alberich »

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Cross-compiling for AVR (90S8515 or Mega8515)
« Reply #5 on: December 15, 2020, 09:52:32 pm »
Thanks for Your answer, that was exactly my question : what must I add to the "base" Lazarus to compile for AVR (and "native" Lazarus could replace Delphi, too, when I need a Windows executable) ? And HOW must I install it ? Is it simply a kind of "setup.exe" ? Meanwhile I installed both WinAVR and FPC for AVR, but Lazarus still does not work ; I am near of starting a "reimaging" of my system partition in a previous version  !

@nouzi has already directed your attention to https://wiki.freepascal.org/Category:AVR

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

alberich

  • New member
  • *
  • Posts: 9
Re: Cross-compiling for AVR (90S8515 or Mega8515)
« Reply #6 on: December 15, 2020, 10:23:30 pm »
On this page I saw mainly how to use the special functions of the AVR's ... and a link to this page :https://wiki.freepascal.org/AVR. And on top this warning : "The FPC-AVR port is experimental and might be broken from time to time", and explanations how to "build" the compiler, suitable only for penguin friends. So I say : bye Lazarus for AVR ...
« Last Edit: December 15, 2020, 10:26:26 pm by alberich »

ccrause

  • Hero Member
  • *****
  • Posts: 845
Re: Cross-compiling for AVR (90S8515 or Mega8515)
« Reply #7 on: December 15, 2020, 10:24:12 pm »
@nouzi has already directed your attention to https://wiki.freepascal.org/Category:AVR

The category link is a bit general - how to build an AVR cross compiler is on the AVR wiki page itself.  This page is however written from the perspective of a Linux user, so some tweaking of the examples is required to make it work on Windows.

Perhaps fpcupdeluxe is the installer you are looking for.  Download the version for your host computer (sounds like win64, almost at the end of the release list).  This will download code, starting compiler, binutils, cross tools etc. based on your selection, then build the required cross tools and [optionally] install them.  All this without messing with any previously installed versions of Lazarus and/or FPC.  Note this takes a while the first time because a lot of code and tools may have to be downloaded.  You can choose to only install FPC, or Lazarus or both.  What you want to get is at least the latest FPC release (3.2.0) or fixes3.2 for your host (win64), once installed click on the Cross tab, select avr and embedded, then click on Setup+, select avr and embedded from the dropdown lists (yes, again) and type avr4 in the Cross SubArch Override edit box (the mega8515 is part of the avr4 sub architecture).

If you have fpcupdeluxe questions (it is a feature rich tool with very many options) please ask them in this fpcupdeluxe thread.

alberich

  • New member
  • *
  • Posts: 9
Re: Cross-compiling for AVR (90S8515 or Mega8515)
« Reply #8 on: December 15, 2020, 10:38:10 pm »
The program crashes ... Thanks for all answers, I will go back to GCBasic.

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: Cross-compiling for AVR (90S8515 or Mega8515)
« Reply #9 on: December 16, 2020, 02:55:34 am »

You can try "Lazarus Arduino Module Wizard"

https://github.com/jmpessoa/lazarduinomodulewizard
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018