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: 13
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: 394
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: 268
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: 13
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: 394
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: 13
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: 394
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.

Post Reply