M16c62A Port

Hello I have freertos running on a M16c62A µC using the nc30 compiler. First I have to say freertos is really easy to port. Really great :)! But what to do now? I think it will be easy to add the port to the freertos source so ???? A problem was the inline attri. because the nc30 has its peculiarity in defining inline fkt. Can be fix by a macro SUPPORTS_INLINE or not… An other one was in the common demo files the casting for the taskname parameter in the xTaskCreate fkt. The problem was the nc30 differs far and near pointer, and because "TASKNAMESTR" (const char) is in flash the nc30 uses a far pointer but it was casted has not const char and so the nc30 generates a warning far->near. Can be fix by only adding the attri. const. Also it would be a good idee to change the typeparameter of this parameter from "const signed char *" to "const unsigned char *" so there is no need for casting? cheers jochen

M16c62A Port

> Hello > I have freertos running on a M16c62A µC using >the nc30 compiler. First I have Cool. > A problem was the inline attri. because the nc30 has its peculiarity in defining > inline fkt. > Can be fix by a macro SUPPORTS_INLINE or not… Most of the ports #define away the inline at the bottom of portmacro.h.  This gets around the problem. >Also it would be a good idee to > change the typeparameter of this parameter >from "const signed char *" to "const > unsigned char *" so there is no need for >casting? This would only remove the need for casting in your port.  Different compilers use signed or unsigned.  The overcasting is due by the use of so many different compilers.

M16c62A Port

>Most of the ports #define away the inline at the bottom of portmacro.h. This gets around the problem. Yes that is my plan! -> macro #define … #ifdef … but where to publish the new port??

M16c62A Port

I am always grateful to receive new ports.  You can send files to me using the address on the contacts page of the FreeRTOS.org site (r ‘dot’ barry ATATAT freertos ###dot org). I need to update the pages to list the unsupported ports (i.e. those for which I don’t have the hardware necessary to test and provide support).  Naturally I credit the authors with the work! Regards.

M16c62A Port

Hi I’m back …. >Most of the ports #define away the inline at the bottom of portmacro.h. This gets around the problem Great idee! First I didn’t understand exactly what you mean but now I do :) The secound problem is in the common test files (demo/common/…) We call the xTaskCreate fkt. and the secound parameter is implicitly casted to ( signed portCHAR * ) the problem is that my compiler now says: "far pointer (implicitly) casted by near pointer" because he differ const pointer(far 20bit FLASH) and normal pointer (near 16bit RAM) I think I won’t be wrong we changed the implicit cast ( signed portCHAR * ) to (const signed portCHAR * ) beacause the xTaskCreate fkt. body is signed portBASE_TYPE xTaskCreate( pdTASK_CODE pvTaskCode, !!   const signed portCHAR * const pcName,       unsigned portSHORT usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, xTaskHandle *pxCreatedTask ) and here is the build output I used TM ******** Cleaning… -—* ******** Complete… ******** Executing… AS30  -LM -finfo -O. ncrt0.a30 R8C/Tiny,M16C/60 Series Assembler system Version 5.10 Release1 COPYRIGHT(C) 1995(2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED macro processing now -—* --assembler processing now TOTAL ERROR(S)    00000 TOTAL WARNING(S)  00000 TOTAL LINE(S)     00280   LINES DATA     0000000(00000H)  data_SE DATA     0000000(00000H)  bss_SE DATA     0000000(00000H)  data_SO DATA     0000000(00000H)  bss_SO DATA     0000000(00000H)  data_NE DATA     0000000(00000H)  bss_NE DATA     0000000(00000H)  data_NO DATA     0000000(00000H)  bss_NO DATA     0000512(00200H)  stack DATA     0004096(01000H)  heap ROMDATA  0000000(00000H)  rom_NE ROMDATA  0000000(00000H)  rom_NO DATA     0000000(00000H)  data_FE DATA     0000000(00000H)  bss_FE DATA     0000000(00000H)  data_FO DATA     0000000(00000H)  bss_FO ROMDATA  0000000(00000H)  rom_FE ROMDATA  0000000(00000H)  rom_FO ROMDATA  0000000(00000H)  data_SEI ROMDATA  0000000(00000H)  data_SOI ROMDATA  0000000(00000H)  data_NEI ROMDATA  0000000(00000H)  data_NOI ROMDATA  0000000(00000H)  data_FEI ROMDATA  0000000(00000H)  data_FOI CODE     0000000(00000H)  program CODE     0000000(00000H)  program_S CODE     0000000(00000H)  interrupt CODE     0000192(000C0H)  vector CODE     0000036(00024H)  fvector CODE     0000288(00120H)  interrupt ( ncrt0.a30 ) NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..\..Sourcelist.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED ..\..Sourcelist.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..\..Sourcequeue.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED ..\..Sourcequeue.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..\..Sourcetasks.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED [Warning(ccom):../../Source/tasks.c,line 968] far pointer (implicitly) casted by near pointer    ===>         xReturn = xTaskCreate( prvIdleTask, ( signed portCHAR * ) "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, (;… ..\..Sourcetasks.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A main.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED main.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..\..SourceportableNC30M16c62Aport.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED ..\..SourceportableNC30M16c62Aport.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..CommonMinimalinteger.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED ..CommonMinimalinteger.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..\..SourceportableMemMangheap_3.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED [Warning(ccom):../../Source/portable/MemMang/heap_3.c,line 58] assign far pointer to near pointer,bank value ignored    ===>                 pvReturn = malloc( xWantedSize ); ..\..SourceportableMemMangheap_3.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..CommonMinimalPollQ.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED ..CommonMinimalPollQ.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..CommonMinimalflash.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED [Warning(ccom):../Common/Minimal/flash.c,line 117] meaningless statements deleted in optimize phase    ===>         xFlashRate /= portTICK_RATE_MS; ..CommonMinimalflash.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ParTestParTest.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED ParTestParTest.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A serialserial.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED serialserial.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..CommonMinimalcomtest.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED ..CommonMinimalcomtest.c NC30  -c -I../../Source/include -I../Common/include -I. -dir . -finfo -DNC30_M16C62A ..CommonMinimalsemtest.c M16C/60 NC30 COMPILER V.5.30 Release 1 COPYRIGHT(C) 2001(2003,2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED [Warning(ccom):../Common/Minimal/semtest.c,line 119] far pointer (implicitly) casted by near pointer    ===>                         xTaskCreate( prvSemaphoreTest, ( signed portCHAR * ) "PolSEM1", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters,;… [Warning(ccom):../Common/Minimal/semtest.c,line 120] far pointer (implicitly) casted by near pointer    ===>                         xTaskCreate( prvSemaphoreTest, ( signed portCHAR * ) "PolSEM2", semtstSTACK_SIZE, ( void * ) pxFirstSemaphoreParameters,;… [Warning(ccom):../Common/Minimal/semtest.c,line 137] far pointer (implicitly) casted by near pointer    ===>                         xTaskCreate( prvSemaphoreTest, ( signed portCHAR * ) "BlkSEM1", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters;… [Warning(ccom):../Common/Minimal/semtest.c,line 138] far pointer (implicitly) casted by near pointer    ===>                         xTaskCreate( prvSemaphoreTest, ( signed portCHAR * ) "BlkSEM2", semtstSTACK_SIZE, ( void * ) pxSecondSemaphoreParameters;… ..CommonMinimalsemtest.c LN30 @.freertos.cmd Linkage Editor (ln30) for R8C/Tiny,M16C Series Version 5.10.01  COPYRIGHT(C) 1995(2004) RENESAS TECHNOLOGY CORPORATION AND RENESAS SOLUTIONS CORPORATION ALL RIGHTS RESERVED now processing pass 1 processing ".ncrt0.r30" processing ".list.r30" processing ".queue.r30" processing ".tasks.r30" processing ".main.r30" processing ".port.r30" processing ".integer.r30" processing ".heap_3.r30" processing ".PollQ.r30" processing ".flash.r30" processing ".ParTest.r30" processing ".serial.r30" processing ".comtest.r30" processing ".semtest.r30" processing "Libraries" now processing pass 2 processing ".ncrt0.r30" processing ".list.r30" processing ".queue.r30" processing ".tasks.r30" processing ".main.r30" processing ".port.r30" processing ".integer.r30" processing ".heap_3.r30" processing ".PollQ.r30" processing ".flash.r30" processing ".ParTest.r30" processing ".serial.r30" processing ".comtest.r30" processing ".semtest.r30" processing "C:MTOOLLIB30nc30lib.lib ( _I4DIV.r30 )" processing "C:MTOOLLIB30nc30lib.lib ( _I4MODU.r30 )" processing "C:MTOOLLIB30nc30lib.lib ( _I4MULU.r30 )" processing "C:MTOOLLIB30nc30lib.lib ( BCOPY.r30 )" processing "C:MTOOLLIB30nc30lib.lib ( BZERO.r30 )" processing "C:MTOOLLIB30nc30lib.lib ( MALLOC.r30 )" processing "C:MTOOLLIB30nc30lib.lib ( MEMCPY.r30 )" processing "C:MTOOLLIB30nc30lib.lib ( MEMSET.r30 )" processing "C:MTOOLLIB30nc30lib.lib ( STRNCPY.r30 )" DATA     0004781(012ADH) Byte(s) ROMDATA  0000147(00093H) Byte(s) CODE     0008743(02227H) Byte(s) ******** Finish…

M16c62A Port

Hi, I was going on to port the freeRTOS-kernel to the M16C6N,  as I’ve seen your post in this forum. Your port is not yet published on the FreeRTOS-homepage. It is possible that you send me your port by mail? That would save me much time. Thanks Alex