Recent

Author Topic: which functions in the rtl to dummy  (Read 1368 times)

Key-Real

  • Sr. Member
  • ****
  • Posts: 372
which functions in the rtl to dummy
« on: July 23, 2024, 08:47:05 pm »
I decided not to implement all the rtl functions like
writeln, blockread, getmem and so no
in my port. The system unit had to be linked against the Psy-Q-SDK.
So I need the list of functions that are OS depended.

Pls list them all

BSaidus

  • Hero Member
  • *****
  • Posts: 596
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: which functions in the rtl to dummy
« Reply #1 on: July 23, 2024, 09:02:23 pm »
Eh, open system, sysutils, ... units or use chm help to find all functions.
But, why do you need to do that ?
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: which functions in the rtl to dummy
« Reply #2 on: July 24, 2024, 08:35:58 am »
I decided not to implement all the rtl functions like
writeln, blockread, getmem and so no
in my port. The system unit had to be linked against the Psy-Q-SDK.
In case you decide not to implement the minimal required functionality then what is the use of using the FPC compiler in the first place ?

The whole FPC implementation relies on things like getmem and freemem. If these are not implemented then FPC generated code will not run.

That is unless you butcher the whole RTL and write your own custom RTL which again raises the question then why use FPC to begin with.

What you imho should do is link against your custom SDK and use that SDK to implement the required FPC functionality using that SDK (normally it would be OS functionality but I guess that is lacking for PSx e.g. barebones).
« Last Edit: July 24, 2024, 08:38:22 am by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

Key-Real

  • Sr. Member
  • ****
  • Posts: 372
Re: which functions in the rtl to dummy
« Reply #3 on: July 24, 2024, 09:14:22 am »
What you imho should do is link against your custom SDK and use that SDK to implement the required FPC functionality using that SDK (normally it would be OS functionality but I guess that is lacking for PSx e.g. barebones).

But I have to deliver some .a libs.
On the other hand I will put thouse libs in any case in the RTL Folder.
Thouse libs are precompiled, no source just headers.

So You suggest to do it this way, OK I'll do that.

Key-Real

  • Sr. Member
  • ****
  • Posts: 372
Re: which functions in the rtl to dummy
« Reply #4 on: July 24, 2024, 09:23:36 am »
have somebody a list of functions I have to implement, pls?

Thaddy

  • Hero Member
  • *****
  • Posts: 16154
  • Censorship about opinions does not belong here.
Re: which functions in the rtl to dummy
« Reply #5 on: July 24, 2024, 09:37:36 am »
There is a wiki entry about writing a minimal system, but you know that already because several people already pointed you to that.
start here:
https://wiki.lazarus.freepascal.org/RTL_development_articles

And read the articles about embedded targets.
The best info is of course the compiler sourcecode, which everybody that wants to write a compiler read first.
« Last Edit: July 24, 2024, 09:43:31 am by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

 

TinyPortal © 2005-2018