I have an app I'm working on that works ok with gcc 3.4.6, but 4.?.? will not work. One of the reasons is I have 90%+ asm code (no stack used, trying to minimize footprint on number of registers used). Anyway, I was going to just move it to an S file. Which works just fine, except I am unable to get F_CPU to work. It seems the hangup is the 'UL' tacked on the end. Is it possible to use the F_CPU that's already being passed to the assembler? (I think that's where its coming from).
Here's the C version-
#define BIT_DELAY ((uint8_t)(((F_CPU/DEBUG_BAUD)-9)/3))
Here's my attempt on the S version-
#define BIT_DELAY lo8(((F_CPU/DEBUG_BAUD)-9)/3))
if I get the F_CPU to a number without UL, it works ok.
I would like to use the already defined (or passed) F_CPU if possible (one less cpu freq define floating around). I am having trouble finding avr-as/gas examples that apply. I have been to binutils, etc., but am not coming up with anything.
I may just forget the S idea, and make it a 3.4.6 only deal.
Here's the app-
http://www.mtcnet.net/~henryvm/4...
don't know if will useful or not, but it is kinda neat to dump out the sram to see what's going on (when Dragon is sleeping).
Thanks.