Skip to content

Commit

Permalink
Upload freertos 10.4.305.482 [103]
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlab-runner committed Dec 2, 2022
1 parent 20f09a8 commit 085ab13
Show file tree
Hide file tree
Showing 17 changed files with 330 additions and 26 deletions.
18 changes: 13 additions & 5 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@
- FreeRTOS kernel 10.4.3
- Ports for GCC, IAR, Arm® compilers and Cortex®-M0 (CM0), Cortex®-M0+ (CM0P), Cortex®-M4 (CM4), Cortex®-M33 (CM33), Cortex®-R4 (CR4) and Cortex®-M7 (CM7) CPUs
- *FreeRTOSConfig.h* template with the recommended configuration options
- Cortex®-M33 (CM33) and Cortex®-R4 (CR4) are currently supported only on GCC_ARM
- Cortex®-R4 (CR4) is currently supported only on GCC_ARM

See [README.md](./README.md) for a complete description of FreeRTOS.


## Changelog

### v10.4.305

- Added functions to save and restore context before sleep for CM33

### v10.4.304

- Created a common section for frequently called freertos functions

### v10.4.303

- Added Cortex®-M7 (CM7) support based on upstream FreeRTOS kernel version 10.4.3 LTS Patch 2
Expand Down Expand Up @@ -82,11 +90,11 @@ This version of FreeRTOS was validated for compatibility with the following soft

| Software and tools | Version |
| :--- | :----: |
| ModusToolbox™ software environment | 2.4 |
| Peripheral driver library (`mtb-pdl-cat1`) | 2.2.1 |
| ModusToolbox™ software environment | 3.0 |
| Peripheral driver library (`mtb-pdl-cat1`) | 3.0.0 |
| GCC compiler | 10.3.1 |
| IAR compiler | 8.32 |
| Arm® compiler 6 | 6.14 |
| IAR compiler | 9.30 |
| Arm® compiler 6 | 6.16 |


## Known issues
Expand Down
4 changes: 2 additions & 2 deletions Source/portable/COMPONENT_CM0/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ standard names - or at least those used in the unmodified vector table. */

/* Enable low power tickless functionality. The RTOS abstraction library
* provides the compatible implementation of the vApplicationSleep hook:
* https://github.com/cypresssemiconductorco/abstraction-rtos#freertos
* https://github.com/infineon/abstraction-rtos#freertos
*/
extern void vApplicationSleep( uint32_t xExpectedIdleTime );
#define portSUPPRESS_TICKS_AND_SLEEP( xIdleTime ) vApplicationSleep( xIdleTime )
Expand All @@ -178,7 +178,7 @@ extern void vApplicationSleep( uint32_t xExpectedIdleTime );
* GCC toolchain: the application must provide the implementation for the required
* newlib hook functions: __malloc_lock, __malloc_unlock, __env_lock, __env_unlock.
* FreeRTOS-compatible implementation is provided by the clib-support library:
* https://github.com/cypresssemiconductorco/clib-support
* https://github.com/infineon/clib-support
*
* ARM/IAR toolchains: the application must provide the reent.h header to adapt
* FreeRTOS's configUSE_NEWLIB_REENTRANT to work with the toolchain-specific C library.
Expand Down
4 changes: 2 additions & 2 deletions Source/portable/COMPONENT_CM0P/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ standard names - or at least those used in the unmodified vector table. */

/* Enable low power tickless functionality. The RTOS abstraction library
* provides the compatible implementation of the vApplicationSleep hook:
* https://github.com/cypresssemiconductorco/abstraction-rtos#freertos
* https://github.com/infineon/abstraction-rtos#freertos
*/
extern void vApplicationSleep( uint32_t xExpectedIdleTime );
#define portSUPPRESS_TICKS_AND_SLEEP( xIdleTime ) vApplicationSleep( xIdleTime )
Expand All @@ -178,7 +178,7 @@ extern void vApplicationSleep( uint32_t xExpectedIdleTime );
* GCC toolchain: the application must provide the implementation for the required
* newlib hook functions: __malloc_lock, __malloc_unlock, __env_lock, __env_unlock.
* FreeRTOS-compatible implementation is provided by the clib-support library:
* https://github.com/cypresssemiconductorco/clib-support
* https://github.com/infineon/clib-support
*
* ARM/IAR toolchains: the application must provide the reent.h header to adapt
* FreeRTOS's configUSE_NEWLIB_REENTRANT to work with the toolchain-specific C library.
Expand Down
9 changes: 5 additions & 4 deletions Source/portable/COMPONENT_CM33/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,15 @@ standard names - or at least those used in the unmodified vector table. */
*/
#if defined(CY_CFG_PWR_SYS_IDLE_MODE) && \
((CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_SLEEP) || \
(CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_DEEPSLEEP))
(CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_DEEPSLEEP) || \
(CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_DEEPSLEEP_RAM))

/* Enable low power tickless functionality. The RTOS abstraction library
* provides the compatible implementation of the vApplicationSleep hook:
* https://github.com/cypresssemiconductorco/abstraction-rtos#freertos
* https://github.com/infineon/abstraction-rtos#freertos
* The Low Power Assistant library provides additional portable configuration layer
* for low-power features supported by the PSoC 6 devices:
* https://github.com/cypresssemiconductorco/lpa
* https://github.com/infineon/lpa
*/
extern void vApplicationSleep( uint32_t xExpectedIdleTime );
#define portSUPPRESS_TICKS_AND_SLEEP( xIdleTime ) vApplicationSleep( xIdleTime )
Expand All @@ -206,7 +207,7 @@ extern void vApplicationSleep( uint32_t xExpectedIdleTime );
* GCC toolchain: the application must provide the implementation for the required
* newlib hook functions: __malloc_lock, __malloc_unlock, __env_lock, __env_unlock.
* FreeRTOS-compatible implementation is provided by the clib-support library:
* https://github.com/cypresssemiconductorco/clib-support
* https://github.com/infineon/clib-support
*
* ARM/IAR toolchains: the application must provide the reent.h header to adapt
* FreeRTOS's configUSE_NEWLIB_REENTRANT to work with the toolchain-specific C library.
Expand Down
40 changes: 40 additions & 0 deletions Source/portable/COMPONENT_CM33/TOOLCHAIN_ARM/portdsram.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* FreeRTOS Kernel V10.4.3 LTS Patch 2
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* https://www.FreeRTOS.org
* https://github.com/FreeRTOS
*
* 1 tab == 4 spaces!
*/

/* Standard includes. */
#include "portdsram.h"


void vStoreDSRAMContextWithWFI( void )
{
}

void vRestoreDSRAMContext( void )
{
}

/*-----------------------------------------------------------*/
42 changes: 42 additions & 0 deletions Source/portable/COMPONENT_CM33/TOOLCHAIN_ARM/portdsram.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* FreeRTOS Kernel V10.4.3 LTS Patch 2
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* https://www.FreeRTOS.org
* https://github.com/FreeRTOS
*
* 1 tab == 4 spaces!
*/

#ifndef __PORT_DSRAM_H__
#define __PORT_DSRAM_H__

/**
* @brief Store the context before entering DS-RAM and enter WFI
*/
void vStoreDSRAMContextWithWFI( void );

/**
* @brief Restore the context after wake up from DS-RAM(System will go through Warm boot)
*/
void vRestoreDSRAMContext( void );


#endif /* __PORT_DSRAM_H__ */
91 changes: 91 additions & 0 deletions Source/portable/COMPONENT_CM33/TOOLCHAIN_GCC_ARM/portdsram.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
* FreeRTOS Kernel V10.4.3 LTS Patch 2
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* https://www.FreeRTOS.org
* https://github.com/FreeRTOS
*
* 1 tab == 4 spaces!
*/

/* Standard includes. */
#include "portdsram.h"
/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE ensures that PRIVILEGED_FUNCTION
* is defined correctly and privileged functions are placed in correct sections. */
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE

/* Portasm includes. */
#include "portasm.h"

/* MPU_WRAPPERS_INCLUDED_FROM_API_FILE is needed to be defined only for the
* header files. */
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE

FREERTOS_COMMON_SECTION_BEGIN
void vStoreDSRAMContextWithWFI( void ) /* __attribute__ (( naked )) PRIVILEGED_FUNCTION */
{
__asm volatile
(
" .syntax unified \n"
" stmdb sp!, {r1-r11, lr} \n" /* Store reg on the stack*/
" mrs r1, psplim \n" /* r1 = PSPLIM. */
" mrs r2, control \n" /* r2 = Control. */
" adr r3,wfi_exit + 1 \n"
" stmdb sp!, {r1-r3} \n" /* Store on the stack - PSPLIM, Control Return Address */
" \n"
" ldr r2, =pxCurrentTCB \n" /* Read the location of pxCurrentTCB i.e. &( pxCurrentTCB ). */
" ldr r1, [r2] \n" /* Read pxCurrentTCB. */
" mrs r0, psp \n" /* Read PSP in r0. */
" str r0, [r1] \n" /* Save the new top of stack in TCB. */
" wfi \n"
" isb \n"
" add sp, sp, #12 \n" /* We we do not enter DSRAM pop-out PSPLIM, Control Return Address*/
"wfi_exit: dsb \n"
" ldmia sp!, {r1-r11, pc} \n"
);
}
FREERTOS_COMMON_SECTION_END

FREERTOS_COMMON_SECTION_BEGIN
void vRestoreDSRAMContext( void )
{
__asm volatile
(
" ldr r2, pxCurrentTCBConstE1 \n" /* Read the location of pxCurrentTCB i.e. &( pxCurrentTCB ). */
" ldr r1, [r2] \n" /* Read pxCurrentTCB. */
" ldr r0, [r1] \n" /* The first item in pxCurrentTCB is the task top of stack. r0 now points to the top of stack. */
" \n"
" ldmia r0!, {r1-r3} \n" /* Read from stack - r1 = PSPLIM, r2 = CONTROL, r3 = LR */
" \n"
" msr psplim, r1 \n" /* Restore the PSPLIM register value for the task. */
" msr psp, r0 \n" /* restore stacks */
" ldr r0, MSPStackTop \n"
" msr msp, r0 \n"
" msr CONTROL, r2 \n"
" isb \n"
" bx r3 \n"
" \n"
" .align 4 \n"
"pxCurrentTCBConstE1: .word pxCurrentTCB \n"
"MSPStackTop: .word __StackTop \n"
);
}
FREERTOS_COMMON_SECTION_END
/*-----------------------------------------------------------*/
42 changes: 42 additions & 0 deletions Source/portable/COMPONENT_CM33/TOOLCHAIN_GCC_ARM/portdsram.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* FreeRTOS Kernel V10.4.3 LTS Patch 2
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* https://www.FreeRTOS.org
* https://github.com/FreeRTOS
*
* 1 tab == 4 spaces!
*/

#ifndef __PORT_DSRAM_H__
#define __PORT_DSRAM_H__

/**
* @brief Store the context before entering DS-RAM and enter WFI
*/
void vStoreDSRAMContextWithWFI( void );

/**
* @brief Restore the context after wake up from DS-RAM(System will go through Warm boot)
*/
void vRestoreDSRAMContext( void );


#endif /* __PORT_DSRAM_H__ */
40 changes: 40 additions & 0 deletions Source/portable/COMPONENT_CM33/TOOLCHAIN_IAR/portdsram.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* FreeRTOS Kernel V10.4.3 LTS Patch 2
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* https://www.FreeRTOS.org
* https://github.com/FreeRTOS
*
* 1 tab == 4 spaces!
*/

/* Standard includes. */
#include "portdsram.h"


void vStoreDSRAMContextWithWFI( void )
{
}

void vRestoreDSRAMContext( void )
{
}

/*-----------------------------------------------------------*/
Loading

0 comments on commit 085ab13

Please sign in to comment.