Commit graph

911 commits

Author SHA1 Message Date
Kovacsics Robert
e933faf3ee
Fix build of & add CMake to LM3S Qemu Demo (#1368)
* Demo/CORTEX_LM3S6965_GCC_QEMU: Trim trailing spaces & lines

* Demo/CORTEX_LM3S6965_GCC_QEMU: Fix Eclipse build 1/2 (examples)

It was trying to build the examples, which pulled in symbols such as
`_write` that are not implemented.

* Demo/CORTEX_LM3S6965_GCC_QEMU: Fix Eclipse build 1/2 (discard .ARM.exidx)

Somewhere along the line now there is the .ARM.exidx section in the
files, we don't use exceptions so can just discard it.

* Demo/CORTEX_LM3S6965_GCC_QEMU: Add CMake

* Debug/CORTEX_LM3S6965_GCC_QEMU: Fix Qemu startup

It was tripping on port.c

        /* Check that the maximum system call priority is nonzero after
         * accounting for the number of priority bits supported by the
         * hardware. A priority of 0 is invalid because setting the BASEPRI
         * register to 0 unmasks all interrupts, and interrupts with priority 0
         * cannot be masked using BASEPRI.
         * See https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */
        configASSERT( ucMaxSysCallPriority );

Inspecting the value ucMaxPriorityValue gave 0xE0, and setting it to
0xE0 complains about overflow in
FreeRTOS/Demo/CORTEX_LM3S6965_GCC_QEMU/LocalDemoFiles/IntQueueTimer.c:57

    /* Shift left 5 as only the top 3 bits are implemented. */
    IntPrioritySet( INT_TIMER2A, configMAX_SYSCALL_INTERRUPT_PRIORITY + ( 1 << 5 ) );

* Add qemu options to run in headless mode

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

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2025-08-15 12:48:14 +05:30
Florian La Roche
1aa47857a0
Various Qemu Cortex M3 ports now support picolibc (#1364)
* Various Qemu Cortex M3 ports now support picolibc

Allow various Qemu Cortex M3 ports to compile against
picolibc. Also support "-flto" to work correctly.
Tested with picolibc in current Debian 13.
Just use "PICOLIBC=1 make" to switch over from default newlib.

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

* Add ffreestanding

Signed-off-by: Ubuntu <ubuntu@ip-172-31-15-241.ap-south-1.compute.internal>

* Fix formatting check

Signed-off-by: Ubuntu <ubuntu@ip-172-31-15-241.ap-south-1.compute.internal>

---------

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Signed-off-by: Ubuntu <ubuntu@ip-172-31-15-241.ap-south-1.compute.internal>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-15-241.ap-south-1.compute.internal>
2025-08-13 20:15:54 +05:30
Florian La Roche
e0aa5eac74
Fix optimization bug and cleanup (#1363)
- Compiling Demo/Common/Minimal/TimerDemo.c with "gcc -flto" breaks the
  tests, so add "volatile" modifier to "ucOneShotTimerCounter" to fix
  this.
- In Demo/FreeRTOS_Plus_TCP_Echo_Qemu_mps2/main_networking.c print the
  network configuration even more visible.
- In MessageBufferDemo.c and Demo/Posix_GCC/main_full.c fix compiler
  warnings from "gcc -Wwrite-strings" by adding a const modifier.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2025-07-08 11:05:01 +05:30
Florian La Roche
722d17b13a
POSIX Demo: clang warnings cleanup (#1359)
Cleanup for clang compiler warnings:
- add "#include" to proper header files
- add "static" modifier to some vars
- if tracing is disabled, do not compile helper functions
- remove unused macro "mainFLASH_TASK_PRIORITY"

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2025-06-19 14:02:36 +05:30
Dan Petrisko
9b5e277a6f
update alignment in RISC-V-spike-htif_GCC (#1357) 2025-06-13 12:42:47 +05:30
Florian La Roche
d1136b4857
Demo/CORTEX_MPS2_QEMU_IAR_GCC: fix warnings (#1352)
* Demo/CORTEX_MPS2_QEMU_IAR_GCC: fix warnings

* fix compiler warning "gcc -Wmissing-prototypes" in startup_gcc.c
* fix compiler warning "gcc -Wredundant-decls" in main.c
* change stack size from 88 to 128
* change heap from 60 to 64 Kbyte

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

* Increase heap size for tracing on

---------

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Rahul Kar <118818625+kar-rahul-aws@users.noreply.github.com>
2025-06-11 20:41:51 +05:30
Florian La Roche
1fb5ee4dad
Demo/Common/Minimal/StreamBufferInterrupt.c: more strict result checking (#1356)
From looking at the code, I think this more strict error checking
was intended in xIsInterruptStreamBufferDemoStillRunning().
If not, then the else part and var could be completely removed
as dead code.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2025-06-11 12:47:56 +05:30
Florian La Roche
67bc5a930d
Demo/Posix_GCC: fix compiler flags and compiler warnings (#1351)
- Change CMakeLists.txt to set the C compiler flags instead
  of the C++ compiler flags.
- Change to compiler warnings from "gcc -Wconversion" in
  main_full.c.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Tony Josi <tonyjosi@amazon.com>
2025-06-04 11:15:09 +08:00
Florian La Roche
9d9bbd0e61
Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC: support "gcc -flto" and fixes (#1353)
* Fix compiler warning "gcc -Wmissing-prototypes" in startup.c.
* For "gcc -flto" fix duplicate labels in asm (startup.c) and mark
  some functions as "used" in startup.c and syscalls.c.
* Fix "gcc -Wredundant-decls" in main.c.

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2025-05-26 15:47:12 +05:30
Florian La Roche
1ca9fd442f
clean up warnings from "gcc -Wconversion" (#1344)
* clean up warnings from "gcc -Wconversion"

clean up warnings from "gcc -Wconversion"

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

* Fix formatting

---------

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Rahul Kar <karahulx@amazon.com>
2025-04-29 21:24:39 +05:30
Luca Mannella
9165944664
Align stack size to 16-byte boundary by changing __stack_size from 350 to 352​ (#1335)
This commit updates the __stack_size definition in the
linker flags, changing its value from 350 to 352. This
change ensures that the stack size is a multiple of 16,
aligning the stack pointer (sp) to a 16-byte boundary
as required by the system architecture.​
2025-04-08 11:24:31 +05:30
Jonathan Cubides
2625a12c04
Update demo RISCV qemu demo to check the vector context save (#1334)
Demo: RISC-V_RV32_QEMU_VIRT_GCC: Add a test for vector registers
2025-03-31 21:08:39 +05:30
Jonathan Cubides
881305dcb8
Update RV32 qemu Demo to support RVA23 (#1329)
* Demo: RISC-V_RV32_QEMU_VIRT_GCC: Increase the memory for RVA23 compilation

* Demo: RISC-V_RV32_QEMU_VIRT_GCC: Update the regtest to include fpu registers

* Demo: RISC-V_RV32_QEMU_VIRT_GCC: Fix small issues for 64-bit configs

* Demo: RISC-V_RV32_QEMU_VIRT_GCC: Enable FPU unit

* Demo: RISC-V_RV32_QEMU_VIRT_GCC: Enable compilation for RVA23 platforms

* Demo: RISC-V_RV32_QEMU_VIRT_GCC: Fix copyright related CI issues

* Demo: RISC-V_RV32_QEMU_VIRT_GCC: Update submodule manifest

* Demo: RISC-V_RV32_QEMU_VIRT_GCC: Update a few typos and left overs

* Demo: RISC-V_RV32_QEMU_VIRT_GCC: Apply @aggarg's sugestions

* Update pointer to Freertos-Kernel
2025-03-10 17:06:13 +05:30
Florian La Roche
2abeb3e52f
Demo/CORTEX_MPS2_QEMU_IAR_GCC: increase min stack size from 80 to 88 (#1332)
Compiling this demo with picolibc 1.8.9 (as packaged with Debian trixie)
results in a stack overflow. Increasing the minimal stack size from
80 to 88 bytes resolves this. (Debian trixie arm crosscompiler defaults
to compile/link against picolibc and not newlib anymore.)

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2025-03-07 00:14:29 +05:30
Johan Kraft
617657c57f
Added TraceRecorder also in IAR project for CORTEX_MPS2_QEMU_IAR_GCC demo (#1325)
* * Added TraceRecorder also in IAR project for demo CORTEX_MPS2_QEMU_IAR_GCC.

* * Added TraceRecorder also in IAR project for demo CORTEX_MPS2_QEMU_IAR_GCC.
2025-02-10 12:32:38 +05:30
Johan Kraft
6d364f0b1f
TraceRecorder demo added in CORTEX_MPS2_QEMU_IAR_GCC (#1320)
* * Added TraceRecorder demo for Percepio View in CORTEX_MPS2_QEMU_IAR_GCC (only gcc supported at the moment)

* * Added TraceRecorder demo instructions in readme.md.

* * Updated FreeRTOS-Plus-Trace pointer

* * Using FreeRTOS-Plus-Trace submodule (TraceRecorder) instead of a static TraceRecorder copy.
2025-01-23 10:11:33 +05:30
Gaurav-Aggarwal-AWS
6aa244f6fe
Update Community-Supported-Demos submodule pointer (#1303)
* Update Community-Supported-Demos submodule pointer

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2024-12-02 17:11:05 +05:30
Gaurav-Aggarwal-AWS
28a20d5a69
Add volatile qualifier (#1283)
Add volatile qualifier

This is needed to ensure that the memory mapped address it always read.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2024-10-17 11:08:16 +05:30
Ian Thompson
b3e6cff1f2
Xtensa Demos updated and moved to Partner-Supported submodules (#1281)
Cadence/Xtensa: Move Tensilica demos to Partner-Supported-Demos submodule

Add a README to this deprecated demos directory indicating where to
find the latest Tensilica test code.

Signed-off-by: Ian Thompson <ianst@cadence.com>
2024-10-16 10:06:05 +05:30
Gaurav-Aggarwal-AWS
c502e5f9a5
Update runtime library support to automatic (#1280)
This ensures that CCS builds this library when the project is
first built after CCS installation.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2024-10-11 10:31:48 +05:30
Matt Ryall [Mawson Rovers]
6dc7737eff
Update CORTEX R4 demo to use linked resources #1272 (#1273)
* Cortex R4 demo: replace setup script with linked resources

* Cortex R4 demo: remove Eclipse user settings
2024-10-10 15:23:25 +05:30
Florian La Roche
d80937d050
Cortex M3 MPS2: modernize assembler syntax and also add .ltorg (#1268)
Cortex M3 MPS2: modernize assembler syntax and also add .ltorg

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2024-09-25 16:09:47 +05:30
Florian La Roche
9245b4aaac
Cortex M3 MPS2: fix alignment warning from assembler (#1266)
* Cortex M3 MPS2: fix alignment warning from assembler

Fix assembler alignment warnings for Cortex M3 MPS2:
Warning: section does not have enough alignment to ensure safe PC-relative loads

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2024-09-16 12:19:39 +05:30
ericwu13
b0c9468ad6
Update RTOSDemo Debug Renode.launch (#1261)
SoftConsole failed to execute MI command to load the RTOSDebug.elf built in this project. Since the debugger couldn't find  address `0xe000ed00` defined in ARM processor. 

We need to set `$target_riscv` to 1 so that the gdb can be initialized correctly.
2024-09-03 11:41:27 +05:30
joejoseph08
3b34f8028d
Add cygwin option for compilation (#1230)
Add Cygwin option for compilation
2024-08-23 15:36:40 +05:30
Gaurav-Aggarwal-AWS
059165fbf1
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>
2024-08-23 12:47:47 +05:30
Rahul Kar
8582188293
ARMv7-R No_GIC Port Demo (#1236)
Add ARM_CRx_No_GIC_Demo
2024-08-11 19:07:30 +05:30
Niklas
36b803e358
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>
2024-07-22 12:15:03 +05:30
Florian La Roche
82099c32a0
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>
2024-07-01 12:46:15 +05:30
Florian La Roche
29d3e527ec
Posix_GCC: use complete function declaration (#1234)
complete function declaration for Posix_GCC

Signed-off-by: Florian La Roche <Florian.LaRoche@gmail.com>
2024-06-30 10:33:21 +05:30
Florian La Roche
5f85f43c39
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>
2024-06-10 11:32:23 +05:30
Florian La Roche
995a030a92
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>
2024-06-04 20:08:16 +05:30
Florian La Roche
49bbe71166
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>
2024-05-24 12:56:03 +05:30
Florian La Roche
8e54579341
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>
2024-05-24 11:57:01 +05:30
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>
2024-04-22 15:00:13 +05:30
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>
2024-04-18 16:56:06 -07:00
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>
2024-04-18 19:07:34 +05:30
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>
2024-04-17 16:56:07 +08:00
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>
2024-04-03 10:13:14 +05:30
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.
2024-04-01 10:16:07 +05:30
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.
2024-03-28 12:37:03 -07:00
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>
2024-03-27 15:34:46 +08:00
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.
---------
2024-03-26 09:24:37 -07:00
Rahul Kar
857962d638
Add support to build Posix Demo with Dynamic Allocation (#1198)
Add support for dynamic allocation in posix demo
2024-03-26 11:02:49 +05:30
Rahul Kar
7de1b5098d
Add separate compile option for tracing functionality in Posix demo (#1194)
* Add compile option for enabling tracing in cmake file *
2024-03-21 14:57:49 +05:30
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.
2024-03-04 14:48:17 +05:30
chinglee-iot
d1ef345165
Calling vTaskEndScheduler in application created task (#1187) 2024-02-26 22:40:00 +05:30
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>
2024-02-19 20:50:02 +05:30
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>
2024-02-19 12:07:43 +05:30
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>
2024-02-17 00:23:12 +05:30