I'm working on Teensy 4.0 with LVGL / ili9488 / Arduino. My app looks great in the LVGL simulator but crashes ("out of memory") instantly on the T4. (I'm SO grateful that it is able to tell me!) If I remove a few visual objects, it runs for a while (in some configurations re-booting every 10 seconds), and stable if I remove enough (see "Note" at end). Optimizing "Smallest Code with LTO" helps. There's a lot I still need to add (real-time audio); I'm distressed to already have memory issues. Speed is NOT an issue. Adding "DMAMEM" produces errors as follows:
R:\QTRNM-QFSV\Teensy\Quartetronome\menui.cpp:59:11: error: expected initializer before 'DMAMEM'
59 | int Test1 DMAMEM;
| ^~~~~~
R:\QTRNM-QFSV\Teensy\Quartetronome\menui.cpp:60:12: error: expected initializer before 'Test2'
60 | int DMAMEM Test2;
| ^~~~~
R:\QTRNM-QFSV\Teensy\Quartetronome\menui.cpp:61:2: error: 'DMAMEM' does not name a type
61 | DMAMEM int Test3;
| ^~~~~~
I'm not comfortable publishing all my (proprietary) code. One user here complained that Arduino lost Teensyduino -- no such problem here. Is there something I need to #include? Do I need to learn how to make a linker file? How can I move stuff into MEM2? Thanks for any help. --BE
Note: when it's "on the edge" (enough objects removed to be stable), moving a slider or pressing a button can cause a crash. I don't really understand why that would be -- the objects are all created before the callbacks are called, and no new objects are created in the callbacks. Why does the callback crash it?
R:\QTRNM-QFSV\Teensy\Quartetronome\menui.cpp:59:11: error: expected initializer before 'DMAMEM'
59 | int Test1 DMAMEM;
| ^~~~~~
R:\QTRNM-QFSV\Teensy\Quartetronome\menui.cpp:60:12: error: expected initializer before 'Test2'
60 | int DMAMEM Test2;
| ^~~~~
R:\QTRNM-QFSV\Teensy\Quartetronome\menui.cpp:61:2: error: 'DMAMEM' does not name a type
61 | DMAMEM int Test3;
| ^~~~~~
I'm not comfortable publishing all my (proprietary) code. One user here complained that Arduino lost Teensyduino -- no such problem here. Is there something I need to #include? Do I need to learn how to make a linker file? How can I move stuff into MEM2? Thanks for any help. --BE
Note: when it's "on the edge" (enough objects removed to be stable), moving a slider or pressing a button can cause a crash. I don't really understand why that would be -- the objects are all created before the callbacks are called, and no new objects are created in the callbacks. Why does the callback crash it?