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.19k stars 19.21k forks source link

Need dev's / mod's approval for use of logo... #8254

Closed Spawn32 closed 6 years ago

Spawn32 commented 6 years ago

Will delete this "Issue" as soon as i get a answer, or would it be ok to have it open ?, will need help with HAL etc..

Board going to PCB Fab on Monday, is the use of the Marlin logo ok ?

The board is OSH and will be published on github as soon as i am finished and have cleaned up the files.

Board will be black but haven't decided on white or yellow logo / text yet.

front back
Spawn32 commented 6 years ago

@tcm0116 This is how the debug stuff looks now, stil stops or crashes the usb / cpu, no usb after reset / boot 😞 as soon as i do //#define TMC_DEBUG everything is back to normal..

TMC26XStepperSTM32.zip

Spawn32 commented 6 years ago

added this at the beginning but ended up with errors:

ifdef TMC_DEBUG

if NUM_SERIAL > 0

MYSERIAL0.begin(BAUDRATE);
#if NUM_SERIAL > 1
  MYSERIAL1.begin(BAUDRATE);
#endif
SERIAL_PRINTF("TMC26x Debug running:");
SERIAL_FLUSHTX();

endif

endif

`In file included from C:\Users\Familien\AppData\Local\Temp\arduino_build_812354\sketch\src\HAL\HAL_STM32F7\TMC26XStepper\TMC26XStepperSTM32.cpp:36:0:

c:\users\familien\appdata\local\temp\arduino_build_812354\sketch\src\hal\hal_stm32f7\hal_stm32f7.h:61:21: error: 'SerialUSB' does not name a type

define MYSERIAL0 SerialUSB // was SerialUSB // usb_serial

                 ^

C:\Users\Familien\AppData\Local\Temp\arduino_build_812354\sketch\src\HAL\HAL_STM32F7\TMC26XStepper\TMC26XStepperSTM32.cpp:125:5: note: in expansion of macro 'MYSERIAL0'

 MYSERIAL0.begin(BAUDRATE);

 ^~~~~~~~~

c:\users\familien\appdata\local\temp\arduino_build_812354\sketch\src\hal\hal_stm32f7\hal_stm32f7.h:94:23: error: 'SerialUART5' does not name a type

 #define MYSERIAL1 SerialUART5

                   ^

C:\Users\Familien\AppData\Local\Temp\arduino_build_812354\sketch\src\HAL\HAL_STM32F7\TMC26XStepper\TMC26XStepperSTM32.cpp:127:7: note: in expansion of macro 'MYSERIAL1'

   MYSERIAL1.begin(BAUDRATE);

   ^~~~~~~~~

c:\users\familien\appdata\local\temp\arduino_build_812354\sketch\src\hal\hal_stm32f7\hal_stm32f7.h:61:21: error: 'SerialUSB' does not name a type

define MYSERIAL0 SerialUSB // was SerialUSB // usb_serial

                 ^

c:\users\familien\appdata\local\temp\arduino_build_812354\sketch\src\core\serial.h:158:39: note: in expansion of macro 'MYSERIAL0'

define SERIAL_PRINTF(args...) MYSERIAL0.printf(args)

                                   ^~~~~~~~~

C:\Users\Familien\AppData\Local\Temp\arduino_build_812354\sketch\src\HAL\HAL_STM32F7\TMC26XStepper\TMC26XStepperSTM32.cpp:129:5: note: in expansion of macro 'SERIAL_PRINTF'

 SERIAL_PRINTF("TMC26x Debug running:");

 ^~~~~~~~~~~~~`
tcm0116 commented 6 years ago

Your hal_stm32f7.h file needs to #include whatever file has USBSerial declared in it.

Spawn32 commented 6 years ago

USBSerial is declared inside STM32GENERIC version of arduino.h and automatically included, the hal works fine with multihost. If i dont turn on TMC_DEBUG i have perfectly working hosts from simplyfy3d and my uart5 at the same time, trouble starts when i want to use serial from TMC26XStepperSTM32.cpp.

It's like serial magically just works inside Marlins core functions / files, LOL

this is from uart5 as long as i dont try any serial TMC debug :)

start echo: Software Reset Marlin bugfix-2.0.x

echo: Last Updated: 2017-11-19 12:00 | Author: (Spawn32, The_Borg) echo:Compiled: Nov 26 2017 echo: Free Memory: 512759 PlannerBufferBytes: 1408 echo:Hardcoded Default Settings Loaded echo: G21 ; Units in mm

echo:Filament settings: Disabled echo: M200 D3.00 echo: M200 T1 D3.00 echo: M200 D0 echo:Steps per unit: echo: M92 X200.00 Y200.00 Z800.00 E280.00

tcm0116 commented 6 years ago

@Spawn32 I'll see if I can find some time to look at it. Would it be possible for you to push your entire working folder to a branch in your fork of Marlin on GitHub so I can look at exactly what you're working with? I can then submit a PR entity any changes I might have.

By the way, how much did it cost to build one of your boards? It might be fun to have one to play around with, if it's not too expensive to get one to me in the U.S.

Spawn32 commented 6 years ago

OMG, worst hour of my life, been without internet, never happen'd before, just got i back LOL

I can upload my Marlin branch on my github, reason i haven't before is that it's full of stupid test remarks, guess it's not that important, will upload it later and tell you.

But you will also need the STM32GENERIC with my board and mods, that's the problem, it's 4700 files and 76mb, github dont allow more than 100 files and 10mb, github is full of projects bigger than that, but don't know how people get it uploaded :/

you must also install the latest 2017-q2-update/bin/arm-none-eabi and change the tool path to the new one, the internal in arduino only goes up to a STM32F4 :)

I think i mentioned before that if i get help i will of course supply a card for free, problem is that they are to hard to hand build, looks like i will be getting most of the parts for my pick & place machine tomorrow so i can start building that and get some more cards build :)

Spawn32 commented 6 years ago

Hmm... now i have the same problem with Marlin, can upload it to github, to many files and to big, is this a a restriction on the free account ? Until i can solve this i will zip marlin and STM32GENERIC and past the links to my onedrive here :)

Spawn32 commented 6 years ago

Borg Marlin MultiHost:
https://1drv.ms/u/s!Asf9doI7WS5djekLOfiqPaK9rW089Q

STM32GEN (goes into you hardware folder in arduino) : https://1drv.ms/u/s!Asf9doI7WS5djekM16bRBsV0DJBFfw

This are safe OneDrive links to me, nothing funny :)

after that you should have The_Borge in the boards section of arduino :) This one compiles and multihost works, but locks up steppers and no TMC_DEBUG...

Don't laugh, it's a mess but compiles 😄

tcm0116 commented 6 years ago

Any reason you're not using the official stm32duino STM32 HAL implementation? It looks like it can directly install into the Arduino IDE:

https://github.com/stm32duino/wiki/wiki/Boards-Manager

Spawn32 commented 6 years ago

I think it's harder to add your own board,it has some development boards in it that's all i think, i actually tried to install it now to have a look at it, following the guide i cant even find it...

I started out my design looking at Chris Barr's picoprint , but after that i decided on another faster MCU and adding a lot of options, changing the power supply, etc.. But he already had a F4 hal with the TCM26x driver almost finished but in a very old release of the 32-Bit-RCBugFix branch.

Her is the official forum thread for STM32Generic, has a lot of more posts than the other one: http://stm32duino.com/viewforum.php?f=51

Are you using the free github account or a paid one ? can't figure out this limit stuff, tested with github desktop (windows 10) also, it looked ok, but suddenly fails during publishing.

Bob-the-Kuhn commented 6 years ago

Would a ST Nucleo F7xx board be useful for code development & testing? Just wondering if there was a quick/easy way for others to help.

Spawn32 commented 6 years ago

@Bob-the-Kuhn A nice ider, but most stuff is already working, problem now is to get the debug part of the TCMdriver to compile without errors and / or killing the main usb, so without the physical TCM2660 chip there isn't much more you could do i think.

Other stuff that needs to be fixed later is: On board wifi (ESP8266) will probably magically start working when we get multi host merged :)

Software for the on board Octoprint / Raspberry Pi Zero, (ider from Prusas MK3) will just wait and se what Prusa does with their firmware.

And a pinsdebug for the hal would be great, specially when i am going to test the on board Multi Material switch :)

And i am not sure yet if Marlin has support for the RGB / case light i implemented ? 5v,CI,DO,GND, very common led strip..

tcm0116 commented 6 years ago

Why do you need to add your own board to the framework? Shouldn't it be generic? If so, you would then just make any necessary changes to the Marlin code. Ideally, this would be in the form of a STM32 HAL and then a pins file.

On Nov 26, 2017 7:32 PM, "Morten" notifications@github.com wrote:

@Bob-the-Kuhn https://github.com/bob-the-kuhn A nice ider, but most stuff is already working, problem now is to get the debug part of the TCMdriver to compile without errors and/ or killing the main usb, so without the physical TCM2660 chip ther'r isen't much more you could do i think.

Other stuff that needs to be fixed later is: On board wifi (ESP8266) will probably magically start working when we get multi host merged :)

Software for the on board Octoprint / Raspberry Pi Zero, (ider from Prusas MK3) will just wait and se what Prusa does with their firmware.

And a pinsdebug would be great, specially when i am going to test the on board Multi Material switch :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/8254#issuecomment-347056812, or mute the thread https://github.com/notifications/unsubscribe-auth/AByD5akdvkaOCtgfVO67QwvtDzjYFoISks5s6hEdgaJpZM4QSHyt .

Spawn32 commented 6 years ago

The problem is that there is a lot of different F7 MCU's most of them needs it's own special startup code because of differences in internal / external clocks / dividers , flash and ram size, pin amount, with or without Ethernet, display port, CAN, etc.. (it's a crazy MCU) 😄

This is handel'd by adding you own board to the STM32Generic menu in arduino.

Once you have everything working you could probably commit your new board to the STM32Generic git so users dont have to modify or copy files and just install the library.

There i also a solution to compile it with STM32Generic using platformio, but haven't looked into that yet.

The STM32F7 hal inside Marlin probably dosent need any changes when it's fully working.

But we might find even easy er ways, most of my thinking goes into getting everything to work this day's 😃

Fact: a STM32F7 running at 216mhz is about 100% faster than a STM32F4 at 180Mhz, by adding more ram it can run Linux :)

tcm0116 commented 6 years ago

Interesting. Ideally, we'd load the required startup code based on which MCU you have, and then handle configuring of the peripherals in the HAL inside Marlin. It seems really tedious to have to have every unique board added to the upstream HAL.

Spawn32 commented 6 years ago

Yup, it can probably be handled much more streamlined, but that will probably start falling into place when it works :)

Spawn32 commented 6 years ago

I have actually just found a total of 3 small flaws in the first revision of the board, not to bad :)

Missing CS signal from MCU to SdCard (easy fix with a small strap).

Missing serial tx/rx signal fro MCU to the ESP8266, not sure we need them since we have spi to it :) but only needs 2 small st(r)aps to fix it, not sure where my head was when was going to rout those :)

There is a total of 6 thermistor ports, one is placed on the Z-Probe port so we can have a temp calibration / compensation on it at some stage.. (the probes changes a lot at different temps)

Spawn32 commented 6 years ago

@tcm0116 //SERIAL_PRINTF("Received ", i_datagram,HEX); SERIAL_ECHOPAIR("\n\nReceived \n", i_datagram);

how do i get SERIAL_ECHOPAIR to send i_datagram as a hex value ? (it doesn't like 3 values) or is there another Marlin SERIAL_xx for that ? 😄

AnHardt commented 6 years ago

Marlin\Marlin\src\libs\hex_print_routines.h Examples in M100.

Spawn32 commented 6 years ago

Ahh.. thanks :)

Spawn32 commented 6 years ago

datagram is unsigned long, print_hex stops at word :)

AnHardt commented 6 years ago
  char* hex_word(const uint16_t w) {
    _hex_word(w);
    return &_hex[byte_start + 2];
  }

  #ifdef CPU_32_BIT
    char* hex_long(const uint32_t l) {
      _hex[2] = hex_nybble(l >> 28);
      _hex[3] = hex_nybble(l >> 24);
      _hex[4] = hex_nybble(l >> 20);
      _hex[5] = hex_nybble(l >> 16);
      _hex_word((uint16_t)(l & 0xFFFF));
      return &_hex[2];
    }
  #endif

  char* hex_address(const void * const w) {
    #ifdef CPU_32_BIT
      (void)hex_long((ptr_int_t)w);
    #else
      (void)hex_word((ptr_int_t)w);
    #endif
    return _hex;
  }

add in the .h-file

@@ -33,10 +33,13 @@ FORCE_INLINE char hex_nybble(const uint8_t n) {
   return (n & 0xF) + ((n & 0xF) < 10 ? '0' : 'A' - 10);
 }
 char* hex_byte(const uint8_t b);
 char* hex_word(const uint16_t w);
 char* hex_address(const void * const w);
+#ifdef CPU_32_BIT
+  char* hex_long(const uint32_t l);
+#endif

 void print_hex_nybble(const uint8_t n);
 void print_hex_byte(const uint8_t b);
 void print_hex_word(const uint16_t w);
 void print_hex_address(const void * const w);
tcm0116 commented 6 years ago

SERIAL_PRINTF("Received %x", i_datagram);

Spawn32 commented 6 years ago

@tcm0116 , thanks that worked :)

Couldn't get it to understand that CPU_32_BIT was defined...

Getting debug info now, and starting to have a clue to whats wrong :) One of the phases on the Y stepper driver is 1k ohm from ground, that probably shuts down all steppers, will fix tomorrow...

Spawn32 commented 6 years ago

Houston we have steppers 😄 Had a terrible divider fault in my HAL_timer :/ This TMC2660's is really quiet, absolutely no vibration's, nice :)

Spawn32 commented 6 years ago

Patched St's eeprom in flash emulator so now it works in the F7, finally i have eeprom :)

Spawn32 commented 6 years ago

OctoPi finally on board and running nicely at the same time as simplify3d, thanks to https://github.com/MarlinFirmware/Marlin/pull/8148 and @tcm0116 😄

20171212_214508

Spawn32 commented 6 years ago

So got the pick and place head's today, was the last missing bits to start building the pick and place machine so i can make some boards :) Those steppers looks nice and cute, LOL

PS, i added Kim Jong-un's atomic button for size comparing ;)

pick

Roxy-3D commented 6 years ago

Why 2 Pick and Place heads? Are you going to make a dual 'nozzle' version?

I'm glad that Nuke button has been removed from Kim Jong-un's desk. It is probably safer in your spare parts box.

Spawn32 commented 6 years ago

Using 2 tool head's is better, no need to change the tool head's (at least not that often). One is for the smallest 402 components and one for IC's.

The tool moved up and down by using a small slider , stepper and a retur spring, after the tool head pick's up a component is passes a upwards facing cam and uses that to dial inn the correct skew, that's why the cute small stepper's are there.

Regarding the Nuke button, there where no wires connected to it, so it never worked, he had it just for show, LOL

20180104_194119

labotecno commented 4 years ago

hello do you have some info about this board ? thank you

github-actions[bot] commented 3 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.