|
156 | 156 | #define configIDLE_TASK_NAME "IDLE"
|
157 | 157 | #endif
|
158 | 158 |
|
159 |
| -#if ( configNUMBER_OF_CORES > 1 ) |
160 |
| - /* Reserve space for Core ID and null termination. */ |
| 159 | +/* Reserve space for Core ID and null termination. */ |
| 160 | +#if ( configNUMBER_OF_CORES > 9 ) |
| 161 | + /* More than 9 cores require 2 characters for core ID and 1 for null termination. */ |
| 162 | + #if ( configMAX_TASK_NAME_LEN < 3U ) |
| 163 | + #error Minimum required task name length is 3. Please increase configMAX_TASK_NAME_LEN. |
| 164 | + #endif |
| 165 | + #define taskRESERVED_TASK_NAME_LENGTH 3U |
| 166 | + |
| 167 | +#elif ( configNUMBER_OF_CORES > 1 ) |
| 168 | + /* Multi-core systems with up to 9 cores require 1 character for core ID and 1 for null termination. */ |
161 | 169 | #if ( configMAX_TASK_NAME_LEN < 2U )
|
162 | 170 | #error Minimum required task name length is 2. Please increase configMAX_TASK_NAME_LEN.
|
163 | 171 | #endif
|
164 | 172 | #define taskRESERVED_TASK_NAME_LENGTH 2U
|
165 | 173 |
|
166 |
| -#elif ( configNUMBER_OF_CORES > 9 ) |
167 |
| - #warning Please increase taskRESERVED_TASK_NAME_LENGTH. 1 character is insufficient to store the core ID. |
168 |
| -#else |
| 174 | +#else /* if ( configNUMBER_OF_CORES > 9 ) */ |
169 | 175 | /* Reserve space for null termination. */
|
170 | 176 | #if ( configMAX_TASK_NAME_LEN < 1U )
|
171 | 177 | #error Minimum required task name length is 1. Please increase configMAX_TASK_NAME_LEN.
|
@@ -3597,7 +3603,12 @@ static BaseType_t prvCreateIdleTasks( void )
|
3597 | 3603 | * only one idle task. */
|
3598 | 3604 | #if ( configNUMBER_OF_CORES > 1 )
|
3599 | 3605 | {
|
3600 |
| - /* Append the idle task number to the end of the name. */ |
| 3606 | + /* Append the idle task number to the end of the name. |
| 3607 | + * |
| 3608 | + * Note: Idle task name index only supports single-character |
| 3609 | + * core IDs (0-9). If the core ID exceeds 9, the idle task |
| 3610 | + * name will contain an incorrect ASCII character. This is |
| 3611 | + * acceptable as the task name is used mainly for debugging. */ |
3601 | 3612 | cIdleName[ xIdleTaskNameIndex ] = ( char ) ( xCoreID + '0' );
|
3602 | 3613 | cIdleName[ xIdleTaskNameIndex + 1 ] = '\0';
|
3603 | 3614 | }
|
|
0 commit comments