Announcement

Collapse
No announcement yet.

4D Maker smartwatch demo failure

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 4D Maker smartwatch demo failure

    Hi,
    I have the demo up and running. - Almost.
    When the program calls the function displayForm(3), theprogram crashes and reboots.

    void displayForm3() {
    gfx.Cls() ;
    gfx.UserImage(iStatictext3) ; // Statictext3
    gfx.UserImages(iUserimages2, sysWeatherFrame) ;
    form = 3;
    }

    Both the call to iStaticText and to iUserimages results in a crash.
    The code seems ok comparing with the library description.
    Testet with same result on 2 IOD-9TH units.

    Exception (9):
    epc1=0x40209d35 epc2=0x00000000 epc3=0x00000000 excvaddr=0x3ffff8ca depc=0x00000000

    ctx: cont
    sp: 3ffff420 end: 3fffffd0 offset: 01a0

    >>>stack>>>
    3ffff5c0: 00000000 00000000 4bc6a7f0 00000000
    3ffff5d0: 00000000 4bc6a7f0 39999999 00000000
    3ffff5e0: 00000000 00000000 4bc6a7f0 00000000
    3ffff5f0: 00000000 4bc6a7f0 845a1cac 00000000
    3ffff600: 00000000 00000000 4bc6a7f0 00000000
    3ffff6

    many more adresses.

    3fffffb0: 3fffdad0 00000000 3fff363d 4020a8c4
    3fffffc0: feefeffe feefeffe 3ffe8644 40100739
    <<<stack<<<

    ets Jan 8 2013,rst cause:2, boot mode3,6)

    load 0x4010f000, len 1384, room 16
    tail 8
    chksum 0x2d
    csum 0x2d
    vbb28d4a3



    Why is that?

    regards

    Poul



  • #2
    Hi Poul,

    We haven't seen this before when just using Userimage calls. If possible could you please send me your complete code so I can investigate further.
    Best regards

    Paul

    Comment


    • #3
      Hi Paul
      I have attached the code as zip file. It is same as demo except for logon info.

      br Poul
      Attached Files

      Comment


      • #4
        Hi Poul,

        It works fine for me. I had mine set to run at 160mhz. I wanted to see the code to see if there was something added that would affect it but found nothing. Not really sure why this happening to you unless there is a problem with the SD card for it to stop at the same place.

        Best regards

        Paul

        Comment


        • #5
          Hi Paul.

          I have tried a clean install of both 4D IDE and Arduino. Same problem.
          And another SD card. (4GB)

          Then I changed the project to IOD 24T, it works perfectly.

          I also made this simpel program:

          #include "GFX4dIoD9.h"

          GFX4dIoD9 gfx = GFX4dIoD9();

          #include "NoName1Const.h" // Note. This file will not be created if there are no generated graphics

          void setup()
          {
          gfx.begin();
          gfx.Cls();
          gfx.ScrollEnable(false);
          gfx.BacklightOn(true);
          gfx.Orientation(LANDSCAPE);
          gfx.SmoothScrollSpeed(5);
          gfx.TextColor(WHITE, BLACK); gfx.Font(2); gfx.TextSize(1);
          if(!gfx.CheckSD()) {
          gfx.print("uSD Card not mounted.");
          gfx.print("Please insert uSD Card and restart module");
          while(1);
          } // Check if the uSD is mounted

          gfx.print("uSD OK");
          gfx.Open4dGFX("NONAME~1"); // Opens DAT and GCI files for read using filename without extension. Note! Workshop generates files with Short filenames


          Serial.begin(115200);
          Serial.print("Run Loop");

          } // end Setup **do not alter, remove or duplicate this line**
          int numx=1;


          void loop(){

          numx = numx+1;
          gfx.LedDigitsDisplay(numx, iiLeddigits1, 2, 1, 60, 0) ; // Leddigits1
          yield(); // Required for ESP
          delay(500);
          Serial.print(numx);

          }


          ............
          Which resets when calling the gfx.LedDigits....

          with this error:

          ets Jan 8 2013,rst cause:2, boot mode3,6)

          load 0x4010f000, len 1384, room 16
          tail 8
          chksum 0x2d
          csum 0x2d
          vbb28d4a3
          ~ld
          Run Loop2
          Exception (9):
          epc1=0x40206f35 epc2=0x00000000 epc3=0x00000000 excvaddr=0x3ffff826 depc=0x00000000

          ctx: cont
          sp: 3ffff400 end: 3fffffd0 offset: 01a0

          Any Ideas?

          Poul

          Comment


          • #6
            Hi Poul,

            I'm not really sure why you are having an issue with the IoD-09 unless something has changed recently with the Arduino IDE. Could you try using this library version as this is the same as the version I tried yesterday.

            Best regards

            Paul
            Attached Files

            Comment


            • #7
              Hi Paul
              I cannot find a solution for this problem. I will continue my project without graphics then :-(

              Comment


              • #8
                Hi Poul,

                I was hoping it was now resolved and the new library fixed your issue. There are a few things we can still check. Could you please check that the filenames on the SD card match with the name in the gfx.Open4dGFX command, this can sometimes happen when the code is loaded in as an example and then saved with another filename.

                Best regards

                Paul

                Comment


                • #9
                  Hi Paul.
                  The name of the files are the same as in the gfx.Open4dGFX("SW7471~1").
                  Please see below, that
                  iUserimages2,0
                  is displayed correct, but
                  iUserimages2,1 result in a crash
                  (iStatictext3) also result in a crash

                  void displayForm3() {
                  gfx.Cls(0x632C) ;
                  //gfx.UserImage(iStatictext3) ; // Crashes
                  //gfx.UserImages(iUserimages2, sysWeatherFrame) ;
                  //gfx.UserImages(iUserimages2,0) ; // Working
                  gfx.UserImages(iUserimages2,1) ; // Crashes
                  form = 3;
                  }


                  Regards
                  Poul
                  Attached Files

                  Comment


                  • #10
                    Hi Poul,

                    Thanks for checking that. Have you tried running this at 160mhz instead of 80mhz not that it should make any difference. Also could you let me know the version of the ESP8266 core you are using.

                    Best regards

                    Paul

                    Comment


                    • #11
                      Hi Paul,

                      Yes, 160MHz made no difference.
                      The version of the board is esp8266 by esp8266 Community version 2.4.2

                      br
                      Poul

                      Comment


                      • #12
                        Hi Poul,

                        Thanks for that. I am running 2.4.1. I will update now to 2.4.2 and we will be on the same page. I will get back to you with my results.

                        Best regards

                        Paul

                        Comment


                        • #13
                          Hi Poul,

                          I have just updated to 2.4.2 and it works fine. I then updated the Arduino IDE to 1.8.7 and I now get the same result as you. I will investigate this and send you a fix as soon as I have found the issue.

                          Best regards

                          Paul

                          Comment


                          • #14
                            Hi Poul,

                            There is an issue and I can't pinpoint it at the moment. All the code in the library uses common commands and standard libraries but the failure is coming from the SD read. Would it be possible to change to the 2.4.1 ESP8266 core and Arduino IDE 1.8.2 in the meantime while this issue is resolved. You can find previous versions of the Arduino IDE here.

                            https://www.arduino.cc/en/Main/OldSo...eases#previous

                            I will contact you again as soon as I have a solution.

                            Best regards

                            Paul

                            Comment


                            • #15
                              Hi Poul

                              I have just tested again and the 1.8.7 Arduino seems fine although a lot slower than previous versions. The core seems to be the issue so you will only need to change to the 2.4.1 core.

                              Best regards

                              Paul

                              Comment

                              Working...
                              X