From 7a0d4022a11aa7adcc64d3705dc99fbb73065ed7 Mon Sep 17 00:00:00 2001 From: rtel Date: Sat, 10 Oct 2015 10:29:29 +0000 Subject: [PATCH] Add FreeRTOS+CLI examples to the Renesas RZ/T demos. Fix some compiler warnings. Correct spellings in comments. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2386 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../Sample-CLI-commands.c | 37 +- .../UARTCommandConsole.c | 10 +- .../Full_Demo/reg_test.S | 4 +- .../Full_Demo/reg_test.S | 4 +- .../CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S | 4 +- .../Source/Full-Demo/reg_test.s | 4 +- .../RTOSDemo/src/Full_Demo/reg_test.S | 4 +- .../Demo/CORTEX_R4F_RZ_T_GCC_IAR/.cproject | 8 +- .../Demo/CORTEX_R4F_RZ_T_GCC_IAR/.project | 87 +++ .../.settings/language.settings.xml | 2 +- .../RTOSDemo HardwareDebug.launch | 14 +- .../Demo/CORTEX_R4F_RZ_T_GCC_IAR/RTOSDemo.ewp | 25 +- .../System/IAR/Interrupt_Entry_Stubs.asm | 58 +- .../settings/RTOSDemo.dbgdt | 245 ++------- .../settings/RTOSDemo.dni | 7 +- .../settings/RTOSDemo.wsdt | 28 +- .../settings/RTOSDemo.wspos | 2 +- .../src/Blinky_Demo/main_blinky.c | 24 +- .../src/FreeRTOSConfig.h | 8 +- .../src/Full_Demo/main_full.c | 59 ++- .../src/Full_Demo/reg_test_GCC.S | 4 +- .../src/Full_Demo/reg_test_IAR.asm | 4 +- .../src/cg_src/r_cg_cmt_user.c | 6 + .../src/cg_src/r_cg_interrupthandlers.h | 36 ++ .../src/cg_src/r_cg_scifa.c | 272 ++++++++++ .../src/cg_src/r_cg_scifa.h | 275 ++++++++++ .../src/cg_src/r_cg_scifa_user.c | 497 ++++++++++++++++++ .../src/cg_src/r_cg_systeminit.c | 14 +- .../Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/main.c | 17 +- .../sources/main.c | 2 +- .../Demo/ColdFire_MCF52259_CodeWarrior/main.c | 2 +- .../ColdFire_MCF5282_Eclipse/RTOSDemo/main.c | 2 +- .../.settings/language.settings.xml | 2 +- .../src/Full_Demo/RegTest_GCC.S | 4 +- .../.cproject | 3 +- .../src/Full_Demo/main_full.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../src/Full_Demo/RegTest_GCC.S | 4 +- .../src/Full_Demo/RegTest_IAR.s | 4 +- .../src/Full_Demo/main_full.c | 4 +- .../RTOSDemo/main-full.c | 4 +- FreeRTOS/Demo/RX600_RX62N-RDK_IAR/RegTest.s | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RTOSDemo/main-full.c | 4 +- FreeRTOS/Demo/RX600_RX62N-RSK_IAR/RegTest.s | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../RTOSDemo/main-full.c | 4 +- .../src/RegTest.S | 4 +- .../Source/RegTest.src | 4 +- .../src/Full_Demo/RegTest_GCC.S | 4 +- .../src/Full_Demo/RegTest_IAR.s | 4 +- .../src/Full_Demo/main_full.c | 4 +- 54 files changed, 1467 insertions(+), 383 deletions(-) create mode 100644 FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/cg_src/r_cg_scifa.c create mode 100644 FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/cg_src/r_cg_scifa.h create mode 100644 FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/src/cg_src/r_cg_scifa_user.c diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c index 0b06ac00b..e23074dad 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c @@ -70,8 +70,7 @@ /****************************************************************************** * - * See the following URL for information on the commands defined in this file: - * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/Embedded_Ethernet_Examples/Ethernet_Related_CLI_Commands.shtml + * http://www.FreeRTOS.org/cli * ******************************************************************************/ @@ -339,7 +338,7 @@ static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWri { const char *pcParameter; BaseType_t xParameterStringLength, xReturn; -static BaseType_t lParameterNumber = 0; +static UBaseType_t uxParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -348,7 +347,7 @@ static BaseType_t lParameterNumber = 0; ( void ) xWriteBufferLen; configASSERT( pcWriteBuffer ); - if( lParameterNumber == 0 ) + if( uxParameterNumber == 0 ) { /* The first time the function is called after the command has been entered just a header string is returned. */ @@ -356,7 +355,7 @@ static BaseType_t lParameterNumber = 0; /* Next time the function is called the first parameter will be echoed back. */ - lParameterNumber = 1L; + uxParameterNumber = 1U; /* There is more data to be returned as no parameters have been echoed back yet. */ @@ -368,7 +367,7 @@ static BaseType_t lParameterNumber = 0; pcParameter = FreeRTOS_CLIGetParameter ( pcCommandString, /* The command string itself. */ - lParameterNumber, /* Return the next parameter. */ + uxParameterNumber, /* Return the next parameter. */ &xParameterStringLength /* Store the parameter string length. */ ); @@ -377,24 +376,24 @@ static BaseType_t lParameterNumber = 0; /* Return the parameter string. */ memset( pcWriteBuffer, 0x00, xWriteBufferLen ); - sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber ); - strncat( pcWriteBuffer, pcParameter, xParameterStringLength ); + sprintf( pcWriteBuffer, "%d: ", ( int ) uxParameterNumber ); + strncat( pcWriteBuffer, pcParameter, ( size_t ) xParameterStringLength ); strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) ); /* If this is the last of the three parameters then there are no more strings to return after this one. */ - if( lParameterNumber == 3L ) + if( uxParameterNumber == 3U ) { /* If this is the last of the three parameters then there are no more strings to return after this one. */ xReturn = pdFALSE; - lParameterNumber = 0L; + uxParameterNumber = 0; } else { /* There are more parameters to return after this one. */ xReturn = pdTRUE; - lParameterNumber++; + uxParameterNumber++; } } @@ -406,7 +405,7 @@ static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBuf { const char *pcParameter; BaseType_t xParameterStringLength, xReturn; -static BaseType_t lParameterNumber = 0; +static UBaseType_t uxParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -415,7 +414,7 @@ static BaseType_t lParameterNumber = 0; ( void ) xWriteBufferLen; configASSERT( pcWriteBuffer ); - if( lParameterNumber == 0 ) + if( uxParameterNumber == 0 ) { /* The first time the function is called after the command has been entered just a header string is returned. */ @@ -423,7 +422,7 @@ static BaseType_t lParameterNumber = 0; /* Next time the function is called the first parameter will be echoed back. */ - lParameterNumber = 1L; + uxParameterNumber = 1U; /* There is more data to be returned as no parameters have been echoed back yet. */ @@ -435,7 +434,7 @@ static BaseType_t lParameterNumber = 0; pcParameter = FreeRTOS_CLIGetParameter ( pcCommandString, /* The command string itself. */ - lParameterNumber, /* Return the next parameter. */ + uxParameterNumber, /* Return the next parameter. */ &xParameterStringLength /* Store the parameter string length. */ ); @@ -443,13 +442,13 @@ static BaseType_t lParameterNumber = 0; { /* Return the parameter string. */ memset( pcWriteBuffer, 0x00, xWriteBufferLen ); - sprintf( pcWriteBuffer, "%d: ", ( int ) lParameterNumber ); - strncat( pcWriteBuffer, pcParameter, xParameterStringLength ); + sprintf( pcWriteBuffer, "%d: ", ( int ) uxParameterNumber ); + strncat( pcWriteBuffer, ( char * ) pcParameter, ( size_t ) xParameterStringLength ); strncat( pcWriteBuffer, "\r\n", strlen( "\r\n" ) ); /* There might be more parameters to return after this one. */ xReturn = pdTRUE; - lParameterNumber++; + uxParameterNumber++; } else { @@ -461,7 +460,7 @@ static BaseType_t lParameterNumber = 0; xReturn = pdFALSE; /* Start over the next time this command is executed. */ - lParameterNumber = 0; + uxParameterNumber = 0; } } diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c index 3f6179944..ce5f02d7a 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c @@ -164,7 +164,7 @@ xComPortHandle xPort; xPort = xSerialPortInitMinimal( configCLI_BAUD_RATE, cmdQUEUE_LENGTH ); /* Send the welcome message. */ - vSerialPutString( xPort, ( signed char * ) pcWelcomeMessage, strlen( pcWelcomeMessage ) ); + vSerialPutString( xPort, ( signed char * ) pcWelcomeMessage, ( unsigned short ) strlen( pcWelcomeMessage ) ); for( ;; ) { @@ -183,7 +183,7 @@ xComPortHandle xPort; if( cRxedChar == '\n' || cRxedChar == '\r' ) { /* Just to space the output from the input. */ - vSerialPutString( xPort, ( signed char * ) pcNewLine, strlen( pcNewLine ) ); + vSerialPutString( xPort, ( signed char * ) pcNewLine, ( unsigned short ) strlen( pcNewLine ) ); /* See if the command is empty, indicating that the last command is to be executed again. */ @@ -203,7 +203,7 @@ xComPortHandle xPort; xReturned = FreeRTOS_CLIProcessCommand( cInputString, pcOutputString, configCOMMAND_INT_MAX_OUTPUT_SIZE ); /* Write the generated string to the UART. */ - vSerialPutString( xPort, ( signed char * ) pcOutputString, strlen( pcOutputString ) ); + vSerialPutString( xPort, ( signed char * ) pcOutputString, ( unsigned short ) strlen( pcOutputString ) ); } while( xReturned != pdFALSE ); @@ -215,7 +215,7 @@ xComPortHandle xPort; ucInputIndex = 0; memset( cInputString, 0x00, cmdMAX_INPUT_SIZE ); - vSerialPutString( xPort, ( signed char * ) pcEndOfOutputMessage, strlen( pcEndOfOutputMessage ) ); + vSerialPutString( xPort, ( signed char * ) pcEndOfOutputMessage, ( unsigned short ) strlen( pcEndOfOutputMessage ) ); } else { @@ -260,7 +260,7 @@ void vOutputString( const char * const pcMessage ) { if( xSemaphoreTake( xTxMutex, cmdMAX_MUTEX_WAIT ) == pdPASS ) { - vSerialPutString( xPort, ( signed char * ) pcMessage, strlen( pcMessage ) ); + vSerialPutString( xPort, ( signed char * ) pcMessage, ( unsigned short ) strlen( pcMessage ) ); xSemaphoreGive( xTxMutex ); } } diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/reg_test.S b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/reg_test.S index c111bebee..fae7dfa13 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D3x_Xplained_IAR/Full_Demo/reg_test.S @@ -123,7 +123,7 @@ vRegTest1Implementation vmov d14, r4, r5 vmov d15, r6, r7 - ; Loop, checking each itteration that each register still contains the + ; Loop, checking each iteration that each register still contains the ; expected value. reg1_loop ; Yield to increase test coverage @@ -317,7 +317,7 @@ vRegTest2Implementation vmov d14, r4, r5 vmov d15, r6, r7 - ; Loop, checking each itteration that each register still contains the + ; Loop, checking each iteration that each register still contains the ; expected value. reg2_loop ; Check all the VFP registers still contain the values set above. diff --git a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/reg_test.S b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/reg_test.S index 45ddc9f8e..e17686ed7 100644 --- a/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A5_SAMA5D4x_EK_IAR/Full_Demo/reg_test.S @@ -142,7 +142,7 @@ vRegTest1Implementation vmov d30, r4, r5 vmov d31, r6, r7 - ; Loop, checking each itteration that each register still contains the + ; Loop, checking each iteration that each register still contains the ; expected value. reg1_loop ; Yield to increase test coverage @@ -434,7 +434,7 @@ vRegTest2Implementation vmov d30, r4, r5 vmov d31, r6, r7 - ; Loop, checking each itteration that each register still contains the + ; Loop, checking each iteration that each register still contains the ; expected value. reg2_loop ; Check all the VFP registers still contain the values set above. diff --git a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S index 6a0198771..780ec13b6 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A9_Cyclone_V_SoC_DK/reg_test.S @@ -135,7 +135,7 @@ vRegTest1Implementation: vmov d30, r4, r5 vmov d31, r6, r7 - /* Loop, checking each itteration that each register still contains the + /* Loop, checking each iteration that each register still contains the expected value. */ reg1_loop: /* Yield to increase test coverage */ @@ -425,7 +425,7 @@ vRegTest2Implementation: vmov d30, r4, r5 vmov d31, r6, r7 - /* Loop, checking each itteration that each register still contains the + /* Loop, checking each iteration that each register still contains the expected value. */ reg2_loop: /* Check all the VFP registers still contain the values set above. diff --git a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/reg_test.s b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/reg_test.s index c9e269ff6..af98e7eee 100644 --- a/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/reg_test.s +++ b/FreeRTOS/Demo/CORTEX_A9_RZ_R7S72100_IAR_DS-5/Source/Full-Demo/reg_test.s @@ -146,7 +146,7 @@ vRegTest1Implementation vmov d30, r4, r5 vmov d31, r6, r7 - ; Loop, checking each itteration that each register still contains the + ; Loop, checking each iteration that each register still contains the ; expected value. reg1_loop ; Yield to increase test coverage @@ -438,7 +438,7 @@ vRegTest2Implementation vmov d30, r4, r5 vmov d31, r6, r7 - ; Loop, checking each itteration that each register still contains the + ; Loop, checking each iteration that each register still contains the ; expected value. reg2_loop ; Check all the VFP registers still contain the values set above. diff --git a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/reg_test.S b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/reg_test.S index 6a0198771..780ec13b6 100644 --- a/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/reg_test.S +++ b/FreeRTOS/Demo/CORTEX_A9_Zynq_ZC702/RTOSDemo/src/Full_Demo/reg_test.S @@ -135,7 +135,7 @@ vRegTest1Implementation: vmov d30, r4, r5 vmov d31, r6, r7 - /* Loop, checking each itteration that each register still contains the + /* Loop, checking each iteration that each register still contains the expected value. */ reg1_loop: /* Yield to increase test coverage */ @@ -425,7 +425,7 @@ vRegTest2Implementation: vmov d30, r4, r5 vmov d31, r6, r7 - /* Loop, checking each itteration that each register still contains the + /* Loop, checking each iteration that each register still contains the expected value. */ reg2_loop: /* Check all the VFP registers still contain the values set above. diff --git a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/.cproject b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/.cproject index b6ac7fa6a..be6b644f4 100644 --- a/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/.cproject +++ b/FreeRTOS/Demo/CORTEX_R4F_RZ_T_GCC_IAR/.cproject @@ -44,6 +44,7 @@