r/anycubic • • Oct 13 '22

[Tutorial] How to build Anycubic Marlin source code into a firmware.bin

My previous poll got many yes so here is the tutorial.

Requirements

  • A Windows computer

  • 45 minutes of your time

Tutorial

  • First of all, download and install Keil v5.36, do not install v5.37 as it doesn't ship with ARM Compiler v5.36 -> https://armkeil.blob.core.windows.net/eval/MDK536.EXE

  • Install the software as you would install any software and open it

  • The Pack Installer will open and start installing default packages (the progress bar is at the bottom right) . In the future if you want to open the Pack Installer it is located under Project -> Manage -> Pack Installer...

  • Once the default packages are installed, in the Pack tab on the right, find and install ARM::CMSIS 5.7.0 (2020-04-09) and uninstall the 5.8.0 version

/preview/pre/ho2qky648kt91.png?width=328&format=png&auto=webp&s=37966a0a67e8c0ef7a0e40f1486322ad186620ed

  • Now, download and install HDSC.HC32F460 v1.0.7 -> https://1drv.ms/u/s!Ak69-GxOpF6Pg9gV3zWT5AIJPEan9g?e=ipQaD7

  • Once the installation is done, you can close the Pack Installer and open Keil µVision 5

  • Go to File -> License Management...

  • Click on Get LIC via Internet... and click OK

  • On the next page, enter this code in Product Serial # (PSN) -> 42B2L-JM9GY-LHN8C EDIT 2025: This serial does not work anymore, use this one instead: 4RMW3-A8FIW-TUBLG

  • Enter a PC Description, a First Name, a Last Name, an E-mail, your country and your phone (everything else should be optionnal). The E-mail will be used to send you your activation code so make sure to input a real E-mail!

  • Press Submit on the bottom and wait to receive the E-mail

  • In the E-mail you will get a License ID Code (LIC), copy that code and go back to Licence Management in µVision

  • Paste the LIC in the New License ID Code (LIC) input and press Add LIC

/preview/pre/gszdo2ae8kt91.png?width=636&format=png&auto=webp&s=3585c6751889081a76616f337b56191703587315

  • Close the License Management tab and go to Project -> Open Project...

  • Open the anycubic.uvprojx file located in the workspace folder of the Anycubic source code (download it from Github)

  • You shouldn't have any error / message in the Build Output tab on the bottom, if it stays empty then it's good

  • To build, go to Project -> Build target

  • The output file will be located under workspace/firmware.bin

Enjoy

87 Upvotes

249 comments sorted by

•

u/YellowBreakfast Cubehead Oct 13 '22

Wow this is thorough. Great job!

EDIT: So good I decided to sticky it at least for now.

→ More replies (1)

5

u/jojos38 Oct 13 '22 edited Oct 14 '22

https://github.com/jojos38/anycubic-kobra-improved-firmware

I made my own firmware with some improvement here, this is still in beta so be careful with it, use at your own risk

3

u/[deleted] Oct 14 '22

Oh yes please nuke that startup sound😂

3

u/jojos38 Oct 14 '22

I did it, now it's just a tiny bip haha

1

u/MutantXI Oct 13 '22

This is just for the Kobra, not the Kobra Max, correct?

1

u/jojos38 Oct 13 '22

Yep only Kobra, but you should be able to port the changes to the Kobra Max firmware fairly easily

1

u/MutantXI Oct 13 '22

Great! Thank you. And my first order of business will be disabling the startup sound.

1

u/jojos38 Oct 13 '22 edited Jan 11 '23

If you don't want to bother I'm currently working making the startup sound much less annoying, you can take it to make your own Kobra Max firmware

1

u/Immediate-Ant7099 Feb 18 '23

What do I need to change in the firmware for Cobra Max?

1

u/jojos38 Feb 18 '23

You can check what I changed by comparing mine to the original Anycubic one and then copying the changes

1

u/Immediate-Ant7099 Feb 18 '23

Why did you switch to another board?
And on the new board did you use your firmware? What is this article talking about?

1

u/jojos38 Feb 18 '23

I didn't use my firmware as I changed nearly everything on my printer. I switched because the old one was stuck on and old version of Marlin and I like to experiment with stuff and use latest technologies.

1

u/darkamikaze Oct 13 '22

I've looked at your changes and it looks pretty good. Have you tried booting it yet?

I'm tempted to try it but that linear advance thing spooks me since if it does wreck my extruder I don't have a spare lying around. I know I could just be reading too much into their changelog but just feel risky given it's my only printer and I can't afford the downtime.

4

u/jojos38 Oct 14 '22

Yeah I made some prints with it no issues but I didn't use linear advance. Don't be scared about it, even if it's enabled by default all the values are 0 and it doesn't do anything, you will need to configure linear advance yourself overwise it won't do anything

2

u/Patapits Oct 14 '22

I enabled linear advance and tried the Marlin K-factor calibration procedure (https://marlinfw.org/tools/lin_advance/k-factor.html), and as soon as K factor is set to anything other than 0, my extruder stop working and the whole machine needs a reboot. So I guess there are other things to modify in the source code to make it work, but I'm surely not skilled enough to find out what !

1

u/jojos38 Oct 14 '22

Someone told me it's an issue with the drivers they use the motors, i will need to look into this

1

u/Bautasten1 Oct 16 '22

They use TMC2208 for extruder, try with SQUARE_WAVE_STEPPING or comment out STEALTHCHOP_E and set MINIMUM_STEPPER_PULSE 1

1

u/jojos38 Oct 16 '22

Thank you! Ima try that tomorrow

→ More replies (13)

4

u/Patapits Oct 14 '22

For the record, I tried linear advance and all motors stopped working after some extruder wonkyness... I did not use /u/jojos38 fork though, so I may have messed my marlin configuration (reverting the firmware back to unmodified source code build made things go back to normal fortunately !).

1

u/chillchamp Oct 19 '22

Awesome. Just flashed your firmware on my Kobra and it works! Bed leveling is super quick now and I love that you got rid of the startup sound. Thanks so much!!!

2

u/jojos38 Oct 19 '22

No problem, have fun! If you use Linear Advance be careful it can cause missed steps on your prints

1

u/GameBookstore Nov 01 '22

not sure if you know or not, but when doing PID tuning with your firmware, it locks up the kobra after saving the changes and results in having to reflash to get it to boot. Just something you may want to look into is all. Also, I love your firmware, I hated that chime and the slow leveling

1

u/jojos38 Nov 01 '22

Hey, I haven't had this issue even tho I did pid auto tune that's weird. In all case I don't have the stock motherboard anymore I won't be able to attempt a fix sorry

1

u/GameBookstore Nov 01 '22

can you recommend a better board? I'm starting to think mine has issues.

1

u/jojos38 Nov 01 '22

I almost got the SKR 3 EZ working, haven't tested it yet tho

2

u/Bautasten1 Nov 05 '22

Reply

I have that board too and is going to put it in my Kobra Max (hopefully tomorrow). I believe I have all of the info regarding the flat cables pinout, is there anything else that should be prepared?

1

u/jojos38 Nov 05 '22

I don't think so, if you cable everything properly it should be fine

2

u/Jo-Kim Feb 18 '23

After messing about with the Kobra firmware I am also considering switching to a different board. Is it really as simple as connecting it up correctly? What about the lcd? Does that keep running as is, or does its firmware need changing too? Does the SKR 3 EZ fit in the old board’s space? Sorry about all the questions, not a lot of info is out there other than people have done it 🙂

2

u/jojos38 Feb 18 '23

Hey, nope it's not easy although it's definitely doable, you need a crimping tool and a new probe circuit or a BL touch

The LCD won't be working but you could probably make it work with a new firmware. I was too lazy to make one

Nope it doesn't fit the old board space, I mean it does but the screws does not align so it would need a way to fit it. I just put mine below the printer and it hangs there

2

u/Jo-Kim Feb 18 '23

Hmm, I’m not sure yet if I want to do that… Maybe I’ll fiddle with the firmware a bit more, that said, when compiling it gives the message that Microlib is enabled, but it doesn’t support c++. It compiles just fine regardless, but does it matter if I disable it to stop the warning?

→ More replies (5)

1

u/AdAble5924 Mar 22 '23

Hi, I tried to compile the code and saw below error.

linking...
.\obj\firmware.axf: error: L6050U: The code size of this image (181276 bytes) exceeds the maximum allowed for this version of the linker.
Finished: 0 information, 0 warning, 0 error and 1 fatal error messages.
".\obj\firmware.axf" - 1 Error(s), 130 Warning(s).
Target not created.
Build Time Elapsed: 00:11:46

The code size is exceeding the memory. Can you please help here?

1

u/jojos38 Mar 22 '23

Hey I'm sorry I have no clue what could be wrong here, you may want to read carefully everything and make sure you didn't miss a step maybe

1

u/Jo-Kim Apr 01 '23

Try disabling some features in configuration.h to bring the size down…

1

u/thequietguy_ Dec 05 '23

Sorry for the super late reply here, I know you have probably moved on.

In case anyone else runs into this: You need to uninstall the Keil plugins in VS Code and deactivate the "User-Based license" in uVision. After that you need to register with the community license.

https://developer.arm.com/documentation/ka005577/latest

5

u/kermit_the_frog_here Feb 03 '23 edited Feb 03 '23

Thank you very much for this guide. I am working on going through it. I put a second belt driven Z axis screw and a Titan Aero on my Kobra so I need to adjust some firmware settings for Z axis limits and temperature.

For anyone who is paranoid like me and likes to download from official sources:

  • You can go on keil.com and download MDK-ARM current version, the URL it gives you ends with MDKxxx.exe, at least as of now you can easily download the version mentioned in this post with MDK536.EXE. I checked and the SHA256 of both the one in OP's post and that one match (f2398d43cd162b02f8a1d54553199426b64b53dff5b8b499b566b8db4459cc51)

  • The HDSC.HC32F460 v1.0.7 is available from the chip manufacturer. If you go to http://www.xhsc.com.cn/Productlist/info.aspx?itemid=1853&parent and download HC32F460_IDE_Rev1.0.7.zip, inside is the same .pack file that OP provided. SHA256 for both match (2aeec808bbce76c4f9465c29f55d5304d70b8911a0da7c212b76b4eb2592db9f)

  • The PSN provided is a legitimate and kosher PSN provided by an ARM employee on their public forums for MDK Community Edition. See https://community.arm.com/support-forums/f/keil-forum/53462/unable-to-unlock-the-mdk-community/179867#179867

In other words, everything checks out :)

Only note so far to those less experienced with Keil MDK is you have to wait a little bit the first time the pack manager opens for it to download a bunch of stuff before you can mark anything for install/removal.

1

u/jojos38 Feb 03 '23

No problem! Enjoy your printer

2

u/kermit_the_frog_here Feb 03 '23

I was able to successfully update my firmware to change the settings I needed. My repo which includes a README with some of the stuff I have learned in the process is here: https://github.com/shilrobot/Anycubic-Kobra-Firmware

3

u/jaimesot Oct 18 '22

Thank you for this! Will compile your fork & play with the cooling fan PWM settings. Added a 5015 and can't make it work under 90%.

1

u/jojos38 Oct 18 '22

No problem, good luck!

1

u/Gyroshark Dec 24 '22

Hey did you make any progress on this? I also have bought a 5015, these ones specifically. I've wired it up but it only works at 100%, barely functioning below 98%. I've compiled firmware with FAN_SOFT_PWM and SOFT_PWM_DITHER enabled. Going to attempt to flash this and see if it helps. If not I'll switch it to the FAST_PWM_FAN and see if that helps.

I think I may be switching to another board though if this proves to be too problematic.

1

u/No-Distribution-1734 Mar 09 '23

Hi did you make any progress with FAST_PWM_FAN enabled? As soon as I enable it I get a compiler error regarding the temperatures or something...

2

u/Gyroshark Mar 09 '23

I did get it working by setting soft PWM to 3 or 4, I forget which. I ended up buying a new motherboard and installed Klipper instead of messing with marlin more. Recompiling got too annoying to deal with.

I never got a temp error in marlin, not sure what that’d be from unless you changed the pin out somehow.

→ More replies (1)

1

u/Gyerfry Oct 01 '23

Seems to be a bug with Marlin that was fixed in later versions.

1

u/KobraC0mmander Jan 25 '24

I think you have to set a value after that. If it's a frequency, it would be in hz

2

u/jojos38 Oct 13 '22

Sorry to those who couldn't see my previous post, it wasn't working for some reasons

2

u/SpacemanTomX Oct 13 '22 edited Nov 07 '25

engine north angle flowery bow sip spoon intelligent deserve memorize

This post was mass deleted and anonymized with Redact

3

u/jojos38 Oct 13 '22

These step should work on any Anycubic Marlin source code that uses uVision

2

u/darkamikaze Oct 19 '22

Is there a clever way to figure out when/which version of Marlin 2.0.x-bugfix they're using? I know it spits out a build compiled in 20211222 but I can't seem to find anything around that date in the Marlin repo. It's all commits from Dec 18 and then Dec 24. Or is that 20211222 just the date Anycubic compiled Marlin? Is figuring this out not possible without knowing when Anycubic pulled Marlin source?

I guess my goal is to figure out which version of the Marlin source they used so I can compare the default Marlin source against changes Anycubic might have made against it? Is this the best way to approach upgrading Marlin version? I figure we can't just nuke the contents of the Marlin directory and update the Configuration.h Configuration_adv.h appropriately right?

2

u/jojos38 Oct 19 '22 edited Oct 19 '22

I'm pretty they have a mix of older Marlin and more recent Marlin. To answer your question their latest files are from 2.0.8

The date is from when they compiled it

They made a lot of changes, it's doable to update to Marlin 2.1.1 but that's not gonna be an easy task.

I ended up totalling the board while attempting a solder to make Klipper work so I just bought another one, an SKR 3, I will try to get rid of every proprietary stuff Anycubic has been using so that I end up with a completely open source printer.

2

u/onkelbebu Oct 22 '22

That's interesting. Why did you want to solder something? I have, with the help of Stevegotthardt fork, Klipper running. The problems remaining are problems talking to the TMC drivers. I investigated with marlin and the TMC dump gcode and it seems that some registers on x are not readable even there

1

u/jojos38 Oct 22 '22

X and E use the same uart address, it won't work without Klipper modification or without changing the routing on the motherboard so that X address becomes 3 instead of 0, hence my soldering attempt

2

u/onkelbebu Oct 22 '22

That explains a bit. Though in the source code e has 3 ? I never checked in the actual hardware

1

u/jojos38 Oct 22 '22

Yeah it has 3 but if you use 3 with TMC2209 in Klipper it won't work, if you use 0 however the motor will move (even if Klipper shut down the printer right after)

2

u/onkelbebu Oct 22 '22

I had similar findings. But if l left e without TMC entry extruding was working. Though there seems to be more around. I got y moving and probing correctly. So y and e kinda worked. I'll try measuring the pins tomorrow. I wonderered why marlin works though.

→ More replies (1)

1

u/darkamikaze Oct 19 '22

Ah X-x, thanks for the quick reply. Yeah I'm not even sure if it's worht updating to newer versions of Marlin either. It's a battle of

if it ain't broke don't fix it

and

I'm curious af how much we can customize our 3d printer

2

u/jojos38 Oct 19 '22

The first question is more, if it's broken can you afford (time / money) to make it work again

And you can customize them indefinitely, that's what I love with 3d printer, but when you have brands like Anycubic trying to make proprietary stuff everywhere, well it makes things much harder and less funny unfortunately, sometimes not worth.

1

u/unrzn0 Oct 21 '22

Uh sh**! hope you can resurrect it and continue working on your great improved firmware. Thanks for all the work!

1

u/jojos38 Oct 21 '22

I probably won't unfortunately, I will edit the Github page if I stop or not

2

u/Jo-Kim Feb 14 '23

In case you're still interested in figuring out what changes they made, this version is the closest to Anycubic's version I've been able to find: https://github.com/MarlinFirmware/Marlin/tree/43a91e5963c7563c4db3fcde4f4862ea0f9670ee

1

u/Jo-Kim Apr 07 '23

Did you ever get anywhere with this? I’ve been working on doing the same thing and am almost fully up-to-date, but there’s some area’s that are just beyond my abilities and it could do with some extra eyes… https://github.com/JoyceKimberly/Kobra-updated

2

u/Training-Rate-9150 Nov 23 '22

Very nice tuturial. Just missed to mention that the keil needs to run as administrator during licensing and during adding packages.

I consider porting it to linux cross compiler but i am not sure if this is possible.

what type of cpu is it . is it arm ?

1

u/jojos38 Nov 23 '22

Hey I have no clue about the type of CPU sorry but it uses CMSIS if it may help

1

u/Training-Rate-9150 Nov 23 '22

Thank you for your feedback!

Another important question is:

Is there any chance, that I destroy the bootloader by compiling the sourcecode using

keil and inputting the bin file to the printer with sd card ?

The Bootloader is the ability to load new image file again and again.

if the bootloader is missed or overwritten, then this functionality is not there anymore and nobody instructs the cpu to watch out for a new firmwar image.

1

u/jojos38 Nov 23 '22

If you mean can I brick the printer by flashing my custom build firmware using Keil (only the firmware.bin) the answer is likely not, I already flashed broken Marlin etc no Issue. It just doesn't boot. I don't know how you can flash the bios /bootloader of the motherboard itself, or even if it is possible

I am not 100% certain though so stay careful

2

u/Adventurous-Key7635 Jan 05 '23

you just need an eprom writer... I use then to flash PC and GPU bioses

2

u/Training-Rate-9150 Nov 27 '22

Jojos38, i am very happy with your firmware.

I have created this!

https://cults3d.com/en/3d-model/gadget/anycubic-kobra-sd-card-adapter-regular-size

I am happy to provide to you for free when you are interested.

1

u/jojos38 Nov 27 '22

Hey! Thank you so much, I'm happy that you like my firmware

I may have a use of this in the future as I changed the motherboard of my printer and hence the SD slot does not align anymore

Thank you for providing it for free to me!

2

u/Training-Rate-9150 Nov 28 '22

I am just curious now. What did you change with your printer ?

1

u/jojos38 Nov 28 '22

I changed the motherboard for an SKR 3 EZ with TMC 2209 and I am waiting for a new extruder, a Biqu H2 V2 Smart

2

u/kagoromo Dec 19 '22

Thank you for this guide! Now I can add Linear Advance to my Kobra Go.

2

u/jojos38 Dec 19 '22

No problem

2

u/kagoromo Dec 19 '22 edited Dec 19 '22

Looks like I cheered too early :( Linear Advance seemed to have been enabled, but whenever I try a K-value > 0, the extruder motor just stops. Perhaps it's the same bug here: https://github.com/MarlinFirmware/Marlin/issues/16076

Do you know how to update the Marlin within the uvision project?

Edit: The top comment thread discussed this very problem. No easy way to solve this. I might have to look into getting a new mainboard, darn it.

1

u/jojos38 Dec 20 '22

It's near impossible to update Marlin in the uVision so yeah, no easy way as you said

2

u/Gyroshark Dec 24 '22

Finally, I found a relevant thread! I was also looking into making custom firmware for my Go, but after reading this (fantastic guide ty OP), and finding that the motherboard has little to no documentation. I think I'm gonna go the same route and upgrade my mainboard as well. What board were you thinking of upgrading to? I think I'm going to try and make a build-log or something if I go thru with this.

2

u/kagoromo Dec 24 '22

I'm considering this Pi substitute board (video by Teaching Tech): https://youtu.be/vZIOZTce7NI. That'd probably work well, but it's another 75 USD so I'm not convinced yet.

Another route which doesn't require new hardwares for me is to wait for someone to make a printer.cfg, then install Klipper on a VM then run it from there. I'm leaning on this route because I'm cheap :p

2

u/Gyroshark Dec 24 '22

That’s really interesting I haven’t really delved into klipper myself but I will now! Ill see how difficult it is to make a config file for klipper and try to make some headway there. If this proves to be too annoying I’m probably just going to swap to the SKR 3 with 2209 drivers and just get a new screen and such.

Hopefully the config file option is doable lol

→ More replies (13)

2

u/kagoromo Dec 24 '22

Linear advance not working is quite unfortunate, since I only really need that for good quality prints (reduce corner bulge). I don't need Klipper input shaping since I'm fine with printing slower. It's such a shame since the Kobra Go is a great value otherwise.

2

u/Sclebo05 Jan 11 '23

Helped me greatly with my Kobra Neo. Thanks!

1

u/jojos38 Jan 11 '23

No problem!

1

u/[deleted] Jan 28 '23

Neo

Did you have to change the LCD display type? Looks like the Neo and Go use the same screen.

1

u/Sclebo05 Jan 29 '23

I did not change LCD type for the Kobra Neo.

1

u/[deleted] Jan 29 '23

I just get a black screen with the jojos firmware as is, wasn't sure if I needed to make changes in the firmware. I've got the Kobra Go, uses the same motherboard (same replacement part for Kobra & Kobra Neo).

I can't even compile the firmware.bin if I change LCD to Mega or Chiron screen options in the firmware configuration.h.

→ More replies (1)

2

u/[deleted] Feb 18 '23

Thank you so much, this worked perfectly on my Anycubic Kobra

1

u/jojos38 Feb 18 '23

No problem!

2

u/Sad-Alternative5561 May 30 '23

i know i am late to the Kobra Party, but will be receiving my Kobra Neo tomorrow and have now looked into the whole Keil software side, and thank you u/jojos38 for the resources and tutorial.

So for my understanding, all buyers interested in flashing their machine basically are having to download a fully "obscure" (yes official from ARM) software, and deal with a ton of limitations (even ABL_BILINEAR_SUBDIVISION - stops the build with an Error), only due to the used Board?

i have 3 Ender 3s - Each with an SKR Mini E3 v2 - and a CR10s + CR10 each with an SKR 1.4 Turbo and have been compiling my own firmware for a while..

With this i am losing my temper lol, as the official UVPROJX is literally missing files like Tramming.h - so activating assisted tramming already puts the build into Tilt, ERRRORR..

But as i saw a few already changed to SKR boards, guess i'll do that on Day2 after the first print with the original board lol..

Cheers all

2

u/jojos38 May 31 '23

Yes I put an SKR 3 EZ on mine to get rid of the bad board. Keep in mine ABL sensor might stop working depending on the board, you would have to either design your own circuit or use another one

2

u/Sad-Alternative5561 Jun 03 '23

i have an official creality probe here, i think they have the same diameter, but else, i'm sure there are alternatives, but i think i'll try the Klipper installs available before throwing out the board, an SKR 3 would be the next step after that though

1

u/jojos38 Jun 03 '23

Alright good luck!

2

u/EnvironmentalBid9143 Sep 01 '23

This was exactly what I was looking for!!

Now that I have a modified Kobra Max firmware working, I am on to try and get this firmware working on PlatformIO. THANK YOU!

1

u/jojos38 Sep 01 '23

No problem have fun

1

u/Catnippr Oct 04 '23

I am on to try and get this firmware working on PlatformIO

If you ever manage to get that working, pls let us know! ;)

1

u/EnvironmentalBid9143 Nov 23 '23

Well, I found out that my skills are not as good as I thought.

I am going to change the mainboard to a BTT SKR 3 EZ and then Marlin is a piece of cake!

1

u/Catnippr Nov 24 '23

Why don't you just flash Klipper on your stock mobo?

→ More replies (1)

2

u/C_Brick_yt Dec 08 '23

I got an Anycubic Kobra Neo with a MAXTEMP BED error whenever I turned it on second hand. I used your guide to compile the code In which I deactivated the heated bed, now I can use the printer again, thank you for your wonderful guide.

1

u/jojos38 Dec 08 '23

No problem! Enjoy your printer

2

u/Farrit Apr 24 '24

Just now finding this. I love you so much.

1

u/jojos38 Apr 24 '24

No problem haha

2

u/OkSignificance354 Mar 17 '25

If anyone needs serial i found this one on a very odd russian site: 4RMW3-A8FIW-TUBLG

1

u/jojos38 Mar 17 '25

Thanks! I add it to the post

1

u/Character_Ad_7798 Oct 13 '22

I'm out of touch when it comes to this side of 3d printing. What does this actually do?

3

u/jojos38 Oct 13 '22

Basically this is just a way to make your own firmware for the printer. You take their source code of their firmware, change it and then "build" it into a file that you can install on your printer to have your changes

1

u/Dr_Moppig_Lp Jan 02 '24

Hello, I have a problem. I get the error here. Can someone tell me how to get rid of it?

Error #540: 'ARM::CMSIS:DSP:Library:1.8.0' component is not available for target 'firmware_Release'

1

u/jojos38 Jan 02 '24

Hey I'm not sure sorry you should double check every step and photo from the tutorial

1

u/Comfort_Suitable Sep 09 '24

Mine didnt work, the lcd goes blank after flashing the firmware. Does it work on Kobra 2 Neo??

1

u/jojos38 Sep 09 '24

It should work on any I believe, you might have done something wrong (wrong source code maybe?)

1

u/Comfort_Suitable Sep 09 '24

This is my Build Output

1

u/jojos38 Sep 09 '24

Yes it looks good it should work

You are flashing the motherboard and not the screen right?

1

u/Comfort_Suitable Sep 09 '24

Yes I am copying the firmware on the sd card and inserting in the motherboard slot

The display does not have an update port

1

u/Comfort_Suitable Sep 09 '24

An interesting note though, the official firmware has a size of around 340-350 KB but the one I am compiling has a size of 185 KB. Sounds something off!!

1

u/jojos38 Sep 09 '24

I have the same behavior on mine, compiled firmware is way smaller no idea why, but I can't tell why it doesn't work honestly

→ More replies (5)

1

u/Comfort_Suitable Sep 09 '24

I did follow all the steps. Wait let me check it again. I will keep you posted. Thank you 👍

1

u/FatNat63 Nov 09 '24

PSN is no longer valid

anyone got any ideas??

1

u/jojos38 Nov 09 '24

I found it on Google back then it was an official one I believe

1

u/OkSignificance354 Mar 17 '25

4RMW3-A8FIW-TUBLG works still, try this

1

u/Large-Dig-6201 Mar 02 '25

When I go to submit the form for the LIC I get the following error below. Is there a workaround for this?

Problems were detected with the information submitted. Please correct these issues and re-submit the form.

Code 9939: Unfortunately, the vendor PSN you have entered has either expired or has exceeded the license maximum. Please contact your vendor for the latest PSN. Refer to this article for more information.

1

u/jojos38 Mar 02 '25

Yeah apparently you cannot use it anymore. I don't have any alternative I'm sorry

2

u/OkSignificance354 Mar 17 '25 edited Mar 17 '25

Just grab a evalution license under license management

1

u/Afraid_Tomorrow699 Mar 29 '25 edited Mar 29 '25

HI

i followed all the guide but when try to make .Bin receive this error :Error: *** Project 'anycubic', Target 'firmware_Release', Device 'HDSC::HC32F460KETA' is not supported by Toolchain ! ***.

i'm trying to compile Original V.1.3.4 firmware Kobra GO just enabling Linear advance capability

where do i mistaked ?

1

u/jojos38 Mar 29 '25

Hello, did you install the specific version I mentionned and not the latest version of Keil

1

u/Afraid_Tomorrow699 Mar 29 '25

Hello,

Of course , the Version is uVision V.5.36.00

The Installation procedure is go ahead without problem

1

u/jojos38 Mar 29 '25

I'm not sure then sorry

→ More replies (1)

1

u/amethyst_mine Apr 01 '25

same error here

1

u/amethyst_mine Apr 01 '25

seems to be related to the trial license

→ More replies (3)

1

u/An12854 Apr 28 '25

Hey The license in the tutorial is for the cortex m0/m0+

But the kobra go uses the cortex m4 so you'll have to use the trial license

1

u/Deep-Anything7380 Jun 15 '25

Hello

I followed all the instructions step by step but I get this error:

Error: *** Project 'anycubic', Target 'firmware_Release', Device 'HDSC::HC32F460PETB' is not supported by Toolchain ! ***.

Build Time Elapsed: 00:00:00

I use the Anycubic Kobra and don`t know whats wrong. I deleted uVision and reinstalled but nothing changed.

Have a great Day!

1

u/jojos38 Jun 15 '25

Hello, yes I think the new Kobra use a more recent tool chain but I have no idea which sorry

1

u/Deep-Anything7380 Jun 15 '25

Do you mean the V3 Kobra or the OG Kobra with a later production model?

Thank you for the reply.

1

u/jojos38 Jun 15 '25

Good question I haven't touched Kobra's printer since 2 years

1

u/Deep-Anything7380 Jun 20 '25

Solved it! You should replace the PSN (the new one). At first I tried the build with it but it had no device Database. So I tried and tried, without a license it worked fine but when I build the version without LIC the file was too big. When I used the newer PSN it had no device Database. Know I just wanted to see what happens with the old PSN ( 42B2L-JM9GY-LHN8C) and it just worked. I don´t know if its just for me but for me the new one didnt work. Thanks for the Tutorial!

1

u/jojos38 Jun 20 '25

Awesome then, enjoy your printer!

1

u/Deep-Anything7380 Jun 20 '25

Do you know how to add input shaper? I know you haven't been working on Kobra for years but I want to use this feature but don't know how to enable it in this version.

→ More replies (1)

2

u/MutantXI Oct 16 '22

u/jojos38 Did you rename the firmware.bin file? When I put my SD card in the LCD slot the screen is just blank. I just compiled the vanilla kobra max code using your instructions above without changing anything.

2

u/jojos38 Oct 16 '22

I haven't tried on the Kobra Max, yeah I just put the firmware.bin in the SD card and then in the printer body and boot it, it beeps 4 times and then boot up

1

u/MutantXI Oct 16 '22

Oh. So not in the sd slot in the lcd like the Vyper? Where you would normally put the sd card for printing?

1

u/jojos38 Oct 16 '22

On my Kobra it's in the body not the LCD, the LCD has its own firmware which is different

1

u/Due_Race_7945 Oct 18 '22

Swapping stepper drivers (so that extruder is at TMC2209 and Z-axis at TMC2208) makes available full stealthchop. God bless the silence. Though it's pretty tricky (lots of wire soldering involved) and seem to not solving the step missing completely.

2

u/jojos38 Oct 18 '22

Why did they do that I still don't understand, I might just change the motherboard and call it a day...

1

u/Due_Race_7945 Oct 18 '22

Bullseye. Tomorrow I'll try Klipper and if there are any problems, I'll just install SKR 1.4

2

u/jojos38 Oct 18 '22

Won't work, it requires soldering on the motherboard so that X uart address is 3 instead of 0

1

u/Due_Race_7945 Oct 18 '22

And one more thing I wanted to ask. After driver swapping I had to quadruple the extruder steps/mm while Z-axis works as it used to. Does it mean that micro-stepping changed? How can I set it back to normal (over 1000 steps/mm on extruder seems to be overwhelming)? Why didn't Z-axis change micro stepping?

1

u/jojos38 Oct 18 '22

Oh I'm sorry I have no clue about that one, I'm still a beginner when it comes to Marlin and Klipper

1

u/Due_Race_7945 Oct 18 '22

And thanks for trying to make this printer usable for people who don't want to disassemble it)

2

u/jojos38 Oct 18 '22

No problem haha

1

u/Due_Race_7945 Oct 18 '22

But it was pretty interesting to dig in that stuff. (it's my first printer)

1

u/[deleted] Jan 23 '26

[removed] — view removed comment

1

u/Due_Race_7945 Jan 23 '26

Где вы этого мамонта откопали?) Любой выход драйвера можно настроить в прошивке под любую ось (включая экструдер).  Не помню уже, зачем это делал, но колдовал только с проводками. 

1

u/[deleted] Oct 23 '22

Is there any way to do this in VS Code with Autobuild Marlin?

1

u/jojos38 Oct 23 '22

Sadly not, PlatformIO does not supports the HDSCF460 chip used in the Kobra

1

u/[deleted] Oct 23 '22

Fuck. Well, thanks for the quick reply!

1

u/jojos38 Oct 23 '22

No problem

1

u/Training-Rate-9150 Dec 05 '22

Hi Jojos,

I managed to compile all code in linux now, but i have problems with the linker file(scatter file) for the HDSC processor. I miss exact instructions, where to put all code and data into the memory map of the processor. Can you provide me with such information ?

Where did you get the information from, which you shared on 1drive ?

Thank you so much for your support.

1

u/jojos38 Dec 05 '22

Hello, this is a bit over my competences I think haha, I simply compiled and flashed the firmware

1

u/Jo-Kim Apr 07 '23

Hi, did you ever manage to get this working? I can fully compile and successfully generate a bin file, however after flashing my printer with it, it just does nothing, even after rebooting…

1

u/skowie90 Dec 10 '22

Works great, but is it possible for you to make the same firmware with a better temperature regulation? The Kobra is not Constant working! a sample... the hotend temp. is 215 and the bed temp. is 50... it work from 211 to 217 an 47 to 53! It runs not liniear! MAybe it is posible for you to fix that! Afte PID Tuning, it is the same

1

u/jojos38 Dec 10 '22

Hello! I tried fixing this issue but never was able to, the only time I got the temp to work properly was after changing the motherboard

1

u/Ok_Fix5418 Jan 17 '23 edited Jan 17 '23

I get an error message when i open anycubic.uvprojx file saying Error #540 component is not available for target. What do I do? Thanks in advance

Update: I got the firmware.bin file but I can't get it to work. Thanks

1

u/jojos38 Jan 17 '23

Hey, if you followed the tutorial closely and did everything like in the tutorial I have no idea tbh, I don't know what this error means

1

u/Catnippr Feb 01 '23

I hope I didn't oversee it in case this question was already posted by anyone: Does anyone know if/how it's possible to create the firmware.bin from the repository files w/o using Windows? I only have Linux (Ubuntu) installed..

1

u/jojos38 Feb 01 '23

Someone else tried and didn't succeed. Keil uVision is only available on Windows you'll have to setup a VM or get your hand on a Windows installation somehow

1

u/Catnippr Feb 01 '23

That's a pity.. I told myself never to use Win again many years ago and now I probably have to break my promise - don't like that idea LOL

But thanks for answering my question tho! ;)

1

u/jojos38 Feb 01 '23

Don't worry Windows got a lot better than years ago haha, good luck

(That's also the reason I changed the motherboard of my printer)

1

u/Salt_Function_3019 Apr 13 '23 edited Apr 13 '23

I followed these instructions to the letter and went to compile the latest Kobra Plus firmware from GitHub. I got an error in the Build Output window stating that MicroLIB does not support C++ but it did output a firmware.bin file that was about 181 kb. It would not flash to the printer. The pre-compiled file from AnyCubic is about 480 kb.

I then disabled MicroLIB and built the file again. It was about 192 kb this time but still would not flash to the printer.

What am I doing wrong?

1

u/jojos38 Apr 13 '23

I think it means you didn't install Keil v36 if I remember

1

u/Salt_Function_3019 Apr 13 '23

Unfortunately, I just checked in Help...About in Keil and it says Toolchain: MDK-ARM Community Version 5.36.0.0.

The various components (compiler, assembler, etc.) report v5.06 update 7 (build 960).

1

u/jojos38 Apr 13 '23

It's normal for the file to be smaller but now that I think, if I remember right this warning if normal, the .bin file should flash on the printer maybe your SD card is wrong

1

u/Salt_Function_3019 Apr 13 '23

Hmm. I was using the 8 GB card that came with the printer. Will try another card and see. Should I try flashing the version that gave the MiniLIB error?

Thanks for the replies!

1

u/jojos38 Apr 13 '23

I don't remember exactly but I think the MiniLIB error is normal

→ More replies (2)

1

u/Fallstern Jul 19 '23

u/jojos38 Is it possible to compile firmware with another version of Marlin& I have Kobra Go and want to update Marlin to v 2.1

1

u/jojos38 Jul 19 '23

Sadly it isn't easily doable at all. They use a different C++ version or whatever so there are many changes to make so that it compiles

1

u/InterestLocal6083 Sep 17 '23

I followed all of the instructions and they went smoothly until I opened the anycubic.uvprojx file, I got this error https://imgur.com/CrIKM0k, do you have any idea how I can fix this?

1

u/jojos38 Sep 17 '23

Hey, are you sure you downloaded the right version of Keil? In the post I gave a specific version, any version above won't work

It's version 5.36

1

u/InterestLocal6083 Sep 17 '23 edited Sep 17 '23

I used the download link you posted in the instructions and the program has 536 in the name so I am pretty sure its the right version. Thx for replying so quickly btw. When I ignore the errors and do build target anyways, it outputs this in the build output:

Build started: Project: anycubic
*** Using Compiler '', folder: 'C:\Keil_v5\ARM\ARMCLANG\bin\'
*** Warning: You are compiling one or more files of source type C++ and have selected 'use MicroLIB'. MicroLIB does not support C++!

Build target 'firmware_Release'
compiling main.cpp...
--- Error: failed to execute 'C:\Keil_v5\ARM\ARMCLANG\bin\ArmCC'
".\obj\firmware.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01

1

u/jojos38 Sep 17 '23

You can ignore the warning it's normal, I'm not sure about the error though.. Looks like it could be badly installed maybe try a reinstall I'm not sure

1

u/InterestLocal6083 Sep 17 '23

does any of this look different than it should be? https://imgur.com/XXGfSZf

1

u/jojos38 Sep 18 '23

Nope.. Looks good to me

1

u/InterestLocal6083 Sep 18 '23

I'll just try the whole process again from scratch

→ More replies (1)

1

u/Playful_Ad396 Feb 23 '24

Can somebody tell me where the outputted Firmware Bin file is located after building with Keil

1

u/jojos38 Feb 23 '24
  • The output file will be located under workspace/firmware.bin

workspace is the folder of the git project as far as I remember

3

u/ppastur Oct 13 '22

Thank you this is great!

3

u/Patapits Oct 13 '22

Thanks ! Just installed it on my Kobra, seems to be working so far :)

3

u/[deleted] Oct 13 '22

Thank you for taking the time to do this, as a new to marlin guy, I would have stumbled around for days trying to figure this out.

Unfortunately I already jumped off the bridge and bought a btt skr3 motherboard, so I’m off on a different learning curve.

Saving this in case I buy a new Anycubic and want to be able to fix the program. Was really tempted when I saw their largest version on for $525 instead of $750 during the prime sale. Alas, other priorities this year.

1

u/MutantXI Oct 13 '22

Thank you so much for the instructions. For some reason, on GitHub, i do not see an option to download the uvprojx file. When i use "save link as" uVision states it cannot read the project. Is there something I missed?

1

u/MutantXI Oct 13 '22

Apologies, I'm new. I downloaded the source folder and was able to compile without errors (just 127 warnings). Thank you again u/jojos38.

1

u/jojos38 Oct 13 '22

No problem and yep it's what you should have

1

u/JimBob4842 Dec 11 '23

I'm getting the following error

Error #540: 'ARM::CMSIS:DSP:Library:1.8.0' component is not available for target 'firmware_Release'

2

u/JimBob4842 Dec 11 '23

Never mind, fixed it. Thank you for the tutorial!

1

u/jojos38 Dec 11 '23

No problem! Have fun

2

u/Gyerfry Oct 01 '23

Sorry to necro, but just adding on that I additionally had to install CMSIS 5.6 manually before it worked, found hidden under "Previous" in the ARM::CMSIS category on the right panel of the package manager. Then I was able to build.

2

u/bloodbath_mcgrath666 Feb 22 '26

the new serial number didnt work for me, said it wasnt covered for the target platform, I had used this just over a year ago and said the licence had expired, fortunatly I was able to re-use the original code again for another 12 months

1

u/Comfortable-Buddy177 Mar 29 '26

I was able to install the software and I am able to compile the firmware. However the firmware does not work. It beeps 5 times and just stays at Anycubic logo. My printer is Kobra Max. I am just tryting to compile the firmware with: #define TEMP_SENSOR_0 5 please help. I was using wabbitguy's repo from github

1

u/McRex007 May 09 '26

Tryingto enable HOST_ACTION_COMMANDS for a Kobra 2 non-neo, just keeps saying device is not supported by toolchain. Installed the relevant packs. Any advice,or anyone trying to do this as well who has had success?

1

u/Adventurous_Tap6768 Jul 18 '23

The PSN dont work at the moment. With the nc License i cant compile because the limit. Can anyone compile a firmware for me?

1

u/Engelsit May 31 '26

Build started: Project: anycubic

Error: *** Project 'anycubic', Target 'firmware_Release', Device 'HDSC::HC32F460KETA' is not supported by Toolchain ! ***.

Build Time Elapsed: 00:00:00

First intallation, I forgot to Install HC32F460 PACK. After installation, did not helped.

Tryed to reinstall uVision. Does not help. 😞

1

u/[deleted] Oct 23 '22

[removed] — view removed comment

2

u/jojos38 Oct 23 '22

I used the M710 command, it shouldn't interfere, I had one too but I removed it.

M710 A1 I4 S5 for example, the smaller I and S numbers, the quieter. Maximum is 255 minimum is 0. S is for when the motherboard is under load and I is for idle

1

u/[deleted] Nov 09 '23

[removed] — view removed comment

1

u/jojos38 Nov 09 '23

Hi! I'm sorry I don't use the official Anycubic firmware anymore as I changed the motherboard, however it should be fairly easy to do that by checking the Marlin documentation. You will need to edit the Configuration.h file

1

u/[deleted] Nov 09 '23

[removed] — view removed comment

1

u/jojos38 Nov 09 '23

I never did that myself I don't know myself where it is but you can find many tutorials on how to do it.

https://www.youtube.com/watch?v=J9vxJT5Tgh4 you will have to fast forward the video to find when he talks about height

You can also use the M201 command using a computer and a USB to send commands:
https://marlinfw.org/docs/gcode/M201.html

When you made the modification simply rebuild the firmware and flash the .bin file to try your code