🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Error compiling examples

    Scheduled Pinned Locked Moved Arduino
    4 Posts 2 Posters 7.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ExieE Offline
      Exie
      last edited by

      I'm currently exploring the world of Zigbee and got the sample code here:
      https://github.com/m5stack/M5Stack/tree/master/examples/Unit/Zigbee_CC2630/P2P_TEST

      Although when I try to compile it in Arduino I get this error:

      In file included from /Users/z/Documents/Arduino/libraries/M5Stack/src/M5Display.h:8,
                       from /Users/z/Documents/Arduino/libraries/M5Stack/src/M5Stack.h:111,
                       from /Users/z/IdeaProjects/poc/M5Stack/examples/Unit/Zigbee_CC2630/P2P_TEST/P2P_TEST.ino:17:
      /Users/z/Documents/Arduino/libraries/M5Stack/src/utility/In_eSPI.h:560:21: error: 'VSPI' was not declared in this scope
           uint8_t  port = VSPI;
                           ^~~~
      /Users/z/Documents/Arduino/libraries/M5Stack/src/utility/In_eSPI.h:560:21: note: suggested alternative: 'SPI'
           uint8_t  port = VSPI;
                           ^~~~
                           SPI
      
      exit status 1
      1 Reply Last reply Reply Quote 0
      • ExieE Offline
        Exie
        last edited by

        By way of a follow up, I'm inclined to suggest the M5Stack library 0.4.2 is broken.

        #include "M5Stack.h"
        
        void setup() {
          // put your setup code here, to run once:
          printf("Hello World");
        }
        
        void loop() {
          // put your main code here, to run repeatedly:
        
        }
        

        Still produces the same exception above:

        In file included from /Users/z/Documents/Arduino/libraries/M5Stack/src/M5Display.h:8,
                         from /Users/z/Documents/Arduino/libraries/M5Stack/src/M5Stack.h:111,
                         from /Users/z/Documents/Arduino/M5Stack_Hello/M5Stack_Hello.ino:1:
        /Users/z/Documents/Arduino/libraries/M5Stack/src/utility/In_eSPI.h:633:20: error: 'VSPI' was not declared in this scope
             uint8_t port = VSPI;
                            ^~~~
        /Users/z/Documents/Arduino/libraries/M5Stack/src/utility/In_eSPI.h:633:20: note: suggested alternative: 'SPI'
             uint8_t port = VSPI;
                            ^~~~
                            SPI
        
        exit status 1
        

        This is using Arduino IDE 2.0.4 trying to compile for M5Stack-AtomS3 board

        1 Reply Last reply Reply Quote 0
        • F Offline
          flypeek
          last edited by

          you can see examples
          #include <M5AtomS3.h> not #include "M5Stack.h"

          1 Reply Last reply Reply Quote 1
          • ExieE Offline
            Exie
            last edited by

            Thanks for the tip @flypeek

            I checked with my Hello World code and this worked.

            I did not expect the AtomS3 to be that different to the original AtomMatrix. However I just confirmed if I change the "board" to just M5Stack-Atom all the original code compiles.

            I would have expected big changes if we referred to the ESP32-C3 with the new RISC architecture, but the S3 was fairly similar I thought.

            I presume it has a new board definition due to the LCD screen on the AtomS3. If I can get the Zigbee unit working nicely, I might port the example over and post up a PR in the AtomS3 library.

            Many thanks again @flypeek you have unblocked me and I can keep moving forward (I hope).

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post