Search found 546 matches

by jickster
Tue Dec 04, 2018 6:18 pm
Forum: General Discussion and Questions
Topic: Help interfacing with C function and input parameters format
Replies: 1
Views: 122

Re: Help interfacing with C function and input parameters format

Yes I’ll help.

Putting this here as a reminder to myself.


Sent from my iPhone using Tapatalk Pro
by jickster
Sun Dec 02, 2018 3:45 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 64
Views: 2437

Re: How do I make a port of MicroPython for Casio calculators?

Why and how have you refactored the py code?

You’re sending the first line into pyexec_friendly_repl() though that function is normally void.

If this is part of a script why are you using REPL functions?



Sent from my iPhone using Tapatalk Pro
by jickster
Sat Dec 01, 2018 4:57 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 64
Views: 2437

Re: How do I make a port of MicroPython for Casio calculators?

Zezombye wrote:Thanks, works fine now :D
Thank god. I was gonna be exasperated otherwise.

I’ll address your REPL issue next.

To be clear, does your

Code: Select all

char * text
represent ALL the lines of a .py script?


Sent from my iPhone using Tapatalk Pro
by jickster
Sat Dec 01, 2018 4:28 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 64
Views: 2437

Re: How do I make a port of MicroPython for Casio calculators?

You forgot to call mp_stack_ctrl_init() which takes care of what you’re trying to do with the variable stack_dummy.


Sent from my iPhone using Tapatalk Pro
by jickster
Sat Dec 01, 2018 3:56 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 64
Views: 2437

How do I make a port of MicroPython for Casio calculators?

Create a super simple script and import it like:

Code: Select all

a = 1
Does it work?

I think what may be happening is you’re importing something too big.


Sent from my iPhone using Tapatalk Pro
by jickster
Sat Dec 01, 2018 3:23 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 64
Views: 2437

Re: How do I make a port of MicroPython for Casio calculators?

mp_pystack_init() is NOT the right function. That refers to something else.

mp_stack_set_limit(mp_uint_t limit) takes in a stack SIZE limit.


Sent from my iPhone using Tapatalk Pro
by jickster
Fri Nov 30, 2018 4:52 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 64
Views: 2437

How do I make a port of MicroPython for Casio calculators?

You have to call a c function to set the amount of C stack available to uPy.


Sent from my iPhone using Tapatalk Pro
by jickster
Fri Nov 30, 2018 3:55 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 64
Views: 2437

Re: How do I make a port of MicroPython for Casio calculators?

Also, if the error is caused by being out of memory, it seems weird because I allocated 32kio (as seen in the screenshot) but that would mean each call costs 32ko/64 = 512 bytes? Seems like a lot for such a small function. Even if it runs out of memory, why doesn't it throw an exception inside Pyth...
by jickster
Fri Nov 30, 2018 3:51 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 64
Views: 2437

Re: How do I make a port of MicroPython for Casio calculators?

I can't really do without recursion though (in algorithms class, recursive functions are almost always studied). Practicing algorithms on a constrained device is a terrible idea . . . as you've seen. If you want to do recursive algorithms in Python, do it on the PC. Sure, recursion eats memory, how...
by jickster
Thu Nov 29, 2018 9:53 pm
Forum: ESP8266 boards
Topic: Flashing error? (memory allocation failed)
Replies: 8
Views: 167

Re: Flashing error? (memory allocation failed)

What happens if you allocate an equally big array of numbers?