![]() |
Forum Index : Microcontroller and PC projects : Pi Bare Metal
![]() ![]() |
|||||
Author | Message | ||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
What kernel is that? Is there one? If there is, where is it? What documentation? Is it suitable? What licence? John |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
The Raspberry Pi Imager program gives you as a default "A port of Debian Bullseys with the Raspberry Pi Desktop". Choosing "Other" gives you Raspberry Pi OS Lite (Bullseye 32-bit and 64-bit and Debian Buster (which is 32-bit, I believe) in versions with and without Desktop. I always use Lite with a PiZW or Z2W and access headless with SSH. Other OSs are available, and I think some not accessed by Imager. All of these Raspberry Pi images give access to GPIO through at least two methods--sysfs (which is deprecated but works (including with MMB4L)) and official? (semi-official?) userspace libgpiod, although the version of libgpiod which you get with sudo install libgpiod is limited compared to the libgpiod under development. The libgpiod under development can do a pretty good job of providing MMBasic GPIO under MMB4L (I've downloaded it and tested building it and MMB4L and believe it will do the job). Neither sysfs nor libgpiod requires root access. ~ Edited 2022-02-14 04:43 by lizby PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
There's no guarantee that sysfs will carry on working now, but there's a hell of a lot to do before the GPIO gets involved anyway. lol And, of course, neither system gives you bare metal access in the same way that other platforms do. The GPIO is still under control of the Broadcom chip. Edited 2022-02-14 04:59 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
lew247![]() Guru ![]() Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
If you actually checked out the links and documentation I linked to you'd have answered most of those questions yourself instead of asking the question As to the licence I don't understand this but maybe someone does from here Copyright (c) 2015, Raspberry Pi (Trading) Ltd All rights reserved. Redistribution. Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met: * This software may only be used for the purposes of developing for, running or using a Raspberry Pi device, or authorised derivative device manufactured via the element14 Raspberry Pi Customization Service * Redistributions must reproduce the above copyright notice and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Broadcom Corporation nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission. DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. I don't know the licence for this because I can't find it but as it's public and posted on Adafruit's website I assume it's ok to use? pi Zero w, Zero W 4, Pi 4B links to kernels Edit also found this Writing a "bare metal" operating system for Raspberry Pi 4 Edited 2022-02-14 07:24 by lew247 |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3378 |
I think "bare metal" on the pi (whatever that might mean) is a dead letter. I was talking about GPIO without root access on the Raspberry Pi released OSes. Re sysfs, while some things which are deprecated are phased out, others remain, but generally fall out of use because better ways to do things come along. I suspect that will be the case with sysfs access of GPIOs (because a lot of designs use this, including some non-pi subsystems of my own) (but I have no way of knowing whether or not that will actually be what happens). PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
https://wiki.lazarus.freepascal.org/Ultibo_core Michal Edited 2022-02-14 07:49 by Michal |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
I took a quick look but could not easily find it, thus my questions. The more I look the less viable this looks. I wish I had not bothered. John Edited 2022-02-14 08:21 by JohnS |
||||
lew247![]() Guru ![]() Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
A C++ Bare metal enviroment for the Pi with USB (32 and 64 bit) This link tells you in easy step by step details how to make a bare metal boot for the Pi 3 and blink an led using the GPIO Pi 4 Bare metal step by step Bare metal resources Datasheets for the Broadcom CPU's including GPIO registers BCM2835 Pi Zero BCM2837 Pi B3+ BCM2711 Pi 4 |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
Oh, you have the info, you have the PicoMite source on Github so all you need to do is put them together, lew. :) I know I won't be doing it. My love of C and C++ is similar to my love of being bashed round the head with a lump of 2x2. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
Feel free to keep raising it but there are few TBS members who could do it and fewer still with the time and probably none with the inclination |
||||
lew247![]() Guru ![]() Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
If I could understand it I would have a go, but considering I struggle with Basic I don't have any chance of that unfortunately |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
It's not the sort of job you take on unless you are already very familiar with the way the Raspberry Pi hardware works and are looking for the challenge to do just this. That's not going to be many people in the world. Almost everyone who wants to program a Pi will want to do it in Python under some linux or other. There have been several attempts to get BBC basic running "bare metal" on the Pi. I think all of them have been abandoned now. It'll never boot into basic as fast as a CMM2 (or even a PicoMite) anyway as the GPU has to start, sort out the hardware then boot the Broadcom chip and hand over control to it. Even a bare metal basic couldn't start until that point. RISC-OS booting BBC basic is probably as fast as you'll get, after all, you'll need graphics handling, keyboard recognition and a file system to do anything on the Pi unless you are going to rewrite all that stuff. I think the Pi 400 broke RISC-OS anyway. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
https://www.youtube.com/watch?v=7l2lzfapa88 Michal Edited 2022-02-14 21:20 by Michal |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7938 |
Not bad. It gives you an idea of the minimum possible time. :) The GPU/Broadcom boot is probably taking 1 to 1.5 of those seconds. Then the emulator has to be loaded. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Michal Senior Member ![]() Joined: 02/02/2022 Location: PolandPosts: 125 |
Here are a few examples: https://www.youtube.com/c/UltiboLive/videos Eg GPIO: https://www.youtube.com/watch?v=yfsuwbfyjgM Michal |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |