[BUG] (Neopixels install returning an undefined reference error) #310

Closed
opened 2022-03-22 19:16:54 -05:00 by TeknikSaiko · 4 comments
TeknikSaiko commented 2022-03-22 19:16:54 -05:00 (Migrated from github.com)

Bug Description

When adding the physical hardware of neopixels and ensuring the hardware works, I tried to fill out the neopixel code in configuration.h and then I built the firmware in platform.io (MEGA_P_DGUS_TMC). The code got built up until the very last part where is resulted in an error of

Archiving .pio\build\MEGA_P_DGUS_TMC\libFrameworkArduino.a
Linking .pio\build\MEGA_P_DGUS_TMC\firmware.elf

C:\Users"MY NAME"\AppData\Local\Temp\ccpFS0bN.ltrans2.ltrans.o: In function GcodeSuite::process_parsed_command(bool)': <artificial>:(.text+0x5884): undefined reference to GcodeSuite::M150()'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\MEGA_P_DGUS_TMC\firmware.elf] Error 1

Steps to Reproduce

  1. Open the folder in VCS and navigate to configuration.h

  2. Modify code from lines 3528 to 3538
    // Support for Adafruit NeoPixel LED driver
    #define NEOPIXEL_LED
    #if ENABLED(NEOPIXEL_LED)
    #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)
    #define NEOPIXEL_PIN 11 // LED driving pin
    //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE
    //#define NEOPIXEL2_PIN 5
    #define NEOPIXEL_PIXELS 20 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.)
    #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.
    #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255)
    #define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup

  3. Go into platformIO --> MEGA_P_DSUS_TMC --> Build

  4. Receive error above

Expected behavior: [What you expect to happen]

Code finishes compiling successfully into a hex file

Actual behavior: [What actually happens]

Failure and Error code

C:\Users"MY NAME"\AppData\Local\Temp\ccpFS0bN.ltrans2.ltrans.o: In function GcodeSuite::process_parsed_command(bool)': <artificial>:(.text+0x5884): undefined reference to GcodeSuite::M150()'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\MEGA_P_DGUS_TMC\firmware.elf] Error 1****
Neopixel Error

Additional Information

  • Provide pictures or links to videos that clearly demonstrate the issue.
  • See How Can I Contribute for additional guidelines.
<!-- ------ PLEASE USE THIS TEMPLATE! -------- Have you read all Wiki articles in cluding the FAQ? https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/wiki Do you want to ask a question? Are you looking for support? Please don't post here. Instead please use one of the support links at https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/issues/new/choose --> ### Bug Description When adding the physical hardware of neopixels and ensuring the hardware works, I tried to fill out the neopixel code in configuration.h and then I built the firmware in platform.io (MEGA_P_DGUS_TMC). The code got built up until the very last part where is resulted in an error of Archiving .pio\build\MEGA_P_DGUS_TMC\libFrameworkArduino.a Linking .pio\build\MEGA_P_DGUS_TMC\firmware.elf ****C:\Users\"MY NAME"\AppData\Local\Temp\ccpFS0bN.ltrans2.ltrans.o: In function `GcodeSuite::process_parsed_command(bool)': <artificial>:(.text+0x5884): undefined reference to `GcodeSuite::M150()' collect2.exe: error: ld returned 1 exit status *** [.pio\build\MEGA_P_DGUS_TMC\firmware.elf] Error 1**** ### Steps to Reproduce <!-- Please describe the steps needed to reproduce the issue --> 1. Open the folder in VCS and navigate to configuration.h 2. Modify code from lines 3528 to 3538 // Support for Adafruit NeoPixel LED driver #define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) #define NEOPIXEL_PIN 11 // LED driving pin //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE //#define NEOPIXEL2_PIN 5 #define NEOPIXEL_PIXELS 20 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.) #define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once. #define NEOPIXEL_BRIGHTNESS 127 // Initial brightness (0-255) #define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup 3. Go into platformIO --> MEGA_P_DSUS_TMC --> Build 4. Receive error above **Expected behavior:** [What you expect to happen] Code finishes compiling successfully into a hex file **Actual behavior:** [What actually happens] Failure and Error code C:\Users\"MY NAME"\AppData\Local\Temp\ccpFS0bN.ltrans2.ltrans.o: In function `GcodeSuite::process_parsed_command(bool)': <artificial>:(.text+0x5884): undefined reference to `GcodeSuite::M150()' collect2.exe: error: ld returned 1 exit status *** [.pio\build\MEGA_P_DGUS_TMC\firmware.elf] Error 1**** ![Neopixel Error](https://user-images.githubusercontent.com/102194548/159597497-2de01a45-f0b9-42c1-bc1b-18404c56ceb4.JPG) #### Additional Information * Provide pictures or links to videos that clearly demonstrate the issue. * See [How Can I Contribute](#how-can-i-contribute) for additional guidelines.
ignotus666 commented 2022-03-23 15:23:13 -05:00 (Migrated from github.com)

Comment out -<src/gcode/feature/leds/M150.cpp> in ~ line 238 of platformio.ini. I think it should compile then.

Comment out `-<src/gcode/feature/leds/M150.cpp>` in ~ line 238 of platformio.ini. I think it should compile then.
TeknikSaiko commented 2022-03-23 17:48:49 -05:00 (Migrated from github.com)

Comment out -<src/gcode/feature/leds/M150.cpp> in ~ line 238 of platformio.ini. I think it should compile then.

Thanks! For some reason, I had to edit this out, compile it, and then add in the neopixel code but it worked. I appreciate it!

> Comment out `-<src/gcode/feature/leds/M150.cpp>` in ~ line 238 of platformio.ini. I think it should compile then. Thanks! For some reason, I had to edit this out, compile it, and then add in the neopixel code but it worked. I appreciate it!
github-actions[bot] commented 2022-04-22 21:00:23 -05:00 (Migrated from github.com)

This issue is stale because it has been open 30 days with no activity. Remove stale label / comment or this will be closed in 5 days.

This issue is stale because it has been open 30 days with no activity. Remove stale label / comment or this will be closed in 5 days.
github-actions[bot] commented 2022-06-27 09:05:14 -05:00 (Migrated from github.com)

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wp/Marlin-2-0-x-Anycubic-i3-MEGA-S#310
No description provided.