[Mspgcc-users] What happened to the mediawiki?
I wanted to look something up in the mspgcc wiki today, but it seems that the whole wiki is gone... All old links redirect to mspgcc sourceforge homepage. Does anybody knows what happened? -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
[Mspgcc-users] weird code with MSPGCC
Hello, I experienced some odd effect when msp430-gcc tries to inline memcpy and/or memset. the code #include stdint.h void test_memcpy(void) { uint8_t mybuffer[10]; memset((uint8_t*)mybuffer, 0, 10); } when compiled with msp430-gcc -c -O2 -mmcu=msp430f449 mspgcc_memcpy.c results in Disassembly of section .text: test_memcpy: 0: 31 50 f6 ff add #-10, r1 ;#0xfff6 4: 81 43 06 00 mov #0, 6(r1) ;r3 As==00, 0x0006(r1) 8: 81 43 08 00 mov #0, 8(r1) ;r3 As==00, 0x0008(r1) c: 31 50 0a 00 add #10,r1 ;#0x000a 10: 30 41 ret In my opion thats not clearing 10 bytes Without optimation the code appears sound. msp430-gcc (GCC) 4.7.0 20120322 (mspgcc dev 20120911) Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Same size problem I noticed with memcpy if inlined best regards Kees -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] weird code with MSPGCC
Hello, You have a bug in your code, you are taking the address of the pointer and zeroing it. This is a dangerous thing to do, the proper way is to do: memset(mybuffer, 0, 10); or memset(mybuffer[0], 0, 10); The compiler should have given you a warning about that without the cast. Listen to it and do not try to force things. As for why the elimination of memset()/memcpy(), the compiler is doing that because you are telling it to optimize. Since you do not use the buffer at all in the function, it does not need to be zeroed. In fact, the two mov instructions can also be optimized away. The first add instruction allocates the buffer in the stack and the last one removes it. When you do not tell the compiler to optimize the code (-O0), it will not make the optimizations and you see your memset()/memcpy() work properly. You will be able to see it at work with optimizations enabled if you were to declare your buffer as a global, that is uint8_t mybuffer[10]; void test_memcpy(void) { memset(mybuffer, 1, 10);/* globals are initialized */ /* to 0 by default */ } Again, not using the buffer may imply optimizing it away... Cheers. On 06/26/2014 03:48 AM, Kees Schoenmakers wrote: Hello, I experienced some odd effect when msp430-gcc tries to inline memcpy and/or memset. the code #include stdint.h void test_memcpy(void) { uint8_t mybuffer[10]; memset((uint8_t*)mybuffer, 0, 10); } when compiled with msp430-gcc -c -O2 -mmcu=msp430f449 mspgcc_memcpy.c results in Disassembly of section .text: test_memcpy: 0: 31 50 f6 ff add #-10, r1 ;#0xfff6 4: 81 43 06 00 mov #0, 6(r1) ;r3 As==00, 0x0006(r1) 8: 81 43 08 00 mov #0, 8(r1) ;r3 As==00, 0x0008(r1) c: 31 50 0a 00 add #10,r1 ;#0x000a 10: 30 41 ret In my opion thats not clearing 10 bytes Without optimation the code appears sound. msp430-gcc (GCC) 4.7.0 20120322 (mspgcc dev 20120911) Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Same size problem I noticed with memcpy if inlined best regards Kees -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users signature.asc Description: OpenPGP digital signature -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] weird code with MSPGCC
Hi, Your problem is that mybuffer is an unused local variable - the compiler can therefore eliminate it entirely when optimising. If you write code that uses mybuffer in some way (that can't be optimised away), then it should work fine. mvh., David On 26/06/14 09:48, Kees Schoenmakers wrote: Hello, I experienced some odd effect when msp430-gcc tries to inline memcpy and/or memset. the code #include stdint.h void test_memcpy(void) { uint8_t mybuffer[10]; memset((uint8_t*)mybuffer, 0, 10); } when compiled with msp430-gcc -c -O2 -mmcu=msp430f449 mspgcc_memcpy.c results in Disassembly of section .text: test_memcpy: 0: 31 50 f6 ff add #-10, r1 ;#0xfff6 4: 81 43 06 00 mov #0, 6(r1) ;r3 As==00, 0x0006(r1) 8: 81 43 08 00 mov #0, 8(r1) ;r3 As==00, 0x0008(r1) c: 31 50 0a 00 add #10,r1 ;#0x000a 10: 30 41 ret In my opion thats not clearing 10 bytes Without optimation the code appears sound. msp430-gcc (GCC) 4.7.0 20120322 (mspgcc dev 20120911) Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Same size problem I noticed with memcpy if inlined best regards Kees -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
[Mspgcc-users] why mspgcc does ICE
Hello, The following piece of code cause an ICE to happen. typedef struct { unsigned long maskbits:20; char extra; } MYSTRUCT; MYSTRUCT mys = {0}; void test_ice(void) { unisgned long lvar = 0x0f; mys.maskbits = lvar; // == ICE here } kees:$ msp430-gcc -mmcu=msp430f449 -c mspgcc_ice.c mspgcc_ice.c: In function 'test_ice': mspgcc_ice.c:13:15: internal compiler error: in convert_move, at expr.c:437 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. msp430-gcc (GCC) 4.7.0 20120322 (mspgcc dev 20120911) Copyright (C) 2012 Free Software Foundation, Inc. smaller bitfields work well. I don't know if later mspgcc versions does ICE here too. Kees -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] What happened to the mediawiki?
SourceForge killed off the hosted applications, and I forgot to move the data somewhere else beforehand. There should be a backup available somewhere; if somebody wants to volunteer to handle this I can make that person an administrator. Otherwise, I won't be getting to it for about two weeks. Peter On Thu, Jun 26, 2014 at 8:46 AM, Wouter Wieleman wiel...@gmail.com wrote: I wanted to look something up in the mspgcc wiki today, but it seems that the whole wiki is gone... All old links redirect to mspgcc sourceforge homepage. Does anybody knows what happened? -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
[Mspgcc-users] Packaging for msp430-elf-*
Hello everyone! i’m the maintainer for the msp430 suite on MacPorts. Is msp430-elf-* shipped with gcc 4.9.0 ready to use? I see there are still some manual steps to do [1]. Is that resolved? Also, why are you building msp430-elf-gcc in two steps, Peter? Can I build newlib first and then msp430-elf-gcc? Thanks, Aljaž [1]: http://msp430-gcc-users.1086195.n5.nabble.com/msp430-elf-gcc-upcoming-release-tp7088.html -- Aljaž Srebrnič a.k.a g5pw My public key: http://bit.ly/g5pw_pubkey -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] Packaging for msp430-elf-*
Also, why are you building msp430-elf-gcc in two steps, Peter? Can I build newlib first and then msp430-elf-gcc? How do you build newlib without a C compiler? -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] Packaging for msp430-elf-*
On 26/giu/2014, at 21:59, DJ Delorie d...@redhat.com wrote: Also, why are you building msp430-elf-gcc in two steps, Peter? Can I build newlib first and then msp430-elf-gcc? How do you build newlib without a C compiler? Ah, yes, sorry. What I meant was can msp430-elf-gcc be built without newlib? I wanted to create a separate package for newlib. -- Aljaž Srebrnič a.k.a g5pw My public key: http://bit.ly/g5pw_pubkey -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] Packaging for msp430-elf-*
Ah, yes, sorry. What I meant was can msp430-elf-gcc be built without newlib? I wanted to create a separate package for newlib. Typically, the gcc runtime (libgcc) needs to know what the usual runtime will be, as some routines in libgcc may need to call C library functions. The usual way to build it is to do it in two steps so that things like stdio.h et al are available to the libgcc build. I haven't tried to build libgcc before newlib in a long time, but if it works, either things have changed or you just haven't noticed the problem yet ;-) -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] Packaging for msp430-elf-*
My recommendation is to look at what MacPorts does for gcc-arm or some other cross-compilation GNU toolchain that produces binutils, gcc, gdb, and library/header packages, and replicate that using the msp430 target flags. That would seem to be the best way to produce packages that are compatible with what users will expect. Peter On Thu, Jun 26, 2014 at 9:01 PM, Aljaž Srebrnič a2pirates...@gmail.com wrote: On 26/giu/2014, at 21:59, DJ Delorie d...@redhat.com wrote: Also, why are you building msp430-elf-gcc in two steps, Peter? Can I build newlib first and then msp430-elf-gcc? How do you build newlib without a C compiler? Ah, yes, sorry. What I meant was can msp430-elf-gcc be built without newlib? I wanted to create a separate package for newlib. -- Aljaž Srebrnič a.k.a g5pw My public key: http://bit.ly/g5pw_pubkey -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users
Re: [Mspgcc-users] MSP430 simulator in gdb
Will TI be providing sufficient documentation on the CIO API that the msp430 implementation can be completed, thus making the system interface usable in other frameworks? http://processors.wiki.ti.com/index.php/CIO_System_Call_Protocol -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users