Optimize _sbrk() from runtime to compiletime initialization.
Fix compiler warnings by adjusting (void *) and (char *) types.
Complete function declarations for uart_init() and _getpid().
Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Demo/Posix_GCC cleanup
- Guard prvSaveTraceFile() function definition.
- Remove "cid" as it is unused.
- handle_sigint(): quiet compiler warning about unused param.
- main_full.c: prvCheckTask(): Remove unused var "xHeapStats".
Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
* Exclude unnecessary directories from build.
1. "FreeRTOS/Source/example"
2. "FreeRTOS+Trace Recorder/extras"
3. "FreeRTOS+Trace Recorder/kernelports/BareMetal"
4. "FreeRTOS+Trace Recorder/kernelports/ESP-IDF_FreeRTOS"
5. "FreeRTOS+Trace Recorder/kernelports/ThreadX"
6. "FreeRTOS+Trace Recorder/kernelports/Zephyr"
1 is applied to both of "Debug" configuration and "Debug_CodeCoverage" configuration.
Others are applied to only "Debug" configuration because those directories are already excluded from build on "Debug_Coverage" configuration.
* Include path setting is modified.
1.Directory name is modified.("Include" -> "include")
2.New path is added.(FreeRTOS+Trace Recorder/kernelports/FreeRTOS/include)
These modifications are needed to build "Debug" configuration. They are not needed for "Debug_CodeCoverage" configuration because these paths are not used. But these modifications are applied to both of "Debug" configuration and "Debug_CodeCoverage" configuration because of future potential risk.
* [WIN32-MingW Demo] Replace "Exclude from Build" by "Resource Filter".
"Resource Filter" is better than "Exclude from Build" because "Resource Filter" makes excluded directories invisible on Eclipse GUI. But some directories are still "Exclude from Build" because they should be excluded only on "Debug_CodeCoverage" configuration. "Resource Filter" cannot be specified to each configuration separately.
* Code review suggestions
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
---------
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
* [RISC-V-Qemu-virt_GCC Demo] Add picolibc support
Add minimal picolibc support:
* Use --specs=picolibc.specs to direct gcc at picolibc
* Use -DPICOLIBC_INTEGER_PRINTF_SCANF to enable smaller printf implementation
* Enable configUSE_PICOLIBC_TLS for thread local storage
* Add TLS section to linker script
Signed-off-by: Keith Packard <keithpac@amazon.com>
* [CORTEX_MPU_M3_MPS2_QEMU_GCC Demo] Add picolibc support
Add minimal picolibc support to this demo
* Use --specs=picolibc.specs to direct gcc at picolibc
* Use -DPICOLIBC_INTEGER_PRINTF_SCANF to enable smaller printf implementation
* Enable configUSE_PICOLIBC_TLS for thread local storage
* Add TLS section to linker script
* Replace newlib syscall hooks with picolibc ones
Signed-off-by: Keith Packard <keithpac@amazon.com>
---------
Signed-off-by: Keith Packard <keithpac@amazon.com>
Co-authored-by: Keith Packard <keithpac@amazon.com>
* [WIN32-MSVC Demo] Add tick type width definition based on the target platform.(32bit/64bit)
32bit TickType_t is used on Win32 target. 64bit TickType_t is used on x64 target.
Reason of change: Before this change, 32bit TickType_t is always used in MSVC demo. It is inefficient for 64bit target. In addition, compiler reported warnings for the cast operation between TickType_t and (void *) pointer if the target is x64 because of different width. 64bit TickType_t should be used instead of 32bit if target is 64bit.
* [WIN32-MSVC Demo] Change type of some variables from uint32_t to UBaseType_t.
Reason of change: These variables are cast to/from pointer type in existing codes. x64 compiler reports warnings for the cast operations between uint32_t and pointer type. UBaseType_t solves those warnings because it has same width as pointer type on both of Win32 platform and x64 platform.
* [WIN32-MSVC Demo]Correct prefix of variables and indent to follow coding style guide.
* [WIN32-MSVC Demo]Correct type of the argument in vApplicationGetIdleTaskMemory() prototype declaration.
It is corrected to match original declaration described in task.h.
* [WIN32-MSVC] Add cast operation to solve compiler warnings on x64 platform.
Before this change, compiler claimed that the cast operation to wider type should be applied before other arithmetic operations because of overflow risk. There is no overflow risk here but it is modified to solve compiler warnings.
* [WIN32-MingW Demo] Add tick type width definition based on compiler type.(32bit/64bit)
32bit TickType_t is used if compiler is MinGW32. 64bit TickType_t is used if compiler is MinGW64.
Reason of change: Before this change, 32bit TickType_t is always used in MinGW demo. It is inefficient for 64bit compiler. In addition, MinGW64 reported warnings for the cast operation between TickType_t and (void *) pointer because of different width. 64bit TickType_t should be used instead of 32bit if compiler is 64bit.
* [WIN32-MingW Demo] Change printf() format specifiers from %u to %llu.
Reason of change: %u specifier corrupts 64bit tick count because it supports only 32bit value. %llu can be used for both of 64bit value and 32bit value.(After casting to 64bit)
* [WIN32-MingW Demo] Change type of some variables from uint32_t to UBaseType_t.
Reason of change: These variables are cast to/from pointer type in existing codes. 64bit compiler(MinGW64) reports warnings for the cast operations between uint32_t and pointer type. UBaseType_t solves those warnings because it has same width as pointer type on both of MinGW32 and MinGW64.
* [WIN32-MingW Demo] Change type of some variables from uint32_t to UBaseType_t.
Same change as previous commit is applied to source codes which are built only on Debug configuration.
* [WIN32-MingW Demo] Add brackets to the condition in #if statement. Behavior is not changed. Reason of change is to follow coding style guide of FreeRTOS.
* Update "FreeRTOS/Source" submodule(FreeRTOS-kernel) to #1008.
* [WIN32-MingW Demo] Change type of one more variable from uint32_t to UBaseType_t.
Additional modification for solving compiler warnings for the cast operation on MinGW64.
* Update FreeRTOS-kernel submodule version in manifest.yml.
* Modify prefix of variables to follow coding style guide.
* Code review suggestions
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
---------
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: ActoryOu <ousc@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
* Add in a Cortex R5F MPU demo for the Hercules RM57 Development Kit.
* Add in a Cortex R4F MPU demo for the Hercules RM46 Development Kit.
* Provide a Code Composer Studio (CCS) project for running these demos.
* Provide a CMakeLists.txt file to allow for compilation of the demos without use of an IDE.
* Add a CI-CD build of these demos using CMake with Fetch-Content.
* Include necessary README to explain the new demos.
---------
This PR enables the FreeRTOS Posix Blinky GCC Demo to be used without the configUSE_TRACE_FACILITY enabled. It is achieved by using `-DNO_TRACING=1` CMake option to disable tracing. By default, -DNO_TRACING is set to 0, and the tracing is enabled.
* Add register test tasks to the CORTEX_MPS2_QEMU_IAR GCC and IAR builds.
* Update header comment in the two added files.
* Fix header checks
* Fix build issue
* update IAR version
---------
Co-authored-by: none <>
Co-authored-by: Rahul Kar <karahulx@amazon.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
* To assist debugging, update a subset of demos to store the line number on which an error is detected rather than just storing a boolean as to whether an error detected or not.
* Correct return value of xAreInterruptSemaphoreTasksStillRunning() made incorrect by the prior commit.
* Uncrustify: triggered by comment.
---------
Co-authored-by: none <>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
Co-authored-by: Rahul Kar <karahulx@amazon.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Add x64 configuration to Win32-MSVC demo.
This was originally contributed in this PR - #1139
---------
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: José Simões <jose.simoes@eclo.solutions>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
* Update kernel
Update kernel to bring in a fix for MSP430 task initialization.
* msp430_GCC: Decrease heap size to avoid stack overflow
With 1800 bytes allocated to the heap, the stack overflows while
initializing tasks. Decrease the heap size so we have a bit more space
for the initial stack. We are using most of the heap, so 100 bytes is
about as much as we can decrease it by.
The line 'Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.'
used to have two spaces between the first and second sentences.
This would cause the header check to fail due to the copyright regex located
ab999f9624/.github/scripts/core_checker.py (L396)
* Refactor the trap handler macro
Since `portasmHANDLE_INTERRUPT` is removed at FreeRTOS-kernel, Riscv re-factoring (#444) (commit: 9efca75d1e)
We don't need this definition anymore
We also remove the unused function definition
* Styling the file header to pass the checker
Remove an extra space
Co-authored-by: ztex <ztex030640417@gmail.com>
* Bump up to MBed-TLS V3.5.1, make changes to Visual Studio Projects to account for this.
* Update MBedTLS Transport files to call psa_crypto_init() if the MBEDTLS_PSA_CRYPTO_C is set.
* Add WIN32_LEAN_AND_MEAN to the corePKCS11_MQTT_Mutual_Auth_Windows_Simulator demo. Add in a check for MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET when making a TLS handshake.
* Change transport interface files from using void * to mbedtls_pk_context * instead per changes in the MbedTLS API.
* Changes to Fleet Provisioning Demo and Demo Setup to use ECDSA keys
* Remove non-32 bit configs from various VisualStudio Projects. Enforce all projects using WIN32_LEAN_AND_MEAN as well as winsock2.h
This PR updates FreeRTOS-Plus-Trace to a submodule pointer and
updates the relevant project files. Percepio recommends to use
streaming to ring buffer on a 64-bit system instead of snapshot
and therefore, POSIX demo is updated to use streaming to ring
buffer.
* Update unit test to cover idle task name longer than configMAX_TASK_NAME_LEN
* Update community supported demo submodule pointer
* Update kernel submodule pointer
* Update CBMC test
---------
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Install FreeRTOS trap handler
The application is supposed to program mtvec correctly depending on
whether they want to use vectored interrupt or not.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Use new version of CI-CD Actions, checkout@v3 instead of checkout@v2 on all jobs
* Use cSpell spell check, and use ubuntu-20.04 for formatting check
* Add in bot formatting action
* Update freertos_demo.yml and freertos_plus_demo.yml files to increase github log readability
* Add in a Qemu demo onto the workflows.
Enable Werror for Posix Demo Coverage Test target
Werror cannot be enabled for the non coverage test because tracelyzer
code generates warnings in that target.
Also add "Build Posix_GCC Demo for Coverage Test" in the PR checks to
catch warnings from kernel code in PR checks.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
1. Add macro configUSE_MPU_WRAPPERS_V1 to allow Demo compatibility with
the old mpu wrapper .
2. Add Dummy xMPU_SETTINGS in portmacro.h file for Unit Tests .
Signed-off-by: kar-rahul-aws <karahulx@amazon.com>
* test full demo
* Revert "test full demo"
This reverts commit 09efa00ec0a3f021f190112fa11bc0f4c6c058bb.
revert back to origin
* pre-define user demo to blinky demo
* pre-define user demo to blinky demo with -j
* test run win32-msvc demo
* test run win32-msvc demo
* test run win32-msvc demo
* update git workflow to run WIN32-MSVC demo
* update git workflow to run WIN32-MSVC demo
* update git workflow to run WIN32-MSVC demo
* update git workflow to run WIN32-MSVC demo
* update git workflow to run WIN32-MSVC demo
* update git workflow to run WIN32-MSVC demo
* update git workflow to run WIN32-MSVC demo
* update trigger action
* build and run WIN32-MSVC blinky demo
* build and run WIN32-MSVC blinky demo
* build and run WIN32-MSVC blinky demo
* update WIN32-MSVC workflow
* update WIN32-MSVC Demo main.c file to remove buffer
* Update main.c files to remove buffer when running executable_monitor file for Git Action
* update formatting for WIN32-MSVC demos
* update formatting for Posix demo
* update comment for setvbuf function used in main.c
* add git build and run action for WIN32-MingW Full and Blinky demos; update main.c file to set buffer size as 0
* add git build and run action for WIN32-MingW Full and Blinky demos; update main.c file to set buffer size as 0
* remove whitespace for freertos_demos.yml file
* add function to Force stdout to write immediately by setting the buffer size for it to 0 in demo main.c file when running git Run Action; Correct formatting error for WIN32-MingW main.c file
* add function to Force stdout to write immediately by setting the buffer size for it to 0 in demo main.c file when running git Run Action
* update git run action commands for Posix_GCC demo
* update git run action commands for Posix_GCC demo
* update git run action commands for Posix_GCC demo
* reduce timeout and correct formatting issue
* reduce timeout
---------
Co-authored-by: Xiaodong Li <xiaodonn@amazon.com>