Recent

Author Topic: Platform eXtended Library on aarch64  (Read 12180 times)

ertank

  • Sr. Member
  • ****
  • Posts: 276
Platform eXtended Library on aarch64
« on: March 04, 2024, 02:42:02 pm »
Hello,

I wonder if someone already has a solution for compiling subject library.
It has some Pi 2 (ARMv7) assembler instructions not compiling under 64 bit OS.

PXL.Boards.RPi.pas: line 383:
Code: [Select]
procedure WriteMemSafe(const Address: Pointer; const Value: Cardinal);
asm
{$IFDEF RPi2}
  dmb
  str r1, [r0]
  dmb
{$ELSE}
  str r1, [r0]
  str r1, [r0]
{$ENDIF}
end;

I get Unknown identifier "R1" compiler error and I don't know assembler and just stuck when I wanted to modify an older project.

Any help is appreciated.

Thanks & Regards,
Ertan

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1862
Re: Platform eXtended Library on aarch64
« Reply #1 on: March 04, 2024, 02:50:00 pm »
Code: Pascal  [Select][+][-]
  1. If you feel lucky, try to replace r[#] with x[#].

ertank

  • Sr. Member
  • ****
  • Posts: 276
Re: Platform eXtended Library on aarch64
« Reply #2 on: March 04, 2024, 03:54:12 pm »
Thank you.
This fixed the compiler error.
But, I am stuck with the /dev/gpiomem access
Searching for additional help in here: https://forums.raspberrypi.com/viewtopic.php?t=366809


pascalbythree

  • Sr. Member
  • ****
  • Posts: 286
Re: Platform eXtended Library on aarch64
« Reply #4 on: July 09, 2025, 05:10:57 pm »
Code: Pascal  [Select][+][-]
  1. procedure WriteMemSafe(const Address: Pointer; const Value: Cardinal);
  2. asm
  3. {$IFDEF RPi2}
  4.   dmb
  5.   str   r1, [r0]
  6.   dmb
  7. {$ELSE}
  8.   str   r1, [r0]
  9.   str   r1, [r0]
  10. {$ENDIF}
  11. end;
  12.  
  13. function ReadMemSafe(const Address: Pointer): Cardinal;
  14. asm
  15. {$IFDEF RPi2}
  16.   dmb
  17.   ldr r0, [r0]
  18.   dmb
  19. {$ELSE}
  20.   ldr r1, [r0]
  21.   ldr r0, [r0]
  22. {$ENDIF}
  23. end;

Can somebody please help changing this to compile PXL v1.1.0 on my Raspberry 5

Using bookworm or full ubuntu.

Code: Pascal  [Select][+][-]
  1. If you feel lucky, try to replace r[#] with x[#]

Is not clear enough to compile, can somebody type it out further ?

Grtz, -=Pascalbythree=-
« Last Edit: July 09, 2025, 05:17:14 pm by pascalbythree »

 

TinyPortal © 2005-2018