Last active
January 7, 2020 16:04
-
-
Save anoken/8ef9355e6945080b37fed12d6edb1e94 to your computer and use it in GitHub Desktop.
TFT_eSprite drawString ToubleShooting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <M5StickC.h> | |
//This Example is drawString Crash ToubleShooting | |
TFT_eSprite *Spr; | |
void setup() { | |
M5.begin(); | |
Spr = new TFT_eSprite(&M5.Lcd); | |
Spr->setColorDepth(8); | |
Spr->createSprite(320, 240); | |
Spr->setBitmapColor(TFT_WHITE, TFT_BLACK); | |
Spr->fillSprite(TFT_BLACK); | |
String moji = "Test"; | |
Spr->setTextColor(TFT_WHITE); | |
//This is crash | |
//Spr->drawString(moji, 0, 0, 1); | |
//This is No problem | |
Spr->drawString(moji, 0, 20, 2); | |
Spr->drawString(moji, 0, 40, 3); | |
Spr->drawString(moji, 0, 60, 4); | |
//This is crash | |
//Spr->drawString(moji, 0, 60, 10); | |
Spr->pushSprite(0, 0); | |
} | |
void loop() { | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spr->drawString(moji, 0, 0, 1); | |
or | |
Spr->drawString(moji, 0, 0, 10); | |
It is as follows when you run | |
23:18:58.880 -> Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. | |
23:18:58.880 -> Core 1 register dump: | |
23:18:58.880 -> PC : 0x400d3715 PS : 0x00060130 A0 : 0x800d3790 A1 : 0x3ffb1ed0 | |
23:18:58.880 -> A2 : 0x00000000 A3 : 0x3ffb1f51 A4 : 0xfefefefe A5 : 0x3ffb85f0 | |
23:18:58.915 -> A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0xfefefefe A9 : 0x3ffb1eb0 | |
23:18:58.915 -> A10 : 0x00000054 A11 : 0x00000054 A12 : 0x00000005 A13 : 0x00000020 | |
23:18:58.915 -> A14 : 0x00000020 A15 : 0x00000000 SAR : 0x0000000e EXCCAUSE: 0x0000001c | |
23:18:58.915 -> EXCVADDR: 0xfefeff06 LBEG : 0x40001699 LEND : 0x400016aa LCOUNT : 0xfffffffc | |
23:18:58.949 -> | |
23:18:58.949 -> Backtrace: 0x400d3715:0x3ffb1ed0 0x400d378d:0x3ffb1f00 0x400d3bb5:0x3ffb1f50 0x400d0ddf:0x3ffb1f80 0x400d7cc7:0x3ffb1fb0 0x40088c19:0x3ffb1fd0 | |
23:18:58.949 -> | |
23:18:58.949 -> Rebooting... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
M5Stack is No problem.
`
#include <M5Stack.h>
TFT_eSprite *Spr;
void setup() {
M5.begin();
Spr = new TFT_eSprite(&M5.Lcd);
Spr->setColorDepth(8);
Spr->createSprite(320, 240);
Spr->setBitmapColor(TFT_WHITE, TFT_BLACK);
Spr->fillSprite(TFT_BLACK);
String moji = "Test";
Spr->setTextColor(TFT_WHITE);
Spr->drawString(moji, 0, 20, 1);
Spr->drawString(moji, 0, 40, 10);
Spr->drawString(moji, 0, 40, 3);
Spr->drawString(moji, 0, 60, 4);
Spr->pushSprite(0, 0);
}
void loop() {
}
`