cancel
Showing results for 
Search instead for 
Did you mean: 

Going back to older version of code

KareemAlkhouri202
Associate II

Hey guys!

I am currently working with Secure Boot using ARM TrustZones, Secure and Non-Secure!

I have ***ed up my code majorly hehe, and I cant just Ctrl + Z everything since I have edited in a lot of files and generated code from CubeMX (UART, HAL, HASH etc), is there a smooth way to go back to an older version of the entire folder, for example an older version of NonSecure and Secure etc.

Thanks in advance!

4 REPLIES 4
Andrew Neil
Super User

Do you use a version control system (VCS); eg, Git ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

No, unfortunatley not, I am only using STM32CubeIDE, which is why I came here to ask!

In that case, no.

This is exactly why Software Version Control Systems (SVCS) exist - so now would be the time to start using one!

Git is probably the most widely used nowadays, although others are available.

GitHub, as the name suggests, uses Git and also provides a hosting service.

GitLab is another, and there are many, many more.

 

PS:

You can host Git locally, but that's a load of extra work and loses the benefit of having an off-site backup.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

@KareemAlkhouri202 There is a widely used saying that initially sounds extremely harsh and banal, but contains a great deal of truth and applies again and again to exactly such cases, like unique family photos, password safes ... or software versions like yours: no backup, no mercy.

Anyway, now it's too late, but @Andrew Neil has already given you the most important tips.

Good luck!
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.