MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.25k stars 19.23k forks source link

[BUG] error LULZBOT_TOUCH_UI #15134

Closed Lino77 closed 5 years ago

Lino77 commented 5 years ago

It may be that a few configuration settings are missing. I can not find MAX_MANUAL_FEEDRATE anywhere

tmp/arduino_build_721483/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp: In static member function 'static float MoveAxisScreen::getManualFeedrate(uint8_t, float)': /tmp/arduino_build_721483/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/move_axis_screen.cpp:112:47: error: 'MAX_MANUAL_FEEDRATE' was not declared in this scope constexpr float max_manual_feedrate[XYZE] = MAX_MANUAL_FEEDRATE; ^ Bibliothek Wire in Version 1.0 im Ordner: /home/lino/.arduino15/packages/ultimachine/hardware/sam/1.6.9-c/libraries/Wire wird verwendet Bibliothek TMCStepper in Version 0.4.6 im Ordner: /home/lino/Arduino/libraries/TMCStepper wird verwendet Bibliothek SPI in Version 1.0 im Ordner: /home/lino/.arduino15/packages/ultimachine/hardware/sam/1.6.9-c/libraries/SPI wird verwendet exit status 1 Fehler beim Kompilieren für das Board Archim.

boelle commented 5 years ago

attach 2 config files as zip file just as the issue template suggests

Lino77 commented 5 years ago

Marlin_config.zip

Ludy87 commented 5 years ago

@Lino77 Das sollte nicht auskommentiert sein und dann muss es ein Array sein https://github.com/MarlinFirmware/Marlin/blob/d9bbe0ff02530239dfa726b87e8303ff427755ba/Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h#L93

define MAX_MANUAL_FEEDRATE { 240, 240, 240, 240 }

Aber ich denke, da werden noch mehr Fehler auftauchen.

@marcio-ao can you say more about that?

marcio-ao commented 5 years ago

@Ludy87: Yes, it looks like that config file is incorrect. I agree that the following would be a fix:

#define MAX_MANUAL_FEEDRATE { 240, 240, 240, 240 }

I'll create a PR with this fix.

Ludy87 commented 5 years ago

Thx @marcio-ao

Lino77 commented 5 years ago

@Ludy87 hattest recht es kam noch ein Fehler anbei meine Config und was ich geändert habe das es durch kompiliert jetzt fehlt mir nur noch das Display zum testen hoffentlich kommt es bald, sollte schon letzte Woche eigentlich da sein, kannst du mir sagen für was "LCD_STR_THERMOMETER" eigentlich steht

Config.zip

Ludy87 commented 5 years ago

that's because it's not called HAS_GRAPHICAL_LCD || HAS_CHARACTER_LCD is declared

@marcio-ao will release a PR with bug fixes

Lino77 commented 5 years ago

@marcio-ao I have a ft 810 and have it connected to the Ultimachine Archim2 as in the pin_mappings.h, and I hope, synonymous configured, but the display remains black. Here is my config and how I wired it. Marlin.zip

AO_EXP2_PINMAP *

The USB Reader is from You

Furthermore, I get with the current git an error , see here.

/tmp/arduino_build_118472/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp: In static member function 'static void BootScreen::onIdle()': /tmp/arduino_build_118472/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp:65:7: error: 'loadBitmaps' is not a member of 'StatusScreen' StatusScreen::loadBitmaps(); ^ /tmp/arduino_build_118472/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp:78:5: error: 'loadBitmaps' is not a member of 'StatusScreen' StatusScreen::loadBitmaps(); ^ /tmp/arduino_build_118472/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/media_player_screen.cpp: In static member function 'static void MediaPlayerScreen::playStream(void, int16_t ()(void, void, size_t))': /tmp/arduino_build_118472/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/media_player_screen.cpp:164:7: error: 'loadBitmaps' is not a member of 'StatusScreen' StatusScreen::loadBitmaps(); ^ Bibliothek Wire in Version 1.0 im Ordner: /home/lino/.arduino15/packages/ultimachine/hardware/sam/1.6.9-c/libraries/Wire wird verwendet Bibliothek TMCStepper in Version 0.4.6 im Ordner: /home/lino/Arduino/libraries/TMCStepper wird verwendet Bibliothek SPI in Version 1.0 im Ordner: /home/lino/.arduino15/packages/ultimachine/hardware/sam/1.6.9-c/libraries/SPI wird verwendet exit status 1 /tmp/arduino_build_118472/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/status_screen.cpp:381:32: error: no 'void StatusScreen::loadBitmaps()' member function declared in class 'StatusScreen' void StatusScreen::loadBitmaps() { ^ Fehler beim Kompilieren für das Board Archim.

marcio-ao commented 5 years ago

@Lino77: For the moment, you should be able to bypass the compilation error by disabling TOUCH_UI_USE_UTF8 in Configuration_adv.h. I'll work on a pull request with a fix.

As for why your display is blank, let's gather some more information. Uncomment "#define UI_FRAMEWORK_DEBUG" in Marlin/src/lcd/extensible_ui/lib/lulzbot/config.h

Then recompile. Then power on the printer and immediately connect via serial. You can confirm whether the USB is working by looking for the following:

Testing X connection... OK␊
Testing Y connection... OK␊
Testing Z connection... OK␊
Testing E connection... OK␊
Testing E1 connection... OK␊
echo:Saving DL to RAMG cache, bytes: 1368 Free space: 2048␊
echo:New status message: LulzBot TAZ Pro ready.␊
echo:New screen: 1␊
echo:SD init fail␊
echo:Active Extruder: 0␊
Starting USB host...rev.03 started␊
echo:Active Extruder: 0␊
X:-27.00 Y:292.00 Z:290.00 E:0.00 Count X:-2700 Y:29200 Z:145000␊
ok P15 B5␊
echo:New screen: 3␊
echo:Appending to DL from RAMG cache, bytes: 1368 REG_CMD_DL: 1368␊
echo:Appending to DL from RAMG cache, bytes: 1368 REG_CMD_DL: 1368␊
echo:Appending to DL from RAMG cache, bytes: 1368 REG_CMD_DL: 1368␊
echo:Appending to DL from RAMG cache, bytes: 1368 REG_CMD_DL: 1368␊
echo:Appending to DL from RAMG cache, bytes: 1368 REG_CMD_DL: 1368␊
echo:Appending to DL from RAMG cache, bytes: 1368 REG_CMD_DL: 1368␊
echo:Appending to DL from RAMG cache, bytes: 1368 REG_CMD_DL: 1368␊
echo:Appending to DL from RAMG cache, bytes: 1368 REG_CMD_DL: 1368␊

The important bit is to look for Starting USB host...rev.03 started and that you are seeing periodic Appending to DL from RAMG cache. The numbers may be slightly different.

Unfortunately, the way the FT810 works, the screen is blank even if it is powered, so troubleshooting can be a bit tricky. We first need to make sure communications is happening before we can move to the next steps.

Lino77 commented 5 years ago

@marcio-ao with inserted FT810 my Archim2 does not start, without see log log.txt

marcio-ao commented 5 years ago

@Lino77: Something isn't quite right. Check your wiring. You could start by disabling the LULZBOT_TOUCH_UI and making sure the USB is starting up. If you get Starting USB host...rev.03 started then you at least would know the GND, 5V, MISO, MOSI and CLK, CS_N are correct.

Lino77 commented 5 years ago

The USB port works only with activated Touch_ui. look at the log.txt, the Usb Port starts yes, but the rest does not want it to be that I have a broken ft810 I can not test the part somehow

Drucker ist jetzt Online.

echo:Not enough space in GRAM to cache display list, free space: 2048 Required: 8191 echo:CachedScreen::storeBackground() failed: not enough DL cache space echo:New status message: 3D Printer Ready. Faulted... ignoring write. Faulted... ignoring write. echo:Appending to DL from RAMG cache, bytes: 65535 REG_CMD_DL: 4294967295 Faulted... ignoring write. echo:Waiting for 4 bytes in command queue, now free: 0... fault Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. echo:Waiting for 4 bytes in command queue, now free: 0... fault Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Starting USB host...rev.03 started Faulted... ignoring write. Faulted... ignoring write. echo:Appending to DL from RAMG cache, bytes: 65535 REG_CMD_DL: 4294967295 Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write.

marcio-ao commented 5 years ago

With the Achim board, it is difficult to see error messages at startup, as the board always resets the serial connection.

So, edit "Marlin/src/lcd/extensible_ui/lib/lulzbot/ftdi_eve_lib/basic/commands.cpp" and replace:

  /* read the device-id until it returns 0x7c or times out, should take less than 150ms */
  uint8_t counter;
  for(counter = 0; counter < 250; counter++) {
   uint8_t device_id = mem_read_8(REG::ID);            // Read Device ID, Should Be 0x7C;
   if (device_id == 0x7c) {
     #ifdef UI_FRAMEWORK_DEBUG
       SERIAL_ECHO_START();
       SERIAL_ECHOLNPGM("FTDI chip initialized ");
     #endif
     break;
   }
   else {
     delay(1);
   }
   if (counter == 249) {
     #ifdef UI_FRAMEWORK_DEBUG
       SERIAL_ECHO_START();
       SERIAL_ECHOLNPAIR("Timeout waiting for device ID, should be 124, got ", device_id);
     #endif
   }
  }

With:

  /* read the device-id until it returns 0x7c or times out, should take less than 150ms */
  uint8_t counter;
  for(counter = 0; counter < 250; counter++) {
   uint8_t device_id = mem_read_8(REG::ID);            // Read Device ID, Should Be 0x7C;
   if (device_id == 0x7c) {
     for(;;) {
         SERIAL_ECHO_START();
         SERIAL_ECHOLNPGM("FTDI chip initialized ");
         safe_delay(1000);
     }
     break;
   }
   else {
     delay(1);
   }
   if (counter == 249) {
      for(;;) {
         SERIAL_ECHO_START();
         SERIAL_ECHOLNPAIR("Timeout waiting for device ID, should be 124, got ", device_id);
         safe_delay(1000);
      }
   }
  }

This should cause your printer to hang at startup printing either FTDI chip initialized or Timeout waiting for device ID, should be 124, got ....

marcio-ao commented 5 years ago

Also, let me know exactly which display you purchased.

marcio-ao commented 5 years ago

Another idea: Power on the printer with your finger touching the display. This is a special condition that will tell the printer it to force the settings to default. Sometimes the LCD brightness could be stuck at 0% you won't be able to see anything unless you force the settings to the defaults.

Lino77 commented 5 years ago

this display http://www.hotmcu.com/5-graphical-lcd-touchscreen-800x480-spi-ft810-p-286.html

Lino77 commented 5 years ago

IMG_20190914_000116

Lino77 commented 5 years ago

with the connected display. does not boot the board

marcio-ao commented 5 years ago

Check your pinout. I noticed that when you posted your pin mappings, the arrangement of the pin numbers was opposite of the ones here

Also, use a multimeter and make sure you can read 5V between the 5V and GND pads next to the ribbon cable on the FTDI board.

Lino77 commented 5 years ago

That was because I kept to the assignment of Ultimachine. pin assignment is correct 5v are connected to the board. I see that correctly, that only 5V GND MOSI MISO SCK CS PD are needed INT and audio are free SC2

Lino77 commented 5 years ago

Today's Marlin, it's just touch ui and USB support enabled,

/tmp/arduino_build_204641/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp: In static member function 'static void BootScreen::onIdle()': /tmp/arduino_build_204641/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp:65:7: error: 'loadBitmaps' is not a member of 'StatusScreen' StatusScreen::loadBitmaps(); ^ /tmp/arduino_build_204641/sketch/src/lcd/extensible_ui/lib/lulzbot/screens/boot_screen.cpp:78:5: error: 'loadBitmaps' is not a member of 'StatusScreen' StatusScreen::loadBitmaps(); ^

Lino77 commented 5 years ago

Okay, I have omitted the touch, and a normal smart controller connected USB works fine.

Connecting ... Printer is online now. USB device inserted LUN is good echo: SD card ok I think my FT810 is broken. Can I test the FT810 in any way? every time I plug in the display I lose the connection to Pronterface and nothing works anymore

marcio-ao commented 5 years ago

@Lino77: Try connecting a few pins at a time. First connect GND and 5V and check whether the board reboots. Then connect PD, CS, SCLK, MOSI and MISO in that order. See where the board starts to reboot. This will give you information on where the problem is.

Lino77 commented 5 years ago

@marcio-ao GND 5V OKAY PD okay CS Okay SCLK Okay Mosi OKay MISO not okay Printer hangs

echo:Waiting for 16 bytes in command queue, now free: 0... fault Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. echo:Touch start: 3 echo:Appending to DL from RAMG cache, bytes: 65535 REG_CMD_DL: 57373 echo:Waiting for 4 bytes in command queue, now free: 0... done echo:Waiting for 12 bytes in command queue, now free: 0... done echo:Waiting for 12 bytes in command queue, now free: 0... fault echo:Waiting for 12 bytes in command queue, now free: 0... done echo:Waiting for 4 bytes in command queue, now free: 0... fault echo:Waiting for 12 bytes in command queue, now free: 0 [ERROR] Can't read from printer (disconnected?) (SerialException): device reports readiness to read but returned no data (device disconnected or multiple access on port?) [ERROR] Can't write to printer (disconnected?) (SerialException): write failed: [Errno 5] Input/output error

marcio-ao commented 5 years ago

@Lino77: So MISO is "Master In, Slave Out", meaning it is a signal that comes from the LCD module to the Archim board. The fact that your board is crashing when that is connected indicates a couple possibilities:

1) Both sides are trying to drive a signal into the pin. This will cause a short which could cause the board to crash. 2) It is possible the pin on the LCD side is being driven at 5V, while the pins on the Archim are only 3.3V tolerant (this is unlikely)

If you have a resistor available (something in the order of 1kOhm), try to put that in series with the MISO line. If the board ceases to crash, then we know whether these issues were at play. Once we get the board not to crash, we can continue troubleshooting.

Lino77 commented 5 years ago

1kOhm resistance is in it. the board does not crash anymore, but still black

echo:Waiting for 4 bytes in command queue, now free: 0... done echo:Saving DL to RAMG cache, bytes: 0 Free space: 1048576 echo:Waiting for 16 bytes in command queue, now free: 0... done echo:Waiting for 4 bytes in command queue, now free: 0... done echo:Waiting for 12 bytes in command queue, now free: 0... done echo:Waiting for 12 bytes in command queue, now free: 0... done echo:Waiting for 12 bytes in command queue, now free: 0... done Faulted... ignoring write. echo:Waiting for 12 bytes in command queue, now free: 0... fault Faulted... ignoring write. Faulted... ignoring write. echo:Waiting for 12 bytes in command queue, now free: 0... fault Faulted... ignoring write. echo:Waiting for 12 bytes in command queue, now free: 0... fault Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. echo:Waiting for 4 bytes in command queue, now free: 0... fault Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write.

marcio-ao commented 5 years ago

@Lino77: Okay, that's good news. I guess we should confirm that the MISO pin was not damaged on the Archim.

My understanding is that you had gotten the USB to work before? Can you confirm it still works? Since the USB uses MISO, we can confirm that the MISO is good if the USB functions.

marcio-ao commented 5 years ago

First try the USB without the display connected. Then try it with the display connected. If the first case works, then we know the MISO is good on the Archim. If connecting the display causes the USB to fail, then we know the MISO on the display is interfering somehow.

Lino77 commented 5 years ago

USB works without touch

USB device inserted echo:Playing note 60, instrument 86 echo:Touch end: 0 echo:Waiting for 4 bytes in command queue, now free: 0... fault echo:Saving DL to RAMG cache, bytes: 8191 Free space: 1048577 Faulted... ignoring write. Faulted... ignoring write. echo:Waiting for 12 bytes in command queue, now free: 0... fault Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. echo:Waiting for 12 bytes in command queue, now free: 0... fault echo:Waiting for 12 bytes in command queue, now free: 0... fault Faulted... ignoring write. Faulted... ignoring write. Faulted... ignoring write. echo:Waiting for 16 bytes in command queue, now free: 0... fault Faulted... ignoring write. Faulted... ignoring write. LUN is good echo:SD card ok

Lino77 commented 5 years ago

The display lights up white without the USB Reader plugged in

Lino77 commented 5 years ago

IMG_20190919_171903

marcio-ao commented 5 years ago

@Lino77: This is peculiar. Check one thing for me. If you disconnect MOSI, the display will remain blank, correct? The fact that it is turning white suggests to me it at least is sending commands to the display and activating the backlight.

It seems like you may have wired everything up like our TAZ Pro, so try our official FW and see if it shows anything on the screen:

Marlin_Quiver_TAZPro_Quiver_DualExtruder_2.0.0.165_d1611cd53.bin.txt

marcio-ao commented 5 years ago

Also, please check your Archim 2.0 for identifying information. Maybe Ultimachine made different versions of the Archim. Does it have a version number?

Lino77 commented 5 years ago

Archim V2.2b Your Firmware works IMG_20190921_101222 IMG_20190921_101156 IMG_20190921_101331

Lino77 commented 5 years ago

@marcio-ao can you explain this, how do you compile your firmware

marcio-ao commented 5 years ago

@Lino77: Excellent! Having working FW will make it much easier for us to understand what is different from upstream Marlin.

The exact firmware you are using hasn't been pushed to our repo quite yet, but I'll give you instructions on how to compile what is there right now.

git clone https://code.alephobjects.com/diffusion/MARLIN/marlin.git
cd Marlin
git checkout devel

With Linux:

./build-lulzbot-firmware Quiver_TAZPro Quiver_DualExtruder

With Arduino IDE:

Run:

cp config/examples/AlephObjects/Quiver_TAZPro/CecropiaSilk_SingleExtruderAeroV2/* Marlin/

Run Arduino IDE (you need the beta build, earlier ones fail) on "Marlin/Marlin.ino":

Choose "Preferences" from the "File" menu and add "https://raw.githubusercontent.com/ultimachine/ArduinoAddons/master/package_ultimachine_index.json" to the "Additional Boards Manager URLs".

In the "Boards Manager" search for "Archim" and install "Archim by UltiMachine" Select "Archim" from the "Board" submenu menu of the "Tools" menu.

Compile and upload.

If it works, I recommend you start by comparing the "Configuration.h" and "Configuration_adv.h" for differences.

Lino77 commented 5 years ago

okay under linux I could build a firmware and it works too. under Arduino 1.9 beta I get the following error In file included from /tmp/arduino_build_807345/sketch/src/HAL/HAL_DUE/../../core/../inc/MarlinConfig.h:28:0, from /tmp/arduino_build_807345/sketch/src/HAL/HAL_DUE/../../core/serial.h:24, from /tmp/arduino_build_807345/sketch/src/HAL/HAL_DUE/DebugMonitor.cpp:26: /tmp/arduino_build_807345/sketch/src/HAL/HAL_DUE/../../core/../inc/MarlinConfigPre.h:49:35: fatal error: ../src/Lulzbot_Extras.h: No such file or directory

include "../src/Lulzbot_Extras.h"

                               ^

compilation terminated. exit status 1

Lino77 commented 5 years ago

I have the error arduino does not transfer the firmware properly to the board. I have created a hexfile under Arduino IDE, and loaded with cura the firmeware. And lo and behold! It works

boelle commented 5 years ago

@marcio-ao & @Lino77 any news on this one?

InsanityAutomation commented 5 years ago

@boelle @shitscreek this one can get closed. Arduino IDE issue.

boelle commented 5 years ago

oki, will swing the axe then :-D

github-actions[bot] commented 4 years ago

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.