Firmware for CNC

Hi guys. I need a little help. Make cnc lathe home build. Took as a basis firmware 0.92. Remove all unnecessary - heaters, extruders through a web interface. Downloaded. Launched to compile an error -

In file included from Repetier.h:363,
                 from Commands.cpp:22:
HAL.h: In static member function 'static void HAL::spiInit(uint8_t)':
HAL.h:612: error: 'DIOMOSI_PIN_DDR' was not declared in this scope
HAL.h:612: error: 'DIOMOSI_PIN_PIN' was not declared in this scope
HAL.h:613: error: 'DIOMISO_PIN_DDR' was not declared in this scope
HAL.h:613: error: 'DIOMISO_PIN_PIN' was not declared in this scope
Commands.cpp: At global scope:
Commands.cpp:24: error: 'HEATER_1_PIN' was not declared in this scope
Commands.cpp:24: error: 'TEMP_1_PIN' was not declared in this scope

Please help.

Comments

  • Hi Kulakov,
    The error in HAL.h is caused by some SD card or other SPI device functions, here is the code containing lines 612&613:
    static inline void spiInit(uint8_t spiRate)
        {
             uint8_t r = 0;
             for (uint8_t b = 2; spiRate > b && r < 6; b <<= 1, r++);

            SET_OUTPUT(SS);
            WRITE(SS,HIGH);
            SET_OUTPUT(SCK);
            SET_OUTPUT(MOSI_PIN);   <<< LINE 612
            SET_INPUT(MISO_PIN);       <<< LINE 613

    Double check the settings of SD, Display or other SPI related features.

    As for the heater, I haв no issues when removing those. Try to manually edit Configuration.h, keeping in mind that a disabled pin is -1. Example:
    #define FAN_BOARD_PIN -1

    Ку!
  • Kulakov,

    Hi Kulakov
    Did you do ​​the lathe with ramp1.4 and Repetier ? It worked
    I am waiting your answer. Thanks
Sign In or Register to comment.