These are chat archives for SmingHub/Sming

20th
Mar 2018
Alexander V. Ribchansky
@avr39-ripe
Mar 20 2018 17:36
hello! Try to port my older sming based apps to recent Sming. stuck in getting http post request body. it perfectly work in old http* code and do not in fresh Sming. when I call request.getBody() in request handler I always got empty string.. when I compile Sming with DEBUG_LEVEL 3 I can see that something receive right amount of bytes of POST request, so if I see in chrome that browser send 88 bytes, I see some debug info about 88 bytes available from Sming. but request.getBody() is always empty; ( try to make POST from curl - same result...what I doing wrong??
laurentppol
@laurentppol
Mar 20 2018 18:17
hi, there, I have crazy but existing problem (appeared on today development of app):
constant table lookup causes ESP to crash
ONE table, for another it works
    #if defined PWM_TIMER
                    if (lcd_third_line_mode == 3) {
                        pwm_output_idx--;
                        if (pwm_output_idx == 0xFF) { pwm_output_idx = PWM_TABLE_MAX - 1; }
        #if defined(__AVR__)
                        pwm_output = pgm_read_byte((PGM_P)&PWM_table[pwm_output_idx]);
        #endif
        #if defined(__ets__)
//              pwm_output = PWM_table[5];
// DEBUG
        pwm_output = 30;
// /DEBUG
        #endif
                                                  }
    #endif
laurentppol
@laurentppol
Mar 20 2018 18:23
:code fragment, and resulting crash output:
00:00:20,T test.1= 20.62C,T test.2= --.--C,  test.3= --.--C,  test.4= --.--C,Alarm:-----,PWM:  -%,DeltaCOL= --.--C,DeltaHD = --.--C,  Timer=-.--.--


***** Software Watchdog Reset

================================================================
3ffffe20:  3ffe9d6a 00000020 3fff2870 40241968  
3ffffe30:  40242034 3fff1dc8 3fff1dc8 00000003  
3ffffe40:  3fff1074 3fffc100 4023eddc 400005e1  
3ffffe50:  4023ce7a 00000030 0000001c 40247f88  
3ffffe60:  4023cac4 3fff1361 3fff1070 402373e4  
3ffffe70:  000000ff 00000000 00003a98 00000000  
3ffffe80:  3fff12d8 3ffeb0ac 3fff12d8 3fff1072  
3ffffe90:  3fff1071 3fff1074 60000600 00000003  
3ffffea0:  4000050c 06158919 402263fb 4000050c  
3ffffeb0:  40000f68 00000030 00000013 ffffffff  
3ffffec0:  40000f58 00000000 00000020 00000000  
3ffffed0:  0000035a 40106de0 3ffeb814 00009890  
3ffffee0:  6000083c 3fff2898 3ffeb814 3fffdab0  
3ffffef0:  00000000 3fffdcb0 3ffeb0f0 00000030  
3fffff00:  3fff1433 00000010 3fff1318 00000010  
3fffff10:  40100b50 0623afec 3ffeb814 00000000  
3fffff20:  3ffeb0d0 3ffeb814 04020408 00000010  
3fffff30:  00000000 061c0ecc 4021c047 3ffeb814  
3fffff40:  401008ba 061d94ba 60000600 4022cf28  
3fffff50:  041a167c 3ffeb0d0 3fff12d8 4023c1dc  
3fffff60:  4020bda0 3fff12d8 3ffeb0d0 40106e18  
3fffff70:  60000600 3fff12d8 3fff12d8 4020bdad  
3fffff80:  4020bdf2 3fffdab0 00000000 3fffdcb0  
3fffff90:  3ffeb0f8 40000f65 3fffdab0 00000000  
3fffffa0:  40000f49 3ffeba58 ffffff01 55aa55aa  
================================================================

 ets Jan  8 2013,rst cause:2, boot mode:(1,6)


 ets Jan  8 2013,rst cause:4, boot mode:(1,6)

wdt reset
any ideas? / where to learn how to find cause?
laurentppol
@laurentppol
Mar 20 2018 18:32
this is just table LOOKUP that causes crash, I wrote 2 lines, one with lookup, then simple assign and it crashes
laurentppol
@laurentppol
Mar 20 2018 18:38
Sming-develop @ 2017-02-13
SDK 2.0.0.16-08-10
laurentppol
@laurentppol
Mar 20 2018 22:37
probable cause was STUPID:
"somewhere in code" there was EXTERN CONST declaration with AVR "PROGMEM". Why stupid? Compiler didn't detected this as an ERROR (for ESP).