Commit Graph

1359 Commits (p3_rel_wip)

Author SHA1 Message Date
kar-rahul-aws 86092070b3 [AUTO][RELEASE]: Bump file header version to "202411.00" 3 months ago
Monika Singh 26d0c3041d [P3] Update FreeRTOS cmock to v2.5.3 (#1251)
* Update libraries to LTS version

* Fix doxygen link

* Update cmock to v2.5.3

* Update FreeRTOS/Test/CMock/CMoc
6 months ago
Monika Singh 7ce50582be [P3] Update Partner/Community supported demos (#1249) 6 months ago
Monika Singh af4d9efe43 Update libraries to LTS version 6 months ago
Gaurav-Aggarwal-AWS 0bf833bb02 Fix crash on Ubuntu 24.04 ARM64 (#1253)
On Ubuntu 24.04 ARM64, PTHREAD_STACK_MIN is 0x20000 which does not fit
in unsigned short, size of which is 2 bytes. Casting PTHREAD_STACK_MIN
to unsigned short in FreeRTOSConfig.h results in
configMINIMAL_STACK_SIZE getting defined to 0 which leads to SIGSEV.

This change removes the not needed casting of PTHREAD_STACK_MIN to
unsigned short.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
6 months ago
Monika Singh 66e1e57e2a Remove redundant TCP includes in FreeRTOS CBMC proofs (#1254)
* Remove unnecessary TCP includes

* Update comment
6 months ago
Rahul Kar e72d72c831 ARMv7-R No_GIC Port Demo (#1236)
Add ARM_CRx_No_GIC_Demo
6 months ago
Niklas 30d2805d14 fix AbortDelay.c Test (#1237)
* fix AbortDelay.c Test

* Uncrustify: triggered by comment.

* Update comment

* Fix formatting

---------

Co-authored-by: Niklas Jenner <niklas.jenner@ifta.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Monika Singh <moninom@amazon.com>
6 months ago
Florian La Roche 6fab57ad3c CORTEX_MPU_M3_MPS2_QEMU_GCC: remove unused defines (#1233)
From CORTEX_MPU_M3_MPS2_QEMU_GCC remove unused configNUM_TX_DESCRIPTORS
define and remove HEAP3 from as heap_4.c is used.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
6 months ago
Florian La Roche 6872fc8f28 Posix_GCC: use complete function declaration (#1234)
complete function declaration for Posix_GCC

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
6 months ago
Florian La Roche 32bed35d2c Posix_GCC: update compiler options (#1227)
Posix_GCC: update compiler options

1. Add to CFLAGS
   - add -O0 optimization for debug builds.
   - add -O3 optimization for release builds. 
2. Update signal handler `handle_sigint()` to use
  `_exit()` instead of `exit()`. Normal exit() is not allowed
  within a signal handler.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
6 months ago
Florian La Roche 0d8b8f8bd3 MPS2_AN385 improvements (#1225)
* MPS2_AN385 improvements

Sync various MPS2_AN385 CORTEX-M3 QEMU targets and improve their
Makefiles and cleanup gcc support:
- FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2:
  - Makefile
    - output image size after linking
    - move -nostartfiles from compiler to linker flags
    - modernize compiler warning flags
    - add --gc-sections to linker flags
  - TCPEchoClient_SingleTasks.c: fix compiler warnings
  - main.c: fix compiler warnings (remove unused code)
  - main_networking.c
    - remove ipLOCAL_MAC_ADDRESS (unknown)
    - fix compiler warnings about unused params
  - startup.c: main(void), remove unused includes,
    silence  unused params
  - syscalls.c: remove unused defines, silence unused params,
    more compact _sbrk()
- FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/build/gcc:
  - Makefile
    - CFLAGS/LDFLAGS in more readable lines
    - move -nostartfiles to linker flags
    - comment out -specs=rdimon.specs as it is not needed
  - startup_gcc.c: fix typo in comment, remove unused uart code
- FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC
  - Makefile
    - after compilation output size of image
    - remove -DQEMU_SOC_MPS2, not needed
    - update many CFLAGS/LDFLAGS settings to more modern gcc/source
    - -ffunction-sections -fdata-sections is moved to CFLAGS
  - startup.c: sync with other ports
  - syscall.c: _write(): param buf is not unused, silence unused params

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>

* remove ipLOCAL_MAC_ADDRESS completely and fix formatting errors

remove ipLOCAL_MAC_ADDRESS completely and fix formatting errors

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
6 months ago
Florian La Roche 491f9130cd Demo/CORTEX_MPS2_QEMU_IAR_GCC add path to IMAGE and remove mapfile (#1223)
For Demo/CORTEX_MPS2_QEMU_IAR_GCC gcc Makefile:
- simplify IMAGE var to already include full path
- clean target also removes mapfile

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
6 months ago
Florian La Roche 625a18d8e1 Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC/syscall.c: remove unused g_ulBase (#1224)
In FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC/syscall.c the
extern definition of g_ulBase ist not used, so remove it.
Also move _heap_bottom and _heap_top to where they are used
in syscall.c.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
6 months ago
Florian La Roche 140ce29320
Demo/CORTEX_MPS2_QEMU_IAR_GCC cleanup (#1213)
Some small changes for Demo/CORTEX_MPS2_QEMU_IAR_GCC:
- FreeRTOSConfig.h: define configENABLE_BACKWARD_COMPATIBILITY to 0
- build/gcc/Makefile: remove unused SUB_MAKEFILE_DIR
- build/gcc/Makefile: no trailing slash(/) for FREERTOS_ROOT
- build/gcc/Makefile: commented out, but prepared:
   - CFLAGS += -Wpedantic -Wshadow -fanalyzer
   - CFLAGS += -flto
- build/gcc/startup_gcc.c:
   - "__attribute__( ( naked ) )" for Reset_Handler
   - "__attribute__( ( used ) )" for isr_vector and prvGetRegistersFromStack

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
10 months ago
Florian La Roche 022447b855
Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC: optimize _sbrk() (#1211)
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>
10 months ago
Florian La Roche 17eeb79698
Demo/Posix_GCC cleanup (#1212)
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>
10 months ago
wat 2b499ab780
[WIN32-MingW Demo] Modify project setting files to resolve compiler errors on Eclipse (#1203)
* 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>
10 months ago
chinglee-iot dd4789cdba
Update kernel submodule for vTaskSuspendAll change (#1207)
* Update kernel submodule pointer for vTaskSuspendAll change
10 months ago
chinglee-iot 28177788d0
Fix vTaskSuspendAll assertion unit test (#1204)
* Update kernel submodule to address vTaskDelete and vTaskSuspend change
10 months ago
Keith Packard eb97c5d325
Make a couple of demos build using picolibc (#1202)
* [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>
10 months ago
wat 7514cd3d54
[WIN32-MSVC Demo] Define TickType_t width based on the target platform(32bit/64bit). (#1201)
* [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.
10 months ago
Soren Ptak 4592acca4c
Update Cortex R4F and Cortex R5F MPU Demos (#1200)
* Set configUSE_EVENT_GROUPS to 0 in the CORTEX_MPU_R4/5F Demos.
* Update the FreeRTOS-Kernel submodule to use the latest FreeRTOS-Kernel.
11 months ago
wat 076430b2ab
[WIN32-MingW Demo] TickType_t width is defined based on compiler type.(32bit/64bit) (#1199)
* [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>
11 months ago
Soren Ptak 273fb94328
ARMv7-R MPU Port Demos (#1149)
* 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.
---------
11 months ago
Rahul Kar 857962d638
Add support to build Posix Demo with Dynamic Allocation (#1198)
Add support for dynamic allocation in posix demo
11 months ago
ActoryOu c5c41ef3af
Update result section in README under CBMC folder. (#1196)
* Update result section in README under CBMC folder

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update proofs result path

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
11 months ago
Rahul Kar 7de1b5098d
Add separate compile option for tracing functionality in Posix demo (#1194)
* Add compile option for enabling tracing in cmake file *
11 months ago
chinglee-iot 2bb9bca68b
Update kernel submodule pointer for xTaskGetHandle unit test (#1191) 11 months ago
chinglee-iot 3f24270b4a
Update kernel xtaskGetHandle unit test (#1186) 11 months ago
Rahul Kar 77cc06d692
Fix demo build issue , when configUSE_TRACE_FACILITY is disabled (#1189)
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.
11 months ago
chinglee-iot 2adaf8471f
Add SMP disable preemption on target test (#1175)
* Add SMP disable preemption on target test

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
12 months ago
chinglee-iot d9ced6e8ac
Add SMP schedule affinity on target test (#1172)
* Add SMP schedule affinity on target test

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
12 months ago
chinglee-iot ec0eae4c0f
Add SMP disable multiple priorities on target test (#1171)
* Add SMP disable multiple priorities on target test

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
12 months ago
chinglee-iot 731a4f05fd
Add SMP schedule highest priority on-target test (#1167)
* Add SMP scheduler highest priority task on target test

---------

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>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
12 months ago
chinglee-iot d1ef345165
Calling vTaskEndScheduler in application created task (#1187) 12 months ago
RichardBarry 7cd180d914
Add register test tasks to QEMU project (#765)
* 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>
12 months ago
RichardBarry 8e8dad2b09
Update some tests to report error line numbers (#747)
* 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>
12 months ago
RichardBarry 6a8e2ba7dc
The zc702 Configuration QEMU.launch file contained an absolute path. This commit makes it project relative. (#761)
Co-authored-by: none <>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
12 months ago
Rahul Kar 5fc7a750a0
update CMakeLists.txt for Posix GCC Demo (#1185) 1 year ago
chinglee-iot 2f85ed9bf6
Add SMP schedule equal priority on target test (#1170)
* Add SMP schedule equal priority on target test

* Remove unnecessary config

* Fix spelling format and header

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
1 year ago
chinglee-iot 3878dd9657
Add SMP one task enter suspendall on target test (#1183)
* Add SMP one task enter suspendall on target test

* Fix format and spelling

* Code review suggestions

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
1 year ago
chinglee-iot 9cb29445cd
Add SMP suspend scheduler on target test (#1184)
* Add SMP suspend scheduler on target test

* Code review suggestion

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
1 year ago
chinglee-iot 5be0af160b
Update kernel submodule for task notify change (#1182) 1 year ago
Darian ce28d94516
Update unit tests due to task notification changes (#1177)
This commit updates the CMock unit tests according to the changes introduced
to https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/982.

Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
1 year ago
chinglee-iot b31b3d4eb3
Update kernel submodule to address vTaskDelete and vTaskSuspend change (#1179) 1 year ago
chinglee-iot 3c5fbc769b
Update unit test to address vTaskDelete and vTaskSuspend change for SMP (#1178)
* Update the unit test to address the problem task self void state change
1 year ago
chinglee-iot 457ca860c1
Update kernel submodule for vTaskEndScheduler and vTaskDelete unit test (#1169) 1 year ago
chinglee-iot 269b16a03a
Fix unit test for vTaskEndShceduler (#1163)
* Update unit test for vTaskEndScheduler change
* test_coverage_vTaskDelete_scheduler_not_running is removed due to vTaskDelete implementation change

---------

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
1 year ago
chinglee-iot 8422d79383
Update on target test for passive idle hook (#1128)
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
1 year ago