* 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
Prior to this commit, CBMC would emit logging information in plain text
format, which does not contain information required for the CBMC VSCode
debugger. This commit makes CBMC use XML instead of plain text.
Co-authored-by: Mark Tuttle <tuttle@acm.org>
Update the unit test for the following functions to verify that equal priority task won't be preempted
* vTaskResume
* xTaskResumeFromISR
* vTaskPrioritySet
* xTaskResumeAll
4 test cases are added to verify this scenario
* test_xTaskResumeAll_success_2_tasks_eq_prio_running_no_yield
* test_vTaskPrioritySet_success_eq_curr_prio_curr_tcb
* test_vTaskResume_success_eq_curr_prio_not_yield
* test_xTaskResumeFromISR_success_eq_curr_prio_suspended_task
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
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>
* Fix WIN32-MSVC demo in FreeRTOS/Demo.
* Add comments.
* Fix corechecks
* Re-work trace and keyboard input.
* Remove unneeded line from trcConfig.h
* Fix formatting in trcConfig.h
* Fix heap issues, add FreeRTOS task to simulate keyboard interrupts.
* Update comment on main_blinky.
* Fix spelling.
* Make keyboard input thread block on input.
* Set thread affinity of keyboard input thread to not run on the same core as FreeRTOS.
* Adjust heap regions and total heap size.
* Fix spelling.
Co-authored-by: Jason Carroll <czjaso@amazon.com>
Update Readme instructions and add troubleshooting
tips for issues seen on Ubuntu and include a description
of where to find various crosstools-ng flags.
Update SiFive IAR demo to support vectored interrupts. This is a near copy of https://github.com/FreeRTOS/FreeRTOS/pull/797.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
* Add a unit test for tasks.c
This test simulates the scenario when a task with priority higher than
the currently executing task is unblocked as a result of the
xTaskIncrementTick call.
This is needed to fix the coverage drop in PR https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/568.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Add description for the test
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Add doc for another test
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Undo syntax changes preventing VeriFast parsing
* Update proofs inline with source changes
Outstanding:
- xQueueGenericReset return code
- Not using prvIncrementQueueTxLock or prvIncrementQueueRxLock macros
* Remove git hash check
* Document new changes between proven code and implementation
* Update copyright header
* VeriFast proofs: turn off uncrustify checks
Uncrustify requires formatting of comments that is at odds with VeriFast's
proof annotations, which are contained within comments.
* Update ci.yml
Co-authored-by: Joseph Julicher <jjulicher@mac.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
The test simulates the scenario when a task with priority equal to the
currently executing task is unblocked as a result of the
xTaskIncrementTick call.
Related PR - https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/568
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Created a generic portmacro.h file in the CBMC include folder instead of using the default MSVC-MingW one. This allows each proof to define the portmacro constants it needs and cover all code in the Task Scheduler
* Removed the license text from the portmacro file
* Fix CI checks
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Fix spell check
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>
* Add test for timer start delayed past expiration
This reverts commit 53af0ec62e, which
itself reverted 9c91199016.
* Add warning about vTimerDemoIncludeBacklogTests()
* uncrustify for CI check
* Remove unintentional changes to spacing in comments
* prvReceiverTask() in MessageBufferDemo.c declared a variable as a "MessageBufferHandle_t *" instead of just a "MessageBuffer_t". This came to light when updating the kernel submodule pointer as the underlying datatype changed in the kernel from a void *.
* Remove additional line that was preventing automated uncrustify tests from passing.
Co-authored-by: none <>
* Test: add multi config ability to build system
* Remove Tests that are not implemented yet from the makefile
* Fix header check
* Test: Unit Test tasks.c
* UnitTest: tasks.c Save progress
* saving some work 70% coverage
* coverage 77%
* tasks.c coverage 90%
* tasks.c coverage 95%
* Cleanup and common header
* Cover some extra branches, no_mutex +stack growth
* Fix Makefile not to use modified version of c-preprocessor
* Remove c-preprocessor errros
* Rebase and add some tests
* Fortify_source=1 and O0 are mutually exclusive
* Style: Uncrustify code
* Style: Fix indent
* Fix Header checks
* Add prototypes
* Build: use unifdef instead of the c-preprocessor to generate different configurations
* Build: fix makefile cflags
* Fix UT after upgrading kernel version
* Resolve conflicts and test failures
* Comment fix version number
* Fix build error
* Update FreeRTOS/Test/CMock/Makefile
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
1. add INCLUDE_xTaskGetCurrentTaskHandle for stream_buffer use
2. 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'
3. 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
Signed-off-by: Eric Chan <e14002270@gmail.com>
* CORTEX_MPS2_QEMU_IAR_GCC now has VSCode tasks and launch configurations to build, run, and debug in one button. This should work on all platforms (Linux, MacOS, Windows).
* Posix_GCC Demo now has VSCode task and launch configs to build, run, debug in one button for Linux/MacOS ("lldb Launch").
It also has configuration for Windows through Ubuntu ("gdb launch"), and this will also work for Linux if the user wants to use gdb instead of lldb.
* Integrated terminal settings for Ubuntu and MSYS2 ways to run Posix Demo on Windows.
This allows Posix port demo to be built on either WSL/Ubuntu or MSYS2 on Windows.
These are absolute paths so if the user has installed Ubuntu or MSYS2 elsewhere they will need to change them.
* Improved pattern matching in Run QEMU task. Replaced usage of deprecated ${workspaceRoot} with ${workspaceFolder}.
* Split MSYS2 and Ubuntu WSL configurations
MSYS2 works better with external console, and Ubuntu WSL works with internal console. This is reflected by having two different configurations.
* Delete RTOSDemo.map
Cleanup. (This is file is built but never deleted when make-ing)
* Delete null.d
* Cleanup extranneous vscode workspace
* Documentation for VSCode launch configs
Documentation for how to run this demo on VSCode using launch configs.
* Added documentation for VSCode launch configs
Added documentation for running demo through VSCode using launch configurations.
* Removed unneeded .log files and c_cpp_properties.json in CORTEX_MPS2_QEMU_IAR_GCC/.vscode/
* Deleted unnecessary .log files from POSIX_GCC/.vscode
* Set build task problem matcher to "gcc", deault problem matcher from VSCode.
* Removed unneeded "sh -c -l" command from the default build task in CORTEX_MPS2_QEMU_IAR_GCC.
* "Build QEMU" task problem matcher finds the correct paths to problem files.
* Moved steps to "Prerequisites" section.
* Update Readme.md
Fixed markdown typo.
* Moved items to prerequisites for Posix_GCC demo.
Co-authored-by: Fan <gilbefan@f84d899204e1.ant.amazon.com>
* Fix build failures in Nuvoton M2351 projects
These are needed because of recent changes in the port
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* All for the Demo/Cortex_MPU_Simulator_Keil_GCC GCC demo:
+ Update the linker script so the project builds now the heap is part of the privileged data.
+ Add simulator.ini to setup the simulator memory map when the debugger starts to prevent invalid access errors.
+ Set configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY to 1 in FreeRTOSConfig.h, then fix up resultant build errors.
+ Set configALLOW_UNPRIVILEGED_CRITICAL_SECTIONS to 0 in FreeRTOSConfig.h, then fix up resultant build errors.
* Fix compiler warning in Arm startup file.
* Update comments in the file headers to pass the git checkin tests.
* Update header comments to pass git checkin tests.
* Second attempt to get file header comments correct for the check-in tests.
* Third attempt to get the header comments correct.
* Fix spelling.
* Fix manifest check
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: none <>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Add a hardware definition project for the MicroZed board to the existing Zynq ZC702 project.
Add a text file that describes how to switch the Zynq project form the ZC702 hardware to the MicroZed hardware.
* PR https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/350 introduced configRUN_TIME_COUNTER_TYPE and ulTaskGetIdleRunTimePercent(). This PR updates the Win32 demo to exercise both additions with configRUN_TIME_COUNTER_TYPE set to uint64_t.
* Add ultaskgetidleruntimepercent to lexicon.txt.
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
Update the SiFive HiFive IAR project
1. Update to the latest toolchain.
2. Add the prints needed by CI.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>