Recent

Author Topic: Lazarus for RISC OS  (Read 34067 times)

StefanRISCOS

  • New Member
  • *
  • Posts: 29
Re: Lazarus for RISC OS
« Reply #180 on: December 31, 2023, 11:05:39 am »
I just got an important informtation from Micken(Michael).
In order to be able to run FPC on the RISC OS emulators like RPCemu or VirtualRPC we need to patch the compiler to replace  ARM assembler code “BX LR “ to “MOV PC,LR".
This is because the emulators only supports ARMv6 not ARMv7.

I am planing to release a polished ZIP with Micken's Alpha version of FPC in the next days. The alpha version of FPC only accepts one parameter (the filename to compile) so compiler directives must be switched on/off by inline code.

TRon

  • Hero Member
  • *****
  • Posts: 3822
Re: Lazarus for RISC OS
« Reply #181 on: December 31, 2023, 11:27:05 am »
This is because the emulators only supports ARMv6 not ARMv7.
Hi Stephan, I can not apologize enough for the delay from my hand  :-[

A brief reaction:
Code: Pascal  [Select][+][-]
  1. fpc -Parm -ic
  2.  
tells us:
Code: [Select]
ARMV3
ARMV4
ARMV4T
ARMV5
ARMV5T
ARMV5TE
ARMV5TEJ
ARMV6
ARMV6K
ARMV6T2
ARMV6Z
ARMV6M
ARMV7
ARMV7A
ARMV7R
ARMV7M
ARMV7EM
Thus the question becomes, which exact (minimal) CPU (instructionset) do(es) the emulator(s) support ?

You can specify the arm specific CPU (sub)target when (cross)compiling the compiler and the mentioned issue should be resolved. see also https://wiki.freepascal.org/ARM_compiler_options
I do not have to remember anything anymore thanks to total-recall.

StefanRISCOS

  • New Member
  • *
  • Posts: 29
Re: Lazarus for RISC OS
« Reply #182 on: January 02, 2024, 02:36:48 pm »
@Tron  Good to see that you are alive. Thanks for that info!
I also didn't have much time to continue on this project but I hope I can spend more time on it this year.
Happy New Year!

PascalDragon

  • Hero Member
  • *****
  • Posts: 5823
  • Compiler Developer
Re: Lazarus for RISC OS
« Reply #183 on: January 02, 2024, 11:34:32 pm »
This is because the emulators only supports ARMv6 not ARMv7.

Then change the target processor type to one that does not support BX, namely ARMV4 (e.g. -Cparmv4). Please note that you probably mean ARM6 which is different from ARMv6, because the later does support BX (see also here).

micken

  • Jr. Member
  • **
  • Posts: 82
Re: Lazarus for RISC OS
« Reply #184 on: February 16, 2024, 12:20:37 am »
This is because the emulators only supports ARMv6 not ARMv7.

Then change the target processor type to one that does not support BX, namely ARMV4 (e.g. -Cparmv4). Please note that you probably mean ARM6 which is different from ARMv6, because the later does support BX (see also here).

I know it is a option. My port is a quick and dirty test and it was quick for me to binary patch the fpc executable. The binaries that fpc produces doesn't have bx lr.

 

TinyPortal © 2005-2018