Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aggarg
Copy link
Member

@aggarg aggarg commented Mar 18, 2023

Description

The configMINIMAL_STACK_SIZE was defined to PTHREAD_STACK_MIN with cast to unsigned short. This cast cab be too restrictive and result in truncation on some platforms. This commit removes this unnecessary cast.

Related Issue

#967

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The configMINIMAL_STACK_SIZE was defined to PTHREAD_STACK_MIN with cast
to unsigned short. This cast cab be too restrictive and result in
truncation on some platforms. This commit removes this unnecessary cast.

Related issue - FreeRTOS#967

Signed-off-by: Gaurav Aggarwal <[email protected]>
@aggarg aggarg requested a review from a team as a code owner March 18, 2023 08:32
@amazonKamath amazonKamath self-requested a review March 20, 2023 16:27
@aggarg aggarg merged commit c8c1c12 into FreeRTOS:main Mar 20, 2023
@aggarg aggarg deleted the remove_cast branch March 20, 2023 16:40
moninom1 pushed a commit to moninom1/FreeRTOS that referenced this pull request Apr 27, 2023
The configMINIMAL_STACK_SIZE was defined to PTHREAD_STACK_MIN with cast
to unsigned short. This cast cab be too restrictive and result in
truncation on some platforms. This commit removes this unnecessary cast.

Related issue - FreeRTOS#967

Signed-off-by: Gaurav Aggarwal <[email protected]>
amazonKamath pushed a commit that referenced this pull request Apr 27, 2023
* Update Readme for the FreeRTOS_PLUS_TCP_ECHO_QEMU_msp2 (#939)

Update Readme for the FreeRTOS_PLUS_TCP_ECHO_QEMU_msp2

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>

* Update TCPEchoClient_SingleTasks.c (#968)

Bug fix for #967

* Remove cast from configMINIMAL_STACK_SIZE (#971)

The configMINIMAL_STACK_SIZE was defined to PTHREAD_STACK_MIN with cast
to unsigned short. This cast cab be too restrictive and result in
truncation on some platforms. This commit removes this unnecessary cast.

Related issue - #967

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Add unit tests for GetStaticBuffer functions (#964)

Add unit tests for the various ...GetStaticBuffer() functions added in
FreeRTOS/FreeRTOS-Kernel#641.
---------

Co-authored-by: Paul Bartell <[email protected]>

* Demo/CORTEX_M3_MPS2_QEMU_GCC: Prepare startup.c for use with --gc-sections

Ensure that the handler2_address_const location will be correctly
aligned when compiled to a separate section.

Add the 'used' attribute to isr_vector to ensure it will not be elided
from the output.

Signed-off-by: Keith Packard <[email protected]>

* Demo/CORTEX_M3_MPS2_QEMU_GCC: Fix use of -ffunction-sections -fdata-sections

For these options to be of any use, they must be passed to the
compiler when building object files and then the --gc-sections flag
must be passed to the linker.

Add -ffunction-sections -fdata-sections to CFLAGS and then add
-Wl,--gc-sections to LDFLAGS.

Signed-off-by: Keith Packard <[email protected]>

* Demo/CORTEX_M3_MPS2_QEMU_GCC: Enable picolibc TLS when needed

When building with Picolibc that has TLS support, enable the relevant
FreeRTOS code.

Signed-off-by: Keith Packard <[email protected]>

* Demo/CORTEX_M3_MPS2_QEMU_GCC: Provide picolibc syscall implementation

Instead of a set of POSIX-compatible APIs as needed by newlib,
picolibc needs a FILE struct allocated that references a function to
output a single character. Picolibc also doesn't need sbrk as it has
its own version

Signed-off-by: Keith Packard <[email protected]>

* Demo/CORTEX_M3_MPS2_QEMU_GCC: Add TLS support to linker script

Allocate ROM for initialized thread local storage variables. Allocate
TLS offsets for all thread local storage variables.

Signed-off-by: Keith Packard <[email protected]>

* Demo/CORTEX_M3_MPS2_QEMU_GCC: Define symbols needed for picolibc sbrk implementation

Picolibc has an internal version of sbrk that uses slightly different
symbol names than the demo provides. Add these in the linker script.

Signed-off-by: Keith Packard <[email protected]>

* Demo/CORTEX_M3_MPS2_QEMU_GCC: Add option to build with picolibc

When built with PICOLIBC=1, selects picolibc as the C library by
removing the newlib-nano linker flags and adding
--specs=picolibc.specs to the compiler flags. This also selects the
integer-only printf variant provided within picolibc to reduce flash
use by adding -DPICOLIBC_INTEGER_PRINTF_SCANF.

Signed-off-by: Keith Packard <[email protected]>

* Demo/RISC-V_RV32_QEMU_VIRT_GCC: Enable configUSE_TRACE_FACILITY

I get a build error when this is not set as it (or
configGENERATE_RUN_TIME_STATS) are required when using
configUSE_STATS_FORMATTING_FUNCTIONS

Signed-off-by: Keith Packard <[email protected]>

* Demo/RISC-V_RV32_QEMU_VIRT_GCC: Set -march=rv32imac_zicsr

Need to add _zicsr for more recent Risc-V toolchains which don't add
this extension to the default set anymore.

Signed-off-by: Keith Packard <[email protected]>

* Demo/RISC-V_RV32_QEMU_VIRT_GCC: Enable picolibc TLS when needed

When building with Picolibc that has TLS support, enable the relevant
FreeRTOS code.

Signed-off-by: Keith Packard <[email protected]>

* Demo/RISC-V_RV32_QEMU_VIRT_GCC: Add TLS support to linker script

Allocate ROM for initialized thread local storage variables. Allocate
TLS offsets for all thread local storage variables.

Signed-off-by: Keith Packard <[email protected]>

* Demo/RISC-V_RV32_QEMU_VIRT_GCC: Add option to build with picolibc

When built with PICOLIBC=1, selects picolibc as the C library, uses
semihosting to display messages and uses picolibc stdio for output.

Signed-off-by: Keith Packard <[email protected]>

* Improve vAssertCalled function to include filename / line number info.

* Enable newlib and picolibc thread local storage

* Increase minimal stack size config to 2048 words

Accomodates increased usage due to newlib thread local storage

* Add register tests to H743ZI2 demo project (#977)

Add register tests to H743ZI2 demo project.

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: kar-rahul-aws <[email protected]>

* Add register tests to Nucleo-L152RE project (#982)

* Add reg tests for CORTEX_MPU_M3_NUCLEO_L152RE

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: kar-rahul-aws <[email protected]>

* Set configMAX_SYSCALL_INTERRUPT_PRIORITY to 4 (#984)

Set configMAX_SYSCALL_INTERRUPT_PRIORITY to 4 instead of 5 to avoid hitting the assert in `Source/portable/GCC/ARM_CM3/port.c` (`configASSERT( ( configMAX_SYSCALL_INTERRUPT_PRIORITY & 0x1U ) == 0U ); `)

* Added a link to the community supported demos repo in the demos readme.txt (#987)

* Added a link to the community supported demos repo in the demos readme.txt

* Update FreeRTOS/Demo/readme.txt

Co-authored-by: Aniruddha Kanhere <[email protected]>

* Update and rename readme.txt to readme.md

---------

Co-authored-by: Aniruddha Kanhere <[email protected]>

* Added support for static memory allocation in FreeRTOS-Plus-CLI (#983)

* Added support for static memory allocation in FreeRTOS-Plus-CLI

* Removed relative include path

* removed whitespace changes

* Removed whitespace changes

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Fix spell check

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Marc-André Harvey <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>

* Add reg tests to LPC55S69 project (#989)

* Update LPCXpresso55S69 SDK to 2.13.1

* Enable print from non-secure side

* Add register tests

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Update M33F simulator Keil example (#990)

* Update M33F simulator Keil example

The example is updated to use latest CMSIS 5.9.0 and Device startup
2.1.0.

Signed-off-by: Devaraj Ranganna <[email protected]>

* Increase timeout and correct config file path in the secure project

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Remove auto-generated files

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Devaraj Ranganna <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>

* Add Reg tests for CORTEX M33F Keil Simulator Project (#991)

* Add Reg tests for CORTEX M33F Keil Simulator Project

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Fix hard fault because of main stack overflow

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>

* Add reg tests to NuMaker M2351 project (#992)

* Add reg tests to NuMaker M2351 project

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Add reg tests for IAR

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Fix formatting check

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Fix header check

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Add reg tests to nRF9160 projects (#1001)

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Fix incorrect file path in the project file (#1000)

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Remove non-existent entry from the project file (#996)

This removes a warning in the IDE.

Signed-off-by: Gaurav Aggarwal <[email protected]>

* Add non trustzone (NTZ) projects for M2351 (#1003)

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Keith Packard <[email protected]>
Signed-off-by: Devaraj Ranganna <[email protected]>
Co-authored-by: kar-rahul-aws <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
Co-authored-by: Darian <[email protected]>
Co-authored-by: Paul Bartell <[email protected]>
Co-authored-by: Keith Packard <[email protected]>
Co-authored-by: kar-rahul-aws <[email protected]>
Co-authored-by: Sergio Soares <[email protected]>
Co-authored-by: Joseph Julicher <[email protected]>
Co-authored-by: Aniruddha Kanhere <[email protected]>
Co-authored-by: tabarnakos <[email protected]>
Co-authored-by: Marc-André Harvey <[email protected]>
Co-authored-by: Devaraj Ranganna <[email protected]>
moninom1 pushed a commit to moninom1/FreeRTOS that referenced this pull request Aug 2, 2023
…table layer. (FreeRTOS#971)

* Fix always warning in Zynq port

* Add ipconfigPORT_SUPPRESS_WARNING to suppress warning messages in portable layer.
every-breaking-wave pushed a commit to every-breaking-wave/FreeRTOS that referenced this pull request Nov 15, 2024
* Initial set of SA fixes

* Revert function parameter name changes

* Reverted parameter name for Static version of function by mistake

* Update mpu_wrappers_v2.c to only include 20.7 fixes

* Update queue.c to remove non-20.7 fixes

* Update tasks.c to remove non-20.7 fixes

---------

Co-authored-by: bjbsmith <[email protected]>
Co-authored-by: chinglee-iot <[email protected]>
Zangetsu112 pushed a commit to Zangetsu112/FreeRTOS-evpp that referenced this pull request Aug 18, 2025
The configMINIMAL_STACK_SIZE was defined to PTHREAD_STACK_MIN with cast
to unsigned short. This cast cab be too restrictive and result in
truncation on some platforms. This commit removes this unnecessary cast.

Related issue - FreeRTOS#967

Signed-off-by: Gaurav Aggarwal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants