#avr Logs

Jul 24 2022

#avr Calendar

04:01 AM specing_ is now known as specing
05:16 AM LeoNerd: For my clock generator board I'm looking at fancier timing sources than the cheap xtal oscillator onboard. I can get a TCXO for mebbe £10 to £20. I can get a OCXO for... well they start at £100, but if I pay a little over £1500 I can get one that claims 0.1 PPB stability. Yes.. 100 parts per *trillion*
05:17 AM LeoNerd: I think that might be considered excessive for hobbiest work ;)
07:14 AM qu1j0t3: are you are time nut or not
07:14 AM qu1j0t3: no self respecting time nut could take teh cheaper, wildly erroneous, option
08:11 AM exp: LeoNerd: 0.1PPB over what period?
08:12 AM exp: £1500 is an awful lot for a clock, but most likely it's not just a clock
08:12 AM exp: at about £300 you can expect single digit ppb/hour or so
08:13 AM exp: sorry that's single digit ppb/day lol
08:13 AM exp: i think the really expensive ones we buy are 30ppb/year
09:41 AM LeoNerd: I have a program for an ATtiny1616 (16Ki flash). It is currently just over 12K in size, which is fine but I'm concerned I might run out of space to keep adding new features before I'm finished. Does anyone have any good size-reduction suggestions..?
09:41 AM LeoNerd: Or at least, ways to inspect to see what is large that I could maybe make smaller?
09:42 AM LeoNerd: I'm already building with -Os -flto -ffunction-sections
09:48 AM Phantom: there is way to generate pseudo ASM code
09:48 AM Phantom: you can look in that file to see how big each things is...
09:48 AM Phantom: dunnot if there is better ways
09:50 AM qu1j0t3: Phantom: -S , objdump etc .. although reading asm is probably not going to lead to systemic code size improvements. If things get that tight, i'd think only a change of approach or architecture will achieve enough change
09:51 AM qu1j0t3: assuming that all opportunities for obvious code factoring are already taken)
09:51 AM qu1j0t3: LeoNerd: random example, are you using floating point?
10:03 AM LeoNerd: qu1j0t3: no floats at all. nope
10:04 AM LeoNerd: I do have a bunch of printfs though; where I am using %s or %d in places. I wonder if I could redo those to some other custom function to save space
10:04 AM qu1j0t3: yeah
10:05 AM qu1j0t3: i would try to remove that or anythign else that might take a non trivial chunk of library code
10:05 AM LeoNerd: It's a bit tedious to go through them all, but I can probably rewrite them all in terms of puts/puti/putd/putx (where the latter are various integer-printing funcs I tend to define myeslf)
10:06 AM qu1j0t3: i'd also do a pass looking for common code that could be further factored into functions if u haven't
10:07 AM LeoNerd: I tend to be fairly good at that
10:07 AM LeoNerd: Actually one thing I might be able to do is shuffle my font generator around a bit. I'm generating all the letters in capitals and lowercase, but I think the only lowercase letter I use is 'z' as part of "Hz". So maybe I can save myself 25 letters of font space
10:08 AM qu1j0t3: nice :)
10:09 AM LeoNerd: But first I'll do the printfs, beacuse I know a full printf function takes getting on for an entire KiB of flash, so that'll be a good saving
10:11 AM qu1j0t3: yeah
10:16 AM LeoNerd: Waaait a moment. Nothing stops me implementing my *own* printf function that only has to handle the tiny things I use
10:19 AM qu1j0t3: heh
10:19 AM qu1j0t3: yeah i have done that
10:37 AM rue_bed: I dont even use printf
10:38 AM rue_bed: I have fn's that print strings and fns that print numbers of different formats
11:14 AM cehteh: i've done my io lib printing from a tagged queue, kindof compression, saves ram as well