bytecode not implemented error

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

bytecode not implemented error

Post by gratefulfrog » Thu Oct 06, 2016 4:12 pm

Hi,

I recently got a "bytecode not implemented" error and was lucky to find this issue on github which mentioned the mpy-cross needed to be rebuilt.

I guess that my last fetch/pull caused that but shouldn't the makefile have noticed and automatically rebuilt the required targets?

Is there anyway of avoiding this in the future by some automation of the makefile?

Again, sorry for my ignorance and thanks for any ideas.

Cheers,
Bob
ps. I commented on the github issue as well, just to be sure there was adequate tracking.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: bytecode not implemented error

Post by Roberthh » Thu Oct 06, 2016 8:20 pm

+1 on the suggestion of a warning. I just spent several hours searching a nasty spurious bug for EPS8266 code, just to find out that I had to rebuild mpy-cross.
And yes - this kind of surprise was mentioned earlier in this board, but it's hard to remember every issue people had.

gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

Re: bytecode not implemented error

Post by gratefulfrog » Thu Oct 06, 2016 8:27 pm

My question is:

Why doesn't make notice the changes and rebuild the mpy-cross automatically?

Shouldn't make do this?

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

Re: bytecode not implemented error

Post by dhylands » Fri Oct 07, 2016 6:12 am

make invoked from where exactly?

make for esp8266 just rebuilds 8266.

If you run make from inside the mpy-cross directory then it will rebuild mpy-cross.

gratefulfrog
Posts: 149
Joined: Sun Mar 01, 2015 12:10 pm

Re: bytecode not implemented error

Post by gratefulfrog » Fri Oct 07, 2016 8:45 am

I get it!

I have added a dependency in my Makefile in the stmhal/scripts/ directory to handle any changes that would require a rebuild of mpy-cross.

I've attached the Makefile if anyone cares to take a look.

I run it from stmhal/scripts/ with the pyboard in dfu mode connected via USB:

Code: Select all

$ make deploy
Cheers,
Bob
Attachments
Makefile.zip
Makefile for embedding frzoen code in mpy on pyboard
(515 Bytes) Downloaded 348 times

Post Reply