Hitting some kind of limit on the Teensy 4.0

Status
Not open for further replies.

kallaballa

New member
I'm trying to create a scripting environment running on the teensy 4.0 based on https://github.com/TonicAudio/Tonic, https://github.com/AnthonyDiGirolamo/lua-teensyduino and https://github.com/satoren/kaguya.
Basically it works but as i define more bindings i seem to hit some kind of limit that i don't understand and the Teensy 4.0 freezes without executing any code from my sketch. The code i'm talking about can be found here: https://github.com/kallaballa/Farts/tree/kaguya but it's rather messy and huge. The problem arises when i add another (no matter how small) binding definition in https://github.com/kallaballa/Farts/blob/kaguya/tonic_lua.cpp. The bindings seem to be correct, after checking them over and over again. when i compile them on my PC (x86_64) it works. I think i'm hitting some kind of limit that i don't understand.

Attached you'll find the map file and the output of arm-none-eabi-size command for a case where the teensy freezes and one case where it just runs fine.

Why is the teensy freezing right after upload?
 

Attachments

  • debugfiles.zip
    498.1 KB · Views: 52
Well... still no solution but i think i know now that I'm not exceeding stack limits. i enabled -fstack-usage to get a csv file with stack usage information per function. the "bind" function (https://github.com/kallaballa/Farts/blob/kaguya/tonic_lua.cpp#L7) that causes the problem had the largest usage, so i splitted it up int 6 functions but the teensy still freezes when i enable all binding definitions.

btw. to sort the .su file i used following command:
Code:
awk  '{FS="\t"; OFS=" "; print $2,$1}' "$SUFILE" | sort -n | less
 
Status
Not open for further replies.
Back
Top