I need to use int32_t and do left and right shifts on them. I
sometimes see strange values. In trying to isolate this, I see
wrapping at 16 bits.
Is support for int32_t implemented?
In stdint.h, I see, after #ifdef DOXYGEN
typedef unsigned long int uint32_t;
typedef signed long int
Here is a reduced application that reproduces the problem. It may not
be minimal.
The compiler is
# avr-gcc --version
avr-gcc (GCC) 3.4.6
The command line is
# avr-gcc -mmcu=atmega8515 -Wall -Wmissing-prototypes \
-Os -I. -c -S sbi-test.s sbi-test.c
In sbi-test.s, the two statements,
I have a mid-sized application, about 400 lines of code, that behaves
strangely. I am using avr-gcc version avr-gcc (GCC) 3.4.6, from the
FreeBSD port. The application builds without error or warning (-Wall
-Wmissing-prototypes), behaves exactly like I expected, except for the
missing line of
What is the preferred interrupt signal name to use.
I normally, by habit, use the SIG_ names, I guess a holdover from
UNIX. (I use FreeBSD)
I see, in iom8515.h, the same definitions named _vect. Either
will work.
I seem to have missed something. What is preferred in new code?
That's what I thought.
Thanks.
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
I enabled the external memory to access ale, etc. Since I am not
addressing an external memory, I cannot see *rd, *wr. That is next.
I did see some interesting things.
ALE happens at the 2/3 point in the clk period. The output change is
at the 1/3 point in the clock period.
Here is a
Sorry, this is long.
I am trying to match interrupt timimg to ATmega8515 cycles. I am
trying to understand the timing and sources of jitter. I have an
ATmega8515L with an external 8.000Mhz clock.
My test application has a loop of 4.751usec, or 38 instruction cycles.
The main loop has 4
Thanks for the reply.
I have the CVS source.
On FreeBSD 5.4, I have autoconf259. It does not like the three AM_
macros in configure.ac. I tried using autoupdate259, no change.
Any ideas?
tomdean
# autoconf259 --version
autoconf (GNU Autoconf) 2.59
Written by David J. MacKenzie and Akim
I have been using an stk500/atmega16 on FreeBSD 5.4, with avr-gcc
(GCC) 3.4.3, avrdude: Version 4.4.0, as happy as can be. Suddenly, I
cannot program the atmega16. I can communicate with it on the spare
UART port and the same FreeBSD serial port.
However, I can program the atmega16 with the
I purchased the part from Jameco. I wanted the NS62256H-15NC, Jameco
shows ATT7C199P-15. . The part I receied was UM61m256K-15, with a
fancy 'm'. The data sheet is for an AS7C256(5v)/
From the data sheet, Max operating current is 115 ma.
Standby is 4 ma.
I do not have the exact datasheet for
I have a Packet Whacker. I want to mount it on a PCB OVER a 62256-15
for use with a AT8585 ATmega8515 running at 16 mHz. The ventilation
will be natural, but, not installed in a box. Maybe in a 2 ft^2
space.
Am I going to have heat problems? I have the data sheet, but, I can't
figure this
From the global definition,
register uint8_t *HEAD asm (r30); /* Z */
register uint8_t *TAIL asm (r28); /* Y */
register uint8_t c asm (r15);
register uint16_t lost_count asm(r26); /* X */
The warning is:
adc.c:155: warning: call-clobbered register used for global register variable
In the ATmega16 application I previously mentioned in the 'Using X and
Z register in global variables' discussion, I used
void SIG_ADC (void) __attribute__ ((naked));
void SIG_ADC (void) {
register uint8_t tmp;
register uint8_t HEAD_hi asm (r31);
tmp = SREG;
asm(in r6, %0\n
st Z+,
I have a piece of code that shows the number of cycles per instruction
in the output of 'avr-objdump -d' for 16-bit instruction CPUs. It
uses a modified version of binutils-2.16/include/opcode/avr.h.
It is interesting to minimize the time in, for example, an ISR. I
often use it with sed and
When I use a register like this, I ALWAYS use avr-objdump and sed to
check for conflicts! I spent some time trying to build an analysis
tool, but, for my latest app, 288 lines of code produced 101 lines, 32
of them comments. All registers were used except r2-r5, r7-r14, r16,
and r18-23. Easy
I believe the correct URL is:
http://www.speakeasy.org/~tomdean/c-source/avr-cycles.c
Matt, please check it.
tomdean
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
I left out the name of the .h file. This is a modification of
binutils-2.16/include/opcode/avr.h
fetch http://www.speakeasy.org/~tomdean/c-source/avr.h
tomdean
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
The difference is in the compiler and the code it supplies for the
handler. Section 6.20.6, SIGNAL(...). Section 6.20.4, INTERRUPT(...).
Lookup the respective __attribute__ in the gcc documents.
In avr/signal.h,
/** \def SIGNAL(signame)
\ingroup avr_interrupts
\code#include
Sorry, I omitted, build one of each and look at the output of
avr-objdump -d. If you need to be very fast, you can use the naked
attribute and do all the save/restore yourself. Your handler should
NOT change the status register so if you use naked, save and restore
SREG.
/*
* work.c = test
Anyone using the Packet Whacker?
I just received one a couple days ago and have started looking at
uip-avr and easyeth.
I want to do UDP socket I/O.
tomdean
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
A callback is a function that will be called as a result of some
pre-determined event or condition. The application code starts a
function or routine that never returns. To get back to the
application code, the callback function is called.
For example, in networking, a callback function will be
Check out http://www.nongnu.org/projects/avr and look at the bottom
right for latest.
tomdean
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Thanks for the reply.
I fixed the problem by moving the strings to program space.
tomdean
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
RTFM is a lot of help.
Where are the tools or the doc for the tools for preventing gcc from
generating code to copy data segment to SRMA?
tomdean
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
I found the doc, thanks to Dave, first, then several others who
provided pointers.
Thanks,
tomdean
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Best I could do. I already know this stuff, so I haven't looked
for the docs lately. Supporting newbies is not my job.
Then, if you don't have anything constructive to add, stay out of this
thread!
tomdean
___
AVR-GCC-list mailing list
# avr-gcc --version
avr-gcc (GCC) 3.4.3
Optimization causes incorrect code. Optimization, determining that I
an thru with a variable, optimizes it away, causing incorrect results.
tomdean
The code:
char *bin_to_hex_ascii(uint16_t i, char *p) {
unsigned int value;
unsigned char c;
Sorry, I forgot to add, 'volatile' fixed the problem.
tomdean
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
I have an Atmel STK500 with ATMEGA16-16P1.
The UART's have several registers controlling their operation.
UBRRH is the upper 4 bits of the divisor
UBRRL is the lower 8 bits of the divisor
The divisor is Fosc/(16*baud)-1. For a 3.6864Mhz xtal, this is
3686400/16/9600-1 or a divisor of
29 matches
Mail list logo