www.mikrocontroller.net

Forum: Mikrocontroller und Digitale Elektronik Turbo51 - Free Pascal compiler for 8051


Autor: funa (Gast)
Datum:

Bewertung
0 lesenswert
nicht 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!

Autor: Guido (Gast)
Datum:

Bewertung
0 lesenswert
nicht 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

Autor: Sebastian (Gast)
Datum:

Bewertung
0 lesenswert
nicht 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?

Autor: funa (Gast)
Datum:

Bewertung
0 lesenswert
nicht 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

Autor: Peter (Gast)
Datum:

Bewertung
0 lesenswert
nicht lesenswert
A really interesting compiler. But it would be even much greater, if you 
also AVR-uC could be supported..!

Autor: Peter -NL (Gast)
Datum:

Bewertung
0 lesenswert
nicht lesenswert
Too many advertising links all over the pages makes turbo51.com hardly 
useable.

Autor: funa (Gast)
Datum:

Bewertung
0 lesenswert
nicht lesenswert
I am sorry if ads cause trouble to you. I am offering the compiler for 
free. Therefore I have to find some other source of income.

Autor: funa (Gast)
Datum:

Bewertung
0 lesenswert
nicht 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_Custo...
http://www.atmel.com/dyn/corporate/view_detail.asp...

Autor: funa (Gast)
Datum:

Bewertung
0 lesenswert
nicht lesenswert
By the way, is there any bootloader support, enabling the programmer to
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.

Autor: Pieter (Gast)
Datum:

Bewertung
0 lesenswert
nicht 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

Autor: funa (Gast)
Datum:

Bewertung
0 lesenswert
nicht 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-inlin...
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.

Autor: funa (Gast)
Datum:

Bewertung
0 lesenswert
nicht 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
{$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

Die Angabe einer E-Mail-Adresse ist freiwillig. Wenn Sie automatisch per E-Mail über Antworten auf Ihren Beitrag informiert werden möchten, melden Sie sich bitte an.

Wichtige Regeln - erst lesen, dann posten!

  • Groß- und Kleinschreibung verwenden
  • Längeren Sourcecode nicht im Text einfügen, sondern als Dateianhang

Formatierung (mehr Informationen...)

  • [c]C-Code[/c]
  • [avrasm]AVR-Assembler-Code[/avrasm]
  • [code]Code in anderen Sprachen, ASCII-Zeichnungen[/code]
  • [math]Formel in LaTeX-Syntax[/math]
  • [[Titel]] - Link zu Artikel
  • Verweis auf anderen Beitrag einfügen: Rechtsklick auf Beitragstitel,
    "Adresse kopieren", und in den Text einfügen




Bild automatisch verkleinern, falls nötig
Bitte das JPG-Format nur für Fotos und Scans verwenden!
Zeichnungen und Screenshots im PNG- oder
GIF-Format hochladen. Siehe Bildformate.
Hinweis: der ursprüngliche Beitrag ist mehr als 6 Monate alt.
Bitte hier nur auf die ursprüngliche Frage antworten,
für neue Fragen einen neuen Beitrag erstellen.

Mit dem Abschicken bestätigst du, die Nutzungsbedingungen anzuerkennen.