bare metal Raspberry Pi Zero port

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
User avatar
boochow
Posts: 30
Joined: Sat Dec 16, 2017 9:36 am

Re: bare metal Raspberry Pi Zero port

Post by boochow » Wed Aug 01, 2018 11:31 pm

dhylands wrote:
Wed Aug 01, 2018 10:50 pm
The fact that x remains defined tell me that the repl isn't being soft-reset when doing the ls command. (this esp32 has the loboris port on it) If I press Control-D on the esp32 repl, and then try print(x) it fails to find x.
Wow. Amazing.
Actually, I did the completely same test with you on the latest build downloaded from Micropython home page.
The result was same as the stm32's case, all of the repl context was disappeared after soft reboot.
So, this seems to be a loboris port feature. I will test the port tonight...

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: bare metal Raspberry Pi Zero port

Post by OutoftheBOTS_ » Thu Aug 02, 2018 5:06 am

I do remember Lorboris saying something about that the ESP32 native soft reset doesn't reset everything just restarts the ESP32 without wiping RAM and he added some code that so that control-D will wipe everything.

loboris
Posts: 344
Joined: Fri Oct 02, 2015 6:19 pm

Re: bare metal Raspberry Pi Zero port

Post by loboris » Thu Aug 02, 2018 8:18 am

In my MicroPython ESP32 port the reset with CTRL_D is only simulated while in raw REPL to enable running rshell without the real reset. It just resets the raw REPL.
look at the source.

By the way, this is quite an interesting project. Have you looked at the Ultibo project? You could find some interesting information about bare metal drivers implementation there.

User avatar
boochow
Posts: 30
Joined: Sat Dec 16, 2017 9:36 am

Re: bare metal Raspberry Pi Zero port

Post by boochow » Thu Aug 02, 2018 10:05 pm

Thanks @loboris @OutoftheBOTS_ now I understand what's going on in the loboris port.
loboris wrote:
Thu Aug 02, 2018 8:18 am
In my MicroPython ESP32 port the reset with CTRL_D is only simulated while in raw REPL to enable running rshell without the real reset. It just resets the raw REPL.
look at the source.
Did you make this modified version of pyexec_raw_repl() to use rshell? or are there any other reasons to avoid resetting MicroPython when CTRL-D is received in raw repl?
loboris wrote:
Thu Aug 02, 2018 8:18 am
By the way, this is quite an interesting project. Have you looked at the Ultibo project? You could find some interesting information about bare metal drivers implementation there.
Yes, I have looked at many bare metal projects including ultibo. In fact, I modified csud USB driver referring to this discussion to detect detaching a USB keyboard from Raspberry Pi zero USB port.

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: bare metal Raspberry Pi Zero port

Post by OutoftheBOTS_ » Mon Aug 06, 2018 10:25 pm

@boochow

Not sure if you have seen these http://www.orangepi.org/orangepizero/

It has a QUAD core ARM cortex A7 chip with XR819, IEEE 802.11 b/g/n WIfi chip in a form factor of 45mm x 48mm delivered for under $15US

There is also a slightly more expensive version with 8GB of EMMC flash on board and also a few other features in same size form factor https://www.aliexpress.com/store/produc ... 49806.html

User avatar
boochow
Posts: 30
Joined: Sat Dec 16, 2017 9:36 am

Re: bare metal Raspberry Pi Zero port

Post by boochow » Tue Aug 07, 2018 3:32 pm

@OutoftheBOTS_

Yes, there are some All-Winner chip based boards similar to Raspberry Pi.
Maybe it is not so difficult to port MicroPython itself to these boards.
However, as far as I know, their bare metal codes and technical information are very limited in contrary to Raspberry Pi.
So, I'm afraid that implementing modules and classes for peripherals such as I2C, SPI, etc. would take much effort.

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: bare metal Raspberry Pi Zero port

Post by OutoftheBOTS_ » Tue Aug 07, 2018 9:28 pm

However, as far as I know, their bare metal codes and technical information are very limited in contrary to Raspberry Pi.
So, I'm afraid that implementing modules and classes for peripherals such as I2C, SPI, etc. would take much effort.
Ok I was hoping that maybe they would be better documented especially the wifi.

User avatar
boochow
Posts: 30
Joined: Sat Dec 16, 2017 9:36 am

Release 1.0.0

Post by boochow » Sat Nov 24, 2018 6:31 am

I have placed pre-compiled binary as release 1.0.0.

https://github.com/boochow/micropython- ... tag/v1.0.0

Now the SD card is writable and mounted on `/sd` at boot time. You can use `rshell` definitely.

`bootcode.bin` and `start.elf` are necessary but not included. Please download them from https://github.com/raspberrypi/firmware ... aster/boot.

Also included in the zip archive are `boot.py`, `main.py`, and some library files but they are not mandatory.

If you do not have any serial interface devices for connecting to Pi's UART and still want to try this, download USB enabled version to use any USB keyboard and uncomment the comment-outed lines in the main.py to duplicate micropython's REPL screen to Pi's HDMI display output.

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: bare metal Raspberry Pi Zero port

Post by OutoftheBOTS_ » Sun Apr 14, 2019 9:48 pm

Have you seen this board with a Allwinner V3s Arm Cortex A7 https://www.banggood.com/Lichee-Pi-Zero ... rehouse=CN

It has docs here https://github.com/Squonk42/V3s_Documentation

safetyfactorman
Posts: 28
Joined: Sat Jan 24, 2015 10:34 pm
Location: vancouver/kelowna/lethbridge

Re: bare metal Raspberry Pi Zero port

Post by safetyfactorman » Fri Dec 06, 2019 5:15 pm

Has anyone used this? Is it possible to pull the latest build?

Post Reply