#avr Logs

Aug 05 2021

#avr Calendar

06:21 AM nohit: hello
06:42 AM twnqx: i guess cehteh didn't find his way here (yet?)
07:30 AM exp: in the meantime i have started using xmegas, and boy there's quite a few changes
07:30 AM exp: i've also discovered ASF's love for code size :)
07:30 AM exp: my featureful bootloader has gone from ~5k to ~12k lol
07:31 AM Thrashbarg: that's quite a bootloader
07:35 AM exp: Thrashbarg: that's just the ASF wizard adding basic things, clocking, sleep, USB + TWI etc
07:35 AM Thrashbarg: I see
07:36 AM exp: one of the best ones is the timer control
07:36 AM Thrashbarg: to me a bootloader has its function crammed into 512 bytes :P
07:36 AM exp: it uses a callback system, which means every ISR is ~90 bytes
07:36 AM exp: and there are 28 of them
07:36 AM Thrashbarg: wow
07:36 AM specing_ is now known as specing
07:37 AM exp: in this case my bootloader flashes some LEDs nicely, talks to a couple chips over I²C and talks over USB to update the flash
07:37 AM exp: so very tricky to fit in 512b!
07:43 AM Thrashbarg: hehe
07:44 AM Thrashbarg: also my idea of a bootloader doesn't initialise anything, it just loads a memory image into RAM and executes it
07:44 AM * Thrashbarg is laughably out of date
07:45 AM exp: yeah if you are thinking about executing RAM on an xmega or maybe AVR in general, you're definitely out of the loop ;-)
07:45 AM Thrashbarg: heh
07:45 AM Thrashbarg: I know what you're talking about though
07:45 AM Thrashbarg: my priorities are elsewhere
07:46 AM exp: ideally I want to get this thing down to < 8k because i can use the apptable flash section and manage to fit two bootloader images, and two main app images
07:46 AM exp: (which makes updating quite a safe affair)
07:46 AM Thrashbarg: ah yea
07:47 AM exp: anyway optimising these ISRs is quite the challenge
07:48 AM exp: i can deal with adding a few cycles latency as the ISR wrapper is already as verbose as possible
07:49 AM exp: but i can't make a single ISR that dispatches to all callbacks, as I wouldn't know which vector had been called
07:49 AM exp: one thing i could do though is write a small block of asm that pushes r0, loads an enum and outs that to a GPIOR
07:50 AM exp: the full ISR prologue/epilogue can then wrap a small jump table function
08:00 AM exp: if anyone with knowledge of this has the time i'd appreciate a sanity check, but if not i've got other things to code before this
04:12 PM Duality: Thrashbarg: like that idea is still happening on for example the am335x a first bootloader is loaded by a rom loader into ram then executed and that loads another application that can load code that then finally loads actuall aplication :)
07:35 PM specing_ is now known as specing