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

    Cannot load "Hello World" program on M5Core2

    Scheduled Pinned Locked Moved Arduino
    2 Posts 2 Posters 3.0k 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.
    • F Offline
      firex726
      last edited by

      Like it says in the title, I cannot load the "Hello World" program provided on the product page:

      https://docs.m5stack.com/en/quick_start/core2/arduino

      
      #include <M5Core2.h>
      
      /* After M5Core2 is started or reset
      the program in the setUp () function will be run, and this part will only be run once.
      After M5Core2 is started or reset, the program in the setup() function will be executed, and this part will only be executed once. */
      void setup(){
        M5.begin(); //Init M5Core2. Initialize M5Core2
                          /* Power chip connected to gpio21, gpio22, I2C device
                            Set battery charging voltage and current
                            If used battery, please call this function in your project */
        M5.Lcd.print("Hello World"); // Print text on the screen (string) Print text on the screen (string)
      }
      
      /* After the program in setup() runs, it runs the program in loop()
      The loop() function is an infinite loop in which the program runs repeatedly
      After the program in the setup() function is executed, the program in the loop() function will be executed
      The loop() function is an endless loop, in which the program will continue to run repeatedly */
      void loop() {
      
      }
      

      I have the board library installed and selected on the correct/only COM port. I have also tried different USB cables and ports.

      When I try and upload it'll come pile and report:

      Arduino: 1.8.16 (Windows 10), TD: 1.55, Board: "M5Stack-Core2, Enabled, Default (2 x 6.5 MB app, 3.6 MB SPIFFS), 240MHz (WiFi/BT), 921600, None, Disabled"
      
      exit status 1
      
      Error compiling for board M5Stack-Core2.
      
      
      
      This report would have more information with
      "Show verbose output during compilation"
      option enabled in File -> Preferences.
      

      Verbose Output:

      Arduino: 1.8.16 (Windows 10), TD: 1.55, Board: "M5Stack-Core2, Enabled, Default (2 x 6.5 MB app, 3.6 MB SPIFFS), 240MHz (WiFi/BT), 921600, None, Disabled"
      
      C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\firex\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\firex\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\firex\OneDrive\Documents\Arduino\libraries -fqbn=m5stack:esp32:m5stack-core2:PSRAM=enabled,PartitionScheme=default,CPUFreq=240,UploadSpeed=921600,DebugLevel=none,EraseFlash=none -vid-pid=1A86_55D4 -ide-version=10816 -build-path C:\Users\firex\AppData\Local\Temp\arduino_build_280106 -warnings=none -build-cache C:\Users\firex\AppData\Local\Temp\arduino_cache_613576 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc-gcc8_4_0-esp-2021r2-patch3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.mkspiffs.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mklittlefs.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\mklittlefs\3.0.0-gnu12-dc7f933 -prefs=runtime.tools.mklittlefs-3.0.0-gnu12-dc7f933.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\mklittlefs\3.0.0-gnu12-dc7f933 -prefs=runtime.tools.esptool_py.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\esptool_py\3.3.0 -prefs=runtime.tools.esptool_py-3.3.0.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\esptool_py\3.3.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.xtensa-esp32-elf-gcc-gcc8_4_0-esp-2021r2-patch3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.riscv32-esp-elf-gcc.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.riscv32-esp-elf-gcc-gcc8_4_0-esp-2021r2-patch3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.xtensa-esp32s3-elf-gcc.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.xtensa-esp32s3-elf-gcc-gcc8_4_0-esp-2021r2-patch3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -verbose C:\Users\firex\OneDrive\Documents\Arduino\sketch_nov01d\sketch_nov01d.ino
      
      C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\firex\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\firex\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\firex\OneDrive\Documents\Arduino\libraries -fqbn=m5stack:esp32:m5stack-core2:PSRAM=enabled,PartitionScheme=default,CPUFreq=240,UploadSpeed=921600,DebugLevel=none,EraseFlash=none -vid-pid=1A86_55D4 -ide-version=10816 -build-path C:\Users\firex\AppData\Local\Temp\arduino_build_280106 -warnings=none -build-cache C:\Users\firex\AppData\Local\Temp\arduino_cache_613576 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.xtensa-esp32s2-elf-gcc-gcc8_4_0-esp-2021r2-patch3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32s2-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.mkspiffs.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mkspiffs-0.2.3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\mkspiffs\0.2.3 -prefs=runtime.tools.mklittlefs.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\mklittlefs\3.0.0-gnu12-dc7f933 -prefs=runtime.tools.mklittlefs-3.0.0-gnu12-dc7f933.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\mklittlefs\3.0.0-gnu12-dc7f933 -prefs=runtime.tools.esptool_py.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\esptool_py\3.3.0 -prefs=runtime.tools.esptool_py-3.3.0.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\esptool_py\3.3.0 -prefs=runtime.tools.xtensa-esp32-elf-gcc.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.xtensa-esp32-elf-gcc-gcc8_4_0-esp-2021r2-patch3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.riscv32-esp-elf-gcc.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.riscv32-esp-elf-gcc-gcc8_4_0-esp-2021r2-patch3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\riscv32-esp-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.xtensa-esp32s3-elf-gcc.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -prefs=runtime.tools.xtensa-esp32s3-elf-gcc-gcc8_4_0-esp-2021r2-patch3.path=C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\tools\xtensa-esp32s3-elf-gcc\gcc8_4_0-esp-2021r2-patch3 -verbose C:\Users\firex\OneDrive\Documents\Arduino\sketch_nov01d\sketch_nov01d.ino
      
      Using board 'm5stack-core2' from platform in folder: C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.5+1.0
      
      Using core 'esp32' from platform in folder: C:\Users\firex\AppData\Local\Arduino15\packages\m5stack\hardware\esp32\2.0.5+1.0
      
      cmd /c if exist "C:\\Users\\firex\\OneDrive\\Documents\\Arduino\\sketch_nov01d\\partitions.csv" COPY /y "C:\\Users\\firex\\OneDrive\\Documents\\Arduino\\sketch_nov01d\\partitions.csv" "C:\\Users\\firex\\AppData\\Local\\Temp\\arduino_build_280106\\partitions.csv"
      
      cmd /c if not exist "C:\\Users\\firex\\AppData\\Local\\Temp\\arduino_build_280106\\partitions.csv" if exist "C:\\Users\\firex\\AppData\\Local\\Arduino15\\packages\\m5stack\\hardware\\esp32\\2.0.5+1.0\\variants\\m5stack_core2\\partitions.csv" COPY "C:\\Users\\firex\\AppData\\Local\\Arduino15\\packages\\m5stack\\hardware\\esp32\\2.0.5+1.0\\variants\\m5stack_core2\\partitions.csv" "C:\\Users\\firex\\AppData\\Local\\Temp\\arduino_build_280106\\partitions.csv"
      
      cmd /c if not exist "C:\\Users\\firex\\AppData\\Local\\Temp\\arduino_build_280106\\partitions.csv" COPY "C:\\Users\\firex\\AppData\\Local\\Arduino15\\packages\\m5stack\\hardware\\esp32\\2.0.5+1.0\\tools\\partitions\\default_16MB.csv" "C:\\Users\\firex\\AppData\\Local\\Temp\\arduino_build_280106\\partitions.csv"
      
      The system cannot find the file specified.
      
      exit status 1
      
      Error compiling for board M5Stack-Core2.
      
      
      
      1 Reply Last reply Reply Quote 0
      • sirspotS Offline
        sirspot
        last edited by

        I spent about and hour trying things and the best solution I could find was to manually copy the desired csv file to the build folder and then rebuild. I also had to turn off compiler warnings because it would treat them as errors.

        Here are the details. The csv files are located in AppData/Local/Arduino15/packages/m5stack/hardware/esp32/2.0.5+1.0/tools/partitions. I used minimal.csv, copies it to the build folder, and renamed it to partitions.csv. That fixed it!

        I hope this helps!
        Adam

        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