Fadi1986
Posts: 3
Joined: Fri Jun 23, 2017 11:03 am

Bare Metal Programming Language

Fri Jun 23, 2017 11:13 am

Hi ..

Is there any programming languages for Raspberry Pi that is Bare Metal, just to do the basic tasks like GPIO, drawing a pixel to screen .. i.e. just like in the days of BBC Micro and C64 when you had BASIC and Assembly to access memory and graphics chip??
Actually I found DexBasic but the documentation on it is gone and you can't use it without documentation..

Any Suggestions ..

I prefer simplicity and practicality, just like in the days of BASIC on 8-Bit machines..not like these days you use frameworks and other technologies that are just black boxes you don't know what is happening inside ..

Thanks in advance ..

LdB
Posts: 1210
Joined: Wed Dec 07, 2016 2:29 pm

Re: Bare Metal Programming Language

Fri Jun 23, 2017 12:31 pm

Ultibo would fit that bill it's just pascal and it is all up and running
https://ultibo.org/

User avatar
Laurens-wuyts
Posts: 716
Joined: Wed Aug 21, 2013 7:35 pm
Location: Belgium
Contact: Website

Re: Bare Metal Programming Language

Fri Jun 23, 2017 12:33 pm

You can use C or assembler if you like.
http://www.valvers.com/open-software/ra ... g-in-cpt1/
http://www.cl.cam.ac.uk/projects/raspbe ... orials/os/

These tutorials aren't fully compatible with the newest Pi, but there are a lot of solutions on this forum.

Laurens

User avatar
Gavinmc42
Posts: 3632
Joined: Wed Aug 28, 2013 3:31 am

Re: Bare Metal Programming Language

Fri Jun 23, 2017 1:23 pm

This one is not bad if you can do C
https://github.com/rsta2/circle

But I mostly use Ultibo on Windows or Linux.
The Pascal is a bit higher level and there is lots of Free Pascal/Delphi code that can sometimes just work.

The Graphic console can do framebuffer, even I can use it for simple plotting of data etc.
pik33 is working on a full Window Manager.
https://ultibo.org/forum/viewtopic.php? ... 4&start=70
He is using DMA and assembler for speed.

With the qemu version you can do virtual baremetal too.
Oh, and some progress has been made in getting Aarch64 bit and NEON support.
More things still to get working, but I have been making gadgets with it for a year already.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Fadi1986
Posts: 3
Joined: Fri Jun 23, 2017 11:03 am

Re: Bare Metal Programming Language

Fri Jun 23, 2017 1:24 pm

Thanks for your suggestions ..

Actually, I got my Pi connected to CRT TV, and you know how low res that can be, I saw ultibo, and it needs Hi res TV Monitor..

For C and Assembly tutorials, they are too low level, I need something like BASIC or C to deal with GPIO or Graphics but with higher level statements without needing to memorize memory addresses and dealing with this...you know just for fun and practicality just like C64, BBC Micro, MSX and the 8-Bit bunch

Thanks guys

dwelch67
Posts: 955
Joined: Sat May 26, 2012 5:32 pm

Re: Bare Metal Programming Language

Fri Jun 23, 2017 4:47 pm

that is what baremetal is, programming addresses you read in the manual just like the C64/VIC20 days with PEEK and POKE.

User avatar
rpdom
Posts: 15014
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Bare Metal Programming Language

Fri Jun 23, 2017 4:55 pm

Have you tried RISCOS? It has BBC Basic with all the old PLOT commands and a few more.

Fadi1986
Posts: 3
Joined: Fri Jun 23, 2017 11:03 am

Re: Bare Metal Programming Language

Fri Jun 23, 2017 6:44 pm

With a CRT TV, I can not use OS like RISC OS or Raspbian, it's just too High Res for such TV, I think I will stick with C64 (Combian64) Distro that is a VICE emulator that works on little boot time ..

For Pi Assembly and Baremetal the tutorials are very good but sometimes doesn't work on Pi3, and I would use something like C64 or MSX or even in the days of Turbo C++ when we used to write inline Assembly along with C++ ..

User avatar
rpdom
Posts: 15014
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Bare Metal Programming Language

Fri Jun 23, 2017 10:48 pm

Raspbian Lite (without desktop) works just fine at the resolutions of a CRT TV or any other display using the composite video out.

RISC OS should be able to cope. I had a RISC OS device that was designed to work with CRT TVs. It was a little fuzzy, but I could write and use code on it.

User avatar
Gavinmc42
Posts: 3632
Joined: Wed Aug 28, 2013 3:31 am

Re: Bare Metal Programming Language

Sat Jun 24, 2017 5:18 am

Actually, I got my Pi connected to CRT TV, and you know how low res that can be, I saw ultibo, and it needs Hi res TV Monitor..
Ultibo does not need high res HDMI monitors.
Just a few weeks ago I plugged a 4.3" 480x278 rear view camera monitor into a Pi running Ultibo.
Without changing any settings it just worked, that was the first time I plugged a Pi into a TV RCA monitor.
https://ultibo.org/forum/viewtopic.php? ... view#p2226

It seems start.elf is now smart enough to detect when monitor or tv or nothing is plugged in.
It defaults to 640x480 when nothing is plugged in, I took screenshots without a screen.
Just for fun, I setup config.txt for a 4K screen and got 4K screenshots from the frame buffer with nothing plugged in.

You can configure the framebuffer for 1920x1080 and then plug it into a different res monitor, if the monitor is smart enough it will scale.
https://ultibo.org/forum/viewtopic.php? ... t&start=20

Screens down to 2.2" TFT 320x240 have been tested.
Plus there is font support for most types.

One thing I noticed about the piCore desktop is for the same res monitor is there just looks like there is more space compared to Raspbian.

Return to “Bare metal, Assembly language”