[avr-gcc-list] Getting avr-gcc 4.02 to recognize new devices

2005-12-04 Thread Ned Konz
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

Re: [avr-gcc-list] Getting avr-gcc 4.02 to recognize new devices

2005-12-05 Thread Ned Konz
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

Re: [avr-gcc-list] AT90CAN128 support

2006-02-02 Thread Ned Konz
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

Re: [avr-gcc-list] AT90CAN128 support

2006-02-02 Thread Ned Konz
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] ___

Re: [avr-gcc-list] Memory Size Report

2006-02-05 Thread Ned Konz
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-

Re: [avr-gcc-list] avr-gcc (GCC) 3.4.5 Bug: copying structure through pointer will destroy the pointer

2006-02-06 Thread Ned Konz
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

Re: [avr-gcc-list] Timer0 problem on AVR butterfly

2006-02-10 Thread Ned Konz
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

Re: [avr-gcc-list] object file break up

2006-02-11 Thread Ned Konz
;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

Re: [avr-gcc-list] How to determine which interrupt fired?

2006-02-12 Thread Ned Konz
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] _

Re: [avr-gcc-list] Bad code generated when using volatile keyword/-O0 opt?

2006-02-12 Thread Ned Konz
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

[avr-gcc-list] __attr_const__ attribute and strlen_P() and friends

2006-03-07 Thread Ned Konz
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

[avr-gcc-list] PROGMEM and C++?

2006-03-26 Thread Ned Konz
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

Re: [avr-gcc-list] New FreeBSD avr-gcc-devel 4.1.0 port fails to build

2006-03-29 Thread Ned Konz
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

[avr-gcc-list] alignment of vtable is greater than maximum object file alignment?

2006-03-29 Thread Ned Konz
;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

Re: [avr-gcc-list] Program Listing With C Comments

2006-04-01 Thread Ned Konz
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

Re: [avr-gcc-list] Missing debug info in extcoff for AVRStudio

2006-04-07 Thread Ned Konz
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

Re: [avr-gcc-list] specific SRAM locations.

2006-04-08 Thread Ned Konz
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]

Re: [avr-gcc-list] Variable __data_end variable not passed through to linker for use in __heap_start?

2006-04-10 Thread Ned Konz
0x00808006PROVIDE (__heap_start, .) .bss0x008000600x4 0x00800060PROVIDE (__bss_start, .) 0x0080__heap_end = 0x80 -- Ned Konz [EMAIL PROTECTED] xx.x Description: Binary data xx.c Description: Binar

Re: [avr-gcc-list] big string into the ROM

2006-04-11 Thread Ned Konz
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

Re: [avr-gcc-list] avr-gcc 3.4.3 confused about function pointers

2006-04-16 Thread Ned Konz
; 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

[avr-gcc-list] -fwhole-program ate my ISR!

2006-04-22 Thread Ned Konz
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

Re: [avr-gcc-list] -fwhole-program ate my ISR!

2006-04-22 Thread Ned Konz
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

Re: [avr-gcc-list] Using PORTB with variables, PORTB = var

2006-04-22 Thread Ned Konz
'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

[avr-gcc-list] Re: Device fuses

2006-04-22 Thread Ned Konz
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

Re: [avr-gcc-list] Using PORTB with variables, PORTB = var

2006-04-22 Thread Ned Konz
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

Re: [avr-gcc-list] Re: Device fuses

2006-04-25 Thread Ned Konz
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

Re: [avr-gcc-list] Re: Device fuses

2006-04-27 Thread Ned Konz
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

Re: [avr-gcc-list] More on C macros vs. C++ templates

2006-04-28 Thread Ned Konz
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

Re: [avr-gcc-list] Re: Device fuses

2006-04-28 Thread Ned Konz
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

Re: [avr-gcc-list] Suggestion

2006-05-01 Thread Ned Konz
.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

Re: [avr-gcc-list] Suggestion

2006-05-02 Thread Ned Konz
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

Re: [avr-gcc-list] Small AVR

2006-05-02 Thread Ned Konz
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

Re: [avr-gcc-list] newbie interrupts question

2006-05-08 Thread Ned Konz
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 (;;)

[avr-gcc-list] C++ and aggregates in flash memory

2006-05-11 Thread Ned Konz
...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

Re: [avr-gcc-list] C++ and aggregates in flash memory

2006-05-11 Thread Ned Konz
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

Re: [avr-gcc-list] Two interrupts one function?

2006-05-14 Thread Ned Konz
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 _

Re: [avr-gcc-list] Two interrupts one function?

2006-05-14 Thread Ned Konz
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

[avr-gcc-list] Re: C++ and aggregates in flash memory

2006-05-15 Thread Ned Konz
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

Re: [avr-gcc-list] AVR-

2006-05-24 Thread Ned Konz
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

[avr-gcc-list] Suppressing specific symbols

2006-05-25 Thread Ned Konz
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

Re: [avr-gcc-list] Data Array alignment

2006-06-05 Thread Ned Konz
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

Re: [avr-gcc-list] Jmp'ing to address / 2?

2006-10-04 Thread Ned Konz
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 __

Re: [avr-gcc-list] Patching EEPROM image for production

2006-10-05 Thread Ned Konz
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

Re: [avr-gcc-list] Patching EEPROM image for production

2006-10-06 Thread Ned Konz
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

Re: [avr-gcc-list] AVR-GCC Ubuntu Help

2006-10-21 Thread Ned Konz
: 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

Re: [avr-gcc-list] Bit-wise structure and unions

2006-11-22 Thread Ned Konz
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

Re: [avr-gcc-list] Non initialized data in EEPROM

2006-12-06 Thread Ned Konz
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

Re: [avr-gcc-list] C and AS programs - compiled together

2007-03-19 Thread Ned Konz
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.

Re: [avr-gcc-list] avr-gcc-4 TinyOs

2007-10-15 Thread Ned Konz
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

Re: [avr-gcc-list] avr-gcc-4 TinyOs

2007-10-15 Thread Ned Konz
[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

Re: [avr-gcc-list] avr-gcc-4 TinyOs

2007-10-16 Thread Ned Konz
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

Re: [avr-gcc-list] possible compiler/optimizer problem (?)

2005-05-30 Thread Ned Konz
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

Re: [avr-gcc-list] reserve some RAM for bootloader

2005-06-15 Thread Ned Konz
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

Re: [avr-gcc-list] inline assembler, ijmp, X-Register

2005-07-01 Thread Ned Konz
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

Re: [avr-gcc-list] Linker question

2005-07-02 Thread Ned Konz
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

Re: [avr-gcc-list] re: libtool and winavr/ AVR GCC

2005-08-21 Thread Ned Konz
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