Forum > Operating Systems
Lazarus for RISC OS
StefanRISCOS:
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:
--- Quote from: StefanRISCOS on December 31, 2023, 11:05:39 am ---This is because the emulators only supports ARMv6 not ARMv7.
--- End quote ---
Hi Stephan, I can not apologize enough for the delay from my hand :-[
A brief reaction:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---fpc -Parm -ic tells us:
--- Code: ---ARMV3
ARMV4
ARMV4T
ARMV5
ARMV5T
ARMV5TE
ARMV5TEJ
ARMV6
ARMV6K
ARMV6T2
ARMV6Z
ARMV6M
ARMV7
ARMV7A
ARMV7R
ARMV7M
ARMV7EM
--- End code ---
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
StefanRISCOS:
@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:
--- Quote from: StefanRISCOS on December 31, 2023, 11:05:39 am ---This is because the emulators only supports ARMv6 not ARMv7.
--- End quote ---
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:
--- Quote from: PascalDragon on January 02, 2024, 11:34:32 pm ---
--- Quote from: StefanRISCOS on December 31, 2023, 11:05:39 am ---This is because the emulators only supports ARMv6 not ARMv7.
--- End quote ---
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).
--- End quote ---
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.
Navigation
[0] Message Index
[*] Previous page