[riot-devel] shell and putchar
Hi all, I'm working on improving IRQ support on PIC32 and I'm testing UART Rx using the shell. The shell uses putchar, but putchar is buffered and needs a flush, thus when typing at the console I get no feedback until I press enter (the line feed gets echo'd and then we get the flush). I'm surprised other newlib implementations don't see this ? A flush is probably needed here: #if !defined(SHELL_NO_ECHO) || !defined(SHELL_NO_PROMPT) #ifdef MODULE_NEWLIB /* use local copy of putchar, as it seems to be inlined, * enlarging code by 50% */ static void _putchar(int c) { putchar(c); fflush(STDOUT) <--- HERE } #else #define _putchar putchar #endif #endif I'm happy to do a PR for this, but this is very core functionality, I don't want to break anything ?? Cheers, Neil ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] size_t vs int usage
> "and how come no one else is getting this error ?" > Probably you are the first to build it with GCC 7.x :) gcc version 4.9.2 (Codescape GNU Tools 2016.05-03 for MIPS MTI Bare Metal) On Wed, Jun 27, 2018 at 2:36 PM, Oleg Artamonov wrote: > "and how come no one else is getting this error ?" > > Probably you are the first to build it with GCC 7.x :) > > It has stricter rules regarding variable types. > > -- > *Sincerely yours,* > *Oleg Artamonov* > *+7 (916) 631-34-90* > *www.unwds.com* <http://www.unwireddevices.com> > > > > 27.06.2018, 16:03, "Neil Jones" : > > I'm getting several failures on MIPS with size_t vs int usage in this PR > (#9368) > > eg: > > > Building application "tests_driver_ata8520e" for "pic32-clicker" with MCU > "mips_pic32mx". > > main.c: In function 'ata8520e_sigfox_cmd': > main.c:84:24: error: format '%d' expects argument of type 'int', but argument > 3 has type 'size_t' [-Werror=format=] > "message length is %d", SIGFOX_MAX_TX_LENGTH, > strlen(argv[2])); > > > IIRC size_t is unsigned so the error is correct, how did this code get > upstream, and how come no one else is getting this error ? > > > I presume the fact that this PR add SPI support for MIPS(PIC32) these drivers > are now getting built for MIPS, but how is this not a failure on other > architectures ? > > > Should I fix these in this PR or create another one ? > > > Cheers, > > > Neil > > > > > > , > > ___ > devel mailing list > devel@riot-os.org > https://lists.riot-os.org/mailman/listinfo/devel > > > ___ > devel mailing list > devel@riot-os.org > https://lists.riot-os.org/mailman/listinfo/devel > > ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
[riot-devel] size_t vs int usage
I'm getting several failures on MIPS with size_t vs int usage in this PR (#9368) eg: Building application "tests_driver_ata8520e" for "pic32-clicker" with MCU "mips_pic32mx". main.c: In function 'ata8520e_sigfox_cmd': main.c:84:24: error: format '%d' expects argument of type 'int', but argument 3 has type 'size_t' [-Werror=format=] "message length is %d", SIGFOX_MAX_TX_LENGTH, strlen(argv[2])); IIRC size_t is unsigned so the error is correct, how did this code get upstream, and how come no one else is getting this error ? I presume the fact that this PR add SPI support for MIPS(PIC32) these drivers are now getting built for MIPS, but how is this not a failure on other architectures ? Should I fix these in this PR or create another one ? Cheers, Neil ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
[riot-devel] bitfeilds
Hi, What is RIOT's position on using named bitfields for register definitions ? I know they are frown upon as there are no endian guarantees in the C standard, personally I don't use them, but the PIC32 device files supplied by Microchip do include bitfield structures for most registers so could make life easier ? (thankfully there are #define for most register fields too, if the answer is not to use them). Cheers, Neil ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
[riot-devel] mips port
Hi Leon, I see from the riot mailing list that you are working on a mips32 port of RIOT. Let me introduce myself, I manage the RTOS / embedded group at Imagination Technologies and one of the activities my group gets involved in is helping out open source RTOSes to improve their MIPS support, for example we have recently improved the MIPS support in FreeRTOS. TBH RIOT has be off radar somewhat as there was no MIPS support at all, we have been looking at RTOSes with some MIPS support already (usually PIC32 which is a somewhat specialised mips32 implementation) and trying to get the up-to-date with modern mips features. So its great to see someone working on MIPS support for RIOT and I would like to offer my assistance, be that loaning or donation of target hardware, or engineering resource (although we are a small teams) for patch reviewing and assisting with features etc. Cheers, Neil ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel