bigtreetech / BIGTREETECH-TouchScreenFirmware

support TFT35 V1.0/V1.1/V1.2/V2.0/V3.0, TFT28, TFT24 V1.1, TFT43, TFT50, TFT70
GNU General Public License v3.0
1.27k stars 1.63k forks source link

Add support for MKS GB boards. #2886

Closed ciotto closed 3 months ago

ciotto commented 4 months ago

Requirements

To test this fix you need a MKS board with GigaDevice MCU (used on Artillery Genius Pro and other Artillery 3D printers).

Description

As you can see here, the new versions of the MKS boards use GigaDevice MCUs.

We know that there are at least 2 versions of the board that use two different versions of the bootloader:

TFT Controller v1.2

TFT Controller v1.4

Benefits

Add support to new versions of the MKS board that use GigaDevice MCUs.

Related Issues

digant73 commented 4 months ago

Related issue is #2391 not #2885. You have to use the following line to mark #2391 as fixed by this PR so #2391 will be automatically closed once your PR is merged:

fixes #2391

ciotto commented 4 months ago

After the rebase doesn't work, I'll debug it soon.

digant73 commented 4 months ago

@ciotto if you have issues with serial communication it could be possible you need to apply the changes made in #2840 for the new GD MCU. Eventually simply use the old implementation (that worked for you) and gradually apply all the not HW based PRs not yet merged in your repo (I don't know how you repo was aligned to this repo in the last months)

ciotto commented 4 months ago

@ciotto if you have issues with serial communication it could be possible you need to apply the changes made in #2840 for the new GD MCU. Eventually simply use the old implementation (that worked for you) and gradually apply all the not HW based PRs not yet merged in your repo (I don't know how you repo was aligned to this repo in the last months)

No, shouldn't be related, I applied these changes after the rebase (doesn't built without these).

I rebased and tested commit by commit and after some hours of work I found that the problem is on the "last" commit 😑 (156e04b).

I suspect that can be related to the changes on os_timer.c because if I comment the OS_TimerInitMs call on HW_Init I can see the screen.

digant73 commented 4 months ago

See the bugfixes on GD TFT variants provided by #2885 just merged today (a missing ~ in os_timer.c for the GD variants only). Rebase on current BTT repo (with last merged PR)

ciotto commented 4 months ago

LOL, I found the same issue 😑.

Now I can do some more deep tests.

ciotto commented 4 months ago

Ok, seems to work fine on both the known versions.

Ready for review.

digant73 commented 4 months ago

Opened a PR on your repo. Simply merge my PR and push the update here

digant73 commented 4 months ago

@BTT please consider to merge the PR. It is OK. Eventually, I will provide a minor cleanup on one of my next PR (not urgent). Thanks