What is minimal requirement to have REPL running?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
User avatar
xidameng
Posts: 9
Joined: Fri Jul 24, 2020 2:08 pm

What is minimal requirement to have REPL running?

Post by xidameng » Fri Jul 24, 2020 2:16 pm

Hi! I am currently working on porting micropython to a new board. I came to the stage where my firmware compilation was ok, safely uploaded and having logs printed, but just couldn't see REPL (three ">") running.

I am new to project of this magnitude and complexity, so any information or direction is truly appreciated!

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: What is minimal requirement to have REPL running?

Post by dhylands » Fri Jul 24, 2020 4:45 pm

I think that the minimal requirements are to have the heap initialized, and have the mp_hal functions related to the uart implemented.

This is essentially what the minimal port does: https://github.com/micropython/micropyt ... ts/minimal

User avatar
xidameng
Posts: 9
Joined: Fri Jul 24, 2020 2:08 pm

Re: What is minimal requirement to have REPL running?

Post by xidameng » Sat Jul 25, 2020 12:48 pm

dhylands wrote:
Fri Jul 24, 2020 4:45 pm
I think that the minimal requirements are to have the heap initialized, and have the mp_hal functions related to the uart implemented.

This is essentially what the minimal port does: https://github.com/micropython/micropyt ... ts/minimal
Thanks ! !
Just as I suspected, I got heap and uart implemented, but haven't touched mp_hal... speaking of which, can you be a little more specific about the mp_hal function? I checked the "mphalport.h" file in the minimal folder, there is basically nothing there...

User avatar
xidameng
Posts: 9
Joined: Fri Jul 24, 2020 2:08 pm

Re: What is minimal requirement to have REPL running?

Post by xidameng » Sat Jul 25, 2020 12:52 pm

dhylands wrote:
Fri Jul 24, 2020 4:45 pm
I think that the minimal requirements are to have the heap initialized, and have the mp_hal functions related to the uart implemented.

This is essentially what the minimal port does: https://github.com/micropython/micropyt ... ts/minimal
Thanks!!

Just as I suspected, I got heap and uart done, but not mp_hal function.. speaking of which, can you be a little more specific about the mp_hal functions? I looked into the minimal port folder and the "mphalport.h" contains barely anything..

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: What is minimal requirement to have REPL running?

Post by dhylands » Sat Jul 25, 2020 2:56 pm

Look at uart_core.c in the minimal port.

Post Reply