Hi,
"I do *not* want the ISR to be called". I guess you do not want the interrupt
to be enabled. If you do not start the timer (as the interrupt is timer
related) this interrupt will never occur. If you are using the timer for
something else and need the timer running, then you need not
From:Georg-Johann Lay g...@gcc.gnu.org
To: avr-gcc-list@nongnu.org
Subject: [avr-gcc-list] avr-gcc 4.7 for Windows
GCC 4.7 has just been released, and I decided to provide a MinGW32 build of
avr-gcc-4.7.2.
Many people feel uncomfortable with building the tools to run under MS Windows,
so here
Hello Richard,
Thanks a lot for your suggestion.
Yes we can and it has already been suggested: Define Your own abstract data
type with an underlying 32 bit integer. You can even overload all operators
for it to achieve full pointer semantics. But I would not go so far and
overload the
From: Joerg Wunsch j...@uriah.heep.sax.de
To: avr-gcc-list@nongnu.org
Sent: Tuesday, September 18, 2012 11:21 AM
What's the point? A pointer is just a 32-bit (or perhaps 24-bit,
in recent AVR-GCC versions) number.
Normally, the point of using a pointer is that the compiler arranges
for you
Hello all,
I have an external FLASH (serial) of size 256K. I would like to create a memory
section for this memory and have pointers (more than 16 bits) to this memory.
Can some one help me please? I am sorry if such a topic has already been dealt
with, as my googling did not yield the desired
From: Georg-Johann Lay a...@gjlay.de
Reserve a piece of RAM that does not depend on how the application
is compiled, for example at the start of .data (bump .data to a later
location) or at the top of the stack (initialize SP to RAMEND-offset).
In the boot loader, write the data to that
From: Georg-Johann Lay a...@gjlay.de
With
int x __attribute__((section (.bootdata)));
you can use x in the known way, it's only about locating .bootdata
to whatever location you deem appropriate. Read the linker manual.
This appears to be the only best way!!! This means I create a section,
Hello all,
I have a boot loader and an application on a Mega168. As boot loader and
application are two different entities, is there any way the boot loader can
pass a parameter to application code? Would like something like main (int argc,
char *argv[]). Any suggestions please? Thank you.
Dear Eric,
Yes indeed, the total code bloated, though the function size actually reduced.
Perhaps my first post was not clear on this point. I can mail you the entire
code, should you wish to see it. Please let me know so I can do the needful. I
am wondering as to what this cause is and any
answered my query. This may also
help others who have similar problem. Thanks once again.
Regards,
Nayani
From: David A. Lyons dly...@lyons42.com
To: Parthasaradhi Nayani partha_nay...@yahoo.com
Cc: avr-gcc-list@nongnu.org avr-gcc-list@nongnu.org
Sent: Monday
Hi all,
I am working on an ATMEGA8. Since my code was getting close to 8K, I thought I
would tweak the code. I have a function listed below
void pulse_en (void)
{
set_EN; // Set EN
_delay_loop_1 (255);
clr_EN; // clear EN
_delay_loop_1 (255);
}
Since the delay after the clr instruction
--- On Sun, 2/28/10, Jeano Kalawa doki...@yahoo.fr wrote:
From: Jeano Kalawa doki...@yahoo.fr
I am working with my final prosject at University. I work with a SHT 75
sensirion sensor to measure temperature and humidity. I use an ATmega 32
controller and have to send data to a PC-skjerme via
From: Michael Clift mich...@clift.com.au
Hi, I am using winavr, and would like to include the default eeprom values
(normally output to .eep) in flash memory. I want to do this so that my
application can easily default the eeprom.
Hello,
EEPROM data in FLASH memory? then the easy way is
From: Joerg Wunsch j...@uriah.heep.sax.de
Sure, it depends from sizeof(int).
My array size is 32K bytes and the section is supposed to be 64K right? and is
not the built-in limit of a section 64K? Thanks.
Regards
Nayani
___
AVR-GCC-list
From: Jan Waclawek konf...@efton.sk
Sure, it depends from sizeof(int).
Hummm, for me, the relationship is not quite sure. Can you explain that in
more detail, please?
I tried to allocate 32K bytes of memory. I am not sure if this is a problem of
user defined sections.
Nayani
From: David Kelly dke...@hiwaay.net
4 million bytes or bits? Most FLASH devices are sized by the bit.
It is 4M Bytes.
No matter what you do you won't be able to say *MyUInt16Ptr = 0x1234;
you will have to write a routine and use it something like this:
u16_value = 0x1234;
result =
Hello all,
I am using a 4MB flash memory with my Mega64. I would like to create a memory
section for the entire 4MB. Is it possible? If yes, how can this be done in the
makefile? Thank you very much for your time.
Regards,
Nayani
___
Hello all,
I have created an external flash memory section in the makefile thus
LDFLAGS += -Wl,--section-start,.exflash=0x85
and named (defined) this section as XFLASH.
I have a structure prclkp of size 32 bytes. When I define
struct prclkp XFLASH PLULOC1[1023]; No error is reported,
David Kelly wrote:
You are right that we know nothing about the application in question - details
here would make it much easier to give recommendations.
Hello all,
I mentioned 4MB flash as it is the HW spec. This 4MB gets filled over a period
of time.
Details of application - I have data
Hello All,
Just not to enter a wrong address, I copy the address or clear the message and
write new one. My apologies for inadvertently doing so. I am creating a new
thread with a different heading. Thanks.
Nayani
--- On Thu, 8/20/09, David Kelly dke...@hiwaay.net wrote:
From: David Kelly
Hello All,
I am facing a peculiar problem with XMEGA64 code. When I use a global buffer in
sprintf, the board appears to reset, but the initial values (which are changed
before a call to sprintf) are not getting effected. If I use a local buffer
(same size) there is no problem. Can some one
Hello all,
I have just started testing an XMEGA64 chip and I find a peculiar problem when
I use sprintf. Following are the environment/specs:
XMEGA64 running at 32MHz (using the internal freq generator)
USART on PC0, operating at 115K BAUD.
One timer in port D being used in compare capture mode.
Hello all,
I am using avr-gcc (WinAVR 20090313) 4.3.2 with PN - version v2.0.8.718-basie.
When I create a project and try to compile a very simple file, I am getting
make.exe: *** No rule to make target `test.c.elf', needed by `elf'. Stop.
Can some one point ahy I am getting this help? I have
--- On Mon, 6/22/09, David Kelly dke...@hiwaay.net wrote:
Study the include files for register definitions for a means of
controlling the absolute address of allocation.
Thank you David Kelly for your response. I will sieve through the header files
to know how to allocate a variable to a
--- On Tue, 6/23/09, Joerg Wunsch j...@uriah.heep.sax.de wrote:
The only method to not have the linker reorder your variables is to
just use a single variable (per memory section). So, put some kind of
an embracing struct around all your variables you'd like to have in
a particular order, and
--- On Tue, 6/23/09, David Kelly dke...@hiwaay.net wrote:
Something like this might work for you:
typedef struct {
uint8_t variable;
uint16_t a, b, c, d;
uint32_t e;
} FLASH_STRUCT;
#define flash_p ((FLASH_STRUCT *)(0x8000))
Hello David Kelly,
Thanks a lot for taking time to
Hello all,
I have interfaced flash memory to my mega64 and created a section for this
memory. I have some variables and two structures which are located in this
memory. Initially I defined the variables first and then the structure. After
linking I checked the map and list files and found that
--- On Fri, 5/22/09, David Kelly dke...@hiwaay.net
wrote:
AVR Studio convention is that internal .eeprom starts
at 0x0081. So what I'd do if I were you and wanted the compiler to
assign static memory addresses in an external eeprom would be:
#define EEEXT
Hello all,
I was wondering if any one can suggest a decent method of automatically
assigning address space to variables in external EEPROM. For internal EEPROM
the attribute EEMEM will allocate addresses in sequence. One can insert or
delete a variable and the address space gets adjusted
--- On Fri, 5/22/09, David Kelly dke...@hiwaay.net wrote:
All EEMEM does is this in eeprom.h:
#define EEMEM __attribute__((section(.eeprom)))
AVR Studio convention is that internal .eeprom starts at
0x0081. So
what I'd do if I were you and wanted the compiler to assign
static
Hi everybody,
I am using Winavr for some years and now I started having
problems with PN recently. When I start PN and open a
project and don't open any source files, commands like
clean, make all etc., work. But when I open a source file
and try the same commands, I get no rule to make
From: Weddington, Eric eric.wedding...@atmel.com
Subject: RE: [avr-gcc-list] PN problem
I don't deal much with PN projects. But I would suspect
something within the .pnps file. IIRC, this file is XML.
Perhaps there is some path issue written in the project
file...
Hi,
Thank you very much
The -mtiny-stack may (and should) be used only for devices
with 0xFF max RAM adderss, i.e. if SP register is 8-bit.
All devices with 1KB and 2KB FLASH memory satisfy this
condition, now.
Hello all,
If the memory size itself is 256 Bytes, naturally SP will be 8 bits and where
is the need to
From: Nicholas Vinen h...@x256.org
For example, things like unsigned char x, y;
x = y4 could
use the nibble swap instruction rather than four shifts,
and things like
Shifting a byte or int right or left must push in 00s from the other side so
swapping a nibble is not the right thing to
--- On Sat, 2/21/09, Georg-Johann Lay a...@gjlay.de wrote:
The trouble might return if .data/.bss will grow and then
overlap(s)
No sir, I needed 256 bytes buffers two and the other variables may total to
about 10 or so.
The problem is that you cannot
introduce holes in a section, i.e.
--- On Sat, 2/21/09, Weddington, Eric ewedding...@cso.atmel.com wrote:
It works for me.
See attached demo. After the build look at the .map
file and
the disassembly file (.dis).
Just realize that because your variable is now in the
.test
Attachment error. Trying again for the
--- On Sun, 2/22/09, Georg-Johann Lay a...@gjlay.de wrote:
You can do this by introducing two global register
variables like
register foo_t * pfoo asm (r2);
Also note the command line option -ffixed-2 -ffixed-3 that
turn R2/R3 into fixed registers (in contrast to R2/R3 beeing
First off, is that a typo above? It's suppose to be an uppercase
'W' like so:
LDFLAGs = -Wl,--section-start=.test=0x800200
Hi,
Checked the 'W' and it was indeed capital letter only. The problem persists!!
Any more suggestions please? Thank you.
Nayani
Hi Vincent,
If I understand correctly, the word volatile itself is to tell the compiler
not to ignore the statement. I am not sure if your statement is correct, but I
have used
asm volatile (nop::);
and the compiler never removed the nops from code.
Nayani
--- On Thu, 2/19/09, Vincent
Hello all,
I needed to create a buffer of 256 bytes starting at a page boundary (xx00) in
the RAM memory (Mega8).
I added this line in the makefile
LDFLAGs = -wl,--section-start=.test=0x800200
and defined a variable in the .C file (shown below)
unsigned char mem3 __attribute__
Hello all,
I sent a mail on the subject but it seems to have got lost and therefore
posting again
I need to have a buffer of about 256 bytes starting at a page boundary in the
ram of Mega8. To get this I introduced a new section and assigned it an address
in makefile. I defined variables,
--- On Fri, 2/20/09, Weddington, Eric ewedding...@cso.atmel.com wrote:
First off, is that a typo above? It's suppose to be an uppercase
'W' like so:
LDFLAGs = -Wl,--section-start=.test=0x800200
It was a typo. Will test and reply. Thank you for your time.
Regards
Nayani
Hello,
I guess there are two variables named flag being created, one in main and the
other in ui.c. Please define the global variable in one .C file of your choice
and tell the other file by using extern directive. Hope this solves your
problem
Nayani
--- On Sun, 2/8/09, Vincent Trouilliez
If you look in the avr-libc manual under Frequently Asked
Questions you can find FAQ #3: How to permanently bind a
variable to a register.
That allows you to assign particular registers to variables,
although care must be used when using the avr-libc library functions.
I had faced a
Hello all,
I have a time critical application where I have to process an external
interrupt request. When the interrupt occurs, I have to read a port and store
this data pointed by a pointer. In order to reduce the time taken by pushes and
pops, I would like to bind a register pair to a char
Hello Weddington,
Thanks for the mail, but the FAQ example is as follows:
register unsigned char counter asm (r3)
The above is an example for a single byte value, but I would like to bind a
pointer which is a 16 bit value and perhaps the X register may be used. I tried
using constraints also
Hi Alex,
I am not sure why you are capturing the timer1 value, unless you are using the
timer for other purposes as well. If not then the easiest method is to:
1. Enable time over flow interrupt.
2. Load the timer withe the required delay for the chosen baud rate. The port
pin can be made low
Hello,
I tested the code on mega8 using winavr release 20070525. No problems were
encountered.
NPS
Michael [EMAIL PROTECTED] wrote: Hi, when I was new to the
avr-gcc (and still fairly new to C), I read the eeprom like this:
unsigned char eeread(unsigned char address)
{
Hello Erik,
Erik Christiansen [EMAIL PROTECTED] wrote:
http://opensource.cqu.edu.au/cgi-bin/info/info2html.cgi?(as.info)AVR-Modifiers
Thanks for the link. This will many people who use assembly language.
Few are interested in writing complete assembler programs on the AVR, it
seems, though
Hello Greg,
Thanks a lot. I am now able to get the address.
Regards
Nayani P
Gre7g Luterman [EMAIL PROTECTED] wrote: --- Parthasaradhi Nayani
wrote:
Hello Group,
I am writing an assembly language function in which
I need to get the address of a sub-routine into a
register pair. How
Hello Group,
I am writing an assembly language function in which I need to get the address
of a sub-routine into a register pair. How can I do it? A sample code is given
below.
;--
.)
-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Parthasaradhi
Nayani
Sent: Wednesday, June 06, 2007 6:07 AM
To: avr-gcc-list@nongnu.org
Subject: [avr-gcc-list] Mega2561 compilation problem
Hello all,
We were using a Mega128 in one
Rick Mann [EMAIL PROTECTED] wrote: On an AVR ATmega128:
I have two source files. In Serial.c, I define a global:
char sCommandReceived;
in the corresponding Serial.h file, I have:
extern char sCommandReceived;
sCommandReceived is set to 1 when enough bytes have been copied into
a buffer
Hello Abhijit,
I'm a student working with ATMEGA 8, 16 and 32, making autonomous robots for
college contests and projects. I'm looking for a bootloader that will search
for an SD/MMC card, find a hex file on it and program itself. This will make it
quite easy to make hassle-free code changes
conclusion is that you are idiot . Have fun with your own replies you idiot Ankur Handa On Fri, 13 Oct 2006, Parthasaradhi Nayani wrote:Hello, How can you use working code of one board (whose connections may be different from yours) on your board? All you need to know is the initialisat
you idiot Ankur Handa On Fri, 13 Oct 2006, Parthasaradhi Nayani wrote: Hello, How can you use working code of one board (whose connections may be different from yours) on your board? All you need to know is the initialisation sequence and writing commands/data. Is you LCD connected
Hello Sumeet,If you do not make changes to the source, then why compile again? If you do make changes, WinAvr will compile.RegardsNayaniSumeet Pal Singh [EMAIL PROTECTED] wrote:Can someone suggest some way(part of code of Makefile to change) to make avr-gcc to compile irrespective of whether the
Hello all, In one of my projects (ATMega128 based) I am using floating point numbers and sprintf to write a formatted record to a buffer. Tthe buffer contents is then sent to a mini printer. The first two records print properly and thereafter I am getting garbage from sprintf!! The
Hello, What is the code for delayms function? If you have a doubt that optimisation is causing a problem, you could disable optimisation, recompile and check the output (delay time).Regards Nayani Sumeet Pal Singh [EMAIL PROTECTED] wrote: Hi We tried to put delay in our program but it
Hello Bernd Trog,
--- Bernd Trog [EMAIL PROTECTED] wrote:
Have you tried to remove *(.vectors) from the
linker script?
Thanks for the reply. I was not sure if one could
remove vector table from being linked. I am under the
impression that vector table is a part and parcel of
the startup
Hello all,
I have written a very simple bootloader and it is
working OK. I would like to eliminate the intial
interrupt vectors to get more flash space. To achieve
this I would like to assemble the crtx file. I am not
sure if this is the right approach, and therefore
seeking your suggestions. Not
Hello,
In order to set the bit, you need to logical OR the
bit.
DDRB |= _BV (PB0);
to clear it
DDRB = ~_BV(PB0);
Nayani
4: undefined reference to `__stack'
#include avr/io.h
int
main(void){
while (1) {
DDRB = _BV(PB0);
};
}
Hello,
GCC 3.4.3 must work for
foo = 0b;
OR
foo = 0B;
Are you getting compilation errors?
Nayani
--- Vincent wrote:
I tried for example
foo = 0b;
or
foo = b;
but neither worked...
I am using gcc-avr 3.4.3 and avr-libc 1.2.3
Hello Vincent,
To be able to modify/access a variable in interrupt,
declare it as volatile. Secondly, to test your code,
turn off optimization (s=0) in your make file. There
is a problem in your code also - you are not making
flag=0 after you send back the character. HTH.
Nayani
--- Vincent
Hello,
Some questions, which may lead to solving the problem.
1. Are ysing external crystal? if yes, did you set bit
to external crystal. If you aare using internal 4M
clock, then please refer the doc on possible baud
rates and their errors. If internal clock is used I
suggest you use lower baud
Hello everybody,
There is no switch in the ISP unit. One has to open the covers and there is a provision on the PCB to solder a two pin jumper (taken out of berg connector). Once the soldering is done, plug in the jumper and power up the unit and after a short while the jumper can be removed. Now
--- [EMAIL PROTECTED] wrote:
Hi all,
i'm looking for a simple c (AVR-GCC) example program
demonstrating the use of the
USART0 (as RS232) of my ATmega48.
Hello,
Here are some program snippets. The following
functions are written for Mega8. Please change the
name of registers if need be.
Hello,
Currently avr-gcc supports only float and not double.
The byte pattern given in your query results in a
float value of -1.135254
Nayani P
--- Kitts [EMAIL PROTECTED] wrote:
Hi all,
I would like to know how a variable declared as
double is represented with
avr-libc. What is the
Hello,
if you want to place other functions in the bootloader
memory add the attribute to these functions as well.
Ideally one must set the address of .text to boot
address, as bootloader is a completely independent
program. I tested by putting the .text in the
bootloader section and it worked
Hello,
This is something many wish, but unfortunately not
possible.
Nayani P
--- Torsten Mohr [EMAIL PROTECTED] wrote:
Hi,
i wonder if it is possible to replace a bootloader
in an ATMega128
with a new version.
Is this possible in a secure way so that a power
failure or communication
Torsten,
AVR data sheets talk about 25 mA current per pin., but
there is some limitation on the total current drawn.
If you are planing to drive some LEDs (4/5) I think
you can drive them directly from the port pins. You
may consider sinking current to switch the LED ON
rather than on sourcing
Hello all,
Perhaps there is ready documentation on bootloader,
but I have not been able to get what I wanted. How
does one declare a programme to be bootloader program?
that is the code must be loaded in the bootsection
when I program the chip using avrisp. How does one set
the starting address
--- Torsten Mohr [EMAIL PROTECTED] wrote:
i wonder if anybody ever successfully used an
ATMega128? I always
assumed that.
We have been using ATMega128 without any problems for
more than a year. We use the SPI bus to program the
chip with AVRISP. On some occations used JTAG
programmer.
Hello,
A lot about serial port programming has been discussed
in the avrfreaks forum. This is the best place to get
answers.
Nayani P
--- Przemek Urbanski [EMAIL PROTECTED] wrote:
Hey,
I am new to avr programming. I can not get my
at90s8515 talk to rs232. I
wrote basic interrupt driven
74 matches
Mail list logo