Author Topic: Baremetal Pascal dev. environment for RPi  (Read 12134 times)

0 Members and 1 Guest are viewing this topic.

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Baremetal Pascal dev. environment for RPi
« on: September 18, 2017, 06:51:36 pm »
I made a quick search on the subject, but couldn't find this on the eevblog so I thought I share. I do not have any connection to Ultibo, other than coding in pascal at times.

What I have lazely looked in to it, it seems to be open source. Backed up with commercial entrepreneur.

www.ultibo.org

- Cheers
PS. For other OSes than Windows, look for Ultibo wiki for instructions (Linux, macOS, Rasbian)



From Ultibo FAQ:
Quote
What is Ultibo?
Ultibo core is an embedded or bare metal development environment for Raspberry Pi. It is not an operating system but provides many of the same services as an OS, things like memory management, networking, filesystems and threading plus much more. So you don’t have to start from scratch just to create your ideas.
What can Ultibo be used for?
Pretty much anything, you can use Ultibo for making projects, for learning and experimenting or even for teaching. All you need is a bit of imagination to come up with endless possible uses.
How much does it cost?
Ultibo core is free and open source software. You can use it without cost, you can modify it and you can share it with others.
Is Ultibo based on Linux?
No, Ultibo core is a complete embedded development environment written specifically for creating applications with small single board computers. It uses many concepts from general operating system design and even borrows information from Linux, but Ultibo is not based on anything else.
Can I install my favorite apps in Ultibo?
Not really, Ultibo is not a general purpose operating system. You could port your favorite apps to run under Ultibo but you cannot download an existing app and just run it.
Why would I use Ultibo instead of Linux or Windows IoT?
That’s up to you but sometimes it makes sense for a particular project to not have the extra overhead of a full operating system. Just as both Linux and Windows have their place, so does Ultibo.
Can I contribute to Ultibo?
Yes, there are many possible ways to contribute, share your projects so that others can learn from them, write code to support a missing feature and submit it or just answer questions in the forums. Anything you do will help make Ultibo what you want it to be.
Why Raspberry Pi, why not (name of other board)?
Raspberry Pi is clearly the market leader when it comes to small single board computers for hobby and educational use. We fully intend for Ultibo to support other boards, which ones and when depends on what the community shows interest in.

https://youtu.be/TCfpb8M0WeQ

Edit2. Barebones to Baremetal .... mixing words this evening.  ???
« Last Edit: September 21, 2017, 11:42:57 pm by Vtile »
 
The following users thanked this post: thermistor-guy

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
Re: Barebones Pascal in RPi
« Reply #1 on: September 18, 2017, 07:21:48 pm »
Why do they show a picture of (MS)windows if its for a rpi?
 

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: Barebones Pascal in RPi
« Reply #2 on: September 18, 2017, 07:25:12 pm »
Why do they show a picture of (MS)windows if its for a rpi?
Ah, sorry I notice now I have error in the subject. It should indicate that it is FOR not IN RPi. The Ultibo editions of IDE and compiler (free pascal) that is used runs on this case in Windows, but compiles RPi native code.

Edit. Hopefully the title / subject is now more informative.
« Last Edit: September 18, 2017, 07:32:14 pm by Vtile »
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4051
  • Country: nz
Re: Barebones Pascal dev. environment for RPi
« Reply #3 on: September 18, 2017, 07:34:23 pm »
It's nice to see a Pi boot up in a couple of seconds. That's useful.

Remarkably, the site, including the FAQ, doesn't mention the BIGGEST prerequisite! "Do I need anything else to get started?" "You’ll need a Raspberry Pi of course and an SD card, other than that everything you need to start creating apps is included in the download."

Ahahaha.

The author apparently hasn't even noticed that you need a Windows PC. Which I don't have, and have never had.

The downloads page has only .exe.
 
The following users thanked this post: cdev

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: Barebones Pascal dev. environment for RPi
« Reply #4 on: September 18, 2017, 07:35:53 pm »
It's nice to see a Pi boot up in a couple of seconds. That's useful.

Remarkably, the site, including the FAQ, doesn't mention the BIGGEST prerequisite! "Do I need anything else to get started?" "You’ll need a Raspberry Pi of course and an SD card, other than that everything you need to start creating apps is included in the download."

Ahahaha.

The author apparently hasn't even noticed that you need a Windows PC. Which I don't have, and have never had.

The downloads page has only .exe.
Take the ultibo source and compile it to Linux or other Freepascal & Lazarus supported environments, including amigaOS4 (or what it were)  ::).
« Last Edit: September 18, 2017, 07:37:56 pm by Vtile »
 

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
Re: Barebones Pascal dev. environment for RPi
« Reply #5 on: September 18, 2017, 09:00:21 pm »


The author apparently hasn't even noticed that you need a Windows PC. Which I don't have, and have never had.


Or the time to keep a window box running, I gave up on that a long time ago.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: us
Re: Baremetal Pascal dev. environment for RPi
« Reply #6 on: September 18, 2017, 11:27:49 pm »
Very nice!

If I can get to the RPi peripherals, I would really like to give it a go.

Better yet, the Pascal P4 compiler (original Niklaus Wirth CDC 6400 version) could be ported to the power of the RPi.  That would be awesome!  It would require 64 bit words to accommodate the original 60 bit set size.  Should be doable...  Add a few system calls and replicate the entire setup.

I have spent time with FreePascal and it works very well.  Somewhere around here, I still have Turbo Pascal although I haven't used it since I wrote a MicroMouse program 12 or more years ago.

 

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: Baremetal Pascal dev. environment for RPi
« Reply #7 on: September 19, 2017, 03:39:00 am »
I have nothing against Pascal but it seems a rather odd choice for a new 21st century generation of developers. 40 years ago it would be a more obvious choice. It's a bit of an antique now. A bit better than Fortran or COBOL but why not BLISS or Modula-2 or Simula-67? Now I'd get excited if it was LISP.

I'd have thought C++ or Python a language choice that would increase the chances of capturing a contemporary audience.

Yeah it's an odd choice, but I will also make the point that it's a shame that it is an odd choice :)

If Borland et-al weren't so flipping incompetent at managing it, I think (Object) Pascal would still be _reasonably_ popular.
In its day, Delphi hit a sweet spot of speed vs development productivity.
It's (was) much simpler than C++ and was compiled so is much faster than Python for example.

 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: us
Re: Baremetal Pascal dev. environment for RPi
« Reply #8 on: September 19, 2017, 03:40:37 am »
I have used Fortran quite a bit the last couple of years and it was my first language back in '70.  I still prefer it for numeric kinds of things.
I don't know anything about BLISS or Simula67 (or Ruby or Perl or Lisp or Forth or....).  Modula-2 is ok but I would rather go even further back and take a look at Algol 68.

C++ brings nothing to my dance.  I like and use C most of the time but I avoid C++ at every opportunity.  Just never warmed up to OOP.  I don't see the application in embedded programming.

In my view, the best book on algorithms and data structures ever written is "Algorithms + Data Structures = Programs" by Niklaus Wirth and it is all done in Pascal.  Pascal was developed as a teaching language and in this it excels.  Modula 2 is the first upgrade and I believe Oberon is the current flavor.  There is an embedded version of Oberon for ARM and I used a version of Pascal with an 8051 clone.

There's just something 'pretty' about Pascal.  It just flows neatly.  Concepts I appreciate but can't explain.  I just like code that looks pretty on the page.
 

Offline thermistor-guy

  • Frequent Contributor
  • **
  • Posts: 381
  • Country: au
Re: Baremetal Pascal dev. environment for RPi
« Reply #9 on: September 19, 2017, 05:02:43 am »
... Modula-2 is ok but I would rather go even further back and take a look at Algol 68...

Algol68 is available for Linux, so it should build on an rpi (for example): https://jmvdveer.home.xs4all.nl/algol.html
 

Offline krho

  • Regular Contributor
  • *
  • Posts: 223
  • Country: si
Re: Baremetal Pascal dev. environment for RPi
« Reply #10 on: September 19, 2017, 05:24:33 am »
Pascal was developed as a teaching language and in this it excels.  Modula 2 is the first upgrade and I believe Oberon is the current flavor.

I've know Delphi/Pascal before I entered the collige and there they forced Oberon on us. I mus say that its rules are :emoji that pukes.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Baremetal Pascal dev. environment for RPi
« Reply #11 on: September 19, 2017, 06:30:05 am »
Pascal -> Modula2 -> Oberon
On the Evolution Line  :D
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Baremetal Pascal dev. environment for RPi
« Reply #12 on: September 19, 2017, 07:06:22 am »
Another device where I appreciate FreePascal is the pretty old GBA
GameBoyAdvance, based on ol StrongARM. It's good, and nice!
 

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: Baremetal Pascal dev. environment for RPi
« Reply #13 on: September 19, 2017, 07:42:53 am »
I think the pascal here deserves a small explanation. It is indeed one of the "old languages", just like is C-language, in fact the C-language is only a few years younger. Indeed pascal at first were academic "teaching language", but early on converted to more usefull general language in hands of more engineering minded people. The general usability of it shows in the fact that the whole developing toolchain of freepascal compiler and Lazarus IDE are written and build with pascal itself (a few million lines of code). Also Wozniaks first Apple computers were using OSes written in one extented Pascal dialects (Apple Pascal). The pascal have long track record of doing stuff, most notably the early Borland era from 80's through early millenium (Borland Turbo Pascal and Delphi), until the mastermind behind the Borland compilers were hired by MS (reasons, IDK).

Indeed the (Object) Pascal is a bit of "odd child" these days, but it is still living just under the mainstream languages with boutique level backing (compared to mainstream languages, which do have huge corporative support / maintenance / development ), it tells something for its usability.

This Ultibo seems to be modification of standard Freepascal & Lazarus toolschain, which by nature is cross-compiling environment that can target (and run) awfully lot of processors and OSes. The Pascal used today is mainly Borland based Object Pascal (Both Turbo&Delphi flavours).

One of the best features (for me atleast) is that the strong(ish) typing leads to compiler that is fast and catch most of the silly programming errors in build phase.
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: us
Re: Baremetal Pascal dev. environment for RPi
« Reply #14 on: September 19, 2017, 03:15:51 pm »
Five minutes with Lazarus IDE and it's time to click the Uninstall button.  On Win 10, I get a detached Messages window, a detached Editor window and the Lazarus toolbar at the top with no apparent way to put the pieces together as I would have with Eclipse.  They're all just flopping in the breeze with my desktop showing through.  I suppose there is some reason for this but my attention span is too short to figure it out.

I can use FPC with Eclipse although I might not have all the features of Lazarus in terms of generating forms.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Baremetal Pascal dev. environment for RPi
« Reply #15 on: September 19, 2017, 03:27:22 pm »
Five minutes with Lazarus IDE and it's time to click the Uninstall button.  On Win 10, I get a detached Messages window, a detached Editor window and the Lazarus toolbar at the top with no apparent way to put the pieces together as I would have with Eclipse.  They're all just flopping in the breeze with my desktop showing through.  I suppose there is some reason for this but my attention span is too short to figure it out.

I can use FPC with Eclipse although I might not have all the features of Lazarus in terms of generating forms.

Thats because you know zero to nothing how Delphi have worked.  So stop bitching, it is behaving correctly. The top panel with menus and components, left the object inspector, and the source codes and the form designer if you hit F12. Sigh!  >:(
 

Offline krho

  • Regular Contributor
  • *
  • Posts: 223
  • Country: si
Re: Baremetal Pascal dev. environment for RPi
« Reply #16 on: September 19, 2017, 03:47:10 pm »
as @Yansi said. This is the best behavior of Delphi. Later on when they joined everything together it just becomes a mess. and you have no place anymore.
You need to learn a few shortcuts to bring the inspector and some other window to  front sometimes otherwise it stays out of the way 99% of the time Without collapsing the docks and all this "shit"
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: us
Re: Baremetal Pascal dev. environment for RPi
« Reply #17 on: September 19, 2017, 05:16:33 pm »

Thats because you know zero to nothing how Delphi have worked.

Absolutely correct! 

I could never afford to buy Delphi and I don't recall that it was ever 'free'.  I stopped after Turbo Pascal and Borland Pascal back a long time ago.

Looking at the prices for Embarcadero Delphi shows it is still out of my reach.  There seems to be a Starter version that is free.  I haven't pursued it...

 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Baremetal Pascal dev. environment for RPi
« Reply #18 on: September 19, 2017, 05:26:37 pm »
I could never afford to buy Delphi and I don't recall that it was ever 'free'.  I stopped after Turbo Pascal and Borland Pascal back a long time ago.

Wrong  :D

Delphi for Windows v1 and v2 were released for free in 2006.
Do you want a copy? Let me know (it comes set in UK language)

It's currently installed on a Windows95 emulator under my IRIX on my SGI workstation (UNIX).
while TurboPascal v7 + TurboVision are installed under IBM-DOS-v7 on my RISCOS v4.39 RISCPC machine (Strong ARM 200Mhz based).

Of course they are not installed on my job-laptop because they are not used for business.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Baremetal Pascal dev. environment for RPi
« Reply #19 on: September 19, 2017, 05:33:03 pm »
Oh, about that: RISCPC runs on modern RPI, and it costs ~50 euro.
It's faster than linux since it's lighter (even if ... less robust )

anyway, it also comes with a super fast dos-emulator (optimized for RISCOS)
which may allow people to install TurboPascal-v7 into a DOS virtual machine.

Just an idea  :-//
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9894
  • Country: us
Re: Baremetal Pascal dev. environment for RPi
« Reply #20 on: September 19, 2017, 07:11:05 pm »

Delphi for Windows v1 and v2 were released for free in 2006.
Do you want a copy? Let me know (it comes set in UK language)


That explains it!  I stopped looking some time in the early to mid '90s.  Never gave it another thought until today.
Thanks for the kind offer but I think I have enough irons in the fire.

 

Online NorthGuy

  • Super Contributor
  • ***
  • Posts: 3148
  • Country: ca
Re: Baremetal Pascal dev. environment for RPi
« Reply #21 on: September 19, 2017, 08:12:50 pm »
Delphi had a wonderful compiler. But it was bundled with over-bloated VCL library and very buggy IDE, so no one has noticed.
 

Offline VtileTopic starter

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: fi
  • Ingineer
Re: Baremetal Pascal dev. environment for RPi
« Reply #22 on: September 19, 2017, 08:37:35 pm »
Ok this have now derailed from OT a bit, but the FPC should be Turbo Pascal 6* and Delphi 6* compatible and in several platforms. Freepascal is better documented, but the VCL equivalent library is a bit raw in edges.

In my mind the Ultibo is a nice project an allow easy jumping to baremetal programming with ease as there is option to use the readily made key HW libraries like communication and consoles. This with easy to write language and error trapping fast compiler. Just the parts one wants when someone wants to start to learn baremetal programming and the language also is capable of full blown system as the speed is good. Only theoretically slightly slower ** than C and many times more memory efficient.

* from memory.. The delphi VCL have a few places where it is not 100% for multiplatform reasons. FPC also do have freevision library and multiplatform textmode IDE (borland clone) build in if the Lazarus suxs.

** as pascal might be less optimised in speedtests, because of not being mainstream and kewl.
« Last Edit: September 19, 2017, 08:48:28 pm by Vtile »
 

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
Re: Baremetal Pascal dev. environment for RPi
« Reply #23 on: September 19, 2017, 08:42:26 pm »
Pascal isn't a bad language, I've used it here and there.

I see Ultibo does support more than windows but you have to dig for it.  That information needs put on the download page so it doesn't look like its just windows only, thats a big turn off for any project as i don't have the resources to maintain a windows system.
 
The following users thanked this post: Vtile

Offline hendorog

  • Super Contributor
  • ***
  • Posts: 1617
  • Country: nz
Re: Baremetal Pascal dev. environment for RPi
« Reply #24 on: September 19, 2017, 08:49:26 pm »
Delphi had a wonderful compiler. But it was bundled with over-bloated VCL library and very buggy IDE, so no one has noticed.

Actually the VCL was a quite revolutionary feature of Delphi, and was optional.

You could write tiny bare metal apps without the VCL if you chose.
Or you could compile it all into a single exe/dll for easy deployment.
Or you could separate the library from the exe and have a small exe and a single large library which you deployed once (this might have been in a later version)

When Delphi came out it was competing against VB. While VB was easy to use, it was very limited in comparison - with it's VBX (later OCX) based library. Delphi had performance and flexibility in the same class as C, and ease of use in the same class as VB.

The chief architect of the VCL went to Microsoft and became the chief architect of C#, he was no mug.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf