You can subscribe to this list here.
2010 |
Jan
|
Feb
|
Mar
(13) |
Apr
(2) |
May
|
Jun
(3) |
Jul
(20) |
Aug
(2) |
Sep
(33) |
Oct
(2) |
Nov
|
Dec
|
---|
From: Weddington, E. <Eri...@at...> - 2010-07-22 16:23:12
|
> -----Original Message----- > From: Kaushik, Praveen_Kumar > Sent: Thursday, July 22, 2010 12:56 AM > To: Weddington, Eric > Cc: avr...@li... > Subject: RE: [avr32-libc-devel] Building AVR32-Libc with GNU > tool chain > <snip> > We don't give --with-newlib switch in AVR toolchain and it > works fine because we dont build libstdc++ there. The link > test problem arises only while configuring libstdc++ > directory. I will look if we give some other option to get > rid of these tests. > > The switch name --with-newlib might not be appropriate but > this does not say that we are going to use Newlib as C > library but instead it is for because the libstdc++ depends > on certain functions provided by Newlib which might not be > part of standard C library. Ah! I wasn't aware of this. We, the avr-libc developers, were never able to successfully build the C++ compiler, partially due to the fact that we could not build libstdc++. I'm now wondering if this issue was a contributing factor. You said that libstdc++ depends on certain functions provided by Newlib which might not be part of the standard C library. Do you know exactly which functions libstdc++ needs from Newlib that aren't part of the standard C library? Eric Weddington |
From: Kaushik, P. <Pra...@at...> - 2010-07-22 06:56:15
|
Hi Eric, >On Wed, Jul 21, 2010 at 11:36 PM, Weddington, Eric ><Eri...@at...> wrote: > > The option --with-newlib has still to be given while > > configuring GCC because GCC's configure scripts recognize > > this option in order to perform some checks which fail > > otherwise due to absence of crt files at that time. > > --with-newlib option eliminates the need for those checks > > (this option does some more stuff, still exploring this). > > > Hi Praveen, > IIRC, the option --with-newlib is needed when building with Newlib >because GCC requires some *header files* that Newlib provides when building >the initial C compiler. We give separate switch --with-headers=dir, to specify the path of header files, while configuring GCC. Among other tasts that --with-newlib does, one is that it disables checking for the link test by not executing the autoconf macro AC_LIBTOOL_DLOPEN while configuring the libstdc++ directory. This macro checks for the dlopen() function support. This leads to do some link tests which will fail giving error "Link tests not allowed after GCC_NO_EXECUTABLES". By giving with-newlib option, this check is omitted as we don't need any link tests to be performed. > But overall there might be a way to build the AVR32 toolchain like it >is done for the AVR target. We should not have to use the --with-newlib >switch, because obviously, we don't want to use newlib and we don't have >it. We don't give --with-newlib switch in AVR toolchain and it works fine because we dont build libstdc++ there. The link test problem arises only while configuring libstdc++ directory. I will look if we give some other option to get rid of these tests. The switch name --with-newlib might not be appropriate but this does not say that we are going to use Newlib as C library but instead it is for because the libstdc++ depends on certain functions provided by Newlib which might not be part of standard C library. Regards, Praveen Kaushik |
From: Weddington, E. <Eri...@at...> - 2010-07-21 18:06:23
|
> -----Original Message----- > From: Kaushik, Praveen_Kumar [mailto:Pra...@at...] > Sent: Tuesday, July 20, 2010 6:11 AM > To: avr...@li... > Cc: Kaushik, Praveen_Kumar > Subject: [avr32-libc-devel] Building AVR32-Libc with GNU tool chain > > The option --with-newlib has still to be given while > configuring GCC because GCC's configure scripts recognize > this option in order to perform some checks which fail > otherwise due to absence of crt files at that time. > --with-newlib option eliminates the need for those checks > (this option does some more stuff, still exploring this). > Hi Praveen, IIRC, the option --with-newlib is needed when building with Newlib because GCC requires some *header files* that Newlib provides when building the initial C compiler. So, as I understand it, the build process is something like: 1. Build binutils (for assembler, linker, etc.) 2. Build GCC, C compiler only (use --with-newlib for certain header files) 3. Build Newlib, using the just built C compiler 4. Build GCC, full C compiler and C++ compiler (and whatever other languages are specified). However, building for the AVR target avoid this. Building for the AVR is easier: 1. Build binutils 2. Build GCC (C, C++, or other specified languages) 3. Build avr-libc So obviously there is some difference between the AVR and AVR32 targets here. I could be wrong about the --with-newlib switch being for certain header files. This needs to be investigated further. But overall there might be a way to build the AVR32 toolchain like it is done for the AVR target. We should not have to use the --with-newlib switch, because obviously, we don't want to use newlib and we don't have it. I'll be interested to know what you find out about this... Eric Weddington |
From: Weddington, E. <Eri...@at...> - 2010-07-21 12:37:15
|
> -----Original Message----- > From: Kaushik, Praveen_Kumar [mailto:Pra...@at...] > Sent: Tuesday, July 20, 2010 6:20 AM > To: avr...@li... > Subject: Re: [avr32-libc-devel] Memory allocation design for > AVR32 Libc > > > Hi All, > The proposed design for memory allocation functions in > AVR32-libc considers the support only for Linux. Do we need > to consider the support for other operating systems also? > More importantly, most if not all UC3 devices won't be using Linux at all. It will either be a "bare metal" application (i.e. no OS), or typically some RTOS such as FreeRTOS, or perhaps some other commercial RTOS. So the memory allocation functions need to be generic enough to handle this. And of course you can go ahead and implement them as you see fit. You don't need to ask me in a private email. Eric Weddington |
From: praveen k. <pra...@gm...> - 2010-07-21 09:46:20
|
Hi All, The source code is committed on the SVN. Regards Praveen Kaushik On Tue, Jul 20, 2010 at 5:40 PM, Kaushik, Praveen_Kumar < Pra...@at...> wrote: > Hi All, > > > > I was able to integrate the avr32-libc with GNU tool chain by using minimal > set of header files and giving dummy declarations for few of the functions. > > > > The header files and functions to be implemented are listed in the attached > document. > > > > The option --with-newlib has still to be given while configuring GCC > because GCC's configure scripts recognize this option in order to perform > some checks which fail otherwise due to absence of crt files at that time. > --with-newlib option eliminates the need for those checks (this option does > some more stuff, still exploring this). > > > > Due to some problem I am not able to commit the source code on Sourceforge. > I will do that ASAP. > > > > Regards > > Praveen Kaushik > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > avr32-libc-devel mailing list > avr...@li... > https://lists.sourceforge.net/lists/listinfo/avr32-libc-devel > > |
From: Kaushik, P. <Pra...@at...> - 2010-07-20 12:21:48
|
Hi All, The proposed design for memory allocation functions in AVR32-libc considers the support only for Linux. Do we need to consider the support for other operating systems also? Regards, Praveen Kaushik |
From: Kaushik, P. <Pra...@at...> - 2010-07-20 12:11:00
|
The following header files are provided with minimal definitions and declarations: time.h unistd.h signal.h locale.h math.h sys/types.h sys/stat.h These header files are required by GCC to build the libraries. In addition, following functions are required to be implemented for creating c++ and other libraries: stdio.h: -------- fdopen getc getchar gets perror printf putc putchar puts scanf setbuf tmpfile tmpnam vprintf vsnprintf vsprintf stdlib.h: --------- atexit atof calloc free getenv malloc mblen mbstowcs mbtowc realloc srand strtof system string.h: --------- strerror unistd.h: --------- lseek stat.h: ------- fstat math.h: ------- atan cos sin tan tanh frexp ceil fabs floor acos asin atan2 cosh sinh modf exp ldexp log log10 pow sqrt fmod |
From: Gupta, U. <Ush...@at...> - 2010-06-23 08:14:08
|
Done Thanks and Regards Usha Gupta -----Original Message----- From: Weddington, Eric [mailto:Eri...@at...] Sent: Tuesday, June 22, 2010 2:38 AM To: avr...@li... Cc: Viswanathan, Senthil; Praveen, Vidhya Subject: [avr32-libc-devel] SVN layout Hi All, Thanks for getting the code into the SVN repository. However, there are a few issues that we need to address. Please take a look at this online book about SVN: <http://svnbook.red-bean.com/> This is a very good resource, and everyone should read it. Specifically take a look at the layout using /trunk, /tags, and /branches, namely in these sections: <http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.tour.importing.layout> <http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.branchmerge.maint.layout> <http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.reposadmin.projects.chooselayout> And then take a look at the avr-libc's SVN layout: <http://svn.savannah.nongnu.org/viewvc/?root=avr-libc> So we need to change the layout of avr32-libc's SVN repo to have these top-level directories: /branches /tags /trunk And the main source code going under /trunk. This is important to get correct *right now* before further development happens. Thanks, Eric Weddington ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ avr32-libc-devel mailing list avr...@li... https://lists.sourceforge.net/lists/listinfo/avr32-libc-devel |
From: Weddington, E. <Eri...@at...> - 2010-06-21 21:51:23
|
Hi All, Thanks for getting the code into the SVN repository. However, there are a few issues that we need to address. Please take a look at this online book about SVN: <http://svnbook.red-bean.com/> This is a very good resource, and everyone should read it. Specifically take a look at the layout using /trunk, /tags, and /branches, namely in these sections: <http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.tour.importing.layout> <http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.branchmerge.maint.layout> <http://svnbook.red-bean.com/en/1.5/svn-book.html#svn.reposadmin.projects.chooselayout> And then take a look at the avr-libc's SVN layout: <http://svn.savannah.nongnu.org/viewvc/?root=avr-libc> So we need to change the layout of avr32-libc's SVN repo to have these top-level directories: /branches /tags /trunk And the main source code going under /trunk. This is important to get correct *right now* before further development happens. Thanks, Eric Weddington |
From: Weddington, E. <Eri...@at...> - 2010-04-21 14:17:19
|
My guess is "probably". Let's make avr32-libc as close as we can to newlib. Eric > -----Original Message----- > From: usha gupta [mailto:ush...@gm...] > Sent: Wednesday, April 21, 2010 3:15 AM > To: avr...@li... > Subject: [avr32-libc-devel] Need for ungetc buffer > > > In avr-libC, there is no ungetc buffer, but newlib creates an > ungetc buffer and keeps it expandable. > is there practically any need for having an ungetc buffer for > avr32-libC? > > -- > Thanks and Regards > Usha Gupta > > |
From: usha g. <ush...@gm...> - 2010-04-21 09:15:08
|
In avr-libC, there is no ungetc buffer, but newlib creates an ungetc buffer and keeps it expandable. is there practically any need for having an ungetc buffer for avr32-libC? -- Thanks and Regards Usha Gupta |
From: Weddington, E. <Eri...@at...> - 2010-03-18 15:36:57
|
> -----Original Message----- > From: usha gupta [mailto:ush...@gm...] > Sent: Wednesday, March 17, 2010 11:21 PM > To: avr...@li... > Subject: [avr32-libc-devel] exit implementation > > what is the use of entering into an infinite loop ?? > > is it not better to use <retal > (return always) instruction > which makes the function to return anyway? According to the C standard, main() is a callable function, which also means that it returns. On an embedded system, with a single application running on "bare metal" (i.e. no OS), what does main() return to? |
From: Weddington, E. <Eri...@at...> - 2010-03-18 15:32:39
|
> -----Original Message----- > From: Boyapati, Anitha [mailto:Ani...@at...] > Sent: Thursday, March 18, 2010 8:29 AM > To: praveen kaushik; avr...@li... > Subject: Re: [avr32-libc-devel] read and write system calls > In short, I think, a much-indepth knowledge of existing libc > is a pre-requisite before embarking onto support (or for > deciding to not support) such routines. Agreed. And I would rather not focus on this area at the moment. What we really need to work on next is to actually get the code base committed to the repository, and a structure where we can start building code. |
From: Boyapati, A. <Ani...@at...> - 2010-03-18 15:28:53
|
> From: praveen kaushik [mailto:pra...@gm...] .... > In NewLib _read syscall's code is: > > #define T2H_SYSCALL(syscall_code) \ > asm ("mov r8, %0\n" \ > "breakpoint\n" \ > "mov r12, -1\n" \ > "mov r11, %1\n" \ > :: "i" (syscall_code), "i" (ENOSYS) ); > > with syscall_code 3. > but now I dont know what is the logic behind these statements, > how it implements _read command? This appears as a broad area to me (assuming the real question is how to carry out stdin initialization). 3 relevant suggestions though : 1. The above format is called extended assembly. It says that syscall_node (input operand numbered as %0) be moved to r8 and the rest of the code is debugger related stuff which can be followed from comments documented just above T2H_SYCALL(incase you missed it). Further info on extended assembly, http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html 2. The design of interface between libc functions and syscalls (as in the case stdio) is not trivial. It requires a good understanding of software framework of a system (for e.g.,with/without OS)and system interfaces. For a posix-like system, the design runs similar to glibc, uclibc and newlib. Essentially, a function like fread(...) ends up calling read syscall to read from a file. For systems without OS support, minimal/trivial interfaces are necessary as suggested by newlib documentation http://www.sourceware.org/newlib/libc.html#Syscalls 3. A certain distinction is necessary between library functions and systemcalls. C standard recommends support for functions fread(...), fwrite, fputc, fgetc...etc. However it leaves the implementation details to a libc developer. A better way of developing libc on a posix-like system is to have them work over the corresponding syscalls. The former has no target-dependent information while the latter has. This means that theoretically porting an existing libc to a new target requires that all syscalls be written for that target while minimal changes to no changes are required for former high-level functions. In short, I think, a much-indepth knowledge of existing libc is a pre-requisite before embarking onto support (or for deciding to not support) such routines. Anitha |
From: praveen k. <pra...@gm...> - 2010-03-18 10:04:10
|
Hi, I need the _read system call for initializing stdin. In NewLib _read syscall's code is: #define T2H_SYSCALL(syscall_code) \ asm ("mov r8, %0\n" \ "breakpoint\n" \ "mov r12, -1\n" \ "mov r11, %1\n" \ :: "i" (syscall_code), "i" (ENOSYS) ); with syscall_code 3. but now I dont know what is the logic behind these statements, how it implements _read command? Thanks Praveen Kaushik |
From: Boyapati, A. <Ani...@at...> - 2010-03-18 08:43:35
|
> From: usha gupta [mailto:ush...@gm...] ... > what is the use of entering into an infinite loop ?? > is it not better to use <retal > (return always) instruction which makes > the function to return anyway? Return to which function? http://www.nongnu.org/avr-libc/user-manual/group__avr__stdlib.html#g137096a48cc0c731052cadfb69c39b34 As a general suggestion, try to put the entire context of the problem. Some useful e-mail etiquette http://www.catb.org/~esr/faqs/smart-questions.html Anitha |
From: usha g. <ush...@gm...> - 2010-03-18 06:20:47
|
what is the use of entering into an infinite loop ?? is it not better to use <retal > (return always) instruction which makes the function to return anyway? -- Thanks and Regards Usha Gupta |
From: Weddington, E. <Eri...@at...> - 2010-03-17 13:34:22
|
> -----Original Message----- > From: usha gupta [mailto:ush...@gm...] > Sent: Wednesday, March 17, 2010 2:08 AM > To: avr...@li... > Subject: [avr32-libc-devel] exit implementation > > Hi All, > > How to implement exit function? > > using avr-libc's way by disabling the global interrupt flag > and then entering into an infinite loop > or > > using newlib's way -calling __call_exitprocs , __cleanup and > then _exit For now, do it avr-libc's way of doing it, as it will be smaller and faster. This implies of course that certain other functions in newlib won't be included in avr32-libc. And the startup code is yet another matter that can be discussed later. |
From: usha g. <ush...@gm...> - 2010-03-17 09:07:40
|
Hi All, How to implement exit function? using avr-libc's way by disabling the global interrupt flag and then entering into an infinite loop or using newlib's way -calling __call_exitprocs , __cleanup and then _exit -- Thanks and Regards Usha Gupta |
From: Boyapati, A. <Ani...@at...> - 2010-03-16 08:40:45
|
( Communication for archival) -----Original Message----- From: Boyapati, Anitha Sent: Thursday, March 11, 2010 2:04 PM To: Kaushik, Praveen_Kumar; Gupta, Usha Cc: Praveen, Vidhya; Singh, Abnikant Subject: RE: Structure of error numbers > In avr-libc, an integer variable is taken in errno.h and sets it > whereas in NewLib a reentrant structure is taken which is having an > integer variable for error number. How do we have to do in avr32-libc? > Including a global variable as required by ANSI C is a much simpler way of implementing error handling. However, when it comes to avr32-libc, I recommend making errno reentrant. I took a quick glance at newlib sources. Making errno reentrant avoids undefined behavior during racing conditions. FYI- Several multi-threaded applications are built and run on AVR32 (mostly UC3A) with/without linux OS support. Thread-safe implementation of avr32-libc is highly recommended wherever applied (just not limited to error handling case) Anitha |
From: Weddington, E. <Eri...@at...> - 2010-03-15 13:13:00
|
Yes, you should be able to. IIRC, we have C style macros in assembly code in avr-libc. > -----Original Message----- > From: praveen kaushik [mailto:pra...@gm...] > Sent: Monday, March 15, 2010 6:08 AM > To: avr...@li... > Subject: [avr32-libc-devel] Using C macros in assembly > > Can we use C style macro in assembly codes. > > e.g. we have ERANGE macro for integer overflow. In strtol we > set the errno to ERANGE in case of overflow. now in assembly > we have to either hardcode the value of ERANGE(34), that cant > be modified later (like by redefining ERANGE) or is there any > way to use C style macro in assembly code? > > Thanks > Praveen Kaushik > > > |
From: praveen k. <pra...@gm...> - 2010-03-15 13:08:04
|
Can we use C style macro in assembly codes. e.g. we have ERANGE macro for integer overflow. In strtol we set the errno to ERANGE in case of overflow. now in assembly we have to either hardcode the value of ERANGE(34), that cant be modified later (like by redefining ERANGE) or is there any way to use C style macro in assembly code? Thanks Praveen Kaushik |
From: Weddington, E. <Eri...@at...> - 2010-03-15 05:36:23
|
Hi Praveen, Go ahead and model it after newlib. This will be better for backwards compatibility. Thanks, Eric Weddington > -----Original Message----- > From: praveen kaushik [mailto:pra...@gm...] > Sent: Sunday, March 14, 2010 10:00 PM > To: avr...@li... > Subject: [avr32-libc-devel] Structure of error number in AVR32-libC > > Hi All, > > Which way is better for handling error numbers for avr32 libC > development? > Taking an integer variable in error.h will be fine(like > avr-libC does) or a re-entrant structure should be taken for > handling it(like NewLib does)? > > Praveen > > |
From: praveen k. <pra...@gm...> - 2010-03-15 05:00:26
|
Hi All, Which way is better for handling error numbers for avr32 libC development? Taking an integer variable in error.h will be fine(like avr-libC does) or a re-entrant structure should be taken for handling it(like NewLib does)? Praveen |