Welcome! Log In Create A New Profile

Advanced

LPC port of RepRapFirmware

Posted by sdavi 
Re: LPC port of RepRapFirmware
August 27, 2018 12:25AM
Quote
AlexY
@sdavi I tried a relatively high-speed print and it looks like the printer is stuttering in some areas causing layer shifting. Not sure what the cause is; perhaps slow SD reads or something with memory usage? Unfortunately I won't have access to my printer for a while so I'll be unable to test.

SD access is faster in V2 code. The original SDCard library I use was running SPI at 2.5MHz after card initialisation for data transfers and it was boosted to 10MHz after updating it to work with SharedSPI.

The Non-Networking version actually has 16,296 bytes free in the AHB RAM. Most of the config and memory arrangement has been set to ensure everything fits for the networking version, except the Main task stack size is left larger for the non-networking version. You could go though and increase any relevant settings you think are affecting it, just be aware that you will need to move some objects that are currently in main RAM into AHB RAM though.
Re: LPC port of RepRapFirmware
August 30, 2018 12:39PM
OK, I'm trying to update my ReArm and getting this error:
M997 S0
Error: M997: Invalid module number '0'

I downloaded firmware-REARM-NETWORK.bin from [github.com] and renamed it to Duet2WifiCombined.bin... and then RepRapFirmware.bin.
DWC recognizes the latter as firmware and tries to update but gives the above error. I made sure I have iap4e.bin in the /sys directory as well.

Am I doing something wrong? What do I need in my /sys directory?
I'm running the 1.21 LPC port on a ReArm.

Thank you!
Re: LPC port of RepRapFirmware
August 30, 2018 07:48PM
Quote
digi2life
OK, I'm trying to update my ReArm and getting this error:
M997 S0
Error: M997: Invalid module number '0'

I downloaded firmware-REARM-NETWORK.bin from [github.com] and renamed it to Duet2WifiCombined.bin... and then RepRapFirmware.bin.
DWC recognizes the latter as firmware and tries to update but gives the above error. I made sure I have iap4e.bin in the /sys directory as well.

Am I doing something wrong? What do I need in my /sys directory?
I'm running the 1.21 LPC port on a ReArm.

Thank you!

To update the firmware you need to rename firmware-REARM-NETWORK.bin to firmware.bin and copy it to / on the SDCard and reboot. Updating the firmware via DWC isn't currently supported.
Re: LPC port of RepRapFirmware
October 12, 2018 10:10AM
Hi sdavi,

Thank you for the effort on porting. Appreciate it much.
Got a question if you can help answering.
I am using smoothieboard on my printers but I have external drivers. Any pointers on how I can make that work with this port? I am sorry I do not know / never used RRP.

Hope you can help.

Thank you.
Re: LPC port of RepRapFirmware
October 13, 2018 07:51PM
Quote
Dreamscape74
Hi sdavi,

Thank you for the effort on porting. Appreciate it much.
Got a question if you can help answering.
I am using smoothieboard on my printers but I have external drivers. Any pointers on how I can make that work with this port? I am sorry I do not know / never used RRP.

Hope you can help.

Thank you.

If the external drivers only connect to the 4pin breakout headers (i.e. En, Dir, Step, GND) on the smoothieboard, then all you need to do is configure the correct timings in config.g by using the Taa:bb:cc:dd parameter for GCode M569. If you look up the datasheet for your stepper drivers they should specify the minimum time required for a step pulse and interval and also the direction setup and hold times.
Re: LPC port of RepRapFirmware
October 14, 2018 09:54PM
Thank you, will into it. Much appreciated
Re: LPC port of RepRapFirmware
November 14, 2018 01:01PM
@sdavi i tried the latest bin on MKS SBase V1.3 (Smoothieware board with LPC1768), but the web server doesn't work weel, the page is loaded very badly and is not paginated.
Monitoring the serial output when i try to acces the web server and i've a lot of error:

18:49:26.173 : Error: Can't open 0:/www/js/jquery.flot.navigate.min.js.gz to read, error code 4

18:49:26.173 : Error: Can't open 0:/www/js/jquery.flot.navigate.min.js.gz to read, error code 4

Anyway very good work, I hope the LCD fucntion soon.

Marco

Edited 2 time(s). Last edit at 11/14/2018 01:03PM by Marco67.
Re: LPC port of RepRapFirmware
November 14, 2018 11:40PM
Quote
Marco67
@sdavi i tried the latest bin on MKS SBase V1.3 (Smoothieware board with LPC1768), but the web server doesn't work weel, the page is loaded very badly and is not paginated.
Monitoring the serial output when i try to acces the web server and i've a lot of error:

18:49:26.173 : Error: Can't open 0:/www/js/jquery.flot.navigate.min.js.gz to read, error code 4

18:49:26.173 : Error: Can't open 0:/www/js/jquery.flot.navigate.min.js.gz to read, error code 4

Anyway very good work, I hope the LCD fucntion soon.

Marco

I think you might have uploaded the files in the "core" directory to the card instead of extracting the zip file? If you clicked the green button to "download" DuetWebControl, you will need to first unzip that file, and inside that will be another zip file (current version is 1.22.5) called DuetWebControl-1.22.5.zip, that is the one you need to unzip to sdcard:/www/
Re: LPC port of RepRapFirmware
November 15, 2018 04:39AM
Thanks! Now i've a javascript error, see the image.
The "MKS SBase V1.3" board is powered from USB and connected to the LAN, no other connection to the board, without main power.

11:22:54.256 : === Diagnostics ===
11:22:54.256 : RepRapFirmware for LPC176[8/9] based Boards version 2.01(RTOS) running on Smoothieboard1 at 100Mhz
11:22:54.256 : Used output buffers: 1 of 14 (8 max)
11:22:54.256 : === RTOS ===
11:22:54.256 : Static ram: 2836
11:22:54.256 : Dynamic ram: 27860 of which 0 recycled
11:22:54.256 : Exception stack ram used: 328
11:22:54.256 : Never used ram: 1712
11:22:54.256 : AHB_RAM Static ram used : 19328
11:22:54.257 : === Ram Totals ===
11:22:54.257 : Main SRAM : 31024/32768 (1744 free, 1712 never used)
11:22:54.257 : RTOS Dynamic Heap (AHcool smiley : 8648/13440 (4792 free, 2112 never used)
11:22:54.257 : === LPC PWM ===
11:22:54.257 : Hardware PWM: 250 Hz
11:22:54.257 : PWMTimer1: 10 Hz
11:22:54.257 : PWMTimer2: 0 Hz
11:22:54.257 : PWMTimer3: 250 Hz
11:22:54.257 : === GPIO Special Pins available === (i.e. with M42)
11:22:54.257 : LogicalPin - PhysicalPin
11:22:54.257 : 60 - P1_24 [HW PWM]
11:22:54.258 : 61 - P1_26 [HW PWM]
11:22:54.258 : 62 - P0_26
11:22:54.258 : Tasks: EMAC(blocked,88) NETWORK(ready,132) IP-task(blocked,284) HEAT(blocked,948) MAIN(running,2020)
11:22:54.258 : Owned mutexes:
11:22:54.258 : === Platform ===
11:22:54.258 : Last software reset details not available
11:22:54.258 : Error status: 0
11:22:54.258 : Free file entries: 3
11:22:54.258 : SD card 0 detected
11:22:54.258 : SD card longest block write time: 0.0ms, max retries 0
11:22:54.258 : Date/time: 2018-11-15 11:22:54
11:22:54.258 : Slowest loop: 0.39ms; fastest: 0.06ms
11:22:54.258 : === Move ===
11:22:54.259 : Hiccups: 0, StepErrors: 0, LaErrors: 0, FreeDm: 100, MinFreeDm: 100, MaxWait: 0ms, Underruns: 0, 0
11:22:54.259 : Scheduled moves: 0, completed moves: 0
11:22:54.259 : Bed compensation in use: none
11:22:54.259 : Bed probe heights: 0.000 0.000 0.000 0.000 0.000
11:22:54.259 : === Heat ===
11:22:54.259 : Bed heaters = 0, chamberHeaters = -1 -1
11:22:54.259 : Heater 1 is on, I-accum = 0.0
11:22:54.259 : === GCodes ===
11:22:54.259 : Segments left: 0
11:22:54.259 : Stack records: 1 allocated, 0 in use
11:22:54.259 : Movement lock held by null
11:22:54.259 : http is idle in state(s) 0
11:22:54.259 : telnet is idle in state(s) 0
11:22:54.259 : file is idle in state(s) 0
11:22:54.260 : serial is ready with "M122" in state(s) 0
11:22:54.260 : aux is idle in state(s) 0
11:22:54.260 : daemon is idle in state(s) 0
11:22:54.260 : queue is idle in state(s) 0
11:22:54.260 : autopause is idle in state(s) 0
11:22:54.260 : Code queue is empty.
11:22:54.260 : === Network ===
11:22:54.260 : Slowest loop: 0.69ms; fastest: 0.01ms
11:22:54.260 : Responder states: HTTP(0)
11:22:54.260 : HTTP sessions: 0 of 1
11:22:54.260 : Interface state: active

Edited 4 time(s). Last edit at 11/15/2018 05:23AM by Marco67.
Attachments:
open | download - javascript_error.JPG (166.9 KB)
Re: LPC port of RepRapFirmware
November 16, 2018 02:10AM
Quote
Marco67
Thanks! Now i've a javascript error, see the image.
The "MKS SBase V1.3" board is powered from USB and connected to the LAN, no other connection to the board, without main power.

Try the older version v1.21.1 of DuetWebControl. Seems there has been some changes which hasn't been included in this port yet.
Re: LPC port of RepRapFirmware
November 16, 2018 03:58AM
With the old web interface i've no error but it doesn't connect to the board (always disconnected), i can't modify anything.
Have you tried your code with this board?

Edited 1 time(s). Last edit at 11/16/2018 03:59AM by Marco67.
Re: LPC port of RepRapFirmware
November 16, 2018 04:27AM
Quote
Marco67
With the old web interface i've no error but it doesn't connect to the board (always disconnected), i can't modify anything.
Have you tried your code with this board?

Have you tried cleaning out the browser cache etc in case its cached some of the previous versions files?

No I don't have a MKS SBase, but it works on my smoothieboard.
Re: LPC port of RepRapFirmware
November 17, 2018 08:04AM
Yes, is not a related cache problem, but i think because this board install a different LAN chip.
See the image, it's a "Microchip LAN8720A".

Edited 2 time(s). Last edit at 11/18/2018 07:44AM by Marco67.
Attachments:
open | download - lan_chip_sbase13.jpg (183.7 KB)
Re: LPC port of RepRapFirmware
November 19, 2018 06:33PM
Quote
Marco67
Yes, is not a related cache problem, but i think because this board install a different LAN chip.
See the image, it's a "Microchip LAN8720A".

Smoothieboard has the PHY 8720A chip as well. Since it's sending the html files off the sdcard to the browser, would assume that's probably not the issue.

I've just about finished updating to RRF v2.02RC4. That should also work with the latest DWC version too.
Re: LPC port of RepRapFirmware
November 20, 2018 05:52AM
New experimental binaries (updated to latest upstream RRF Version 2.02RC4) available for download. As usual, download the binary for your board and copy to / on the internal SDCard and reboot the board. Ensure everything is working correctly after updating before attempting a print.

For those using the Networking version, also update DuetWebControl to version 1.22.5.

LPC port changes:
* heap5 memory now spans across both the main RAM and AHB ram. This makes it easier to maintain code as no longer need to specify which RAM segment to use.


For those who wish to compile their own version, you will now also need to download RRFLibraries.
Re: LPC port of RepRapFirmware
November 21, 2018 03:56AM
Nice job sdavi, now work fine at the bench tests here!
Have you plan to add lcd support?

Edited 1 time(s). Last edit at 11/21/2018 03:57AM by Marco67.
Re: LPC port of RepRapFirmware
November 21, 2018 04:33AM
I'm sorry, I saw it work only once after flashing the firmware, then the web interface never worked again... sad smiley
Re: LPC port of RepRapFirmware
November 21, 2018 04:45AM
The LCD (ST7920) is also now compiled in by default in the Non-Networking builds only - there is not enough memory to include it with the networking builds at this stage.

The only modification I made to it was to drop the SPI freq down to 1MHz (cause it was showing garbage on with my RepRapDiscount Graphic LCD when running at 2MHz) and to select the 2nd SSP port on the LPC.

I have only briefly tested it (only with the LCD SPI pins connected and no encoder or buttons etc) and seem to be working ok. It does require a /Menu/ directory on the SDCard and loads a file called "main" in that menu dir. I'm not sure if anyone has written a menu yet, I only tested a very simple one that displayed the bed and extruder temps which worked as expected. Supported commands are listed in the source code file Menu.cpp for those who want to write their own.
Re: LPC port of RepRapFirmware
November 21, 2018 02:35PM
There is some documentation on writing menu files at [duet3d.dozuki.com]. We'll publish some sample ones soon.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Re: LPC port of RepRapFirmware
November 22, 2018 08:42AM
The error in DWC is caused by the missing 'fanRPM' property in the sensors field of the status response. I just prepared another build that checks if this field is present and omits it if it is not. Please check if that resolves your problem.
Attachments:
open | download - DuetWebControl-1.22.5+1.zip (651.4 KB)
Re: LPC port of RepRapFirmware
November 26, 2018 12:57PM
Same results, here it doesn't work with MKS SBase V1.3 with LAN, only USB.
Re: LPC port of RepRapFirmware
November 26, 2018 11:01PM
Quote
chrishamm
The error in DWC is caused by the missing 'fanRPM' property in the sensors field of the status response. I just prepared another build that checks if this field is present and omits it if it is not. Please check if that resolves your problem.

In the latest version i was sending fanRPM set to zero as a workaround but i'll probably remove that in next version now that DWC can handle that missing field. Thanks.

Quote
Marco67
Same results, here it doesn't work with MKS SBase V1.3 with LAN, only USB.

To try and rule some things out: Have you tried a different browser? Is the board still responsive over USB after the network stops? Can you run M122 over usb after the web pages stop responding? Just to check your setup isn't running out of memory etc, check line that says "RTOS Dynamic Heap" to see how much free memory and how much never used? Also look at the bottom of M122 for "Interface state:" and see if it goes back to "establishing link" (which would indicate PHY has lost the link) and watch the LEDs on the network port on the board too to see if the link drops.

I was also looking on makerbase-mks Github issues page and seems there are some people are experiencing hardware related problems with networking on their boards.
Re: LPC port of RepRapFirmware
December 03, 2018 06:53AM
Updated to upstream RRF v2.02RC5. Binaries updated in their usual location.

LPC Changes:
- Increased the memory for the networking related tasks to see if that fixes some of the networking issues some are having.
- Increased the delay needed for RRD Full Graphic LCD to avoid some corruption on the screen.

The upstream version of RC5 has some updates to the LCD code. I was having a play around with it a bit today and was able to create a neat (using the new text alignment) and simple UI reasonably quickly for my old reprapdiscount full graphic lcd.

Currently showing Extruder and bed current and active temps, XYZ position, text from M117 command and 3 buttons on the bottom. The inline editing of the temps etc is great, being able to change the temps without digging through menus is very handy. I haven't come across any commands for showing printing progress such as time left or percentage printed yet which would be nice to show.
Re: LPC port of RepRapFirmware
December 07, 2018 05:35PM
Now the LAN version work fine on MKS Sbase V1.3!
But i can't write the settings on MicroSD with M500.

Edited 2 time(s). Last edit at 12/07/2018 05:53PM by Marco67.
Re: LPC port of RepRapFirmware
December 07, 2018 09:03PM
Quote
Marco67
Now the LAN version work fine on MKS Sbase V1.3!
But i can't write the settings on MicroSD with M500.

Good to hear the networking issue has been resolved.

I just tested M500 and is working for me. To use M500, you first need to have M501 at the end of config.g. Can you check you have that and it's not commented out?
Re: LPC port of RepRapFirmware
December 08, 2018 03:32AM
Ops, missing this step, added, thanks!
I've no reply on the web gui screen of the G-CODE console if i send M503, is normal?
But i can see all the M503 output with USB.

Edited 2 time(s). Last edit at 12/08/2018 03:38AM by Marco67.
Re: LPC port of RepRapFirmware
December 08, 2018 04:25AM
Quote
Marco67
Ops, missing this step, added, thanks!
I've no reply on the web gui screen of the G-CODE console if i send M503, is normal?
But i can see all the M503 output with USB.

Yep that's normal due to the memory constraints we have on the LPC for Networking. config.g and config-override.g are viewable (and even editable, as are the other sys files) in DWC Settings->System Editor so you don't really need M503. Since they are editable directly from DWC I imagine most people don't use M500, M503 etc these days.
Re: LPC port of RepRapFirmware
December 09, 2018 11:19AM
I agree, M503 in RepRapFirmware is obsolete, except for ports that don't support networking. Even then if doesn't tell you the whole story because of config-override.g.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Re: LPC port of RepRapFirmware
December 10, 2018 12:54PM
Hi,
Wanted to play with RRF on a MKS SBASE 1.3.
No network and I use Pronterface via USB to talk to the board/printer.

Last week, I installed the "firmware-SMOOTHIEBOARD", managed to bring the machine to live (motor, endstop, heater ...).

Now, I just replaced it by your latest: firmware-MKSBASE and nada, yes, the firmware changed to .cur, I can connect via Pronterface but when trying to home, error msg can't find the G code ( home ....) although they are there as before ?

M21 command returns SD card not usable ? (2G Sandisk)
Changed it for an other one (8G ) and it is seen, so home, motor etc... OK

So the firmware can load from the SD but can't read it ??????

PS: Would be nice to have a separate sub forum for RRF, like for Marlin

Edited 2 time(s). Last edit at 12/10/2018 03:31PM by MKSA.


"A comical prototype doesn't mean a dumb idea is possible" (Thunderf00t)
Re: LPC port of RepRapFirmware
December 10, 2018 05:01PM
Quote
MKSA
PS: Would be nice to have a separate sub forum for RRF, like for Marlin

Have you considered asking the admins for one?

Most discussion about RepRapFirmware takes place on the Duet3D forum, [forum.duet3d.com]. There is a subsection for RRF on non-Duet controllers there. I'll leave it up to @sdavi to decide whether he wants to use that, or continue here, or request a forum for RRF here - perhaps with your support.

Edited 1 time(s). Last edit at 12/10/2018 05:02PM by dc42.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Sorry, only registered users may post in this forum.

Click here to login