Commit graph

837 commits

Author SHA1 Message Date
chinglee-iot
ed2717767a
Posix demo use heap_3 in cmake (#1068) 2023-08-16 15:58:56 +08:00
Gaurav-Aggarwal-AWS
405b518f61
Update submodule pointers for demos (#1051)
Update submodule pointers for demos

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-08-03 17:33:57 +05:30
kar-rahul-aws
5861ac4d7a
Update MPU Demos for Kernel V10.6.0 (#1057)
Update MPU Demos for Kernel V10.6.0
2023-08-03 14:28:25 +05:30
Gaurav-Aggarwal-AWS
1cf219a80b
Enable Werror for Posix Demo Coverage Test target (#1059)
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>
2023-08-02 15:39:38 +05:30
chinglee-iot
f776f5ee4a
Move demos in Community-Supported to Community-Supported-Demos (#1053)
* Move demos in Community-Supported to Community-Supported-Demos
* Update RP2040 CI workflow path
2023-07-27 14:50:38 +08:00
chinglee-iot
6eb8fc5f51
Merge SMP demos from FreeRTOS-SMP-Demos (#1046)
* Merge RP2040 and XMOS AICORE SMP demos to main branch from FreeRTOS-SMP-Demos
* Update the common test for SMP demos
* Update the kernel submodule
2023-07-24 21:17:17 +08:00
kar-rahul-aws
5d94b20aa8
Make changes required for MPU enhancements (#1034)
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>
2023-07-13 16:32:05 +05:30
chinglee-iot
8f3233e0a0
Adding CMakeList.txt in posix GCC demos (#1020)
* Add cmake for posix GCC demo

---------

Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2023-06-16 15:20:52 +08:00
Aniruddha Kanhere
1277ba1661
Revert "Remove coroutines (#874)" (#1019)
* Revert "Remove coroutines (#874)"

This reverts commit 569c78fd8c.

* Update freertos Kernel submodule to latest head

* Remove temporary files

* Fix MingW demos and spell check

* Fix manifest version; fix headers

* Add ignore files and paths to core-checker.py

* Fix copyright in remaining files

* Fix PR check build failure

1. Remove defining `inline` in Makefile. This was causing build
   warnings.
2. Ensure that the linker removed unused functions from various
   compilation units.
3. Update the linker script so that all the functions are correctly
   placed in FLASH section.

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

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-06-09 15:25:48 -07:00
Xiaodong Li
9ccae851e7
Create GitHub Workflows that execute the p3 FreeRTOS Kernel Demos (#1018)
* 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>
2023-06-09 10:01:35 -07:00
e14002270
d60b34c8e2
risc-v: Fix build flags and linker scripts (#906)
1. miss debug info in assembly code
RISC-V-spike-htif_GCC
        LDFLAGS add arch and abi info for linker
            for riscv64-unknown-elf multilib, if there is no arch and abi
            info, will link to default lib and have below error
            target emulation `elf32-littleriscv' does not match `elf64-littleriscv'
        use CFLAGS to replace ASFLAGS when compile assembly code
            because DEBUG flag is added in CFLAGS, if we use ASFLAGS to compile
            assembly code, there is no debug info in assembly code objfile

2. binutils 2.39 ld warn 'has a LOAD segment with RWX permissions'
RISC-V-Qemu-virt_GCC
RISC-V-spike-htif_GCC
RISC-V_RV32_QEMU_VIRT_GCC

3. fix build fail
RISC-V_RV32_QEMU_VIRT_GCC

Signed-off-by: Eric Chan <e14002270@gmail.com>
2023-05-31 11:48:13 -07:00
Gaurav-Aggarwal-AWS
9e1c6e1ab1
Fix file path in the project file (#1013)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-05-15 23:33:10 +05:30
Devaraj Ranganna
201472a578
Update FreeRTOSconfig.h for M2351 (#1005)
The number of implemented priority bits for Armv8-M baseline
implementation is defined by the architecture as 2. Therefore the
config option `configPRIO_BITS` is updated to 2.

In addition, in Armv8-M baseline implementation BASEPRI is RES0.
Therefore, `configMAX_SYSCALL_INTERRUPT_PRIORITY` is not supported. Hence
this config option is removed.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
2023-05-15 16:04:27 +05:30
kar-rahul-aws
03db1e8e49
Set configMAX_SYSCALL_INTERRUPT_PRIORITY to 4 for QEMU demos (#986)
* Update FreeRTOSConfig.h

* Update FreeRTOSConfig.h

* Update FreeRTOSConfig.h
2023-04-28 18:18:38 +05:30
Gaurav-Aggarwal-AWS
3fcb9a5ad0
Add IAR projects for LPC55S69 (#1007)
* Add IAR projects for LPC55S69

* IAR Project for trustzone
* MCUXpresso and IAR projects for non-trustzone (NTZ) ports

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

* Fix build issues and warnings

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

* Fix formatting check

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

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-04-28 13:01:57 +05:30
Gaurav-Aggarwal-AWS
14a34fc9e5
Add non trustzone (NTZ) projects for M2351 (#1003)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-04-24 16:48:39 +05:30
Gaurav-Aggarwal-AWS
dcb2972d0d
Remove non-existent entry from the project file (#996)
This removes a warning in the IDE.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-04-24 13:53:58 +05:30
Gaurav-Aggarwal-AWS
d022baf6cd
Fix incorrect file path in the project file (#1000)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-04-24 12:25:44 +05:30
Gaurav-Aggarwal-AWS
87a85a8ee5
Add reg tests to nRF9160 projects (#1001)
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-04-24 11:14:18 +05:30
Gaurav-Aggarwal-AWS
5b403a6a07
Add reg tests to NuMaker M2351 project (#992)
* Add reg tests to NuMaker M2351 project

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

* Add reg tests for IAR

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

* Fix formatting check

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

* Fix header check

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

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-04-19 11:28:07 -07:00
kar-rahul-aws
457418a723
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 <aggarg@amazon.com>

* Fix hard fault because of main stack overflow

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

---------

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
2023-04-19 13:29:00 +05:30
Devaraj Ranganna
27cbc7f6a2
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 <devaraj.ranganna@arm.com>

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

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

* Remove auto-generated files

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

---------

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.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>
2023-04-18 12:23:31 +05:30
Gaurav-Aggarwal-AWS
5eaf2f3bce
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 <aggarg@amazon.com>
2023-04-18 10:45:59 +05:30
Joseph Julicher
1309654d6f
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 <60444055+AniruddhaKanhere@users.noreply.github.com>

* Update and rename readme.txt to readme.md

---------

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2023-04-11 11:52:56 -07:00
Sergio Soares
d57e2b746b
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 ); `)
2023-04-10 15:32:35 +05:30
Gaurav-Aggarwal-AWS
084b7efe99
Add register tests to Nucleo-L152RE project (#982)
* Add reg tests for CORTEX_MPU_M3_NUCLEO_L152RE

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: kar-rahul-aws <karahulx@amazon.com>
2023-04-03 16:27:52 +05:30
Gaurav-Aggarwal-AWS
aba448be9c
Add register tests to H743ZI2 demo project (#977)
Add register tests to H743ZI2 demo project.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: kar-rahul-aws <karahulx@amazon.com>
2023-04-03 12:58:42 +05:30
Paul Bartell
4408d7430e Increase minimal stack size config to 2048 words
Accomodates increased usage due to newlib thread local storage
2023-03-30 12:32:55 -07:00
Paul Bartell
63cfc621ed Enable newlib and picolibc thread local storage 2023-03-30 12:32:55 -07:00
Paul Bartell
c6325a02ff Improve vAssertCalled function to include filename / line number info. 2023-03-30 12:32:55 -07:00
Keith Packard
84ad9250da 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
bc1a95e9e7 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
9add6bdf98 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
56cdd1ad12 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
827493747f 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
82e8d335b8 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
15826fe5cc 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
642c495fcb 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
f807222c85 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
0ecd0f5188 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
0a1db4b00c 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Keith Packard
68ef270215 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 <keithpac@amazon.com>
2023-03-30 12:32:55 -07:00
Soren Ptak
93a35f87d2
Added two config options to the FreeRTOSConfig file to get the demo running again. Fixed a typo in a file. Added a section to the link file (#940)
Co-authored-by: Soren Ptak <skptak@amazon.com>
2023-03-05 20:43:35 -08:00
Kody Stribrny
2f3e5235aa
Expand RV32E demo support, prevent 'ebreak' looping (#883)
* Expand RV32E demo support, prevent 'ebreak' looping

The RegTest tests are modified in the Qemu and HiFive demos
to support RV32E and its limited set of registers.

'ebreak' call looping is removed in RegTest. This produces
a lot of noise when debugging.

* Correct whitespace

* Remove 'ebreak' instruction calls

The ebreak instruction sets and exception
which leads to jumping around the binary. This
can make debugging difficult.

* Fix whitespace formatting
2023-02-06 21:00:09 -08:00
Paul Bartell
61fed35107 CI: add win32-mingw demo to GithubActions workflow 2022-12-21 13:09:02 -08:00
Paul Bartell
32a3f4e8a1 msp430_GCC: Update makefile for most recent mspgcc 2022-12-21 13:09:02 -08:00
Kody Stribrny
e28f953025
Update AVR_Dx Atmel Demo (#902)
Updates the demo .cproj file to account for new
paths since 3P restructure. Also enables the xTaskGetCurrentTaskHandle
include which is needed for building.

Inspired by - https://forums.freertos.org/t/avr-gcc-warning-extra-tokens-at-end-of-undef-in-porthardware-h/16365/3
2022-12-20 09:03:25 -08:00
Gaurav-Aggarwal-AWS
1e8d541ed4
Fix stack smashing in POSIX Demo (#901)
The tracelyzer code was declaring a local stack variable of type
`uint32_t` and passing it as output parameter to a function which
expected `uint64_t` on a 64-bit platform. This resulted in 4 byte memory
corruption. The problem was that the function signature uses
`TraceUnsignedBaseType_t` type for the output parameter which gets
defined to `uint32_t` on a 32-bit platform and to `uint64_t` on a 64-bit
platform, while the local stack variable was declared as `uint32_t`.
This commit changes the type of local stack variable to
`TraceUnsignedBaseType_t` to match the function parameter type.

Tracelyzer creates a task internally stack size of which is controlled
using TRC_CFG_CTRL_TASK_STACK_SIZE. It was earlier defined to 1024.
The POSIX port requires the stack size to be minimum PTHREAD_STACK_MIN.
The commit updates the TRC_CFG_CTRL_TASK_STACK_SIZE to
PTHREAD_STACK_MIN.

The demo directory contained one extra trcConfig.h and
trcKernelPortConfig.h. This commit deletes those files.

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

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2022-12-15 19:21:55 +05:30
jasonpcarroll
6f7f9fd9ed [AUTO][RELEASE]: Bump file header version to "202212.00" 2022-12-10 01:17:30 +00:00
jasonpcarroll
a545cb2aee
Fix MingW RTOS demo. (#897)
* Fix MingW RTOS demo.

* Remove unnused variable.

* Fix header check.

* Remove tabs from source files.

* Fix spelling.

* Remove unneeded call to vTraceStop.

* Fix function.

* Fix code coverage project.

* Add Makefile to MinGW demo.

Co-authored-by: Jason Carroll <czjaso@amazon.com>
2022-12-09 15:49:42 -08:00