• Official Marlin Support

    J.C. Nelson07/07/2020 at 04:15 2 comments

    Today the official build support for Lerdge X, K, and S was merged into Marlin's bug fix branch. LCD Support is still coming but I published a branch which combines LCD, Lerdge, and the upgraded STM32 core for maximum goodness.

    This project is nearly complete - what's left to wrap up is details of the K board's FRAM and RGB LEDs.

    And then we move on...

  • Aiming a bit higher...

    J.C. Nelson06/23/2020 at 17:10 0 comments

    After my last post, I realized that with a  functional Ledge X and K v1, and someone helping with the Ledge S, I could aim a bit higher. My initial PR was meant to simply get Ledge-X building in Marlin, without LCD. I think now it's reasonable to say we should aim to have X, S, and K working minus the LCD. Whether or not we hold for the TFT pull request is another issue, and will largely be controlled by whether or not the TFT PR lands first. I know there's something wrong in current code where the init sequences aren't working, and I know a range of commits that broke it, and when I'm home, I'll gradually suss out which one is at fault. Also, I've found that I'm missing some pin information for the X (the transistor which enables/disables the divider network for thermistor use), so it'll be back to the multimeter for that.

  • Marlin on Lerdge K...and S?

    J.C. Nelson06/19/2020 at 00:35 0 comments

    I managed to unbrick my Lerdge K board (the bootloader dump sketch left it in a "SWD no longer works" state), and reset it with the K bootloader I have uploaded here, so the files are definitely good. I've also generalized the marlin build environment for Lerdge so adding support for K can be done with minimal fuss, but it will be at least a week before I have more hacking time.

    A user contacted me who had a Lerdge S board, and flashed a build of Marlin for the X on it. It turns out the information I was given, that the pins were similar to the X, is not accurate, but that user is hacking away on the pins definitions, so S support will eventually be a thing.

    The Lerdge S LCD reports itself as an 0x800C LCD...which is nothing.

    But, it's definitely an ST7796. Forcing the override allows Marlin with LCD to boot on the S.

    So that is definitely progress. Happy hacking, folks. See you in a week.

  • Fun with LCDs...

    J.C. Nelson06/16/2020 at 21:49 0 comments

    While we wait on Lerdge X support to be merged into Marlin...how about getting the new TFT UI up and running?

    I had to extract Lerdge's init sequence from the binary and do a few other things. Note, the UI is scaled for a smaller screen, a known problem we're going to fix, but here it is - touch and all.

    I'm working with the dev who is doing the primary TFT support to make sure it'll run on the X (and K) out of the box. Next update will be when we have a proper sized UI to show off...

  • Lerdge X Basic Support PR for Marlin

    J.C. Nelson06/14/2020 at 23:44 0 comments

    There's been quite a break in updates on this project and that's for good reason. I do this for fun, and it stopped being fun. However, after the completion of the Chitu (Tronxy) work, I decided to loop back around. Marlin has evolved, the ST Arduino core has evolved. Everything has evolved...so I decided to start again.


    It took quite a bit of messing around but I was able to get Marlin 2.0 running without LCD, building and encrypting automatically for LerdgeX (K is a different variant. The same scripts will be used but you need a different pin set for the variant and I'm not looking at that yet.

    The PR is out to add support for Lerdge to Marlin.

    No LCD, but you've seen it work (hell, the code is in my repo). With the new TFT support coming to Marlin, it is a matter of time.

    You can follow the PR here:

    https://github.com/MarlinFirmware/Marlin/pull/18302

  • Pins are In

    J.C. Nelson09/17/2019 at 17:34 0 comments

    Marlin's bugfix-2.0.x now contains pin definitions for the Lerdge X and K. I don't own an S, so I have no idea what the pins are. Next steps are to figure out if we HAVE to have a specific board definition (my suspicion is "yes") or if we can build with a generic variant. The reason I think we'd need a specific variant is that the variant's pin config specifices which pins are used by an ADC, and on Lerdge I had issues with the bed pin not having a default ADC definition (I had to uncomment it).  

  • Signs of LIfe

    J.C. Nelson09/09/2019 at 00:27 0 comments

    Tomorrow I'm hoping to get the Lerdge-S pinouts from Lerdge. Tonight, I dusted off the repositories and got everything compiling enough to make pull requests for pins. That'll be the beginning of getting this into Marlin 2.9 proper. There's a number of problems with the boot screens and touch controller, but we'll get it running.

  • FSMC Progress

    J.C. Nelson07/08/2019 at 05:00 0 comments

    A week ago, my STM32F4xx mcudev black board arrived, with a fun STM32F4 processor on it and a TFT LCD interface. I also ordered the cheapest LCD I could find on AliExpress, an Orise clone that specifically mentioned supporting FSMC access. The pinout wasn't identical to what the STM32F4XX wanted, but with a nest of jumper wires, I hooked them up to the right ports.

    Why?

    I want to build a nice, generic FSMC library where I can tell it the configuration and let it do the rest, and FSMC code is very picky. I found a sample for Keil MDK (which is very expensive) and slowly began cutting it over from the Standard Peripheral Library to the ST HAL. Finally, I managed to get some code that successfully initialize the LCD, but the Orise is an oddity - it can be hard reset from software. The reset pin isn't even used during init. Most LCDs require a reset sequence (lerdge certainly does).

    The other advantage of this hardware is that it has an XPT2064 resistive touch, just like the lerdge, meaning that next I can hook the four wires (SPI + Interrupt) for the touch, and get that working. 

    Lastly, SDIO + DMA will be the end goal, with DMA from an aligned buffer. Touch work will come first.

  • Roadmap going forward

    J.C. Nelson06/26/2019 at 05:16 0 comments

    The next few stages are not going to be terribly entertaining. As noted, I need to get the pin mappings into Marlin 2.x, which will produce an absolutely *minimal* printer. I don't say that lightly, I mean it - no SD, no LCD, no...most of the pretty bits. But once that's working and in, I can switch modes. I ordered from China (and just received) a beautiful little blackpill board - that's an STM32F4 system with SDIO SD card and a FMSC LCD interface.

    Just like the lerdge boards.

    What this means is that I can develop SDIO support for HAL_STM32 on a system that's actually designed for debugging, then move the code over to support Lerdge.

    LCD? Same deal. The LCD in question uses a different command set, but that's irrelevant - I will wire it up identically and use it to debug FMSC LCD interaction, followed by U8G LCD interaction...followed by moving the code to Marlin. THe LCD supports the exact same XPT chip, so I can even debug touch interaction.

    But first, I am going to finish out the M200 work.

  • Getting Working Again

    J.C. Nelson04/27/2019 at 05:51 1 comment

    My other project, Marlin 2.x on the Monoprice Mini/Malyan M200, is slowly starting to function, and there's a few benefits from that for my lerdge project. First off, I have a much better grip on how USB support has to work. Secondly, I've identified a few problems with PWM that have to be resolved -and also we need a better way to handle timers in the ST HAL. The problem is that F_CPU is used to derive some of the prescalar values for a timer, but that will vary based on the board's clock config. For instance, I could underclock an STM32F103 to 48mhz and USB/timers will still work fine. The RCC_GetClockConfiguration function will get us the clock divisors, and with a helper function to get every timer's proper clock source and divide out by the proper scaler, it should work.