Flashlight Firmware Repository

While you are in here TK, quick question. I have some 105C drivers laying around that I want to use up. I would like to put the A6 firmware on them, is it as simple as simply zeroing out the 7135 channel in the modes section and putting my desired modes all in the FET section? I don’t see any reason it wouldn’t but I have not messed with the A6 firmware yet.

Well let’s give it a shot.

So the ramp tables are essentially what I am used to seeing as far as PWM values for each channel? Then in the progmem section , those numbers (1-40) just correspond with a place along the ramp? So using your example code you posted here, a ‘20’ in progmem would equal 255/82/0 ?

Can I make the tables smaller (like 10 or 15 levels) so it’s easier to keep track of?

Yep, that is exactly it!

You can make the ramp size smaller, I think all you need to do is change the Ramp_Size and then remake the ramps for each channel with the correct number of modes.

Ok, I can work with that. So the extra levels in the ramp table are just that, extras, so it gives smoother ramp downs for Temp and LVP? But If I wanted to, I could actually run it with a ramp size of 4? The firmware automatically adjusts for the ramp size I define? And likewise, I see I can reduce the number of mode groups if needed.

Correct, if you want to super basic you can do that. I personally like the mode I use to be basic but I leave all the extras in the firmware so that down the road if something changes I can simply select another mode group later rather than having to reflash.

Texas_ace: how do you set the default options in this tripledown firmware? Like you mentioned, moon or no moon, or what mode group is defaulted right after flashing.

It is in the “// Config option variables” section. Just above the mode groups.

Pretty self-explanatory really, just keep in mind that in this section the mode groups start at 0. So if you want mode group 3, you need to enter 2 in that field.

Basically all of these settings can be adjust later from the config menu, so this is just where you setup the default options for the first use.

so in the boot options does mode 0 = mode 1, or does mode 0 = muggle mode?

0 = 1

I think that muggle mode would = the number of mode groups you are using –1. So in my case 9, although I have not tested it to know for sure.

Thanks! I don’t know how I missed that…

Please, help a newbie :slight_smile:

I’m trying to compile biscotti firmware, but I get the file size of 1026 bytes (100.2%).
I use build.sh from ./bin:

What am I doing wrong?

(When I’m trying to compile bistro firmware, I get file identical to original bistro.hex from repository…)

I got 1022 bytes when built in Amtel Studio 7, but looks like you got the optimize for size (-Os) setting set... Might be some other setting, or compiler/tool version maybe.

So, what command do I use to flash to a 25? Fuses and such?

Depends what's recommend by the firmware - thinkn we've been pretty consistent to list the exact fuse values in the comment section at the beginning of the code. I got 25... BAT files posted on my shared google drive. My psw25 firmware uses this BAT file:

avrdude -p t25 -c usbasp -Ulfuse:w:0xe2:m -Uhfuse:w:0xdf:m -Uefuse:w:0xff:m

Hmm well, even that simple statement was a bit over my head.

I think I know what I need to do to bistro, I just need the line to paste in avrdude to make it flash. Is that the line I need?

K, according to TK's header in bistro.c:

* I use these fuse settings on attiny25
* Low: 0xd2
* High: 0xde
* Ext: 0xff

So, you would want to use the following AVRDude command:

avrdude -p t25 -c usbasp -Ulfuse:w:0xd2:m -Uhfuse:w:0xde:m -Uefuse:w:0xff:m

Just paste the above line into a .BAT file, call it SetBistroFuses.bat, and you got a decent setup.

Little details on this, maybe helps:

  • all parameters start with a "-"
  • lfuse = low byte fuse, hfuse=hi byte fuse, efuse=extended fuse
  • 0x is hex notation, so fuse values are specified in hex
  • "-p" I believe is for processor, "-c" is probably for connection
  • this is a great tool for understanding fuse values: http://www.engbedded.com/fusecalc. We all use it. Given the d2/de/ff values, just plug them in, and the tool will tell you what the settings mean

To dnld bistro, this is what I use in a BAT file:

rem 25bistro - downloads bisstro (Tiny25 power switch UI configurable)
rem
avrdude -p attiny25 -c usbasp -u -Uflash:w:\Tiny254585Projects\bistro\bistro\Release\bistro.hex:a

So this is what I use currently

I just paste that in command prompt terminal.

Sooooo I can use this?

Yea, you can combine them like that - should be fine. I've been splitting them out, because it's not necessary to re-do fuses usually, but I may dnld new firmware dozen or more times in a day/eve.

So when I compile my bistro file, I get this:

….that can’t be right

Sorry to be such a leach, but I’m lost again. How many .h files am I supposed to have? I thought it was just “tk-calibration.h” which I merged into my .c but I’m getting a million build errors.

ouch, no. Are u using Studio 7.0?

Like an #ifdef is missing an #endif or something. If you have an #ifdef that's not true, and no closing #endif, it would comment out a whole lot of code.

There should be 5 .h files