#avr Logs

Mar 19 2019

#avr Calendar

12:52 AM day_ is now known as day
01:41 AM rue_mohr: hi HelloShitty
01:42 AM rue_mohr: HelloShitty, can we try flurrys code with you?
02:30 AM rue_bed2: ==
01:14 PM gsi__ is now known as gsi_
04:38 PM paulo_ is now known as Guest13057
07:44 PM [1]MrMobius is now known as MrMobius
08:57 PM cehteh: wtf .. gcc doesnt __flash string literals
08:59 PM LeoNerd: What CPU?
08:59 PM LeoNerd: Er.. MCU
08:59 PM cehteh: 328pb
08:59 PM LeoNerd: I've been playing with the tiny 1-series lately.. they're totally different
08:59 PM LeoNerd: Ahh.. yeah; flash storage on those is annoying
08:59 PM cehteh: well thats rather a gcc issue
08:59 PM LeoNerd: gcc does make it more annoying for anything that isn't a string-literal, also
09:00 PM LeoNerd: I gave up on it in the end
09:00 PM cehteh: so far i manage good, doing xmacros everywhere
09:00 PM cehteh: expanding a lot tables
09:00 PM LeoNerd: For string literals, or...?
09:00 PM cehteh: everything
09:01 PM cehteh: whole commandline interface, stepper drivers, interrupts code generation :D
09:01 PM cehteh: anyway my code just exploded when using flash strings I thought it will merge
09:02 PM LeoNerd: https://paste.debian.net/1073854/ - I just plain could not find any way to put that all in flash without doing that
09:02 PM cehteh: now defining them first
09:02 PM LeoNerd: PSTR() works fine for a single string literal, but I couldn't get any way to make an array of structs contianing arrays of strings ... nicely nested
09:02 PM cehteh: i switched over to __flash mostly .. easier
09:02 PM LeoNerd: Hrmmmm
09:02 PM cehteh: moment .. example
09:03 PM cehteh: https://git.pipapo.org/?p=muos;a=blob;f=error.h;h=1101b4444a7aeb05848bdae0c1a15b003c43d867;hb=refs/heads/devel#l49
09:03 PM cehteh: all errors defined in header
09:03 PM cehteh: https://git.pipapo.org/?p=muos;a=blob;f=error.c;h=24ddc4c53bb0723be700228c7f302fd6abc41daa;hb=refs/heads/devel#l31
09:03 PM cehteh: and plenty expansions
09:04 PM LeoNerd: I thought I tried that and couldn't get it to work, but my memory might be vague on that now
09:04 PM cehteh: there are some receipes on the net an i did differet tricks in the past
09:05 PM cehteh: exactly that way now proved the best
09:05 PM cehteh: many years ago i created some monster :D
09:05 PM cehteh: https://git.pipapo.org/?p=dinoheat;a=blob;f=progmem_string_array.h;h=ba3124adf590f82a463031d8be0145de70a7e517;hb=50ae17e9510e6224e32d9c8960c11c8203d1b5ce
09:06 PM cehteh: the actual use of that isnt that bad
09:06 PM cehteh: but the xmacro method is so versatile, i constrain myself only to use that as far as possible
09:07 PM cehteh: makes code much easier to maintain when you only use one idiom
09:07 PM LeoNerd: Yeah that's kinda icky though
09:08 PM cehteh: on the stepper driver i overdid it a bit :) but i wanted to generate different interrupts/stepper driver flavors with a single configuration/code base
09:09 PM cehteh: welcome to the macro overlords
09:09 PM cehteh: https://git.pipapo.org/?p=muos;a=blob;f=hw/atmel/avr/stepper.c;h=0495254f06ac2550fccfe87159baed92d45e90ad;hb=refs/heads/devel
09:09 PM LeoNerd: anyhow... bedtime
09:09 PM cehteh: i am not 100% proud of that, but when one gets used to it it should be moderately readable
09:10 PM cehteh: hah n8 :)
09:11 PM cehteh: me thinks expannding that code gives a few 1000 lines