Any videos showing how to edit firmware files (like Anduril etc)?

Are there any videos on YouTube showing how to edit a firmware?

I haven’t found one.

There are enough videos showing how to flash drivers though…
But I’d love to see somebody actually editing an Anduril file, and explain what each thing means, how to remove certain features, how to change things, etc… so non-coders like me may also give it a try. Like an over the shoulder video.

If the video shows that it’s not too difficult to edit Anduril, I might give it a try … and if not… I’d still watch it anyway…

Edit: updated the text a bit so people don’t get confused…

Hex files aren’t edited (usually) as they contain the compiled code in form of machine readable instructions.

What you want to edit instead is the source code. In case of Anduril it’s a collection of many files written in the C programming language, then compiled via avr-gcc into hex files. This is a complex process that cannot be explained in a few minutes of video. For editing you don’t need more than a simple text editor - in addition to some knowledge of programming in C. Once you’re familiar with C we can go into the specifics of Anduril.

Next you’ll need the compiler toolchain. Today the easiest way is to use a docker image, initially created by me and later extended by @wolfgirl42. This brings you to the next learning section: Docker, how to use the command line, some basic Linux tools etc. It certainly helps if you have some basic knowledge of Linux. And of compilers, what they are and what’s important to keep an eye on when using them.

As a first step you could browse through the Anduril source code which can be found on GitHub. Look into the ui/anduril directory to find most of the state machine that represents the UI. Hardware specific configuration can be found in the hw directory. And don’t even look into the fsm part, which contains the core of Anduril. It’s just too complex, especially for a beginner.

7 Thanks

If you make a clear request, sometimes one of the Anduril Gods or Godesses will build you a custom Hex file, out of kindness (or pity) towards us mere mortals. :wink:

1 Thank

Pretty much what @SammysHP said.

If you want a specific modification that’s just a configuration change (e.g. enabling/disabling features or changing defaults), I’ve been putting some work into a system for applying user customisations to anduril builds, which should hopefully have some worked examples, if you were looking for a custom build I could do one using that as an example.

for more advanced changes, in terms of actually changing basic functionality or adding new things, it’s written in C, and the easiest way to build it is with GitHub - SiteRelEnby/anduril-buildenv-docker (also due an update soon, but waiting for some other changes elsewhere as well), or via github actions - if you clone the git repo and make your changws then push them to github, github will automatically build the firmware images, then you can download a .zip of them.

If you don’t really know C, it’s well written enough IMO that it’s possible to learn a fair part of the basics you’ll need just by reading the code. Look under ui/ for the higher level anduril code such as how the interface is designed, and fsm/ for the lower level closer to the hardware functions that form an abstraction layer so ui/ can be more easily worked on at a high level, or even other UIs can be written that are also based on FSM.

6 Thanks

I will echo whats already been said, some background in programming and compiling does help… BUT, @toykeeper has done a FABULOUS job of commenting and organizing the code, it is Extremely readable for the layman.

I have experience with C but that was 25 years ago… I Do Not know what I’m doing but have been able to modify A2 to get what I wanted(mostly… some things are still over my head).

Definitely if you are even remotely interested in trying it, at least go read through the code, it might be much more intuitive to you than you think it will be!

Gee, that’s nice to know!
Wish I’d known that a year ago… but then Anduril wasn’t on git then… still, thats a cool trick to know!

1 Thank

Thank you @SammysHP , @wolfgirl42 , @jon_slider , and @AK-Adventurist .

I’m surprised nobody could share a video… isn’t there any?

@Sammy
Oopssss… yeah, I meant the actual code. My bad! I knew it wasn’t going to be a 30-second youTube short :wink: Many things I learned on YouTube were from long, thorough tutorials (like building a website, etc). So I don’t mind a thorough video tutorial… that explains things step by step on how to start, and where to find things.
I have actually compiled my own firmware back in 2013/2014? for my Solarforce L2i P60 dropin. Which is still on my bedside… 4 modes, always starting in Low, no memory. But I got some help from somebody through PM…

@jon_slider
hahaha…yup… I would probably edit Anduril, and make it a Lite version :slight_smile: (it’s probalby not worth calling Anduril anymore at that point though) Only 2 mode groups (stepped/smooth) with shortcuts to turbo and low, have mode memory, a lockout, and a battery check. (I could probably live without a stepped mode even)
Pre-programmed thermal config at 60 or 70 degrees… and that’s it.
No configuration modes…no blinkies… nothing

@wolfgirl
Thank you. It’s been probably more than 10 years since I made my own simple firmware, and can’t even remember how I did it. How about making a video on how to do it? haha :smiley:
It would be nice to see how things are built, the software to use… how to “Github Action” or “Clone git repo” which are all terms that coders would use, and not mere mortals like us :wink: We have no clue what that means, or how that is done. A video tutorial can teach certain things in 5 minutes, that could take an hour to read.

@AK
I’ve learned many things online, from video and text. And I explain/teach things through video a lot for new 1Lumen reveiwers for example… Some tutorials are just easier/better to watch than read. Have you learned playing your favorite song on the piano for example? Just kidding… But it’s just a great example: video is sometimes preferred.

I totally appreciate all the work others have put into written documentation, and in these firmwares.

Now waiting for somebody willing to make a video :smiley:

Little bit surprised nobody has actually done this yet.

1 Thank

There isn’t a video because it is a bit like a self fulfilling prophecy. If you know enough programming to handle C, github, command lines, compiling etc then you don’t really need a step by step video. The code is indeed pretty well documented!

If you don’t then well better start learning the basics, if you have done that then you don’t need the video anymore^^

2 Thanks

Lol… that’s a very weird answer…

I’ll consider it… how about a text guide with images? I can definitely do that, but I don’t really feel confident about making videos at the moment.

5 Thanks

I don’t have a dog in the fight, but I generally prefer a text guide with images over a video. :+1:

4 Thanks

I don’t think video is a good format for such tutorial anyway.

1 Thank

Yeah, I would tend to agree, I personally don’t like video tutorials for that kind of thing, but some people do. If someone wants to make what I do do into a video then go for it, I guess.

No worries… I was just giving you a hard time :slight_smile:

It would be great to have someone do a tutorial on how to manipulate Anduril, so anybody could come in and remove things they don’t want.
Maybe I wasn’t very clear, but I wasn’t really asking for a full course on how to build firmware from the ground.

Agree: a text guide with images is much easier to maintain and keep up-to-date.

Written tutorials can become books… lol.

Just give you an example: wolfgirl42 said: upload to Github… writing down how to do that would take much more time than just showing it on video. because you don’t have to edit 20 images just to show where to click, etc.

BTW… I’m not asking anyone to record videos… I was just asking if anybody knew any… but I guess there are just none…

So I got my answer :smiley:

No worries… I have enough other things to do :smiley:

“How to use git/GitHub” is the sort of thing that I just take for granted in my own skillset, but also I wouldn’t really have any idea where to start on how to explain… Maybe this tutorial: How to Use Git and GitHub – Introduction for Beginners

1 Thank

Yeah… that’s what I meant… I do that myself as well. If you’re used to something you might say: upload it to X Y Z… but anybody who has never done that, doesn’t know how to do that.

There’s no need to learn how to use git to make your modifications/customisations, you can just download the code, modify, compile and use.

edit : GitHub - ToyKeeper/anduril: Anduril 2 Flashlight Firmware and FSM UI Toolkit
Code (green button) → download zip

1 Thank

I know… it was just an example.