Different debugging behavior running codes

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
davidbogatec
Posts: 10
Joined: Tue Feb 04, 2020 3:23 pm

Different debugging behavior running codes

Post by davidbogatec » Wed Feb 12, 2020 7:13 am

I have to esp32 boards:
- board 1 with espressif esp32-WROOM 32 chip
- board 2 with espressif ESP32-WROVER B chip

On both the same firmware is uploaded.
On both the same code is running with a type error on line 4 (micropython1 instead of micropython).

import machine
import micropython

micropython1.mem_info()

Board 1 REPL output

Ready to download this file,please wait!
.
download ok
exec(open('mem.py').read(),globals())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 4, in <module>
NameError: name 'micropython1' isn't defined

Board 2 REPL output

Ready to download this file,please wait!
.
download ok
exec(open('mem.py').read(),globals())
T

Board 1 is making a debug, while board 2 is giving only an error in a form of T character.

How i can solve the problem? I need to have debugging on all esp boards.

Thanks
david

User avatar
jimmo
Posts: 1845
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Different debugging behavior running codes

Post by jimmo » Sat Feb 15, 2020 5:08 am

davidbogatec wrote:
Wed Feb 12, 2020 7:13 am
NameError: name 'micropython1' isn't defined
Where is "micropython1" coming from?

Can you try using a serial console (miniterm, rshell, putty, picocom, screen) directly and using pyboard.py or rshell to copy the files to the device?

aleskeyfedorovich
Posts: 13
Joined: Mon Aug 27, 2018 4:43 pm

Re: Different debugging behavior running codes

Post by aleskeyfedorovich » Tue Jun 30, 2020 12:33 pm

jimmo wrote:
Sat Feb 15, 2020 5:08 am
davidbogatec wrote:
Wed Feb 12, 2020 7:13 am
NameError: name 'micropython1' isn't defined
Where is "micropython1" coming from?

I think that David is asking why some boards do print the error line and other don't. He made the error with micropython1 on purpose to show his problem.
I have the same problem.
Since this problem is present/absent with same version of micropython and just changing the board I suppose is an hardware problem but I don't have any solution and I'd love to hear one.

aleskeyfedorovich
Posts: 13
Joined: Mon Aug 27, 2018 4:43 pm

Re: Different debugging behavior running codes

Post by aleskeyfedorovich » Tue Jun 30, 2020 1:21 pm

I just found that using putty instead of upycraft let you see errors

Post Reply