Skip to content

Commit ba2306d

Browse files
authored
Merge branch 'main' into update-pxcurrentTCB
2 parents 893fcc8 + 2faa8bc commit ba2306d

File tree

15 files changed

+1469
-116
lines changed

15 files changed

+1469
-116
lines changed

.github/.cSpellWords.txt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ CCNT
7575
CCNTR
7676
CCPN
7777
CCPR
78+
CCRH
7879
CDTY
7980
CDTYR
8081
CFBS
@@ -86,6 +87,7 @@ CHSR
8687
CICR
8788
CISR
8889
CKDIV
90+
CKDIVMD
8991
CKEY
9092
CKGR
9193
CKLO
@@ -125,6 +127,7 @@ CODR
125127
comms
126128
COMPA
127129
CONFG
130+
coreid
128131
coremqtt
129132
CORTUS
130133
coverity
@@ -149,6 +152,7 @@ CPRE
149152
cpsid
150153
cpsie
151154
CPSR
155+
CPUCLK
152156
CPUID
153157
CRCB
154158
crflash
@@ -164,6 +168,8 @@ csrs
164168
csrw
165169
CTCR
166170
ctest
171+
CTPC
172+
CTPSW
167173
CTRLA
168174
CTSIC
169175
CUPD
@@ -227,6 +233,7 @@ DTREN
227233
DTXD
228234
DUNITY
229235
DVAR
236+
Dxxx
230237
EABI
231238
ecall
232239
ECIT
@@ -237,6 +244,7 @@ EEVT
237244
eevtedg
238245
EEVTEDG
239246
EFRHD
247+
EIIC
240248
EINT
241249
EIPC
242250
EIPSW
@@ -310,6 +318,7 @@ FNTR
310318
FOSC
311319
FPCCR
312320
FPCSR
321+
FPEPC
313322
FPSW
314323
FPUL
315324
FRDY
@@ -338,6 +347,7 @@ GPTA
338347
HCLK
339348
Hitach
340349
HRESP
350+
HTCFG
341351
HWHSH
342352
HWORD
343353
HWRD
@@ -353,6 +363,7 @@ ICCR
353363
ICCRPR
354364
ICCRX
355365
ICERST
366+
ICIPI
356367
ICSR
357368
IDCR
358369
IECR
@@ -372,6 +383,7 @@ INTTM
372383
IODEFINE
373384
IORLW
374385
IPEN
386+
IPIR
375387
IPLB
376388
ipsr
377389
IPSR
@@ -380,8 +392,8 @@ IRET
380392
IRXFCS
381393
ISRAM
382394
ISRR
383-
ISR's
384395
ISRS
396+
ISR's
385397
ISRTICK
386398
isystem
387399
ITIF
@@ -564,6 +576,7 @@ OSCEN
564576
OSCOFF
565577
OSCOUNT
566578
OSMC
579+
OSTM
567580
outpw
568581
OVLY
569582
OVRE
@@ -584,6 +597,7 @@ PCLKSEL
584597
PCSR
585598
PCXI
586599
PDSR
600+
PEID
587601
PEIE
588602
PENDSV
589603
PENDSVCLEAR
@@ -799,6 +813,8 @@ SWINTR
799813
SWRST
800814
SWTRG
801815
synchronise
816+
SYNCM
817+
syncm
802818
SYSC
803819
sysclk
804820
Sysclk

include/queue.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
109109
* the same size.
110110
*
111111
* @return If the queue is successfully create then a handle to the newly
112-
* created queue is returned. If the queue cannot be created then 0 is
112+
* created queue is returned. If the queue cannot be created then NULL is
113113
* returned.
114114
*
115115
* Example usage:
@@ -126,15 +126,15 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
126126
*
127127
* // Create a queue capable of containing 10 uint32_t values.
128128
* xQueue1 = xQueueCreate( 10, sizeof( uint32_t ) );
129-
* if( xQueue1 == 0 )
129+
* if( xQueue1 == NULL )
130130
* {
131131
* // Queue was not created and must not be used.
132132
* }
133133
*
134134
* // Create a queue capable of containing 10 pointers to AMessage structures.
135135
* // These should be passed by pointer as they contain a lot of data.
136136
* xQueue2 = xQueueCreate( 10, sizeof( struct AMessage * ) );
137-
* if( xQueue2 == 0 )
137+
* if( xQueue2 == NULL )
138138
* {
139139
* // Queue was not created and must not be used.
140140
* }
@@ -292,7 +292,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
292292
* queue is full. The time is defined in tick periods so the constant
293293
* portTICK_PERIOD_MS should be used to convert to real time if this is required.
294294
*
295-
* @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.
295+
* @return pdPASS if the item was successfully posted, otherwise errQUEUE_FULL.
296296
*
297297
* Example usage:
298298
* @code{c}
@@ -375,7 +375,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
375375
* is full. The time is defined in tick periods so the constant
376376
* portTICK_PERIOD_MS should be used to convert to real time if this is required.
377377
*
378-
* @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.
378+
* @return pdPASS if the item was successfully posted, otherwise errQUEUE_FULL.
379379
*
380380
* Example usage:
381381
* @code{c}
@@ -460,7 +460,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
460460
* queue is full. The time is defined in tick periods so the constant
461461
* portTICK_PERIOD_MS should be used to convert to real time if this is required.
462462
*
463-
* @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.
463+
* @return pdPASS if the item was successfully posted, otherwise errQUEUE_FULL.
464464
*
465465
* Example usage:
466466
* @code{c}
@@ -633,7 +633,7 @@ typedef struct QueueDefinition * QueueSetMemberHandle_t;
633633
* item at the back of the queue, or queueSEND_TO_FRONT to place the item
634634
* at the front of the queue (for high priority messages).
635635
*
636-
* @return pdTRUE if the item was successfully posted, otherwise errQUEUE_FULL.
636+
* @return pdPASS if the item was successfully posted, otherwise errQUEUE_FULL.
637637
*
638638
* Example usage:
639639
* @code{c}
@@ -723,8 +723,8 @@ BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
723723
* xQueuePeek() will return immediately if xTicksToWait is 0 and the queue
724724
* is empty.
725725
*
726-
* @return pdTRUE if an item was successfully received from the queue,
727-
* otherwise pdFALSE.
726+
* @return pdPASS if an item was successfully received from the queue,
727+
* otherwise errQUEUE_EMPTY.
728728
*
729729
* Example usage:
730730
* @code{c}
@@ -811,8 +811,8 @@ BaseType_t xQueuePeek( QueueHandle_t xQueue,
811811
* @param pvBuffer Pointer to the buffer into which the received item will
812812
* be copied.
813813
*
814-
* @return pdTRUE if an item was successfully received from the queue,
815-
* otherwise pdFALSE.
814+
* @return pdPASS if an item was successfully received from the queue,
815+
* otherwise pdFAIL.
816816
*
817817
* \defgroup xQueuePeekFromISR xQueuePeekFromISR
818818
* \ingroup QueueManagement
@@ -852,8 +852,8 @@ BaseType_t xQueuePeekFromISR( QueueHandle_t xQueue,
852852
* constant portTICK_PERIOD_MS should be used to convert to real time if this is
853853
* required.
854854
*
855-
* @return pdTRUE if an item was successfully received from the queue,
856-
* otherwise pdFALSE.
855+
* @return pdPASS if an item was successfully received from the queue,
856+
* otherwise errQUEUE_EMPTY.
857857
*
858858
* Example usage:
859859
* @code{c}
@@ -998,7 +998,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
998998
* running task. If xQueueSendToFrontFromISR() sets this value to pdTRUE then
999999
* a context switch should be requested before the interrupt is exited.
10001000
*
1001-
* @return pdTRUE if the data was successfully sent to the queue, otherwise
1001+
* @return pdPASS if the data was successfully sent to the queue, otherwise
10021002
* errQUEUE_FULL.
10031003
*
10041004
* Example usage for buffered IO (where the ISR can obtain more than one value
@@ -1070,7 +1070,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
10701070
* running task. If xQueueSendToBackFromISR() sets this value to pdTRUE then
10711071
* a context switch should be requested before the interrupt is exited.
10721072
*
1073-
* @return pdTRUE if the data was successfully sent to the queue, otherwise
1073+
* @return pdPASS if the data was successfully sent to the queue, otherwise
10741074
* errQUEUE_FULL.
10751075
*
10761076
* Example usage for buffered IO (where the ISR can obtain more than one value
@@ -1235,7 +1235,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
12351235
* running task. If xQueueSendFromISR() sets this value to pdTRUE then
12361236
* a context switch should be requested before the interrupt is exited.
12371237
*
1238-
* @return pdTRUE if the data was successfully sent to the queue, otherwise
1238+
* @return pdPASS if the data was successfully sent to the queue, otherwise
12391239
* errQUEUE_FULL.
12401240
*
12411241
* Example usage for buffered IO (where the ISR can obtain more than one value
@@ -1318,7 +1318,7 @@ void vQueueDelete( QueueHandle_t xQueue ) PRIVILEGED_FUNCTION;
13181318
* item at the back of the queue, or queueSEND_TO_FRONT to place the item
13191319
* at the front of the queue (for high priority messages).
13201320
*
1321-
* @return pdTRUE if the data was successfully sent to the queue, otherwise
1321+
* @return pdPASS if the data was successfully sent to the queue, otherwise
13221322
* errQUEUE_FULL.
13231323
*
13241324
* Example usage for buffered IO (where the ISR can obtain more than one value
@@ -1389,8 +1389,8 @@ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue,
13891389
* to unblock *pxTaskWoken will get set to pdTRUE, otherwise *pxTaskWoken will
13901390
* remain unchanged.
13911391
*
1392-
* @return pdTRUE if an item was successfully received from the queue,
1393-
* otherwise pdFALSE.
1392+
* @return pdPASS if an item was successfully received from the queue,
1393+
* otherwise pdFAIL.
13941394
*
13951395
* Example usage:
13961396
* @code{c}

portable/CCRH/F1Kx/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# RH850/F1K and F1Kx FreeRTOS Port with CC-RH Compiler
2+
3+
## Introduction
4+
5+
This repository contains the port of FreeRTOS for Renesas RH850/F1K and F1Kx microcontrollers using the CC-RH compiler. The following sections provide instructions on how to use this port, a link to the test project, and other relevant information.
6+
7+
## Prerequisites
8+
- Compiler: CC-RH
9+
- FreeRTOS version 11.1.0
10+
11+
| Device | FPU | SMP |
12+
|----------|-----|-----|
13+
| F1K | Yes | No |
14+
| F1KM-S1 | Yes | No |
15+
| F1KM-S2 | Yes | No |
16+
| F1KM-S4 | Yes | No |
17+
| F1KH-D8 | Yes | Yes |
18+
19+
## Link to Test Project
20+
21+
The test project can be found [here](https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos) (`RH850_F1Kx_CCRH`). This project contains example tasks and configurations to help you get started with FreeRTOS on the RH850/F1K and F1Kx.
22+
23+
## Note
24+
1. Configure IPIR Interrupt: Ensure that the bit specifying the destination for binding (requesting) an interrupt is enabled (e.g: IBDxxx register of F1KH-D8) (1)
25+
2. `Channel 0` and address `0xFFFEEC00` are used as default configuration for configIPIR_CHANNEL and configEXCLUSIVE_ADDRESS, in case of resource confliction other channel/address can be used. (2)
26+
3. The minimal stack size (configMINIMAL_STACK_SIZE) must be included the reserved memory for nested interrupt. This formula can be referred: `(task_context_size) * (1 + configMAX_INT_NESTING) + Stack_depth_of_taskcode`
27+
In which, `task_context_size` is calculated as `36*4bytes = 144bytes` (when FPU enabled) or `34*4bytes = 136` (when FPU disabled), configMAX_INT_NESTING is 02 as default.
28+
4. `configTIMER_PRESCALE`: This value is required in order to correctly configure clock for `CPUCLK_L`. Refer to Hardware Manual at `Table 44.22` for `option byte`: If the user sets the option byte `CKDIVMD to 1`, then `configTIMER_PRESCALE = 4`. Otherwise, if `CKDIVMD is set to 0`, then `configTIMER_PRESCALE = 2`.
29+
30+
(1) This is applicable for F1KH-D8 with SMP only.
31+
32+
(2) This is optional and applicable for SMP only.
33+
34+
## Other Relevant Information
35+
36+
- **Documentation:**
37+
- Refer to the official [FreeRTOS documentation](https://www.freertos.org/Documentation/RTOS_book.html) for detailed information on configuring and using FreeRTOS.
38+
- Consult the [RH850 F1K group user manual hardware manual](https://www.renesas.com/us/en/document/mah/rh850f1k-group-users-manual-hardware?r=1170166) for specific details about the microcontroller.
39+
- For more information about Renesas RH850/F1K and F1Kx, please visit [this website](https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rh850-automotive-mcus)
40+
- The CC-RH compiler can be downloaded [here](https://www.renesas.com/us/en/software-tool/c-compiler-package-rh850-family#downloads)
41+
42+
- **Support:**
43+
- If you encounter any issues or have questions about this port, please open an issue in this repository or contact the maintainer.
44+
45+
- **Contributing:**
46+
- Contributions to improve this port are welcome. Please fork the repository, make your changes, and submit a pull request.

0 commit comments

Comments
 (0)