26

Re: Question about Arduino install, stuck

All right, I made the change to configuration.h to make the max temp 350. I compiled it. When I look st the folder, only configuration.h shows a change on the date time stamp, is that correct?

I am getting confused now on which instructions to follow. Am I ready to upload the firmware with the HID bootloader?

If so, is this next part correct?:
- Download Lincomatic's BootloaderHID.zip and extract the files.
- Move the firmware.cpp.hex file from the previous section into the BootloaderHID folder.
 
(I cannot find the firmware.cpp.hex file. Where, oh where, could it be?)

- Connect your motherboard to your PC via USB. Add a jumper to the BOOT pins and press the RESET button to reset into bootloader mode. If you do not have a jumper, just short the pins together and press reset.

- Open a command prompt window. Navigate to BootloaderHID folder in the comand promt window and type the following command, substituting your file in for "firmware.cpp.hex":
hid_bootloader_cli -mmcu=at90usb1286 -w -v firmware.cpp.hex

Your firmware should upload to your motherboard very quickly before resetting.

Is that it? All done?

Robox printer, HICTOP (Prusa i3 variant) Model 3DP17 printer, ELEK 2.5W laser engraver, AutoDesk 123D Design, Windows 10

27 (edited by 3d-oodler 2013-09-12 16:06:57)

Re: Question about Arduino install, stuck

You shouldn't have to mess with the Bootloader.

Make the configuration.h changes in the Arduino IDE, save them, hit the reset button on the board and hit Upload.

You shouldn't have to mess with the jumper.

Though I'm basing this information on my experience with the Sanguino board, not Printrboard.

28 (edited by jason_ 2013-09-12 16:23:48)

Re: Question about Arduino install, stuck

I'm pretty sure its a totally different process with the Sang

To find your firmware.cpp.hex file you need to look at the information the compile put out  (You have to hold shift or maybe ctl to see this it tells you in the instructions).

It will be in a location like c:\Users\Yourusername\Appdata\Local\

and it won't actually be called firmware.cpp.hex you have to read the information to get the filename, it will be the only cpp.hex file referenced though.

Unzip the HIDbootloader, locate the file generated above copy it into the hidbootloader directory.  I chose to rename the file to firmware.cpp.hex to make it easier.  Unplug the main powercord from the printer/leave the usb plugged in. Hold a screwdriver to the boot jumpers and hit reset button. 

Open the command prompt.  Browse to your Hidbootloader folder.  Run the command in the instructions (they assume you renamed your file to firmware.cpp.hex)  If it says you are good then good, however it may say something about waiting on reset.  If it does go through the procedure with the screwdriver, and reset button again and it will finish.


When it says its done unplug and replug the usb then plug the power cord in

Your done

29

Re: Question about Arduino install, stuck

Hunter Green, I am tweaking what Jason just said so you can plug this into the tutorial you're compiling:

To find your firmware.cpp.hex file you need to look at the information the compile put out.

You have to use the "verbose" compile to see this. The Arduino menu says you can press SHIFT while clicking Sketch>Verify/Compile but I couldn't get the verbose output to work. Instead, I went to the Arduino's File>Preferences option and clicked on the link for additional preferences. Now, you need to open the Preferences.Txt file with Arduino closed. Once you have it open (in Notepad) add the line "build.verbose=true" (without the quotation marks) at the bottom of the file and Save it. Reopen Arduino, the select Sketch>Verify/Compile the configuration.h and it will display the output information at the bottom of the Arduino screen.

It will be in a location like C:\Users\Kent\AppData\Local\Temp\build8020340528660499036.tmp\Solidoodle3_6142013.cpp.hex

Unzip the http://blog.lincomatic.com/wp-content/u … derHID.zip, locate the file generated above, copy it into the hidbootloader directory. 


Unplug the main powercord from the printer/leave the usb plugged in. Hold a screwdriver to the boot jumpers and hit reset button.

Open the command prompt (Run>Cmd.exe).  Browse to your Hidbootloader folder. 

Run the command:
hid_bootloader_cli -mmcu=at90usb1286 -w -v Solidoodle3_6142013.cpp.hex

If it says you are good then good, however it may say something about waiting on reset.  If it does go through the procedure with the screwdriver, and reset button again and it will finish.

When it says its done unplug and replug the usb then plug the power cord in.

Your done.

Robox printer, HICTOP (Prusa i3 variant) Model 3DP17 printer, ELEK 2.5W laser engraver, AutoDesk 123D Design, Windows 10

30

Re: Question about Arduino install, stuck

It is nonsense like that that led me to dig up what the IDE does and use the equivalent commands manually or from makefiles.

31

Re: Question about Arduino install, stuck

Not really helpful to the ACTUAL topic at hand; but for future reference you can use the CODE bbtag (there is a button that looks like "<>" when you compose a message) that anything you put within it is put into a scroll-box so the thread doesn't get massively long.  For example, this is MarlinSerial.H

I'm not being critical; just informative smile

/*
  HardwareSerial.h - Hardware serial library for Wiring
  Copyright (c) 2006 Nicholas Zambetti.  All right reserved.
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.
  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  Modified 28 September 2010 by Mark Sproul
*/
#ifndef MarlinSerial_h
#define MarlinSerial_h
#include "Marlin.h"
#if !defined(SERIAL_PORT) 
#define SERIAL_PORT 0
#endif
// The presence of the UBRRH register is used to detect a UART.
#define UART_PRESENT(port) ((port == 0 && (defined(UBRRH) || defined(UBRR0H))) || \
                        (port == 1 && defined(UBRR1H)) || (port == 2 && defined(UBRR2H)) || \
                        (port == 3 && defined(UBRR3H)))                
                        
// These are macros to build serial port register names for the selected SERIAL_PORT (C preprocessor
// requires two levels of indirection to expand macro values properly)
#define SERIAL_REGNAME(registerbase,number,suffix) SERIAL_REGNAME_INTERNAL(registerbase,number,suffix)
#if SERIAL_PORT == 0 && (!defined(UBRR0H) || !defined(UDR0)) // use un-numbered registers if necessary
#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##suffix
#else
#define SERIAL_REGNAME_INTERNAL(registerbase,number,suffix) registerbase##number##suffix
#endif
// Registers used by MarlinSerial class (these are expanded 
// depending on selected serial port
#define M_UCSRxA SERIAL_REGNAME(UCSR,SERIAL_PORT,A) // defines M_UCSRxA to be UCSRnA where n is the serial port number
#define M_UCSRxB SERIAL_REGNAME(UCSR,SERIAL_PORT,B) 
#define M_RXENx SERIAL_REGNAME(RXEN,SERIAL_PORT,)    
#define M_TXENx SERIAL_REGNAME(TXEN,SERIAL_PORT,)    
#define M_RXCIEx SERIAL_REGNAME(RXCIE,SERIAL_PORT,)    
#define M_UDREx SERIAL_REGNAME(UDRE,SERIAL_PORT,)    
#define M_UDRx SERIAL_REGNAME(UDR,SERIAL_PORT,)  
#define M_UBRRxH SERIAL_REGNAME(UBRR,SERIAL_PORT,H)
#define M_UBRRxL SERIAL_REGNAME(UBRR,SERIAL_PORT,L)
#define M_RXCx SERIAL_REGNAME(RXC,SERIAL_PORT,)
#define M_USARTx_RX_vect SERIAL_REGNAME(USART,SERIAL_PORT,_RX_vect)
#define M_U2Xx SERIAL_REGNAME(U2X,SERIAL_PORT,)


#define DEC 10
#define HEX 16
#define OCT 8
#define BIN 2
#define BYTE 0

#ifndef AT90USB
// Define constants and variables for buffering incoming serial data.  We're
// using a ring buffer (I think), in which rx_buffer_head is the index of the
// location to which to write the next incoming character and rx_buffer_tail
// is the index of the location from which to read.
#define RX_BUFFER_SIZE 128

struct ring_buffer
{
  unsigned char buffer[RX_BUFFER_SIZE];
  int head;
  int tail;
};
#if UART_PRESENT(SERIAL_PORT)
  extern ring_buffer rx_buffer;
#endif
class MarlinSerial //: public Stream
{
  public:
    MarlinSerial();
    void begin(long);
    void end();
    int peek(void);
    int read(void);
    void flush(void);
    
    FORCE_INLINE int available(void)
    {
      return (unsigned int)(RX_BUFFER_SIZE + rx_buffer.head - rx_buffer.tail) % RX_BUFFER_SIZE;
    }
    
    FORCE_INLINE void write(uint8_t c)
    {
      while (!((M_UCSRxA) & (1 << M_UDREx)))
        ;
      M_UDRx = c;
    }
    
    
    FORCE_INLINE void checkRx(void)
    {
      if((M_UCSRxA & (1<<M_RXCx)) != 0) {
        unsigned char c  =  M_UDRx;
        int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
        // if we should be storing the received character into the location
        // just before the tail (meaning that the head would advance to the
        // current location of the tail), we're about to overflow the buffer
        // and so we don't write the character or advance the head.
        if (i != rx_buffer.tail) {
          rx_buffer.buffer[rx_buffer.head] = c;
          rx_buffer.head = i;
        }
      }
    }
    
    
    private:
    void printNumber(unsigned long, uint8_t);
    void printFloat(double, uint8_t);
    
    
  public:
    
    FORCE_INLINE void write(const char *str)
    {
      while (*str)
        write(*str++);
    }

    FORCE_INLINE void write(const uint8_t *buffer, size_t size)
    {
      while (size--)
        write(*buffer++);
    }
    FORCE_INLINE void print(const String &s)
    {
      for (int i = 0; i < (int)s.length(); i++) {
        write(s);
      }
    }
    
    FORCE_INLINE void print(const char *str)
    {
      write(str);
    }
    void print(char, int = BYTE);
    void print(unsigned char, int = BYTE);
    void print(int, int = DEC);
    void print(unsigned int, int = DEC);
    void print(long, int = DEC);
    void print(unsigned long, int = DEC);
    void print(double, int = 2);
    void println(const String &s);
    void println(const char[]);
    void println(char, int = BYTE);
    void println(unsigned char, int = BYTE);
    void println(int, int = DEC);
    void println(unsigned int, int = DEC);
    void println(long, int = DEC);
    void println(unsigned long, int = DEC);
    void println(double, int = 2);
    void println(void);
};
extern MarlinSerial MSerial;
#endif // !AT90USB
#endif"
|                                                           SD3                                                |
| Mk5 Jigsaw |:| Overkill Y-Axis Bracket |:| Lawsy's X/Y Carriage Replacement |
|  M5 Z-Axis  |:|         Glass Bed            |:|               Plexiglass Enclosure       |

32

Re: Question about Arduino install, stuck

Wow, neat idea. Thanks, Shan.

Robox printer, HICTOP (Prusa i3 variant) Model 3DP17 printer, ELEK 2.5W laser engraver, AutoDesk 123D Design, Windows 10

33 (edited by mattio79 2013-11-23 19:59:50)

Re: Question about Arduino install, stuck

when i try to compile, i get a compiling error.

C:\Users\Matt\AppData\Local\Temp\build7052610623013338738.tmp\core.a(main.cpp.o): In function `main':
C:\Users\Matt\Desktop\arduino-0022\hardware\at90usb1286\cores\at90usb1286/main.cpp:6: undefined reference to `setup'
C:\Users\Matt\Desktop\arduino-0022\hardware\at90usb1286\cores\at90usb1286/main.cpp:8: undefined reference to `loop'
  is what is in red in the output text
i am using the arduino 0022 that has the preconfigured solidoodle printrboard settings in it.  i have the correct com port selected and i have tried this with both of the printrboard settings in arduino, the tinyusbisp and the one for bootloader cdc