Power & Source of Big Ideas

bare metal project

Moderators: chensy, FATechsupport

There is a "bare metal" subsection on the RaspberryPI forums that should deal with the topics and processes that you need to understand and use.
The "bare metal" section in the Raspberry Pi forum can give you some ideas on how-to program an ARM CPU. But for programming the Allwinner SoC we need to have details on how to create a startup.S (or similar). The ideal option is not using the U-Boot loader and have our own 'bare metal' loader. Any ideas are much appreciated.
rpidmx512 wrote:
The "bare metal" section in the Raspberry Pi forum can give you some ideas on how-to program an ARM CPU. But for programming the Allwinner SoC we need to have details on how to create a startup.S (or similar). The ideal option is not using the U-Boot loader and have our own 'bare metal' loader. Any ideas are much appreciated.


Try here:

http://linux-sunxi.org/Main_Page
https://forum.armbian.com/forum/4-development/

The above is mostly Linux, it does not give the details for baremetal programming.

I’ve found the following:
https://github.com/dwelch67/allwinner_s ... /master/H3
https://github.com/trebisky/orangepi {Allwinner H3}

Both are still using U-Boot.
rpidmx512 wrote:

The above is mostly Linux, it does not give the details for baremetal programming.

I’ve found the following:
https://github.com/dwelch67/allwinner_s ... /master/H3
https://github.com/trebisky/orangepi {Allwinner H3}
FileZilla Malwarebytes Rufus
Both are still using U-Boot.

The "bare metal" section in the Raspberry Pi forum can give you some ideas on how-to program an ARM CPU. But for programming the Allwinner SoC we need to have details on how to create a startup.S (or similar). The ideal option is not using the U-Boot loader and have our own 'bare metal' loader. Any ideas are much appreciated.
JAGITA wrote:
rpidmx512 wrote:

The above is mostly Linux, it does not give the details for baremetal programming.

I’ve found the following:
https://github.com/dwelch67/allwinner_s ... /master/H3
https://github.com/trebisky/orangepi {Allwinner H3}

Both are still using U-Boot.

The "bare metal" section in the Raspberry Pi forum can give you some ideas on how-to program an ARM CPU. But for programming the Allwinner SoC we need to have details on how to create a startup.S (or similar). The ideal option is not using the U-Boot loader and have our own 'bare metal' loader. Any ideas are much appreciated.


I have a complete baremetal environment here -> https://github.com/vanvught/rpidmx512
This includes: I2C, SPI, Ethernet, GPIO

I still use U-Boot. This is basically the Allwinner supported method. I am not eager to invent the wheel in writing my own SPL.
http://linux-sunxi.org/Boot_Process
Try OpenBSD for a really interesting way to learn old school where Makefile is 'it'
https://www.openbsd.org mirrors https://www.openbsd.org/ftp.html
https://www.openbsd.org/arm64.html https://www.openbsd.org/armv7.html
is simpler than Linux, especially when dealing with systemd and all the dross that has become attached to Linux.
Load up snapshot openbsd on a pc, download the install files from
https://mirror.aarnet.edu.au/pub/OpenBS ... ots/arm64/
https://mirror.aarnet.edu.au/pub/OpenBS ... ots/armv7/
look through INSTALL.arm64 or INSTALL.armv7 then grab
https://mirror.aarnet.edu.au/pub/OpenBS ... rts.tar.gz
https://mirror.aarnet.edu.au/pub/OpenBSD/6.7/sys.tar.gz and src.tar.gz
sys has the kernel build system to build /bsd (kernel) and /bsd.rd (the installer)
src has the build system for a basic install
ports is the build system everything
Patch and cross compile enough to get it up and running on your bare metal then native compile what you want.
I've just about finished nanopi-neo-air and I'm about to embark on nanopc-t4, then submit the patches to OpenBSD for inclusion in "current".
bigtreeman wrote:
Try OpenBSD for a really interesting way to learn old school where Makefile is 'it'
https://www.openbsd.org mirrors https://www.openbsd.org/ftp.html
https://www.openbsd.org/arm64.html https://www.openbsd.org/armv7.html
is simpler than Linux, especially when dealing with systemd and all the dross that has become attached to Linux.
Load up snapshot openbsd on a pc, download the install files from
https://mirror.aarnet.edu.au/pub/OpenBS ... ots/arm64/
https://mirror.aarnet.edu.au/pub/OpenBS ... ots/armv7/
look through INSTALL.arm64 or INSTALL.armv7 then grab
https://mirror.aarnet.edu.au/pub/OpenBS ... rts.tar.gz
https://mirror.aarnet.edu.au/pub/OpenBSD/6.7/sys.tar.gz and src.tar.gz
sys has the kernel build system to build /bsd (kernel) and /bsd.rd (the installer)
src has the build system for a basic install
ports is the build system everything
Patch and cross compile enough to get it up and running on your bare metal then native compile what you want.
I've just about finished nanopi-neo-air and I'm about to embark on nanopc-t4, then submit the patches to OpenBSD for inclusion in "current".


Baremetal programming has nothing to do with old school and/or Makefile.
In todays world the baremetal programming environment is based on Modern C++ with cmake.

In baremetal your write your own startup routine and low-level devices firmware. Preferable based on CMSIS. For the latter it would be great when AllWinner would provide packages.

Of course you have the option to write your own Ethernet stack, but mostly lwIP is used.
The same applies for FAT (and others); you can write your own, but mostly FatFS is used.

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 3 guests