SKR V1.3 firmware upload

Do you want to use TMC5160 in combination with SKR 1.3 ?

No. I’m using generic stepper drivers that came with the board.

To use frimware for SKR1.3 in combination with TFT published by channel Teaching Tech you need to modify it to use drv8825 using PlatformIO in VSCode or PlatformIO in Atom
http://marlinfw.org/docs/basics/install_platformio_atom.html http://marlinfw.org/docs/basics/install_platformio_vscode.html After modification you have to compile the file and then you get the firmware which you then place on the SD card; after the reset (on board) the firmware is loaded into board.

guideline
https://www.youtube.com/watch?v=yLm7Yl8_QUU

When I try to compile the TT firmware it atom and VS code throw a improper syntax error and aborts. Marlin bug fix 2.0 vanilla compiles fine. I have been at it for a month now and have gotten to the point where I may just tap out. Some one help!

What is the error?

Compile the TT firmware

Try

Give marlin folder admin rights

in platformio.ini

change env_default = LPC1768 to default_envs = LPC1768 (new version command in platformio)

uncomment extra_scripts = Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py or remove line (calling python script for saving location)

upload_port = /dev/ttyUSB0 change to upload_port = D: (or some drive visible to system)

Hi, I’d like to understand if I have some issues in VS Code because I’m still getting errors on 2 different PCs… does the Teaching Tech firmware works for you?

 

This is what I get when I compile TT firmware with ICT Avatar suggestions

> Executing task: C:\Users\mirko.platformio\penv\Scripts\platformio.exe run <

Can not remove temporary directory c:\MPCNC\marlin 2.0 - mpcnc lowrider2 - skr v1.3 tmc5160.pioenvs. Please remove it manually to avoid build issues
Processing LPC1768 (platform: https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/master.zip; framework: arduino; board: nxp_lpc1768)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/nxplpc-arduino-lpc176x/nxp_lpc1768.html
PLATFORM: NXP Arduino LPC176x 0.1.0 > NXP LPC1768
HARDWARE: LPC1768 100MHz, 31.97KB RAM, 464KB Flash
DEBUG: Current (cmsis-dap) On-board (cmsis-dap) External (blackmagic, jlink)
PACKAGES: toolchain-gccarmnoneeabi 1.80201.190214 (8.2.1), framework-arduino-lpc176x 0.1.3
Converting Marlin.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ strict
Looking for TMCStepper library in registry
Found: https://platformio.org/lib/show/5513/TMCStepper
LibraryManager: Installing id=5513 @ <1.0.0
Using cache: C:\Users\mirko.platformio.cache\4a\00c7fd7875e9cd0a4cf8d7b2771b3c4a
TMCStepper @ 0.6.1 has been successfully installed!
Found 5 compatible libraries
Scanning dependencies…
Dependency Graph
|-- <Servo> 1.0.0
|-- <LiquidCrystal> 1.0.0
|-- <U8glib-HAL> 0.4
|-- <TMCStepper> 0.6.1
|-- <Adafruit NeoPixel> 1.2.4
Building in release mode
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\CHOPCONF.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\COOLCONF.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\DRVCONF.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\DRVCTRL.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\DRVSTATUS.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\DRV_CONF.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\DRV_STATUS.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\ENCMODE.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\GCONF.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\IHOLD_IRUN.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\PWMCONF.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\RAMP_STAT.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\SERIAL_SWITCH.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\SGCSCONF.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\SHORT_CONF.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\SMARTEN.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\SW_MODE.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\SW_SPI.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\TMC2130Stepper.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\TMC2160Stepper.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\TMC2208Stepper.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\TMC2209Stepper.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\TMC2660Stepper.cpp.o
Compiling .pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\TMC5130Stepper.cpp.o
In file included from .piolibdeps\LPC1768\TMCStepper_ID5513\src\source\SW_SPI.h:4,
from .piolibdeps\LPC1768\TMCStepper_ID5513\src\source\SW_SPI.cpp:1:
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\SW_SPI.cpp: In member function ‘void SW_SPIClass::init()’:
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\TMC_platforms.h:22:22: error: ‘LPC176x’ has not been declared
#define writeSCK_H LPC176x::delay_ns(40); LPC176x::gpio_set(sck_pin)
^~~~~~~
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\SW_SPI.cpp:21:3: note: in expansion of macro ‘writeSCK_H’
writeSCK_H;
^~~~~~~~~~
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\TMC_platforms.h:22:45: error: ‘LPC176x’ has not been declared
#define writeSCK_H LPC176x::delay_ns(40); LPC176x::gpio_set(sck_pin)
^~~~~~~
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\SW_SPI.cpp:21:3: note: in expansion of macro ‘writeSCK_H’
writeSCK_H;
^~~~~~~~~~
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\SW_SPI.cpp: In member function ‘uint8_t SW_SPIClass::transfer(uint8_t)’:
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\TMC_platforms.h:23:22: error: ‘LPC176x’ has not been declared
#define writeSCK_L LPC176x::delay_ns(40); LPC176x::gpio_clear(sck_pin)
^~~~~~~
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\SW_SPI.cpp:26:3: note: in expansion of macro ‘writeSCK_L’
writeSCK_L;
^~~~~~~~~~
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\TMC_platforms.h:23:45: error: ‘LPC176x’ has not been declared
#define writeSCK_L LPC176x::delay_ns(40); LPC176x::gpio_clear(sck_pin)
^~~~~~~
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\SW_SPI.cpp:26:3: note: in expansion of macro ‘writeSCK_L’
writeSCK_L;
^~~~~~~~~~
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\TMC_platforms.h:20:23: error: ‘LPC176x’ has not been declared
#define writeMOSI_H LPC176x::gpio_set(mosi_pin)
^~~~~~~
.piolibdeps\LPC1768\TMCStepper_ID5513\src\source\SW_SPI.cpp:30:28: note: in expansion of macro ‘writeMOSI_H’
!!(ulVal & (1 << i)) ? writeMOSI_H : writeMOSI_L;
^~~~~~~~~~~
compilation terminated due to -fmax-errors=5.
*** [.pioenvs\LPC1768\lib563\TMCStepper_ID5513\source\SW_SPI.cpp.o] Error 1
================================================================================================== [FAILED] Took 8.39 seconds ==================================================================================================

Environment Status Duration


megaatmega2560 IGNORED
megaatmega1280 IGNORED
at90usb1286_cdc IGNORED
at90usb1286_dfu IGNORED
DUE IGNORED
DUE_USB IGNORED
DUE_debug IGNORED
LPC1768 FAILED 00:00:08.390
LPC1769 IGNORED
melzi IGNORED
melzi_optiboot IGNORED
rambo IGNORED
sanguino_atmega644p IGNORED
sanguino_atmega1284p IGNORED
STM32F1 IGNORED
STM32F4 IGNORED
ARMED IGNORED
mks_robin IGNORED
black_stm32f407ve IGNORED
teensy35 IGNORED
malyanm200 IGNORED
esp32 IGNORED
fysetc_f6_13 IGNORED
linux_native IGNORED
============================================================================================= 1 failed, 0 succeeded in 00:00:08.390 =============================================================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

There’s a bug in the newest version of the tmc driver. Details here: Error: 'LPC176x' has not been declared · Issue #130 · bigtreetech/BIGTREETECH-SKR-V1.3 · GitHub

1 Like

I’m new to this site so if this is redundant I’ll apologize in advance. I’m also a big fan of flexibility and power. No point in going 8 bit when 32 bit is available and applicable. Not to mention cheaper.

The only time I’ve had the error you list is when I’ve had a file in the .pio folder open. When Marlin compiles in VScode it deletes the existing .pio folder and writes a new one. If a file or folder is open it can’t delete the folder so it fails to write/compile.

I agree that the SKR v1.3 is a potentially complicated board to program but imo that makes it move valuable.

I believe the original question was how to update the board once Marlin is compiled. All that is necessary is to copy Firmware.bin and firmware.elf (found in the /pio/build/LPC1768/ folder) to a compatible SD card, insert it into the SKR board and reboot it. The Firmware.bin is changed to Firmware.cur. You can also copy the files using usb once the SKR is configured to show as an attached drive.

As an aside, I love my SKR v1.3. Now that I know that people are using it for the MPCNC and LowRider I’ll go that route. I currently have one installed in my Ender-3 Pro.

My final comment is don’t change a lot of things on this card at one time. There is significant interaction between some settings. Making a bunch of changes at the same time makes trouble shooting much more difficult. In the end, for me at least, is the money. Cheap, quick or good, pick two. I’ve got the time to take cheap and good.

You don’t need the firmware.elf, just the firmware.bin file. The ELF format is in use by several different operating systems. Among others, this includes Linux, Solaris/Illumos, Free-, Net- and OpenBSD, QNX, BeOS/Haiku, and Fuchsia OS [2]. Furthermore, you will find it on mobile devices running Android, Maemo or Meego OS/Sailfish OS as well as on game consoles like the PlayStation Portable, Dreamcast, and Wii…but not ARM-Cortex which the LPC1768 is.

Ok. I ran into most of the problems above and a few more. The upload part was solved by either making a file called “firmware.cur” or the easy one was renaming the Sd card to “REARM”. Worked on the first try! Spent weeks googling and pulling my hair out! Lol

Hey Jeff ,

I just got all the hardware for the lowrider CNC and used Teaching tech vids as a guide. I cannot for my life find that precompiled binary int he zip file. From what i got from google is that you look for a firmware.bin file and copy it to the skr sd card and reset and flashes itself?

I have no idea where this precompiled bin file is and i also tried to create a new one using VS but there are errors, as the code is outdated :confused:
I am completly new to the software stuff.
what do you recommend that i do here?

Since this post, we have accepted the skrs and we have started creating precompiled configurations for some boards and drivers. We don’t have a skr 1.3 5160 combo though.

What I would do is grab the skr1p3_2209 zip from Marlinbuilder releases (the dual lr) and change the driver type to 5160 and recompile that.

2 Likes

Hey Jeff, I have done as you suggested, changed the drivers to 5160 then compiled and it worked. what i bought was a tft28 LCD it has a 5 pin connecter which seems different from what everyone seems to have and connected it to the 5 pins on the SKR v1.3 labelled tft. then i copied the .bin files for the TFT in the teaching techs firmware folder and tried to boot it up but the screen wont change from its manufacturers default screen.

so i am guessing the board and the lcd are not interacting?

any sugegstions?

The firmware files for the screen should go into the sd card of the screen, not the board. I don’t have the mks tft, I just have a BigTreeTech one. But it diaplays a progress bar while updating.

The 5 pins is normal. In no particular order: 5V, Gnd, TX, RX, Reset.

how you changed firmware. Have you editable firmware. i Tried ed It works, but motor after moving is “fry”. I’ don’t know what i have to change.

what means “LR” in firmware version?

Yes.

I have a lcd from bigtree too not mks…sorry for the mis information.

I got the code to flash on the skr and lcd.

I connected it to printer face and tried the M105 to see if codes uploaded. All good except the lcd says printer not attached and when I conne t the board to the NEMA 17s and try move them nothing works.

I dont know if its a firmware issue or a hardware one.

Two things with the screen.

  1. That doesn’t look like the cnc firmware. The cnc doesn’t show the temperatures on the front.
  1. The baud rate needs to be set to 250k in the screen settings. There are a few ways to do that, but the easiest is probably just changing it in the menu on the screen.