Search found 43 matches

by pulkin
Thu Mar 26, 2020 6:49 pm
Forum: Development of MicroPython
Topic: test/parser.py fails on my port: any clue how to debug this?
Replies: 10
Views: 428

Re: test/parser.py fails on my port: any clue how to debug this?

When "compile" raises SyntaxError it corrupts the memory.
by pulkin
Thu Mar 26, 2020 6:46 pm
Forum: Development of MicroPython
Topic: test/parser.py fails on my port: any clue how to debug this?
Replies: 10
Views: 428

Re: test/parser.py fails on my port: any clue how to debug this?

Code: Select all

>>> compile("", "stdin", "eval")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "stdin", line 2
SyntaxError: invalid syntax
>>> compile("", "stdin", "eval")
(module halts)
by pulkin
Mon Mar 23, 2020 10:26 am
Forum: Development of MicroPython
Topic: test/parser.py fails on my port: any clue how to debug this?
Replies: 10
Views: 428

Re: test/parser.py fails on my port: any clue how to debug this?

Honestly saying, I have only a vague idea how nlr works and what has to be implemented by the port. I inherited it from whoever started porting mpy to the module. Here is the code:

https://github.com/pulkin/micropython/t ... ts/gprs_a9
by pulkin
Sun Mar 22, 2020 7:12 pm
Forum: Development of MicroPython
Topic: test/parser.py fails on my port: any clue how to debug this?
Replies: 10
Views: 428

Re: test/parser.py fails on my port: any clue how to debug this?

I am working on making gdb and, possibly, hardware breakpoint working. I tried doing that a couple of times already but did not really succeed. Can you point to commit fixing the issue you refer to? Maybe it is not yet in the port ...
by pulkin
Sat Mar 21, 2020 6:06 pm
Forum: Development of MicroPython
Topic: test/parser.py fails on my port: any clue how to debug this?
Replies: 10
Views: 428

Re: test/parser.py fails on my port: any clue how to debug this?

So what may, in principle, cause such failures? Was the pointer to globals accidentally overwritten?
by pulkin
Thu Mar 19, 2020 10:38 pm
Forum: Development of MicroPython
Topic: test/parser.py fails on my port: any clue how to debug this?
Replies: 10
Views: 428

Re: test/parser.py fails on my port: any clue how to debug this?

No, that [compiling without gc] does not help.

Is it normal for bulk tests to fail at some point without gc?
by pulkin
Sat Mar 07, 2020 6:30 pm
Forum: Development of MicroPython
Topic: test/parser.py fails on my port: any clue how to debug this?
Replies: 10
Views: 428

test/parser.py fails on my port: any clue how to debug this?

The test with "compile" statements fails (i.e. it freezes the board). I traced the problem down to mp_map_lookup where mp_map_t *map becomes an invalid pointer (it is by fact 0x04 which might be just random data). This happens during another call to mp_load_name which makes me think that it is a pro...
by pulkin
Wed Mar 04, 2020 4:11 pm
Forum: Development of MicroPython
Topic: Builtin modules are loaded at the point of importing them
Replies: 10
Views: 441

Re: Builtin modules are loaded at the point of importing them

To verify my understanding: does this mean that up-to-date ESP8266 firmware allows importing files named os.py but will not import uos.py?
by pulkin
Wed Mar 04, 2020 1:07 pm
Forum: Development of MicroPython
Topic: Builtin modules are loaded at the point of importing them
Replies: 10
Views: 441

Re: Builtin modules are loaded at the point of importing them

Right, what I am saying is that I have a port

https://github.com/pulkin/micropython/t ... ts/gprs_a9

where I have to make it behave like you demonstarted. At the firmware level.
by pulkin
Sat Feb 29, 2020 11:45 pm
Forum: Development of MicroPython
Topic: Builtin modules are loaded at the point of importing them
Replies: 10
Views: 441

Re: Builtin modules are loaded at the point of importing them

I believe the problem is that you cannot override the built-in module. The typical way one would do it is to manipulate sys.path before importing the module. In my case, however, that does not help: whatever import order is the built-in module is always preffered/loaded. I.e. there is no way to impo...