Recent

Author Topic: Simple Question, order installation FPCUPDELUXE, for FPC compiler for AVR  (Read 1396 times)

pascalbythree

  • Sr. Member
  • ****
  • Posts: 256
Hello members, i working on a new installation for the freepascal for AVR compiler. On my raspberry ZERO.

It did work out before, but i have to re install everything ...

but before everything gets a mess again, can somebody awnser the order of FPCUPDELUXE howto install the 3.3.1 compiler for AVR?

I Also need to know weither you have to place everything in one directory or create new ones.

PS: Does anybody knows weither it is FPC 3.0.2 or FPC 3.2.0, FPC 3.2.2 to install under the FPC AVR 3.1.1 compiler? I lost my paper where i wrote it down.

Example, for the basic tab page

Install path = /home/pi/WVW_FPC
FPC Version = 3.2.0
Lazarus version = 2.2.0

Example, for the Cross tab page
Install path = /home/pi/WVW_FPC_AVR
CPU = AVR
OS = Embedded

Can somebody give me the right values, Greetz, WvW

PS2: is it possible to cross compile without the graphical lazarus IDE, so FPC only to create hex files for my AVR in the terminal?
« Last Edit: September 12, 2022, 01:38:05 pm by pascalbythree »

dseligo

  • Hero Member
  • *****
  • Posts: 1221
Re: Simple Question, order installation FPCUPDELUXE, for FPC compiler for AVR
« Reply #1 on: September 12, 2022, 02:00:25 pm »
For AVR I currently have:
Lazarus 2.3.0
FPC 3.3.1

This are my notes for FPCupDeluxe for new processor:
- go to 'Cross' tab
  - Click on 'Setup+'
    - Select CPU = avr
    - Select OS = embedded
    - Subarch = avr6
  - CPU = avr
  - OS = embedded
  - Install cross-compiler

I think it is absolutely possible to compile without Lazarus, but it is easier with Lazarus (i.e. easier and faster editing, you can program your MCU from Lazarus, etc.).
If you have Lazarus already set to compile, you can click 'Show Options' in 'Project Option' to see options you need for fpc.
My current 'command line parameters':
Code: Text  [Select][+][-]
  1. C:\LazarusAVR\fpc\bin\i386-win32\fpc.exe
  2. -Tembedded
  3. -Pavr
  4. -CpAVR6
  5. -MObjFPC
  6. -Scghi
  7. -O1
  8. -l
  9. -vewnhibq
  10. -Filib\avr-embedded
  11. -Fu.
  12. -FUlib\avr-embedded
  13. -FE.
  14. -otemp_reg
  15. -WpATMEGA2561
  16. -al

'Execute after':
Code: Text  [Select][+][-]
  1. avrdude
  2. -pATMEGA2561
  3. -cusbasp
  4. -Uflash:w:temp_reg.hex:i


Hope it helps

af0815

  • Hero Member
  • *****
  • Posts: 1291
Re: Simple Question, order installation FPCUPDELUXE, for FPC compiler for AVR
« Reply #2 on: September 12, 2022, 03:44:39 pm »
Do not change the "install path". The crosscompiler is bound to your actual fpc/lazarus stored in the install path. Only use the cross tab as dseligo says. Change never the "install path".

You need the "install path" if you select in fpcupdeluxe different complete installations. 
regards
Andreas

pascalbythree

  • Sr. Member
  • ****
  • Posts: 256
Re: Simple Question, order installation FPCUPDELUXE, for FPC compiler for AVR
« Reply #3 on: September 13, 2022, 11:49:05 am »
While installing, i got this error
When copying the system.pp file to the same directory it only gives more error.
Can anybody describe what i am doing wrong ?
Where is the system.pp file for AVR ? Can anybody send it up to me ?

Greetz, Wouter

Code: Pascal  [Select][+][-]
  1. #!/bin/sh
  2.  
  3. echo  '*************************** WvW switching to compiler directory **************************'
  4. echo '/home/pi/WVW_FPC_AVR_FORUM_TEST/fpc/lib/fpc/3.3.1'
  5. cd /home/pi/WVW_FPC_AVR_FORUM_TEST/fpc/lib/fpc/3.3.1
  6.  
  7.  
  8. echo  '*************************** WvW Vars SET **************************'
  9. echo 'Cristal FREQ:' $1
  10. echo 'Compile file:' $2
  11. echo 'MCU Name:' $3
  12.  
  13. echo  '************** WvW Compiling ' $3 ' **************************'
  14. sudo /home/pi/WVW_FPC_AVR_FORUM_TEST/fpc/lib/fpc/3.3.1/ppcrossavr -Tembedded -Wp$3 -Cpavr5 -Pavr -O3 -g -a -al -XPavr- -MObjFPC -Fu"." -Sm -dF_CPU:=$1 /home/pi/WVW_FPC_AVR_FORUM_TEST/fpc/lib/fpc/3.3.1/$2
  15.  
  16.  
  17.  

dseligo

  • Hero Member
  • *****
  • Posts: 1221
Re: Simple Question, order installation FPCUPDELUXE, for FPC compiler for AVR
« Reply #4 on: September 13, 2022, 01:11:33 pm »
While installing, i got this error

Screenshot and text you posted doesn't look like installation, it looks like you are compiling source for AVR. What is it?

When copying the system.pp file to the same directory it only gives more error.

You don't have to copy anything.

Try to add some options to your command line options from example I posted, i.e.:
Code: Text  [Select][+][-]
  1. -Filib\avr-embedded
  2. -FUlib\avr-embedded

Then try to remove -XPavr- option.

ccrause

  • Hero Member
  • *****
  • Posts: 856
Re: Simple Question, order installation FPCUPDELUXE, for FPC compiler for AVR
« Reply #5 on: September 13, 2022, 02:00:59 pm »
While installing, i got this error

Screenshot and text you posted doesn't look like installation, it looks like you are compiling source for AVR. What is it?

Agreed, the compile command seems to suggest you are trying to compile an RTL unit.  Please clarify what you are trying to do. Install RTL for a different subarch like AVR5? Fixing up something not installed by fpcupdeluxe?

pascalbythree

  • Sr. Member
  • ****
  • Posts: 256
Can somebody send me up the system.pp unit for AVR ?

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
It is in the sources..... Being lazy in the weekend is allowed,though... O:-)
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018