Turbo51 - Free Pascal compiler for 8051

Gast #1028798
Lesenswert?

Sorry for language, I hope you will understand.

For those who use 8051 and like programming in Pascal please take a look 
at Turbo51 - a free Pascal compiler for the 8051 family of 
microcontrollers:

http://turbo51.com

It features a fast single pass optimizing compiler, Borland Turbo Pascal 
7 syntax, full floating point support, mixed pascal and assembler 
programming, full use of register banks, advanced multi-pass optimizer, 
smart linker, generates compact high quality code, output formats 
include binary, Intel HEX, OMF-51 and assembler source. Source level 
debugging possible with extended absolute object file.

Give it a try!
Gast #1028847
Lesenswert?

Hi funa,

I already found turbo51 but missing a reasonable
documentation it's very hard to get started with it.
Will it work with a 8052 without external RAM? I guess
I've got to search the demos about that. Eventually
I will try to feed your doc-pages through Acrobat and
test the result.

For the moment: Thanks for great work! But still a
lot of work is waiting ;-).

Guido
Gast #1028850
Lesenswert?

I already discovered your site a few days ago. The pascal comppiler 
looks promising, and I'll probably try it out once I'ver built myself a 
suitable piece of hardware - have been mostly using AVRs recently, but 
since I started programming with Turbo Pascal, and working with 
microcontrollers with the 80C535, this could make for a nice "back to 
the roots" experience. If I like it, I might possibly use it in 
real-world applications - An AT98S52 doesn't cost much more than an 
ATtiny2313, after all.

By the way, is there any bootloader support, enabling the programmer to 
write code that doesn't start at address 0 and such?
Gast #1029839
Lesenswert?

Hello everybody,

Regarding the docs: I will prepare a PDF document with complete 
documentation immediately after I will finish some urgent features I 
would like to implement, like OMF object file import and various calling 
conventions (to use existing libraries written in C).

If you are familiar with Turbo Pascal then you should be also familiar 
with Turbo51. The syntax is VERY similar (almost identical).

If there is ANY particular question or problem feel free to ask, please 
use Turbo51 contact page.

Regarding code that doesn't start at address 0: I am already working on 
this, if somebody is interested for a demo version with this feature 
please go to Turbo51 contact page and send me a mail.

Igor
Gast #1034161
Lesenswert?

Regarding support for AVR microcontrollers:

Turbo51 is a Pascal compiler dedicated to 8051 microcontrollers (Silabs, 
NXP, Atmel,...). It is very tightly connected to 8051 specific features. 
After I will finish it I will reconsider a compiler for AVR. But the AVR 
future is not clear now. Read this information:

http://www.atmel.com/corporate/documents/SLL_Customer_Letter.pdf
http://www.atmel.com/dyn/corporate/view_detail.asp?FileName=Micro_ON_10_2.html
Gast #1037474
Lesenswert?

1
By the way, is there any bootloader support, enabling the programmer to
2
write code that doesn't start at address 0 and such?

Now with Turbo51 version 0.1.3.2 it is possible.
See doc pages for details.
Gast #1037630
Lesenswert?

moin moin,

funktioniert ja schon ganz gut:-(

"otschen charascho"

Nur meinen Record will er nicht :-)

111: Achse = Record
112:   Step      : Integer;
113:   Bres      : LongInt;
114:   isLeading : Boolean;
115:   Sig       : Byte;
116:   End;
(*
Turbo51 version 0.1.3.2, Copyright 2000 - 2008 Igor Funa
TEST.PAS (114): Error 220: Boolean fields are not allowed.
    isLeading : Boolean;(*Byte;*)
                      ^
*)

In Delphi und in meinem Macroassembler geht das so.

Mit Gruß
Pieter
Gast #1038140
Lesenswert?

Boolean variables use BIT (boolean) memory in 8051. If you would like to 
use boolean variables in DATA or XDATA memory (or even in CODE memory as 
typed constant) then you have two possibilities:
1) use type ByteBool (WordBool and LongBool are also possible), this 
will occupy one byte (or 2 for WordBool and 4 for LongBool)
2) use sets. See some examples at
http://turbo51.com/documentation/8051-pascal-inline-procedures
Each set element can be boolean variable and will occupy only one bit in 
DATA or XDATA memory, you have 8 boolean variables in on byte.

Hope this answers your question.

You can use the contact form on Turbo51 site for the fastest response on 
any problem or question.
Gast #1048741
Lesenswert?

Just a reminder for all those who have used Turbo51 before version 
0.1.3.2 and now have some trouble using the latest version:

In version 0.1.3.2 the syntax for $M directive was changed (to be able 
to set CODE memory start address). Compiler directive $M has now syntax
1
{$M <CODE Start>, <CODE Size>, <XDATA Start>, <XDATA Size>, <Heap Size> }

Please make sure the $M directive is updated with the new syntax.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren