Flashlight Firmware Repository

TK thanks for the reply.
Later tonight I’ll try the build-25.sh and post here the results.

TK, could you please explain how to use the build-25.sh on a AVRStudio project?
I already downloaded the build-25.sh from your repository.

Nope, I can’t really do that. I’ve never used AVR Studio. About all I can say is that you’ll have to find the places in the GUI where all those compiler options are hidden… but I don’t know where to look.

Sorry, there is no driver schematic repository. I don’t even know how the concept of open-source would apply to something like that.

TK, what software do you use to compile instead AVR Studio?

Instead of AVR Studio, I use the tools and commands listed in the bin/build*.sh scripts.

AVR Studio uses the same tools to compile things, but it adds a bunch of extra layers around that to wrap it in a GUI. I don’t have any computers which are compatible with AVR Studio though, and don’t much care for GUI development environments, so I take a more direct route.

It’s all pretty easy to do under Linux, or in a Debian-like OS. This includes Windows 10, using its ability to run Ubuntu in a sandbox. Just a few commands to install the relevant packages, and then things mostly just work.

Most of the time, I just hit Up, then Enter. Or Up, Up, Enter. And things get compiled, or flashed, or whatever else it was I was doing.

TK, that’s way out my capabilities.
If I manage to make AVR Studio to compile crescendo with the thermal management included I’ll post here.
Thanks again.

Have you seen Guide: how to flash ATtiny13a based drivers (NANJG, QLITE, etc.) with custom firmware?

Hi g_damian.
Thanks for the link.
I have been using AVRStudio with success for some time.
My difficulty is specifically compiling crescendo with the thermal control activated and with the especial modes at the same time.
For some unknown reason the resulting .hex file is too large for the attiny 25.
I will try to investigate the cause of this problem.
Any help is appreciated.

I'm currently not at a PC with Atmel Studio installed, but check your settings for the project.

One big one is the -Os setting.

Otherwise, take a look at the command line flags reported in AVR/GNU C Compiler and compare that with the flags used in build_25.sh: https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/fsm/view/head:/bin/build-25.sh

If there are some missing, I think you can add them under "Other optimization flags"

But from what I see, the most critical thing is Optimization level. You want -Os

Would the Gnu General Public Licence work? You have far more experience with GPL than I do.

For Eagle the source code would be the .sch and .brd files. The author would put a copyright and GPL notice in a text box in the schematic and layout.
Gerber files and images would be “object code”

The free version of Eagle will work for drivers. That should satisfy the “Corresponding Source” clause in section 1.

The PCB layout and source files can be copyrighted, but that might not cover the information in a schematic. If I understand correctly, the schematic might go under patent law, not copyright law. So the GPL and other similar licenses might not even be relevant.

Basically, I don’t have the background to answer this question… and a quick web search suggests that the answer is probably not simple.

A circuit can not be copyrighted but sometimes can be patented. Like any patentable invention, a patentable circuit needs to be new and non-obvious.

A copyright would apply to the drawing and the .sch file. Someone could redraw the circuit without violating the copyright. That goes against the sprit of GPL.

A patent for using pulse width modulation to regulate an LED flashlight was granted in August 2000.

Well, Arduino is such a thing. :slight_smile:

A few older videos from EEVblog

it is also a big forum

I know it’s a super minor thing, no big deal at all. But, I wanted to alert you that the Bistro.txt file doesn’t format correctly in Notepad. It seems that there is an “intention” for line breaks in certain places, but Notepad isn’t breaking lines there. So, the text is one big weird blob with huge multi-space gaps (space bar used instead of tab button). When I manually entered line breaks in what looked like the appropriate places, the text was a lot more organized and easy to follow.

Is this a feature or a bug? :smiling_imp:

Have your tried opening it with other (proper) text editors like Notepad++ ?

This sounds like the one Unix vs Windows Line breaks problem.

Unix uses the LF (line feed) symbol as a line break, Windows uses CRLF (carriage return, line feed)

And since Notepad finds no CRLF sequence, it just shows one long line

That seems like exactly what is (probably) happening. I’m on a computer that doesn’t have a proper text editor, and I don’t have permission to install one. If it’s an inherent flaw in Windows, then it obviously is not a problem that has, or needs, a solution.

So, as to my question of whether it’s a feature or a bug, it seems that it is both. :stuck_out_tongue:

What zeroflow said. It’s a bug, but the bug is a long-standing bug which everything except Windows fixed a long time ago. Most programs display both types of text file correctly, but Notepad is an exception. Microsoft has known about the bug for 25+ years and refuses to fix it.

I’m not surprised. I use Ubuntu at home, so I rarely see these bugs. :innocent: