Babka firmware development

Oh i see…
I’m using Atmel Studio 7.0 for compiling the fw, but will check the settings.

Yeah, I’ve never touched Atmel Studio but I can Google with the best of ’em :wink:

Here’s a YouTube video showing how to select fuse settings. It’s using Studio 6, but I image that Studio 7 would be similar.

Essentially, open up the Device Programming menu. Select the Fuses category. In the Fuse Register area, use 0xFF for High and 0x75 for Low

Oh thanks, i could seach for it, just did not have time yet just finished with work :slight_smile:

I’m just realized what we are talking about here :slight_smile:

Of course i am using avrdude for flashing and with these fuse settings, but don’t make anny difference.

Maybe should check the Hz and BOGOMIPS then.

Okay this speed think is causing more challenges :frowning:

If we are using the default configs the whole blinking, time is too fast. (Bogomips 950, blink_speed750, ticks_per_minute 120):
In this case the blinking so fast that not able to configure, if blink_speed modified to 1250, the blinkes are better but all the delays are wrong.
In case of Turbotimer 8 minutes in real just 3:50 minutes.

If i modify the BOGOMIPS to 2350 everything is better (can use the blink speed at 750, ticks per minutes 120 etc), but in this case the fast presses not good, easily can go into hidden modes.
Is there any way to modify the fast press speed?

Thank you

I believe you when you say that you check the fuse settings. But what you’re describing really sounds to me like the wrong fuse settings were used. As you’re also experiencing this with Biscotti, it’s doesn’t seem to be related to the code. So that leaves (1) something during flashing (aka, the fuses) or (2) something physical with the driver. You didn’t build this driver or replace the MCU, did you?

It might not hurt to pose this question in the Guide: How to Flash… thread where it might get more attention

Is there a compiled version (hex file) ?

I get many errors (pic)

Yup, it’s up on TK’s repository here. If you want to try compiling it again, it looks like you’re missing TK’s include files, which can be found 1 directory up.

I missed this thread somehow and would like to thank gchart for posting it up.
For members like me mentally deficient in understanding the coding side of things rely heavily on others doing the heavy lifting for us.
Long story short your 100, 20 with turbo and memory turned off was just what the Dr ordered.
Glad I stumbled on it in TK’s repository looking for something else. :beer: :slight_smile:

:+1:

Thanks for bringing this thread back up! I’ve done some more work lately too, I really need to get that posted (I’ve ported Babka to the BLF A6 driver, made some space efficiency improvements, etc)

I had babka symlinked from biscotti for a while to increase its visibility, but people on Windows have trouble with symlinks so I ended up removing it.

I’ve run into more issues since then though, where a symlink is really the only viable solution. Would really like to find a way to use those without breaking things for Windows folks.

It does not seem that long ago that a 4 mode 7135 driver was special. Now we are spoilt rotten by you guys and a Princess.
I’m using it on a driver for a IR build where 100, 20, and 1% was used from Biscotti but the 1% just did not work hence the 100, 20% will be perfect.

Nice work, gchart. I’m really looking forward to try it. I’m guessing there will be different versions for the ATTINY13 and ATTINY25?

I’m interested in the A6 driver port of Babka. I have 3 lights running Babka right now, I change the 3 taps for blinky modes to 6 taps since I was accidentally activating it while playing with the lights. I think this firmware running on a commonly available A6 driver would make a great single sided driver for those who don’t want to solder a 7135x8 driver to an S2+ pill and would rather use the retaining ring.

I’ll be honest… I haven’t touched the A6 version in over a year. So it’s probably a bit behind “normal” Babka. It looks like the mode options are a bit different, and it doesn’t have the fast_presses redundancy (usually not necessary unless your driver lost the “attiny13a lottery” and that byte decays to an unfortunate value). But for what it’s worth, I just pasted it here

Cool, I’ll give it a try one day. I plan to grab some A6 drivers at some point since they are pretty cheap.

i have a problem trying to flash attiny13 driver for my convoy with babka.hex after i edit the turbo timer code and compile it, it gives an error in avrdude, “avrdude: ERROR: address 0x0410 out of range at line 65”. it did the same thing with star offtime untill i deleted some lines so that the program bytes are less than a 100% in avr studio. if i compile babka.c in avr studio the program bytes are 105.7% its been a long time since i have fooled with avr studio and avrdude so i am rusty and may be doing something wrong, any help would be appreciated.

It needs a bunch of compiler flags to make the code fit. These flags aren’t used by default in AVR Studio, and it can be difficult to find the right part of the GUI to enable those features.

If possible, it may be easier to use the build scripts in the bin/ directory instead. This requires a command line though, generally using a Linux system. It’s possible to install Linux in a container though, using WSL (Windows Subsystem for Linux). Basically, just tell it to give you a recent Debian or Ubuntu container, and then follow some instructions in the repository’s README file, and it should get you some working firmware.

For example, if I compile Anduril2 for the Emisar D4, with the included build scripts or with default compiler settings…

  • bin/build.sh: 7686 bytes (93.8% full)
  • gcc defaults: 13756 bytes (167.9% full)

I’m not sure what the difference is for babka, but hopefully it’s easy to see how much difference the compiler settings can make.

^ what she said :wink:

At a minimum, make sure you have “Optimize for size (-Os)” selected. Here’s a screenshot (not mine) of where to find that.

so i have to install linux or is there settings in avr studio that i can change? my brain does not work as well as it did a few years ago but it seems i had to change settings in avr studio and i cant remember what or where.