o rule to make target `c\:\avr-gcc\avr\include\avr\io.h',
>>
>>
>> > needed by `MIXER-72x75-0920.o'. Stop.
>>
>>
>>
>>
>>
>> This does not look like a reasonable file name. c\:\avr-gcc\...
>>
>>
>>
>>
>>
>> Where do you get it from?
>>
>>
>>
>>
>>
>> Johann
>>
>>
>>
>>
>>
>>
>
> --
Dave Hylands
Peachland, BC, Canada
http://www.davehylands.com
/projects/robostix/i2c-BootLoader/BootLoader.c
Search for addr32
Anyways, not exactly what you're looking for, but hopefully a few ideas to
help you along. Feel free to ask questions.
--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
__
HI Johannes,
On Mon, May 10, 2010 at 7:37 AM, Johannes Bauer wrote:
> Hi Dave,
>
> On 10.05.2010 16:22, Dave Hylands wrote:
>
>>> __attribute__ ((section(".bootloader")))
>>>
>>> this does still relocate the data into the non-bootloader f
rt of the bootloader
(word address from the data sheet * 2), and boot is my entry point
symbol. The actual entry point is determined by your reset vector.
Since this relocates the .text section, the load address of the .data
section automatically updates as well.
--
Dave Hylands
Shu
Hi Erik,
On Fri, Apr 30, 2010 at 1:34 AM, Erik Christiansen
wrote:
> On Thu, Apr 29, 2010 at 07:31:55AM -0700, Dave Hylands wrote:
>> On Thu, Apr 29, 2010 at 6:18 AM, Erik Christiansen wrote:
>
> Incidentally, that was "23:18:32 +1000" at my keyboard. At 6:18 AM, it
&g
flash.
I guess you could use it as a "default", so whether you include it or
not in the vacant_flash calculaton should depend on whether you
include it in the .hex file to you use to load to flash.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
are untouched. It still
suffers from the problem I mentioned above, but it can often tell you
if you're getting close to filling the stack.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-li
f90 ..1.
0020 cf91df91 0895..
Contents of section .progmem.data:
666f6f20 77617320 63616c6c 65640a00 foo was called..
607 >cmp test1.o test2.o
shows that the two objects are in fact 100% identical, but the 2nd
ve
e. This ensures
that when you take the address of one object it doesn't equal the
address of another object (which could happen if the object in fact
takes up zero bytes).
I also seem to recall that in C++ the new operator needs to allocate 1
byte, even when passed a length of zero to alloc
lock (rw!x) : ORIGIN = 0x83, LENGTH = 1K
signature (rw!x) : ORIGIN = 0x84, LENGTH = 1K
}
Those are the addresses used by the linker.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
A
avr avr-libc
> if so, then is there a sequence of installing binutils, gcc, avr-libc and
> other packages?
> or can I select them all and then install them all at one time?
Select them all and install them all at once is fine.
--
Dave Hylands
Shuswap, BC, Canada
it significant for use inside an interrupt handler?
I'm guessing that it prevents re-ordering, but it isn't clear to me
why reordering would be bad in this situation.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
eg__
0001 a __zero_reg__
T foo
Changing -Os to -O0, the resulting output of avr-nm is:
D Divisor
003e a __SP_H__
003d a __SP_L__
003f a __SREG__
U __do_clear_bss
U __do_copy_data
a __tmp_reg__
U __udivmodsi4
0001 a __zero_reg__
uS at 4 MHz
> Bin = ( A / Data_Divisor ) // Data_Divisor is a constant, 32.
If I declare
const uint32_t Data_Divisor = 32;
then it calls the helper function, but if I declare
const int Data_Divisor = 32;
then it appears to use the shift.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveH
34: 01CD MOVW R24,R26 Copy register pair
> +0635: 9508 RET Subroutine return
The assembly above comes from the __udivmodhi4 helper function (found
in libgcc.a), which is a helper function for performing a 32-
writing A_String first, it would trample B_String, but the second loop
writing B_String would have fixed B_String[0] back up.
Then you amalgamated the loops, A_String[16] was trampled after
B_String[0] was written, so things didin't get corrected.
> I solved my problem by inserting the null with
tically
add the svn-version.h file as a dependent.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
###
#
# svn-version.mk - Creates the
e
iso C99 syntax as well.
Now, in either case, the sizeof operator won't give the correct results.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
ART code which uses the CBUF.h
The thing I like about CBUF.h is that it's completely platform
independant. I use it on AVRs, ARMs, and on the PC.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
ds.org/filedetails.php?repname=Projects&path=%2Fcommon%2Favr%2FUART.c&rev=0&sc=0>
A typical Config.h (which can be different for each project) looks like this:
<http://websvn.hylands.org/filedetails.php?repname=Projects&path=%2Favr%2FFlash-LED-robostix%2FConfig.h&rev=0&a
lar implementation means
that buffers upto 128 entries would be supported)
<http://websvn.hylands.org/filedetails.php?repname=Projects&path=%2Fcommon%2FCBUF.h&rev=0&sc=0>
It's important that the queue be declared volatile (as m
le contains the application side of the code which
shares with the bootloader. i2c-slave.c is the file that gets compiled
into the bootloader.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
If the ISR doesn't do any function calls, then it will only push/pop
the bare minimum of registers. If the ISR has to do a function call,
then it needs to push/pop all of the registers that "any old" C
function might touch.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.
Gu Gre7g,
Try this version of mega32.ld
I think it does everything you need without having to use any .c files.
--
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/
mega32.ld
Description: Binary data
___
AVR-GCC-list mailing list
AVR-GCC
owledge you can't do that.
Perhaps you could share a more complete example of what you're trying
to do. There are often alternate techniques that can be used.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list m
, '*' )) != NULL )
{
token++;
// token now points to the character after the '*'
}
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
pointer to the
beginning of the buffer. You should then call strtok_r again with a
NULL to retrieve the second token, which will be the characters after
the '*'.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list
acter is always replaced by 0, so it seems to work.
>
> Maybe I'm missing something?
Based on your description, it seems to be working perfectly.
If you're trying to break things up on the commas, then you need to
pass the comma in as a delimiter.
And the second and subse
> Here's a place you can get the FTDI USB-UART (serial) converter already
> soldered.
> http://www.beyondttl.com/usb232lv.html
And another:
http://www.sparkfun.com/commerce/product_info.php?products_id=718
SparkFun has quite a few chips available on breakout boards.
--
Dave Hyl
rs don't. Some have command line options to
control it.
avrdude uses the -E option to control the reset and Vcc status after exiting.
Adding -E noreset,vcc should allow the program to run after programming.
I don't recall what the default is if no -E option is specified.
--
Dave Hylan
Hi Wouter,
> Why? Is this a bug or a feature? Am I doing something wrong or is an u08
> return always promoted to an int?
This is what the C Language specification says it must do, so that's
what gcc does.
--
Dave Hylands
Vancouver, BC, Canada
http://www.Dave
5;
which returns the same answer using the following:
in r24,54-0x20
swap r24
lsr r24
andi r24,0x7
clr r25
ret
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing
Hi Eric,
However, I am curious. What do you get with this:
uint8_t temp = (tx_producer_index++) % 64;
The wrong answer :)
It would need to be
uint8_t temp = (++tx_producer_index) % 64;
to give a functionally equivalent result.
--
Dave Hylands
Vancouver, BC, Canada
http
then it compiles down to:
func:
subi r24,lo8(-(1))
andi r24,lo8(63)
ret
Aside: It seems that stdint.h is incompatible with the -mint8 flag.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing
table (1, pwm_tab_1, forward_max_1, center_1, reverse_min_1,
forward_high_1, forward_low_1, reverse_high_1);
}
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
hen
the 16 MHz 386 was considered the new kid on the block), but never
went beyond using them just as tools.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
ows to
> linux. Where would I go to get the latest patches for
> gcc/binutils/et al.?
See Bingo600's script, it's referenced in a "sticky" article on top of
the AVR-GCC forum of http://www.avrfreaks.net/ .
Thanks, I'll check it
I'm currently using Marc Bodmer's build_avr_toolchain.sh script which
is the latest version I've found so far. It's using gcc-4.2-20060819
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailin
very function, then I get
the size down to 890 bytes (it was 1366 bytes before this).
The 3.4.5 compiler generated 848 bytes.
At least the bootloader is under 1k again.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-l
80 93 c6 00 sts 0x00C6, r24
3cce:08 95 ret
Is there a different set of options I can use with 4.x to get smaller code size?
It seems to be inlining the putch function which is called many times,
and the inlined version is quite a bit bigger than calling the
function.
There is lots out there as well, it just depends on what you're looking for.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
iles in question.
These were for the ATMega168.
It seems like a bug to me, but I figured I'll wait to hear some other
people's opinions. If it is indeed a bug, then I'm more than happy to
file a bug report.
--
Dave Hylands
Vancouver, BC, Ca
and it accepts and works with the
644 (I'm using the 644 in one of my bots).
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
makefiles. Not recommended for
everyone :)
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
ves the problem.
Only if you use absolute paths. My stuff works equally well on both
environments, because it's using relative paths.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list
f overflow is not defined
as part of the language and that most implementation ignore it.
Seems like something that could be tested for.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu
cated to unsigned type
(that's with the 3.4.5 version of the compiler)
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
he -mint8 flag)
1U is an unsigned int
1L is a long
1UL is an unsigned long and is typically 32 bits wide.
Similarly, for floating point
1.0 is a double
1.0F is a float
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-lis
e ATmega128. You can find more
information over here:
http://docwiki.gumstix.org/Robostix_i2c_bootloader
You may need to enter a username and password at some point in time.
If so, use gumstix and gumstix.
If you have any questions, please feel free to ask.
--
Dave Hylands
Vancouver,
r the intended purposes, the GetEntryPtr and Advance functions
should be public.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
a bit of functionality but it would be
easy to add. I think at the time I didn't fully appreciate what was
affecting the size and could probably get the C++ one to be as small
as the C one now that I understand whats going on.
--
Dave Hylands
Vancouver, BC, Canada
http://www.D
ny plans on use of the RAMPZ
> in Avr-gcc and/or Avr-libc in future?
If you use the ELPM instruction then you need RAMPZ. There are
functions in avr-libc which use ELPM (see avr/include/pgmspace.h>
--
Dave Hylands
Vancouver, BC, Canada
ht
g:
extern int x;
says that somebody else has allocated storage for an int sized variable named x.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
"\n\t" \
"eor %D0, %D0" "\n\t" \
"add %A0, %A0" "\n\t" \
"adc %B0, %B0" "\n\t" \
"adc %C0, %C0"
he long address of a symbol
located in "high" flash (i.e. above the 64K mark - on an ATMega128).
Doing:
uint32_t addr = (uint32_t)&flashVar;
seems to give a sign-extended version of the lower 15 bits of the
address. This works for the upper and lower 32K on the ATMega128, but
not
HI Erik,
On 1/11/06, Erik Walthinsen <[EMAIL PROTECTED]> wrote:
> Dave Hylands wrote:
> > One of the linker options is --just-symbols=filename which will import
> > the symbols from an objet file.
>
> Hmm, I should have paid a bit more attention, you did say "o
e bootloader. You link the
application against the bootloader jump table entries using
--just-symbols. Now the bootloader can change quite a bit without
chaning the location of the jump table entries.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
__
since you've said that repeating the call to delay 100 times gives
the correct result, then I'd speculate that you have a semicolon at
the end of your for statement, something like this:
> for(char i=0;i<100;i++);
--
Dave Hylands
Vancouver, BC,
> Can't do COLinux like systems either as that would show up
> when IT 'shadows' the hard drive.
There's also bootable CD Linux distributions, like Knoppix. And USB
pen drives can provide your transfer to/from the PC world. Leaves no
trace behind...
--
Dave Hylands
led colinux
<http://www.colinux.org/>, which gives me linux running as a Win32
process. I use it to build toolchains for my gumstix
<http://www.gumstix.com>.
Of course, the avr stuff builds under colinux too.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
__
minus the avr-
prefix) also works with the intel flavour of gcc. My experience is
that -gstabs works on more platforms that just -g (i.e. -g by itself
doesn't work on the AVR for doing the above interlisting).
The d option in the -Wa,-ahldms=... casues the debug information to be
removed from the
information.
avr-objdump --source file.o
will also produce an intermixed listing, but I personally find this
inferior to the one produced by letting the assembler do the listing.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR
y generated file - do not edit" > buildnum
@echo "BUILDNUMBER=$(NEW_BUILDNUMBER)" >> buildnum
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://l
le can be included by make (in case you want to include the
build number in part of a generated filename) or similarly it can be
sourced by a shell script.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing li
errupt names match the datasheets.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
ive to
the case of the files as they appear in the Mmakefile.
Perhaps the make utility released with the newer WinAVR was compiled
with a different set of options.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mai
\n"
" ldi r27, %2 \n"
"2: sbiw r26, 1 \n"
" brne 2b \n"
" sbiw %0, 1 \n"
" brne 1b \n"
he common directory.
The robostix uses an ATMega128, although I'm also using it on other
ATMega processors as well.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
ormation like this is normally buried deep and
often requires connecting multiple tidbits together.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
(which is often the case when dealing with hardware registers).
If I don't care, then I'll use one of the more generic int, or
unsigned types.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
++ is illegal,
but *foo = 'x'; is legal.
You can combine the two to create a constant pointer to a constant object.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
the shifts for the interrupt enable are different you can store
those in the structure as well.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
now no longer need the myQ_SIZE macro.
Then add:
#define CBUF_SizeIsPowerOf2( cbuf ) (( CBUF_Size( cbuf ) & (
CBUF_Size( cbuf ) - 1 )) == 0 )
Then for each circular buffer you create, you can throw in a variant of:
#if ( !CBUF_SizeIsPowerOf2( myQ ))
#error size of myQ not a power of 2
#endi
id of the SIZE macro requirement by
using sizeof's.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
, it is
> always worth double checking which rule the author is following.
I get around this problem with cicular buffers by having get and put
ptrs or indicies. It makes it much more obvious what they do.
--
Dave Hylands
Vancouver, BC, Canada
h
n
named .vectors then it will go after the real vectors.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
Hi Bob,
If you don't find a compiler option, you could reformat your source code:
char date[] = "??" "/??" "/??";
which will compile to the same thing but has no tri-graphs.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
, you don't get the
"automagic" stuff generated.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
o error.txt and then redirect handle 2
(stderr) tto handle 1 (stdout) so both your stdout and stderr will get
redirected into error.txt.
I'm assuming that you're using cmd.exe and not command.com
(command.com doesn't support that syntax).
--
Dave Hyl
:
make -f target1.mk clean
and there are ways of getting the clean incorporated into the main
Makefile, it just requires more thought than what comes off the top of
my head.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GC
take up space twice, once
in flash (used to initialize the RAM) and once in RAM, where they're
actually used.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nong
aking some kind of 'jump table' to each 'case', probably to optimize
> the speed of processing the switch/case.
Try using the -mno-tablejump option to see if that helps.
--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
82 matches
Mail list logo