using freepascal for osdev

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

using freepascal for osdev

Post by Meshounah »

due to my GCC woes i would like to use freepascal for os dev but my killer question is... how? from the ide i can choose many target platforms but raw binary is not one of them. :roll:
chik'n
Pavia
Posts: 23
Joined: Mon Jun 25, 2007 2:54 pm
Location: Russia

Post by Pavia »

it is easy.

You be able compiller to ELF, or Object File.
And use linker to get bin file.

For example.

fpc -Rintel kernel.pas
ld -o "kernel.bin" kernel.o
objcopy.exe -O binary "kernel.bin"

Last comand used for convert from PE to Binary.

I not used options "ld --oformat binary"
because windows ld have bug.
Sorry, my bed english. =)
Meshounah
Member
Member
Posts: 38
Joined: Sun Jun 24, 2007 6:48 pm

Post by Meshounah »

ok thank you it worked \:D/

another quick question where can i find objcopy?
chik'n
Post Reply