I patched the avr-gcc 4.02 sources with the attached patch file
(which I modified from one posted here for gcc 3.4.3).
My intention was to add some of the newer devices, especially the
attiny45.
Then I rebuilt and reinstalled it (I'm using fink on a Mac). The new
version seems to work, at
On Dec 5, 2005, at 9:50 AM, Bernd Trog wrote:
--- Ned Konz <[EMAIL PROTECTED]> wrote:
What am I missing?
Patching the binutils?
Ah... wonder where I can find a corresponding patch. Suggestions?
Whats the output of "avr-as --target-help"?
Known MCU names:
avr1 avr
ed to supplement avr-libc by adding some register/bit
definitions for added CAN hardware or maybe slightly different linker
scripts, but this can be done by the user and has no impact on AVR-GCC.
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list
t 5329 packages read in 2 seconds.
avr-gcc-4.0.2-2: GNU GCC for ATMEL AVR micro controllers
.
Web site: http://gcc.gnu.org/
.
Maintainer: Matthias Ringwald <[EMAIL PROTECTED]>
I compiled my own, of course.
--
Ned Konz
[EMAIL PROTECTED]
___
ot;def" /* will take only flash, but you have
to use different functions to access it */
then:
char myBuffer[30]; /* in RAM */
sprintf(myBuffer, s1);
/* but */
sprintf_P(myBuffer, s2);
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-
brne .L6
120 004c 285B subi r18,lo8(-(72))
121 004e 3F4F sbci r19,hi8(-(72))
122 0050 3093 sts (rx_tel_in_ptr)+1,r19
123 0054 2093 sts rx_tel_in_ptr,r18
--
Ned Konz
[EMAIL PROTECTED
utterfly" gcc
to find resources.
One I've found helpful is http://www.siwawi.arubi.uni-kl.de/
avr_projects/#bf_app
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
;editor".
Refactor the one huge function so that it's several smaller ones, and
apply the above strategy.
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
o maximum
* try disabling the brown-out reset (via the BODEN fuse)
* ensure that the watchdog timer is disabled (via the WDTON fuse)
* try running your JTAGICE at its slowest rate (just in case you
happen to have a slow clock)
--
Ned Konz
[EMAIL PROTECTED]
_
need.
Why does it seem like a bug?
Is this your entire program, or might there be an interrupt handler
that's trashing one or another registers or memory locations?
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR
ed const, considering the above?
And if I was using the self-programming flash capabilities of the AVR
would this be a problem?
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
ribute__((__progmem__))
struct ROMVar1
{
int const val;
ROMVar1(int const& init) : val(init) { }
};
ROMVar1 PROGMEM rv1b(123);
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu
paring with my 4.0.2 version, the 4.1.0 version is a tiny bit
larger (24 bytes out of 20K or so) in a couple of cases. Don't know why.
This may be considerably smaller than the 3.4.x range, though.
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list
;QHsm::vtable for QHsm' is
greater than maximum object file alignment. Using 1
Is this a problem?
Is there some way to shut these up (other than post-processing the
gcc output)?
Thanks,
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list mailin
ldd r22, Z+2; (0x02)
ldd r23, Z+3; (0x03)
std Z+1, r23; (0x01)
st Z, r22
ret
Run it like so:
avr-objdump -S myProg.elf | ruby simplifyListing.rb > myProg.asm
--
Ned Konz
[EMAIL PROTECTED]#!/usr/bin/ruby
# takes outpu
the optimization to -O0 (instead of -O2 or -Os or -O3)
you will see things stepping through in the order you wrote them.
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
u basically just have fixed-address
sections (defined inside the SECTION directive in your linker
definition file) that you then use to refer to from C:
int sat_bearing __attribute__((__section__=myAttribute));
--
Ned Konz
MetaMagix embedded consulting
[EMAIL PROTECTED]
0x00808006PROVIDE (__heap_start, .)
.bss0x008000600x4
0x00800060PROVIDE (__bss_start, .)
0x0080__heap_end = 0x80
--
Ned Konz
[EMAIL PROTECTED]
xx.x
Description: Binary data
xx.c
Description: Binar
So it'd be something like:
avr-gcc -Wl,-T,linker.txt text.o s6b1713.o menu.o pgmmem.o main.o -
mmcu=atmega128 -o abc.elf
--
Ned Konz
MetaMagix embedded consulting
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
; 61
132:df 91 pop r29
134:cf 91 pop r28
136:08 95 ret
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
igned char uc;
#ifdef ADD_USED
__attribute__ ((used))
#endif
ISR(INT0_vect)
{
uc++;
}
int main(void)
{
for (;;)
;
}
===
--
Ned Konz
MetaMagix embedded consulting
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
ribute__ ((signal, used,
externally_visible)); \
void vector (void)
#endif
--
Ned Konz
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
'm thinking it has
something to do with scope perhaps?
It's hard to tell why you would like to keep the functions.
You're probably in a better position to say why .
--
Ned Konz
MetaMagix embedded consulting
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
1 -j 0 -N 1 fuses.bin
| tr -d ' ')
avrdude -p atmega128 -U hfuse:w:m:$(od -A n -t x1 -j 1 -N 1 fuses.bin
| tr -d ' ')
avrdude -p atmega128 -U efuse:w:m:$(od -A n -t x1 -j 2 -N 1 fuses.bin
| tr -d ' ')
avrdude -p atmega128 -U lock:w:m:$(od -A n -t x1 -j 3 -N 1 fuses.b
blink(&PORTB, led_mask);
change(&led_mask);
}
return 0;
}
--
Ned Konz
MetaMagix embedded consulting
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
On Apr 23, 2006, at 2:08 PM, Anton Erasmus wrote:
On 22 Apr 2006 at 10:09, Ned Konz wrote:
On Apr 21, 2006, at 11:18 PM, Björn Haase wrote:
"Anton Erasmus" <[EMAIL PROTECTED]> wrote:
Wouldn't it be worthwhile to add a method of specifying device
fuses
in the C or
functions that are called are instantiated.
* the template code is much smaller:
textdata bss dec hex filename
1188 0 121200 4b0 test-old.elf (1985-style C++)
320 0 4 324 144 test-new.elf (with templates)
* The compiler seems to re
0042 B myQ
00c8 0048 T main
So you see that main() is only 2 bytes larger in the C++ version.
I also made the C interface parameterizable for IndexType and
EntryType, added the missing functions to the C++ version (though I'm
not sure that they should be public at all), and
write one more example
in plain good C.
Remember too that you can combine inline assembly language macros
with C++ templates if you want.
I'm not sure about access to template parameters, etc. but it should
work AFAIK.
--
Ned Konz
MetaMagix embedded consulting
[EMAIL PROT
.lss
Or you can use it as part of a pipeline:
%.lss: %.elf
avr-objdump -S $< | perl -i timeStampHeader > $@
Enjoy,
--
Ned Konz
MetaMagix embedded consulting
[EMAIL PROTECTED]
timestampHeader
Description: Binary data
___
AVR-GCC-list mai
Makefile; Make is very good at looking at timestamps and comparing
them. Why would you have to?
--
Ned Konz
MetaMagix embedded consulting
[EMAIL PROTECTED]
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
So it depends on how much I/O and which peripherals you need.
One of my favorites right now is the Attiny45, but it's only an 8-pin
chip. It's about $2 in single quantities in the US and has 256 bytes
of RAM.
There's also the Attiny2313, which might be useful.
--
Ned
obal interrupt flag is off here
// start another ADC conversion
}
int main(void)
{
// initialize ADC, timer, etc.
set_sleep_mode(SLEEP_MODE_ADC); // or whichever one you need
sei(); // enable global interrupts
// main loop: do nothing but sleep
for (;;)
...A
b5: ...A
Is there some easy way around this problem?
Thanks,
--
Ned Konz
[EMAIL PROTECTED]
http://bike-nomad.com
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Joerg Wunsch wrote:
Ned Konz <[EMAIL PROTECTED]> wrote:
const AllDeviceSettings PROGMEM spiDeviceSettings =
{
/* .display */
{
/* .csPortAddress */ &atmega128::PORTC,
Btw., no need to write the field names as comments.
I know; this started out as C99 code that actually used
whatever interrupt number you need to:
void INT1_vect(void) __attribute__ ((signal, naked));
void INT1_vect(void)
{
__asm__ __volatile__ ("jmp __vector_1" ::);
}
int main(void)
{
}
Thanks,
--
Ned Konz
[EMAIL PROTECTED]
http://bike-nomad.com
_
Ned Konz wrote:
Trampas wrote:
I have two external interrupts connected to a quadature encoder, I do
the same operations when either interrupt pin is changed. I was
wondering if it was possible to have one ISR that is called from both
interrupts. If so how do I do it?
Seems like this would
u1 = someXX.constm1();
u2 = XX::const0;
u3 = XX::const1();
}
Thanks,
--
Ned Konz
[EMAIL PROTECTED]
http://bike-nomad.com
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
r--r-- 1 ned ned 139164 Feb 28 00:40 gengtype-lex.c
Thanks,
--
Ned Konz
[EMAIL PROTECTED]
http://bike-nomad.com
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
and avr-objcopy man pages,
and they appear to work at a much coarser level (like they can suppress
all the debugging information for an entire object file).
Is there some other strategy that I can use to control the visibility of
debug information for these inline functions?
Thanks,
--
Ned Ko
f3 cf rjmp.-26; 0x10a
--
Ned Konz
[EMAIL PROTECTED]
http://bike-nomad.com
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
funcptr) (void);
goto *(funcptr)0x1c00; // a gcc extension; should do what you want:
a4: e0 e0 ldi r30, 0x00 ; 0
a6: fc e1 ldi r31, 0x1C ; 28
a8: 09 94 ijmp
--
Ned Konz
http://bike-nomad.com
__
dimax un wrote:
Hi Folks,
I'm trying to find clean solution for the following system problem.
I have configuration structure in EEPROM:
struct VPD_t
{
char sn[10];
char id[20];
}VPD EEPMEM;
While linking I generate EEPROM image in lets say VPD.eep file.
For production purposes I need to bur
ing the section pragma to
place it in the right place.
avrdude is good for this.
--
Ned Konz
[EMAIL PROTECTED]
http://bike-nomad.com
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
: Wrong C compiler found; check the PATH!
But I check the path and is all right, I don't understand where is the
error.
Thank your attention
What arguments are you giving to configure?
Specifically, what value are you providing for --host?
It should be --host=avr as I recall.
--
Ned
Reserved4 */
uint16_t :1; /* Reserved5 */
uint16_t :1; /* Reserved6 */
uint16_t :1; /* Reserved7 */
} f;
} UBRR1_t;
#define UBRR1_sfr (*(volatile UBRR1_t *) (0xCC))
/* single bits */
/* bit numbers */
/* multi-bit fields */
#define UBRR1 UBRR1_sfr.f.fUBRR1
--
Ned Konz
[EMAIL PRO
EPROM anyway; you have to use the EEPROM functions and give them
offsets into EEPROM.
What I generally do is to define a pointer to the beginning of EEPROM by
taking the address of the first EEPROM data item I've defined, and then
calculate offsets from it to various data items in EEPROM
of aligning 256B buffer to 0xXX00 address
in RAM...
The linker manual is not large.
It's probably easiest to define a section starting on the appropriate
boundary (using a custom linker file), and then tell the compiler to put
the buffer into that section.
ld be hard (as I recall, anyway) to do with
straight GCC.
Certainly you can use avr-GCC on the *hardware* but that's apparently
not what you were asking.
Ned Konz
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.o
[mistakenly sent to avr-chat initially]
Arnim Littek wrote:
Ned Konz <[EMAIL PROTECTED]> 16/10/2007 2:21 a.m. >>>
Domenico Arenga wrote:
I'm a student of the university of Pisa, Italy. I would want to know if
it is possible to use avr-GCC 4 on tinyOs. Excuse the dist
ps.com/products/index.htm#QP-nano
AVR port at:
http://www.quantum-leaps.com/avr/index.htm
The QDK-nano AVR-GCC is dual-licensed (GPL/commercial), so depending on
your needs you should be able to find something that fits. Price is
reasonable. It's roya
nfusing is that C provides some composite
operator/assignment operators:
+= -= *= /= &= |= ^= %= <<= >>=
but != is one of the test operators that happen to end in '=':
!= == >= <=
--
Ned Konz
___
AVR-GCC
rs is: "write a new linker script". Especially if it's just for use
with your own code.
You just have to work around the default section names used by the compiler.
There are 5 avr5.x* link scripts that come with avr-libc; these may provide
some insight into what yo
Ben Mann wrote:
Have you tried it just using a 'vanilla' C function pointer? Although I
don't use the 128 I had the impression that avrlib did this for you.
But he wants to jump, not call...
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http
t; time what functions will be called. However if you are not using pointers
> to functions is there a way to have the linker not include functions that
> are not called?
If you have one function per archive member (i.e. per object file), this
shouldn't happen.
--
Ned Kon
ry as well.
Libtool is just an adapter that tries to hide platform differences in
more complex build environments. You shouldn't need it for a
cross-compilation environment for an 8-bit processor.
Ned Konz
___
AVR-GCC-list mailing l
56 matches
Mail list logo