Xylopyrographer / STAC

A Roland Smart Tally Atom Client
Other
3 stars 0 forks source link

Error Compiling #43

Closed peterjamesgraham closed 1 year ago

peterjamesgraham commented 2 years ago

Hello, thanks so much for your coding expertise - I've been looking for just such a solution fo my church in Brampton, ON for some time!

I think I've done everything right, on two different Mac's (one running os 10.14, the other on 12) with exactly the same results.

Exit status 1 Error compiling for board M5Stack-ATOM.

I've attached the verbose log as an PDF - I hope it helps!

STAC Error.pdf

Can you help please?

Thank you!

Xylopyrographer commented 2 years ago

Hello Peter:

OK, should be pretty easy to fix up. Take a look at the README.md file in the libraries folder of the STAC repository here: https://github.com/Xylopyrographer/STAC/blob/main/libraries/libraries_README.md

I modified the original M5 Stack ATOM MATRIX library to fix a few things up. You'll have to replace the stock M5Atom library files with the modified ones.

Suggest:

  1. Quit the Arduino IDE if it's open.
  2. Delete the entire existing M5Atom library folder. Looks like you'll find it on your machine at: /Users/petergraham/Documents/Arduino/libraries/M5Atom/
  3. From within the Arduino IDE, go to the Library Manager (Tools --> Manage Libraries...) and search for and reinstall the M5Atom library, but this time select version 0.0.1.
  4. Follow the directions in the above README.md file to overwrite the stock libraries with the modified ones.

That should get you up and running.

I haven't peeked inside the latest 0.0.8 library to see if M5 has fixed things up in there. Or if the "M5Unified" library is a path forward. I figure any library with that many zero's in front is probably still an alpha version. 😉

And a hello back to you from Calgary, AB. 😄.

Please let me know if there are any other issues and do send a note when you're up and running with the STAC(s). I'd be very interested to know how they're working for you and as well get any feedback on the STAC itself or any of the documentation.

All the best.

Xylopyrographer commented 2 years ago

@peterjamesgraham

Hello Peter:

OK, should be pretty easy to fix up. Take a look at the README.md file in the libraries folder of the STAC repository here: https://github.com/Xylopyrographer/STAC/blob/main/libraries/libraries_README.md

I modified the original M5 Stack ATOM MATRIX library to fix a few things up. You'll have to replace the stock M5Atom library files with the modified ones.

Suggest:

Quit the Arduino IDE if it's open. Delete the entire existing M5Atom library folder. Looks like you'll find it on your machine at: /Users/petergraham/Documents/Arduino/libraries/M5Atom/ From within the Arduino IDE, go to the Library Manager (Tools --> Manage Libraries...) and search for and reinstall the M5Atom library, but this time select version 0.0.1. Follow the directions in the above README.md file to overwrite the stock libraries with the modified ones. That should get you up and running.

I haven't peeked inside the latest 0.0.8 library to see if M5 has fixed things up in there. Or if the "M5Unified" library is a path forward. I figure any library with that many zero's in front is probably still an alpha version. 😉

And a hello back to you from Calgary, AB. 😄.

Please let me know if there are any other issues and do send a note when you're up and running with the STAC(s). I'd be very interested to know how they're working for you and as well get any feedback on the STAC itself or any of the documentation.

All the best.

peterjamesgraham commented 2 years ago

Hi again, thanks for your quick and thorough reply! I've been on quite a journey on my end.

First I had to find, figure out how to implement and do this - https://community.m5stack.com/topic/3866/error-compiling-for-board-m5stack-atom

In the meantime, I was pretty sure I had fried my first ATOM, but after adding the U to the line Wire.begin(25, 21, 100000); I managed to compile and upload one of the ATOM example sketches (yay!)

Now I get this error. Full, verbose log is attached.

Once again, can you help please?

Thanks again!

STAC Error #3.pdf

/Users/petergraham/Library/Arduino15/packages/m5stack/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /var/folders/dv/bb5675nn6c3_6y7cchx_x6b00000gn/T/arduino_build_522972/libraries/Preferences/Preferences.cpp.orig.cpp.o:/Users/petergraham/Library/Arduino15/packages/m5stack/hardware/esp32/2.0.2/libraries/Preferences/src/Preferences.cpp.orig.cpp:20: multiple definition of `nvs_errors'; /var/folders/dv/bb5675nn6c3_6y7cchx_x6b00000gn/T/arduino_build_522972/libraries/Preferences/Preferences.cpp.o:/Users/petergraham/Library/Arduino15/packages/m5stack/hardware/esp32/2.0.2/libraries/Preferences/src/Preferences.cpp:26: first defined here collect2: error: ld returned 1 exit status exit status 1 Error compiling for board M5Stack-ATOM

[STAC Error #3.pdf]

Xylopyrographer commented 2 years ago

Hi Peter:

The problem is the compiler, as it traverses all the directories in all its search paths looking for all the bits it needs to put together the sketch, is finding both the modified Preferences.cpp file and as well the original one. You'll need to move some files around so that the compiler is blind to the original.

[Sidebar: It seems the compiler looks for any file that starts with (in this case) Preferences. It behaves as if it stops matching after the second "." it sees in the file name, meaning it'll try and use "file.cpp.whatever", "file.cpp.pizza.some.thing.else", "file.cpp", etc. I'll have to make this a bit clearer in the next version of the libraries_README.md file]

First, quit the Arduino IDE app completely.

Move the file: /Users/petergraham/Library/ Arduino15/packages/m5stack/hardware/esp32/2.0.2/libraries/Preferences/src/Preferences.cpp.orig.cpp in to a folder on your Desktop or to some other folder outside the /Users/petergraham/Library/Arduino15 folder. Do not put it anywhere in your /Users/petergraham/Documents/Arduino folder.

Check your /Users/petergraham/Documents/Arduino and your /Users/petergraham/Documents/Arduino/STAC folders and subfolders to make sure there is no other Preferences.xxx file. If you find one, either move it to some other folder outside that path or delete it. (But you do not want to delete or move the Preferences.h file in /Users/petergraham/Library/Arduino15/packages/m5stack/hardware/esp32/2.0.2/libraries/Preferences/src/)

Bottom line, there should only be one Preferences.cpp file and it should live in the ...Arduino15/... path

I'm also seeing that you have an overall different folder structure in your ...Arduino15/... path than my system.

Are you using an arduino-esp32 core version 2.x.y and/or are you using the newish Unified M5Stack library?

I've not done any testing using either of those cores/libraries as especially for the 2.x.y series cores there have been a lot of changes to the communications libraries, including WiFi. I don't consider the 2.x.y series stable as there is till a lot of development work on-going.

However, it may be that everything will work just dandy. Let me know how it goes!

peterjamesgraham commented 2 years ago

Woot woot! Thank you once again!!

Moving the Preference file to another location did not do the whole job - I also had to move LED_DisPlay.cpp.orig, LED_DisPlay.h.orig and MPU6886.cpp.orig to another location and viola!

Thanks again for your guideance.

Now to get it all set up!

mqshaw commented 2 years ago

@peterjamesgraham Welcome to the STAC community, glad to hear that you have got the code compiling now. Just an FYI, if you are looking for a better IDE than the Arduino one, I have been successful getting the STAC FW to compile using Visual Studio Code. Much nicer IDE when trolling through the code with the intelligent agent.

Xylopyrographer commented 1 year ago

Closed as completed.