fout meldingen ESP 01

Software vragen voor ESP chip familie
Berichten: 133
Geregistreerd: 10 Jan 2016, 16:39

fout meldingen ESP 01

Berichtdoor Nightmystic » 21 Okt 2018, 22:29

Ik werk met een ESP-10, een RGB ledstrip WS2812B en de FastLED library.

Ik wil een sketch uploaden naar een ESP-01, maar krijg meerdere foutmeldingen die er allemaal ongeveer zo uitzien:

C:\Users\Games\AppData\Local\Temp\ccEmIaxA.s:879684: Error: operand 2 of 'l32r' has out of range value '4294335164'

Het probleem lijkt te ontstaan wanneer ik teveel cases toevoeg aan een switch. Het programma lijkt dan te groot te worden, maar als ik kijk naar het percentage wat de ROM vult, dan zit ik nog maar op 42%.

Bij 72 leds kan ik max. 100 cases toevoegen, bij 144 leds max 200 cases zonder foutmeldingen te krijgen.

Dat is dus wel consequent, maar dan snap ik nog niet waarom de compiler niet gewoon aangeeft dat de sketch te groot is.

Heeft iemand enig idee wat hier aan de hand is? deze foutmelding ook gehad en opgelost? of moet ik gewoon de sketch niet te groot maken en minder cases toevoegen?

Dit is een stukje van de sketch. De hele sketch is veel te groot om hier te plaatsen.

cpp code
void (loop)
{
FastLED.show();

crntMs = millis();
if ((unsigned long)(crntMs - prvsMS) >= Time)
{
prvsMS = crntMs;
fx = fx + 1;
}
switch (fx)
{
case 0:
leds[143] = CHSV(248, x, x);
leds[142] = CHSV(248, x, x);
leds[141] = CHSV(247, x, x);
leds[140] = CHSV(247, x, x);
leds[139] = CHSV(247, x, x);
leds[138] = CHSV(247, x, x);
leds[137] = CHSV(246, x, x);
leds[136] = CHSV(246, x, x);
leds[135] = CHSV(246, x, x);
leds[134] = CHSV(246, x, x);
leds[133] = CHSV(245, x, x);
leds[132] = CHSV(245, x, x);
leds[131] = CHSV(245, x, x);
leds[130] = CHSV(244, x, x);
leds[129] = CHSV(244, x, x);
leds[128] = CHSV(244, x, x);
leds[127] = CHSV(244, x, x);
leds[126] = CHSV(244, x, x);
leds[125] = CHSV(243, x, x);
leds[124] = CHSV(243, x, x);
leds[123] = CHSV(243, x, x);
leds[122] = CHSV(242, x, x);
leds[121] = CHSV(242, x, x);
leds[120] = CHSV(242, x, x);
leds[119] = CHSV(242, x, x);
leds[118] = CHSV(241, x, x);
leds[117] = CHSV(241, x, x);
leds[116] = CHSV(241, x, x);
leds[115] = CHSV(240, x, x);
leds[114] = CHSV(240, x, x);
leds[113] = CHSV(240, x, x);
leds[112] = CHSV(240, x, x);
leds[111] = CHSV(239, x, x);
leds[110] = CHSV(239, x, x);
leds[109] = CHSV(239, x, x);
leds[108] = CHSV(238, x, x);
leds[107] = CHSV(238, x, x);
leds[106] = CHSV(238, x, x);
leds[105] = CHSV(238, x, x);
leds[104] = CHSV(237, x, x);
leds[103] = CHSV(237, x, x);
leds[102] = CHSV(237, x, x);
leds[101] = CHSV(236, x, x);
leds[100] = CHSV(236, x, x);
leds[99] = CHSV(236, x, x);
leds[98] = CHSV(235, x, x);
leds[97] = CHSV(235, x, x);
leds[96] = CHSV(235, x, x);
leds[95] = CHSV(234, x, x);
leds[94] = CHSV(234, x, x);
leds[93] = CHSV(234, x, x);
leds[92] = CHSV(234, x, x);
leds[91] = CHSV(233, x, x);
leds[90] = CHSV(233, x, x);
leds[89] = CHSV(233, x, x);
leds[88] = CHSV(232, x, x);
leds[87] = CHSV(232, x, x);
leds[86] = CHSV(232, x, x);
leds[85] = CHSV(232, x, x);
leds[84] = CHSV(231, x, x);
leds[83] = CHSV(231, x, x);
leds[82] = CHSV(231, x, x);
leds[81] = CHSV(230, x, x);
leds[80] = CHSV(230, x, x);
leds[79] = CHSV(230, x, x);
leds[78] = CHSV(230, x, x);
leds[77] = CHSV(229, x, x);
leds[76] = CHSV(229, x, x);
leds[75] = CHSV(229, x, x);
leds[74] = CHSV(228, x, x);
leds[73] = CHSV(228, x, x);
leds[72] = CHSV(228, x, x);
leds[71] = CHSV(227, x, x);
leds[70] = CHSV(227, x, x);
leds[69] = CHSV(227, x, x);
leds[68] = CHSV(226, x, x);
leds[67] = CHSV(226, x, x);
leds[66] = CHSV(226, x, x);
leds[65] = CHSV(226, x, x);
leds[64] = CHSV(225, x, x);
leds[63] = CHSV(225, x, x);
leds[62] = CHSV(225, x, x);
leds[61] = CHSV(224, x, x);
leds[60] = CHSV(224, x, x);
leds[59] = CHSV(224, x, x);
leds[58] = CHSV(224, x, x);
leds[57] = CHSV(224, x, x);
leds[56] = CHSV(223, x, x);
leds[55] = CHSV(223, x, x);
leds[54] = CHSV(223, x, x);
leds[53] = CHSV(222, x, x);
leds[52] = CHSV(222, x, x);
leds[51] = CHSV(222, x, x);
leds[50] = CHSV(222, x, x);
leds[49] = CHSV(222, x, x);
leds[48] = CHSV(221, x, x);
leds[47] = CHSV(221, x, x);
leds[46] = CHSV(221, x, x);
leds[45] = CHSV(220, x, x);
leds[44] = CHSV(220, x, x);
leds[43] = CHSV(220, x, x);
leds[42] = CHSV(220, x, x);
leds[41] = CHSV(219, x, x);
leds[40] = CHSV(219, x, x);
leds[39] = CHSV(219, x, x);
leds[38] = CHSV(219, x, x);
leds[37] = CHSV(219, x, x);
leds[36] = CHSV(218, x, x);
leds[35] = CHSV(218, x, x);
leds[34] = CHSV(218, x, x);
leds[33] = CHSV(218, x, x);
leds[32] = CHSV(218, x, x);
leds[31] = CHSV(217, x, x);
leds[30] = CHSV(217, x, x);
leds[29] = CHSV(217, x, x);
leds[28] = CHSV(216, x, x);
leds[27] = CHSV(216, x, x);
leds[26] = CHSV(216, x, x);
leds[25] = CHSV(216, x, x);
leds[24] = CHSV(216, x, x);
leds[23] = CHSV(216, x, x);
leds[22] = CHSV(215, x, x);
leds[21] = CHSV(215, x, x);
leds[20] = CHSV(215, x, x);
leds[19] = CHSV(215, x, x);
leds[18] = CHSV(215, x, x);
leds[17] = CHSV(214, x, x);
leds[16] = CHSV(214, x, x);
leds[15] = CHSV(214, x, x);
leds[14] = CHSV(214, x, x);
leds[13] = CHSV(214, x, x);
leds[12] = CHSV(214, x, x);
leds[11] = CHSV(214, x, x);
leds[10] = CHSV(213, x, x);
leds[9] = CHSV(213, x, x);
leds[8] = CHSV(213, x, x);
leds[7] = CHSV(213, x, x);
leds[6] = CHSV(213, x, x);
leds[5] = CHSV(213, x, x);
leds[4] = CHSV(213, x, x);
leds[3] = CHSV(212, x, x);
leds[2] = CHSV(212, x, x);
leds[1] = CHSV(212, x, x);
leds[0] = CHSV(212, x, x);
break;

Advertisement

Gebruikers-avatar
Berichten: 2655
Geregistreerd: 06 Aug 2016, 01:03

Re: fout meldingen ESP 01

Berichtdoor Koepel » 21 Okt 2018, 23:42

Je weet toch hoe het gaat? Laat de hele sketch zien, of anders krijg je van die flauwe grappen over een kristallen bol.

Nu ik het toch over mijn kristallen bol heb, die lag al een tijdje stoffig in een doos. Nadat ik hem had weer glimmend had schoongepoetst, zag ik in mijn kristallen bol dat je in het bestand "ccEmlaxA.ino" een variabele "l32r" hebt, die een "long" is. Je probeert die variabele te vullen met de waarde "4294335164", maar die waarde is te groot en past niet in een long. Misschien dat ik vaag nog ergens de getallen "632132" zie, maar dat hangt er van af of hoe het berekend wordt.

Het is mogelijk dat de compiler tegen een grens aan loopt, maar dat kan ik me niet voorstellen. Honderd of tweehonderd cases mag geen probleem zijn. Als de code te groot wordt voor een jump-tabel, dan neem ik aan dat de compiler een lange-jump-tabel maakt.

Ik zie geen patroon in de getallen waarmee je het 'led' array vult. De getallen zouden in een array gedeclareerd kunnen worden. Maar de getallen kunnen ook gemaakt worden met een klein array :geek:

cpp code
byte leds[144];

void setup()
{
Serial.begin(9600);

Serial.println("Vul het array");

const byte startValue = 212;
const byte repetitions[] = { 4, 7, 7, 5, 6, 3, 5, 5, 4, 3, 5, 3, 5, 3, 4, 3,
3, 3, 4, 3, 4, 3, 4, 3, 3, 3, 4, 3, 4, 3, 4, 3,
5, 3, 4, 4, 2 };

byte value = startValue;
int index = 0;
for( int i=0; i<sizeof( repetitions); i++)
{
for( int j=0; j<repetitions[i]; j++)
{
leds[index] = value;
index++;
}
value++;
}

Serial.println("Laat het array zien");

char buffer[40];
for( int i=(sizeof(leds) - 1); i>= 0; i--)
{
sprintf( buffer, "leds[%d] = CHSV(%d, x, x);", i, int(leds[i]));
Serial.println( buffer);
}
}

void loop()
{
}

Berichten: 133
Geregistreerd: 10 Jan 2016, 16:39

Re: fout meldingen ESP 01

Berichtdoor Nightmystic » 22 Okt 2018, 20:56

Bedankt voor je reactie.

Het bestand wat aangemaakt wordt in de temp kan ik niet terugvinden op de hdd. Misschien verdwijnt het ook weer aangezien het een temp folder is.
Betreft de long die te groot wordt, misschien is dat waar het probleem gezocht moet worden.
In de loop heb ik het volgende staan:
cpp code
crntMs = millis();
if ((unsigned long)(crntMs - prvsMS) >= Time)
{
// "Reset" timer
prvsMS = crntMs;
fx = fx + 1;
}


daarmee rol ik door de cases heen.
Kan het zijn dat bij teveel cases de crntMS en / of prvsMS te groot wordt?
Ergens lijkt het me onwaarschijnlijk dat dit het probleem is aangezien ik met 72 leds 100 cases kan gebruiken en met 144 leds 200.
Maar bij meer cases en leds gaat het fout.

Gebruikers-avatar
Berichten: 2655
Geregistreerd: 06 Aug 2016, 01:03

Re: fout meldingen ESP 01

Berichtdoor Koepel » 22 Okt 2018, 21:47

Ik zal mijn kristallen bol eens flink schudden... ik zie nu dat 'l32r' ook een assembly instructie kan zijn.

Het is inderdaad vreemd dat je met 72 leds 100 cases kunt gebruiken en bij 144 leds 200 cases.
Waarschijnlijk zit er ergens een fout in de sketch, of misschien heb je ergens een oude ontwikkelomgeving vandaan waar nog bugs in zitten.

Begint dat gedoe met die kristallen bol intussen al een beetje irritant te worden ? Of zal ik er nog een schepje bovenop doen :evil: :lol:
Ken je deze website: https://snippets-r-us.com/, die is speciaal gemaakt voor deze situaties.
Zonder de code te zien, kan ik weinig beginnen. Ik weet niet eens het type van 'crntMs' en 'prvMS'.

Berichten: 133
Geregistreerd: 10 Jan 2016, 16:39

Re: fout meldingen ESP 01

Berichtdoor Nightmystic » 23 Okt 2018, 22:13

cpp code
#include <FastLED.h>

// Fastled
#define NUM_LEDS 144
int BRIGHTNESS = 50; // Max. 255
CRGB leds[NUM_LEDS];
#define PIN 0 // GPIO 0
#define button 2 // GPIO 2
int knockSensor = 1; // GPIO 1 (TX)

// Button states and debounce
int buttonState = 0;
int lastButtonState = HIGH;
unsigned long lastDebounceTime = 0;
// Switch variable
int fx = 0;

// Color variables
int b = 0;
int c = 0;
int x = 255;

// Piezo sensor
int knockcount = 1;
int fade = 10;
byte val = 0;
int THRESHOLD = 2;

// Millis timer variables
unsigned long crntMs;
unsigned long prvsMS;
unsigned long Time = 3;

void buttonRead()
{
int reading = digitalRead(button);
if (reading != lastButtonState)
lastDebounceTime = millis();

if ((millis() - lastDebounceTime) > 50)
{
if (reading != buttonState)
{
buttonState = reading;
if (buttonState == LOW)
{
fx = 0;
}
}
}
lastButtonState = reading;
}

void setup()
{
// Button Pullup
pinMode(button, INPUT_PULLUP);
pinMode(knockSensor, INPUT);

attachInterrupt(digitalPinToInterrupt(button), buttonRead, FALLING);

// Fastled
FastLED.addLeds<WS2811, PIN, GRB>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness( BRIGHTNESS );
}

void chckSnsr()
{
val = analogRead(knockSensor);
if (val > THRESHOLD)
{
leds[0] = CRGB::White;
leds[1] = CRGB::White;
leds[2] = CRGB::White;
leds[3] = CRGB::White;
leds[4] = CRGB::White;
leds[5] = CRGB::White;
leds[6] = CRGB::White;
leds[7] = CRGB::White;
leds[8] = CRGB::White;
leds[9] = CRGB::White;
leds[10] = CRGB::White;
leds[11] = CRGB::White;
leds[12] = CRGB::White;
leds[13] = CRGB::White;
leds[14] = CRGB::White;
leds[15] = CRGB::White;
leds[16] = CRGB::White;
leds[17] = CRGB::White;
leds[18] = CRGB::White;
leds[19] = CRGB::White;
leds[20] = CRGB::White;
leds[21] = CRGB::White;
leds[22] = CRGB::White;
leds[23] = CRGB::White;
leds[24] = CRGB::White;
leds[25] = CRGB::White;
leds[26] = CRGB::White;
leds[27] = CRGB::White;
leds[28] = CRGB::White;
leds[29] = CRGB::White;
leds[30] = CRGB::White;
leds[31] = CRGB::White;
leds[32] = CRGB::White;
leds[33] = CRGB::White;
leds[34] = CRGB::White;
leds[35] = CRGB::White;
leds[36] = CRGB::White;
leds[37] = CRGB::White;
leds[38] = CRGB::White;
leds[39] = CRGB::White;
leds[40] = CRGB::White;
leds[41] = CRGB::White;
leds[42] = CRGB::White;
leds[43] = CRGB::White;
leds[44] = CRGB::White;
leds[45] = CRGB::White;
leds[46] = CRGB::White;
leds[47] = CRGB::White;
leds[48] = CRGB::White;
leds[49] = CRGB::White;
leds[40] = CRGB::White;
leds[41] = CRGB::White;
leds[42] = CRGB::White;
leds[43] = CRGB::White;
leds[44] = CRGB::White;
leds[45] = CRGB::White;
leds[46] = CRGB::White;
leds[47] = CRGB::White;
leds[48] = CRGB::White;
leds[49] = CRGB::White;
leds[50] = CRGB::White;
leds[51] = CRGB::White;
leds[52] = CRGB::White;
leds[53] = CRGB::White;
leds[54] = CRGB::White;
leds[55] = CRGB::White;
leds[56] = CRGB::White;
leds[57] = CRGB::White;
leds[58] = CRGB::White;
leds[59] = CRGB::White;
leds[60] = CRGB::White;
leds[61] = CRGB::White;
leds[62] = CRGB::White;
leds[63] = CRGB::White;
leds[64] = CRGB::White;
leds[65] = CRGB::White;
leds[66] = CRGB::White;
leds[67] = CRGB::White;
leds[68] = CRGB::White;
leds[69] = CRGB::White;
leds[70] = CRGB::White;
leds[71] = CRGB::White;

// Andere kant van de ledstrip

leds[72] = CRGB::White;
leds[73] = CRGB::White;
leds[74] = CRGB::White;
leds[75] = CRGB::White;
leds[76] = CRGB::White;
leds[77] = CRGB::White;
leds[78] = CRGB::White;
leds[79] = CRGB::White;
leds[80] = CRGB::White;
leds[81] = CRGB::White;
leds[82] = CRGB::White;
leds[83] = CRGB::White;
leds[84] = CRGB::White;
leds[85] = CRGB::White;
leds[86] = CRGB::White;
leds[87] = CRGB::White;
leds[88] = CRGB::White;
leds[89] = CRGB::White;
leds[90] = CRGB::White;
leds[91] = CRGB::White;
leds[92] = CRGB::White;
leds[93] = CRGB::White;
leds[94] = CRGB::White;
leds[95] = CRGB::White;
leds[96] = CRGB::White;
leds[97] = CRGB::White;
leds[98] = CRGB::White;
leds[99] = CRGB::White;
leds[100] = CRGB::White;
leds[101] = CRGB::White;
leds[102] = CRGB::White;
leds[103] = CRGB::White;
leds[104] = CRGB::White;
leds[105] = CRGB::White;
leds[106] = CRGB::White;
leds[107] = CRGB::White;
leds[108] = CRGB::White;
leds[109] = CRGB::White;
leds[110] = CRGB::White;
leds[111] = CRGB::White;
leds[112] = CRGB::White;
leds[113] = CRGB::White;
leds[114] = CRGB::White;
leds[115] = CRGB::White;
leds[116] = CRGB::White;
leds[117] = CRGB::White;
leds[118] = CRGB::White;
leds[119] = CRGB::White;
leds[120] = CRGB::White;
leds[121] = CRGB::White;
leds[122] = CRGB::White;
leds[123] = CRGB::White;
leds[124] = CRGB::White;
leds[125] = CRGB::White;
leds[126] = CRGB::White;
leds[127] = CRGB::White;
leds[128] = CRGB::White;
leds[129] = CRGB::White;
leds[130] = CRGB::White;
leds[131] = CRGB::White;
leds[132] = CRGB::White;
leds[133] = CRGB::White;
leds[134] = CRGB::White;
leds[135] = CRGB::White;
leds[136] = CRGB::White;
leds[137] = CRGB::White;
leds[138] = CRGB::White;
leds[139] = CRGB::White;
leds[140] = CRGB::White;
leds[141] = CRGB::White;
leds[142] = CRGB::White;
leds[143] = CRGB::White;

delay(fade);
BRIGHTNESS = 140;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 130;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 120;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 110;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 100;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 90;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 80;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 70;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 60;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 50;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 40;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 30;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 20;
FastLED.setBrightness( BRIGHTNESS );
delay(fade);
BRIGHTNESS = 10;
FastLED.setBrightness( BRIGHTNESS );
delay(100);
BRIGHTNESS = 150;
FastLED.setBrightness( BRIGHTNESS );
}
}

void loop()
{
chckSnsr();

buttonRead();

FastLED.show();

crntMs = millis();
if ((unsigned long)(crntMs - prvsMS) >= Time)
{
// "Reset" timer
prvsMS = crntMs;
fx = fx + 1;
// Place code here
}


if (fx > 254)
{
fx = 0;
}

switch (fx)
{
case 0:
leds[143] = CHSV(254, x, x);
leds[142] = CHSV(234, x, x);
leds[141] = CHSV(254, x, x);
leds[140] = CHSV(254, x, x);
leds[139] = CHSV(254, x, x);
leds[138] = CHSV(254, x, x);
leds[137] = CHSV(254, x, x);
leds[136] = CHSV(b, x, x);
leds[135] = CHSV(0, x, x);
leds[134] = CHSV(254, x, x);
leds[133] = CHSV(0, x, x);
leds[132] = CHSV(b, x, x);
leds[131] = CHSV(254, x, x);
leds[130] = CHSV(254, x, x);
leds[129] = CHSV(254, x, x);
leds[128] = CHSV(254, x, x);
leds[127] = CHSV(254, x, x);
leds[126] = CHSV(254, x, x);
leds[125] = CHSV(254, x, x);
leds[124] = CHSV(254, x, x);
leds[123] = CHSV(254, x, x);
leds[122] = CHSV(254, x, x);
leds[121] = CHSV(254, x, x);
leds[120] = CHSV(254, x, x);
leds[119] = CHSV(254, x, x);
leds[118] = CHSV(254, x, x);
leds[117] = CHSV(254, x, x);
leds[116] = CHSV(254, x, x);
leds[115] = CHSV(254, x, x);
leds[114] = CHSV(254, x, x);
leds[113] = CHSV(254, x, x);
leds[112] = CHSV(254, x, x);
leds[111] = CHSV(254, x, x);
leds[110] = CHSV(254, x, x);
leds[109] = CHSV(254, x, x);
leds[108] = CHSV(254, x, x);
leds[107] = CHSV(254, x, x);
leds[106] = CHSV(254, x, x);
leds[105] = CHSV(254, x, x);
leds[104] = CHSV(254, x, x);
leds[103] = CHSV(254, x, x);
leds[102] = CHSV(254, x, x);
leds[101] = CHSV(254, x, x);
leds[100] = CHSV(254, x, x);
leds[99] = CHSV(254, x, x);
leds[98] = CHSV(254, x, x);
leds[97] = CHSV(254, x, x);
leds[96] = CHSV(254, x, x);
leds[95] = CHSV(234, x, x);
leds[94] = CHSV(b, x, x);
leds[93] = CHSV(b, x, x);
leds[92] = CHSV(b, x, x);
leds[91] = CHSV(b, x, x);
leds[90] = CHSV(b, x, x);
leds[89] = CHSV(b, x, x);
leds[88] = CHSV(b, x, x);
leds[87] = CHSV(b, x, x);
leds[86] = CHSV(b, x, x);
leds[85] = CHSV(b, x, x);
leds[84] = CHSV(b, x, x);
leds[83] = CHSV(b, x, x);
leds[82] = CHSV(b, x, x);
leds[81] = CHSV(b, x, x);
leds[80] = CHSV(b, x, x);
leds[79] = CHSV(b, x, x);
leds[78] = CHSV(b, x, x);
leds[77] = CHSV(b, x, x);
leds[76] = CHSV(b, x, x);
leds[75] = CHSV(b, x, x);
leds[74] = CHSV(b, x, x);
leds[73] = CHSV(b, x, x);
leds[72] = CHSV(234, x, x);
leds[71] = CHSV(254, x, x);
leds[70] = CHSV(254, x, x);
leds[69] = CHSV(254, x, x);
leds[68] = CHSV(254, x, x);
leds[67] = CHSV(254, x, x);
leds[66] = CHSV(b, x, x);
leds[65] = CHSV(0, x, x);
leds[64] = CHSV(254, x, x);
leds[63] = CHSV(0, x, x);
leds[62] = CHSV(b, x, x);
leds[61] = CHSV(254, x, x);
leds[60] = CHSV(254, x, x);
leds[59] = CHSV(254, x, x);
leds[58] = CHSV(254, x, x);
leds[57] = CHSV(254, x, x);
leds[56] = CHSV(254, x, x);
leds[55] = CHSV(254, x, x);
leds[54] = CHSV(254, x, x);
leds[53] = CHSV(254, x, x);
leds[52] = CHSV(254, x, x);
leds[51] = CHSV(254, x, x);
leds[50] = CHSV(254, x, x);
leds[49] = CHSV(254, x, x);
leds[48] = CHSV(254, x, x);
leds[47] = CHSV(254, x, x);
leds[46] = CHSV(254, x, x);
leds[45] = CHSV(254, x, x);
leds[44] = CHSV(254, x, x);
leds[43] = CHSV(254, x, x);
leds[42] = CHSV(254, x, x);
leds[41] = CHSV(254, x, x);
leds[40] = CHSV(254, x, x);
leds[39] = CHSV(254, x, x);
leds[38] = CHSV(254, x, x);
leds[37] = CHSV(254, x, x);
leds[36] = CHSV(254, x, x);
leds[35] = CHSV(254, x, x);
leds[34] = CHSV(254, x, x);
leds[33] = CHSV(254, x, x);
leds[32] = CHSV(254, x, x);
leds[31] = CHSV(254, x, x);
leds[30] = CHSV(254, x, x);
leds[29] = CHSV(254, x, x);
leds[28] = CHSV(254, x, x);
leds[27] = CHSV(254, x, x);
leds[26] = CHSV(254, x, x);
leds[25] = CHSV(234, x, x);
leds[24] = CHSV(b, x, x);
leds[23] = CHSV(b, x, x);
leds[22] = CHSV(b, x, x);
leds[21] = CHSV(b, x, x);
leds[20] = CHSV(b, x, x);
leds[19] = CHSV(b, x, x);
leds[18] = CHSV(b, x, x);
leds[17] = CHSV(b, x, x);
leds[16] = CHSV(b, x, x);
leds[15] = CHSV(b, x, x);
leds[14] = CHSV(b, x, x);
leds[13] = CHSV(b, x, x);
leds[12] = CHSV(b, x, x);
leds[11] = CHSV(b, x, x);
leds[10] = CHSV(b, x, x);
leds[9] = CHSV(b, x, x);
leds[8] = CHSV(b, x, x);
leds[7] = CHSV(b, x, x);
leds[6] = CHSV(b, x, x);
leds[5] = CHSV(b, x, x);
leds[4] = CHSV(b, x, x);
leds[3] = CHSV(b, x, x);
leds[2] = CHSV(b, x, x);
leds[1] = CHSV(b, x, x);
leds[0] = CHSV(b, x, x);

break;

case 1:
leds[143] = CHSV(254, x, x);
leds[142] = CHSV(254, x, x);
leds[141] = CHSV(b, x, x);
leds[140] = CHSV(254, x, x);
leds[139] = CHSV(254, x, x);
leds[138] = CHSV(254, x, x);
leds[137] = CHSV(b, x, x);
leds[136] = CHSV(b, x, x);
leds[135] = CHSV(254, x, x);
leds[134] = CHSV(254, x, x);
leds[133] = CHSV(b, x, x);
leds[132] = CHSV(b, x, x);
leds[131] = CHSV(254, x, x);
leds[130] = CHSV(254, x, x);
leds[129] = CHSV(254, x, x);
leds[128] = CHSV(254, x, x);
leds[127] = CHSV(254, x, x);
leds[126] = CHSV(234, x, x);
leds[125] = CHSV(b, x, x);
leds[124] = CHSV(b, x, x);
leds[123] = CHSV(b, x, x);
leds[122] = CHSV(b, x, x);
leds[121] = CHSV(b, x, x);
leds[120] = CHSV(b, x, x);
leds[119] = CHSV(b, x, x);
leds[118] = CHSV(234, x, x);
leds[117] = CHSV(0, x, x);
leds[116] = CHSV(b, x, x);
leds[115] = CHSV(b, x, x);
leds[114] = CHSV(254, x, x);
leds[113] = CHSV(254, x, x);
leds[112] = CHSV(254, x, x);
leds[111] = CHSV(254, x, x);
leds[110] = CHSV(b, x, x);
leds[109] = CHSV(254, x, x);
leds[108] = CHSV(253, x, x);
leds[107] = CHSV(253, x, x);
leds[106] = CHSV(253, x, x);
leds[105] = CHSV(253, x, x);
leds[104] = CHSV(253, x, x);
leds[103] = CHSV(253, x, x);
leds[102] = CHSV(253, x, x);
leds[101] = CHSV(253, x, x);
leds[100] = CHSV(253, x, x);
leds[99] = CHSV(253, x, x);
leds[98] = CHSV(253, x, x);
leds[97] = CHSV(253, x, x);
leds[96] = CHSV(253, x, x);
leds[95] = CHSV(253, x, x);
leds[94] = CHSV(b, x, x);
leds[93] = CHSV(b, x, x);
leds[92] = CHSV(b, x, x);
leds[91] = CHSV(b, x, x);
leds[90] = CHSV(b, x, x);
leds[89] = CHSV(b, x, x);
leds[88] = CHSV(b, x, x);
leds[87] = CHSV(b, x, x);
leds[86] = CHSV(b, x, x);
leds[85] = CHSV(b, x, x);
leds[84] = CHSV(b, x, x);
leds[83] = CHSV(b, x, x);
leds[82] = CHSV(b, x, x);
leds[81] = CHSV(b, x, x);
leds[80] = CHSV(b, x, x);
leds[79] = CHSV(b, x, x);
leds[78] = CHSV(b, x, x);
leds[77] = CHSV(b, x, x);
leds[76] = CHSV(b, x, x);
leds[75] = CHSV(b, x, x);
leds[74] = CHSV(b, x, x);
leds[73] = CHSV(b, x, x);
leds[72] = CHSV(254, x, x);
leds[71] = CHSV(b, x, x);
leds[70] = CHSV(254, x, x);
leds[69] = CHSV(254, x, x);
leds[68] = CHSV(254, x, x);
leds[67] = CHSV(b, x, x);
leds[66] = CHSV(b, x, x);
leds[65] = CHSV(254, x, x);
leds[64] = CHSV(254, x, x);
leds[63] = CHSV(b, x, x);
leds[62] = CHSV(b, x, x);
leds[61] = CHSV(254, x, x);
leds[60] = CHSV(254, x, x);
leds[59] = CHSV(254, x, x);
leds[58] = CHSV(254, x, x);
leds[57] = CHSV(254, x, x);
leds[56] = CHSV(234, x, x);
leds[55] = CHSV(b, x, x);
leds[54] = CHSV(b, x, x);
leds[53] = CHSV(b, x, x);
leds[52] = CHSV(b, x, x);
leds[51] = CHSV(b, x, x);
leds[50] = CHSV(b, x, x);
leds[49] = CHSV(b, x, x);
leds[48] = CHSV(234, x, x);
leds[47] = CHSV(0, x, x);
leds[46] = CHSV(b, x, x);
leds[45] = CHSV(b, x, x);
leds[44] = CHSV(254, x, x);
leds[43] = CHSV(254, x, x);
leds[42] = CHSV(254, x, x);
leds[41] = CHSV(254, x, x);
leds[40] = CHSV(b, x, x);
leds[39] = CHSV(254, x, x);
leds[38] = CHSV(253, x, x);
leds[37] = CHSV(253, x, x);
leds[36] = CHSV(253, x, x);
leds[35] = CHSV(253, x, x);
leds[34] = CHSV(253, x, x);
leds[33] = CHSV(253, x, x);
leds[32] = CHSV(253, x, x);
leds[31] = CHSV(253, x, x);
leds[30] = CHSV(253, x, x);
leds[29] = CHSV(253, x, x);
leds[28] = CHSV(253, x, x);
leds[27] = CHSV(253, x, x);
leds[26] = CHSV(253, x, x);
leds[25] = CHSV(253, x, x);
leds[24] = CHSV(b, x, x);
leds[23] = CHSV(b, x, x);
leds[22] = CHSV(b, x, x);
leds[21] = CHSV(b, x, x);
leds[20] = CHSV(b, x, x);
leds[19] = CHSV(b, x, x);
leds[18] = CHSV(b, x, x);
leds[17] = CHSV(b, x, x);
leds[16] = CHSV(b, x, x);
leds[15] = CHSV(b, x, x);
leds[14] = CHSV(b, x, x);
leds[13] = CHSV(b, x, x);
leds[12] = CHSV(b, x, x);
leds[11] = CHSV(b, x, x);
leds[10] = CHSV(b, x, x);
leds[9] = CHSV(b, x, x);
leds[8] = CHSV(b, x, x);
leds[7] = CHSV(b, x, x);
leds[6] = CHSV(b, x, x);
leds[5] = CHSV(b, x, x);
leds[4] = CHSV(b, x, x);
leds[3] = CHSV(b, x, x);
leds[2] = CHSV(b, x, x);
leds[1] = CHSV(b, x, x);
leds[0] = CHSV(b, x, x);
break;

// En zo 254 cases (past niet in 1 post, maar zien er allemaal zo uit als case 0 en 1) in totaal.

}
}

Gebruikers-avatar
Berichten: 2655
Geregistreerd: 06 Aug 2016, 01:03

Re: fout meldingen ESP 01

Berichtdoor Koepel » 24 Okt 2018, 00:48

Dus ik kan de sketch nog steeds niet zelf compileren :?

Ik zie een paar kleine dingen, maar dat kan het probleem niet zijn.
Het lijkt er op dat de compiler tegen een grens aan loopt. Dat zou heel vreemd zijn. De compiler mag zo'n fout niet hebben.

Die kleine dingen is bijvoorbeeld de waarde van analogRead() in een 'byte' stoppen en dan vergelijken met een integer. Of vergeten om 'fx' een 'volatile' te maken. Verder heb ik te weinig kennis van ESP8266 en de FastLED library om er meer over te zeggen.

Iemand anders op dit forum vond een fout bij Arduino: http://arduinoforum.nl/viewtopic.php?f=9&t=2454. Dus het kan gebeuren dat je tegen iets aanloopt, dat nog niemand eerder heeft gehad :shock:

Het enige dat ik kan verzinnen is om de compiler te vertellen om wel of geen jump tabel te gebruiken voor het switch-statement.
Je kunt bovenin de sketch dit zetten:
Code: Alles selecteren
// #pragma GCC optimize("-fjump-tables")
// #pragma GCC optimize("-fno-jump-tables")

En dan een van de twee kiezen door bij een van de twee even de commentaar-dingen "//" weg te halen.

Berichten: 133
Geregistreerd: 10 Jan 2016, 16:39

Re: fout meldingen ESP 01

Berichtdoor Nightmystic » 24 Okt 2018, 18:39

Dus ik kan de sketch nog steeds niet zelf compileren :?

[url]
https://drive.google.com/file/d/1Igmm-V ... sp=sharing[/url]

Bij deze, had pastebin geprobeerd, maar die accepteert slechts 512 Kbytes aan code voor niet pro users.

Die kleine dingen is bijvoorbeeld de waarde van analogRead() in een 'byte' stoppen en dan vergelijken met een integer. Of vergeten om 'fx' een 'volatile' te maken.

Weet jij of er een website is waar je dit soort info kunt vinden, wat wel en niet mag, kan, moet, hoe het werkt?

Verder heb ik te weinig kennis van ESP8266 en de FastLED library om er meer over te zeggen.

Esp8266 en ledstrips zijn leuk om mee te spelen.

Iemand anders op dit forum vond een fout bij Arduino: viewtopic.php?f=9&t=2454. Dus het kan gebeuren dat je tegen iets aanloopt, dat nog niemand eerder heeft gehad :shock:

Is het inmiddels ook echt opgelost?

Het enige dat ik kan verzinnen is om de compiler te vertellen om wel of geen jump tabel te gebruiken voor het switch-statement.
Je kunt bovenin de sketch dit zetten:

Code:
Alles selecteren
// #pragma GCC optimize("-fjump-tables")
// #pragma GCC optimize("-fno-jump-tables")


Het ziet er naar uit dat dit het helaas ook niet oplost :cry:
zowel met jumptable en zonder jumptable getest.

Dezelfde foutcode komt op:

Code: Alles selecteren
In file included from C:\Users\Games\Documents\Blitz oefenzwaard\002_Design_001_test_5_OTA_Blynk_2\002_Design_001_test_5_OTA_Blynk_2.ino:4:0:

C:\Users\Games\Documents\Arduino\libraries\FastLED/FastLED.h:14:21: note: #pragma message: FastLED version 3.002.001

 #    pragma message "FastLED version 3.002.001"

                     ^

In file included from C:\Users\Games\Documents\Arduino\libraries\FastLED/FastLED.h:65:0,

                 from C:\Users\Games\Documents\Blitz oefenzwaard\002_Design_001_test_5_OTA_Blynk_2\002_Design_001_test_5_OTA_Blynk_2.ino:4:

C:\Users\Games\Documents\Arduino\libraries\FastLED/fastspi.h:110:23: note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output

 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"

                       ^

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s: Assembler messages:

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:8213: Error: jump target out of range; no usable trampoline found

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:8213: Error: jump target out of range; no usable trampoline found

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:8213: Error: jump target out of range; no usable trampoline found

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:8213: Error: jump target out of range; no usable trampoline found

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:8213: Error: jump target out of range; no usable trampoline found

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:8213: Error: jump target out of range; no usable trampoline found

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:8213: Error: jump target out of range; no usable trampoline found

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:8213: Error: jump target out of range; no usable trampoline found

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:52779: Error: operand 1 of 'j' has out of range value '261914'

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:57704: Error: operand 1 of 'j' has out of range value '261911'

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:134947: Error: operand 2 of 'l32r' has out of range value '4294705136'

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:134981: Error: operand 2 of 'l32r' has out of range value '4294705116'

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:135015: Error: operand 2 of 'l32r' has out of range value '4294705096'

C:\Users\Games\AppData\Local\Temp\cc8KDFt2.s:135050: Error: operand 2 of 'l32r' has out of range value '4294705072'


etc etc

Gebruikers-avatar
Berichten: 2655
Geregistreerd: 06 Aug 2016, 01:03

Re: fout meldingen ESP 01

Berichtdoor Koepel » 24 Okt 2018, 20:08

Dat probleem dat iemand anders vond (met de round() functie) is niet opgelost :( Het Arduino team begrijpt nog steeds niet wat standaard 'c' en 'c++' is. Ik vind het ongelofelijk. Daar hebben anderen zo hun best voor gedaan en Arduino helpt de standaard om zeep :evil:


Met hulp van mijn kristallen bol, deed ik het volgende:
Arduino IDE 1.8.7
Bij "Bestand / Voorkeuren / Meer Board Managers URL's" dit ingevuld: "http://arduino.esp8266.com/stable/package_esp8266com_index.json".
Bij "Board Beheer" de "esp8266 bij ESP8266 Community" geïnstalleerd. Dat is versie 2.4.2.
Jouw sketch van Google Drive gehaald.
Met "Bibliotheek Beheer" de "FastLED", "esp8266_mdns by mrdunk", "ESP8266OTA by Chip", "Blynk by Volodymyr Shymanskyy" geïnstalleerd.

Daarmee lukte het niet om het te compileren.
Dus vervolgens zat ik maar te poetsen en te turen in mijn kristallen bol, maar mijn kristallen bol bleef erg mistig.
Waarschijnlijk is mijn kristallen bol een namaak. Ik heb hem maar weggedaan. Zonder een goede kristallen bol kan ik je niet helpen. Dus ik geef het op :o

Probeer je code eens anders te schrijven. Het lijkt er sterk op dat je over de grenzen van geheugen of van de compiler bent gegaan.
Je kunt bijvoorbeeld een paar globale 'const' array van getallen declareren en die in een for-loop naar de 'led[]' array kopiëren.
Eventueel kun je alle stukje codes in aparte functies plaatsen.

Berichten: 133
Geregistreerd: 10 Jan 2016, 16:39

Re: fout meldingen ESP 01

Berichtdoor Nightmystic » 25 Okt 2018, 22:46

Vreemd dat hij niet compiled bij jou.
Zijn ongeveer ook de libraries die ik gebruik. Ik heb er denk ik zelfs minder geinstalleerd staan, maar wel van dezelfde makers.

Kies je Generic Esp2866 als board?

Maar goed, je workaround werkt in ieder geval :D
Nu er meerdere switches in functies geplaatst zijn, kan ik hem wel compilen en uploaden :D

Echt top, mega thanks!

https://drive.google.com/file/d/1zVDYhq7DtC8srpaoX9JYW6w1v0-Kb3LY/view?usp=sharing

Gebruikers-avatar
Berichten: 2655
Geregistreerd: 06 Aug 2016, 01:03

Re: fout meldingen ESP 01

Berichtdoor Koepel » 25 Okt 2018, 23:30

Met de "Generic ESP2866 Module" kom ik inderdaad wat verder.

Het blijkt een tekortkoming van de GCC compiler te zijn.
Ik kan andere projecten vinden met dezelfde foutmelding, en ook daar hebben ze workaround moeten maken, net als jij.

Je nieuwe code compileren duurt nog best lang. Na ruim 4 minuten krijg ik een waarschuwing dat de linker een bepaald deel niet in een segment krijgt.

Haal je die code bij Google Drive ook weer weg en wijzig je nog even alle wachtwoorden die je in de sketch had staan en nu openbaar zijn ?


Wat dacht je van zo iets:
cpp code
for( int i=0; i<144; i++)
{
leds[i] = CRGB::Black;
}

Dat is toch wel een ietsje korter dan 144 regels om de hele 'leds[]' array met Black te vullen.

Volgende

Terug naar ESP Software

Wie is er online?

Gebruikers in dit forum: Geen geregistreerde gebruikers en 6 gasten