]> begriffs open source - freertos/log
freertos
5 years agoAdded index to all trace points. (#69)
eriktamlin [Wed, 17 Jun 2020 23:38:06 +0000 (01:38 +0200)]
Added index to all trace points. (#69)

5 years agoFix out of offset errors when LTO is enabled (#71)
Gaurav-Aggarwal-AWS [Wed, 10 Jun 2020 17:03:11 +0000 (10:03 -0700)]
Fix out of offset errors when LTO is enabled (#71)

When Link Time Optimization (LTO) is enabled, some of the LDR
instructions result in out of range access. The reason is that the
default generated literal pool is too far and not within the permissible
range of 4K.

This commit adds LTORG assembly instructions at required places to
ensure that access to literals remain in the permissible range of 4K.

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
5 years agoRenamed trace point in prvNotifyQueueSetContainer() so it isn't a d… (#47)
cykro82 [Tue, 2 Jun 2020 17:50:02 +0000 (19:50 +0200)]
Renamed trace point in prvNotifyQueueSetContainer() so it isn't a d… (#47)

* * Renamed trace point in prvNotifyQueueSetContainer() so it isn't a duplicate of the trace point in xQueueGenericSend()

* * Fixed backwards compatibility.

Co-authored-by: Erik Tamlin <erik.tamlin@percepio.com>
5 years agoUpdated History.txt for task notification array change (#65)
RichardBarry [Thu, 28 May 2020 16:55:17 +0000 (09:55 -0700)]
Updated History.txt for task notification array change (#65)

Updated History.txt to note the single task notification per task has been replaced with an array of task notifications per task.

5 years agoupdates FreeRTOS.h to handle new usages of task notify (#64)
syntroniks [Thu, 28 May 2020 15:12:24 +0000 (10:12 -0500)]
updates FreeRTOS.h to handle new usages of task notify (#64)

5 years agoRemoving vPortEndScheduler() implementation, since it's not implemented according...
Yuhui Zheng [Wed, 27 May 2020 21:08:44 +0000 (14:08 -0700)]
Removing vPortEndScheduler() implementation, since it's not implemented according to spec. (#61)

Refer to https://www.freertos.org/a00133.html.
The issue with the implementation is that, if only stop kernel tick the program will keep executing current task.
The desired behavior is to at least return/jump to the next instruction after vTaskStartScheduler().

Signed-off-by: Yuhui Zheng <10982575+yuhui-zheng@users.noreply.github.com>
5 years agoFeature/multiple direct to task notifications (#63)
RichardBarry [Wed, 27 May 2020 19:28:48 +0000 (12:28 -0700)]
Feature/multiple direct to task notifications (#63)

Description
Before this change each task had a single direct to task notification value and state as described here: https://www.FreeRTOS.org/RTOS-task-notifications.html. After this change each task has an array of task notifications, so more than one task notification value and state per task. The new FreeRTOSConfig.h compile time constant configTASK_NOTIFICATION_ARRAY_ENTRIES sets the number of indexes in the array.

Each notification within the array operates independently - a task can only block on one notification within the array at a time and will not be unblocked by a notification sent to any other array index.

Task notifications were introduced as a light weight method for peripheral drivers to pass data and events to tasks without the need for an intermediary object such as a semaphore - for example, to unblock a task from an ISR when the operation of a peripheral completed. That use case only requires a single notification value. Their popularity and resultant expanded use cases have since made the single value a limitation - especially as FreeRTOS stream and message buffers themselves use the notification mechanism. This change resolves that limitation. Stream and message buffers still use the task notification at array index 0, but now application writers can avoid any conflict that might have with their own use of task notifications by using notifications at array indexes other than 0.

The pre-existing task notification API functions work in a backward compatible way by always using the task notification at array index 0. For each such function there is now an equivalent that is postfixed "Indexed" and takes an additional parameter to specify which index within the array it should operate upon. For example, xTaskNotify() is the original that only operates on array index 0. xTaskNotifyIndexed() is the new function that can operate on any array index.

Test Steps
The update is tested using the Win32 demo (PR to be created in the FreeRTOS/FreeRTOS github repo), which has been updated to build and run a new test file FreeRTOS/Demo/Common/Minimal/TaskNotifyArray.c. The tests in that file are in addition to, not a replacement for those in FreeRTOS/Demo/Common/Minimal/TaskNotify.c.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

5 years agoAdding volatile to tasks.c's runtime information to protect against compiler optimiza...
Daniel Glaser [Fri, 22 May 2020 17:26:41 +0000 (19:26 +0200)]
Adding volatile to tasks.c's runtime information to protect against compiler optimization (#62)

As discussed in https://forums.freertos.org/t/make-runtime-stats-working-with-compiler-optimization-enabled/9846 and on lined out on https://blog.the78mole.de/freertos-debugging-on-stm32-cpu-usage/, adding the volatile prevents the run-time stats variable being optimized away when used with compiler optimizations.

5 years agoFix/clear MIE bit in initial RISC-V mstatus register. (#57)
RichardBarry [Sat, 2 May 2020 05:35:42 +0000 (22:35 -0700)]
Fix/clear MIE bit in initial RISC-V mstatus register. (#57)

* fix: CLEAR MIE BIT IN INITIAL RISC-V MSTATUS VALUE
The MIE bit in the RISC-V MSTATUS register is used to globally enable
or disable interrupts.  It is copied into the MPIE bit and cleared
on entry to an interrupt, and then copied back from the MPIE bit on
exit from an interrupt.

When a task is created it is given an initial MSTATUS value that is
derived from the current MSTATUS value with the MPIE bit force to 1,
but the MIE bit is not forced into any state.  This change forces
the MIE bit to 0 (interrupts disabled).

Why:
If a task is created before the scheduler is started the MIE bit
will happen to be 0 (interrupts disabled), which is fine.  If a
task is created after the scheduler has been started the MIE bit
is set (interrupts enabled), causing interrupts to unintentionally
become enabled inside the interrupt in which the task is first
moved to the running state - effectively breaking a critical
section which in turn could cause a crash if enabling interrupts
causes interrupts to nest.  It is only an issue when starting a
newly created task that was created after the scheduler was started.

Related Issues:
https://forums.freertos.org/t/risc-v-port-pxportinitialisestack-issue-about-mstatus-value-onto-the-stack/9622
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
5 years agoFix Linux port Valgrind errors (#56)
alfred gedeon [Tue, 28 Apr 2020 21:42:34 +0000 (14:42 -0700)]
Fix Linux port Valgrind errors (#56)

Fix Valgrind uninitialized variables warning.
Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
5 years agoGCC/ATmegaxxxx port path and name change. (#51)
Yuhui Zheng [Tue, 21 Apr 2020 20:21:19 +0000 (13:21 -0700)]
GCC/ATmegaxxxx port path and name change. (#51)

Moving ATmega port to third party directory, and mature it there. Once we are fully done, the port could then be moved back to portable/GCC.

5 years agoATmegaxxxx - generalised support (#48)
Phillip Stevens [Thu, 16 Apr 2020 01:51:57 +0000 (11:51 +1000)]
ATmegaxxxx - generalised support (#48)

ATmegaxxxx - generalised support. Please see README.md included in the same PR for usage and limitations.

5 years agoAdd definition of portDONT_DISCARD to ARMv7-M ports (#50)
Gaurav-Aggarwal-AWS [Tue, 14 Apr 2020 16:03:11 +0000 (09:03 -0700)]
Add definition of portDONT_DISCARD to ARMv7-M ports (#50)

Enabling Link Time Optimization (LTO) causes some of the functions used
in assembly to be incorrectly stripped off, resulting in linker error.
To avoid this, these functions are marked with portDONT_DISCARD macro,
definition of which is port specific. This commit adds the definition
of portDONT_DISCARD for ARMv7-M ports.

Signed-off-by: Gaurav Aggarwal
5 years agoEnable ARMv7-M MPU ports to place FreeRTOS kernel code outside of flash (#46)
Gaurav-Aggarwal-AWS [Mon, 6 Apr 2020 22:51:40 +0000 (15:51 -0700)]
Enable ARMv7-M MPU ports to place FreeRTOS kernel code outside of flash (#46)

Problem Description
-------------------
The current flash organization in ARMv7-M MPU ports looks as follows:

__FLASH_segment_start__ ------->+-----------+<----- __FLASH_segment_start__
                                |  Vector   |
                                |   Table   |
                                |     +     |
                                |   Kernel  |
                                |    Code   |
                                +-----------+<-----  __privileged_functions_end__
                                |           |
                                |           |
                                |           |
                                |   Other   |
                                |   Code    |
                                |           |
                                |           |
                                |           |
   __FLASH_segment_end__ ------>+-----------+

The FreeRTOS kernel sets up the following MPU regions:

* Unprivileged Code - __FLASH_segment_start__ to __FLASH_segment_end__.
* Privileged Code - __FLASH_segment_start__ to __privileged_functions_end__.

The above setup assumes that the FreeRTOS kernel code
(i.e. privileged_functions) is placed at the beginning of the flash and,
therefore, uses __FLASH_segment_start__ as the starting location of the
privileged code. This prevents a user from placing the FreeRTOS kernel
code outside of flash (say to an external RAM) and still have vector
table at the beginning of flash (which is many times a hardware
requirement).

Solution
--------
This commit addresses the above limitation by using a new variable
__privileged_functions_start__ as the starting location of the
privileged code. This enables users to place the FreeRTOS kernel code
wherever they choose.

The FreeRTOS kernel now sets up the following MPU regions:

* Unprivileged Code - __FLASH_segment_start__ to __FLASH_segment_end__.
* Privileged Code - __privileged_functions_start__ to __privileged_functions_end__.

As a result, a user can now place the kernel code to an external RAM. A
possible organization is:

                                 Flash              External RAM
                              +------------+        +-----------+<------ __privileged_functions_start__
                              |   Vector   |        |           |
                              |   Table    |        |           |
                              |            |        |           |
__FLASH_segment_start__ ----->+------------+        |   Kernel  |
                              |            |        |    Code   |
                              |            |        |           |
                              |            |        |           |
                              |            |        |           |
                              |   Other    |        |           |
                              |    Code    |        +-----------+<------ __privileged_functions_end__
                              |            |
                              |            |
                              |            |
  __FLASH_segment_end__ ----->+------------+

Note that the above configuration places the vector table in an unmapped
region. This is okay because we enable the background region, and so the
vector table will still be accessible to the privileged code and not
accessible to the unprivileged code (vector table is only needed by the
privileged code).

Backward Compatibility
----------------------
The FreeRTOS kernel code now uses a new variable, namely
__privileged_functions_start__, which needs to be exported from linker
script to indicate the starting location of the privileged code. All of
our existing demos already export this variable and therefore, they will
continue to work.

If a user has created a project which does not export this variable,
they will get a linker error for unresolved symbol
__privileged_functions_start__. They need to export a variable
__privileged_functions_start__ with the value equal to
__FLASH_segment_start__.

Issue
-----
https://sourceforge.net/p/freertos/feature-requests/56/

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
5 years agoSynopsys ARC port, adding support for ARC EM and HS cores -- continued from PR #8...
Yuhui Zheng [Tue, 24 Mar 2020 18:54:03 +0000 (11:54 -0700)]
Synopsys ARC port, adding support for ARC EM and HS cores -- continued from PR #8. (#28)

Synopsys ARC port, adding support for ARC EM and HS cores.

5 years agopxTCB is no longer needed in this local function.
Yuhui Zheng [Mon, 23 Mar 2020 01:58:21 +0000 (18:58 -0700)]
pxTCB is no longer needed in this local function.

5 years agoUpdate tasks.c (#22)
WineQ圈9 [Mon, 23 Mar 2020 02:18:48 +0000 (10:18 +0800)]
Update tasks.c (#22)

An optimization for prvResetNextTaskUnblockTime().

5 years agoportable/GCC/Posix: add new port for Posix (Linux) applications
David Vrabel [Wed, 4 Mar 2020 18:00:41 +0000 (18:00 +0000)]
portable/GCC/Posix: add new port for Posix (Linux) applications

This is similar to the Windows port, allowing FreeRTOS kernel
applications to run as regular applications on Posix (Linux) systems.

You can use this in a 32-bit or 64-bit application (although there are
dynamic memory allocation trace points that do not support 64-bit
addresses).

Many of the same caveats of running an RTOS on a non-real-time system
apply, but this is still very useful for easy debugging/testing
applications in a simulated environment. In particular, it allows easy
use of tools such as valgrind.

You can call standard library functions from tasks but care must be
taken with any that internally take mutexes or block. This includes
malloc()/free() and many stdio functions (e.g., printf()).

Replacement malloc(), free(), realloc(), and calloc() functions are
provided which are safe. printf() needs to be called with a FreeRTOS
mutex help (or called from only a single task).

Each task is run in its own pthread, which makes debugging with
standard tools (such as GDB) easier backtraces for individual tasks
are available. Threads for non-running tasks are blocked in sigwait().

The stack for each task (thread) is allocated when the thread is
created, and the stack provided during task creation is not used. This
is so the stack has guard pages, to help with detecting stack
overflows.

Task switch is done by resuming the thread for the next task by
sending it the resume signal (SIGUSR1) and then suspending the current
thread.

The timer interrupt uses SIGALRM and care is taken to ensure that the
signal handler runs only on the thread for the current task.

The additional data needed per-thread is stored at the top on the
task's stack.

When a running task is being deleted, its thread is marked it as dying
so when we switch away from it it exits instead of suspending. This
ensures that even if the idle task doesn't run, threads are deleted
which allows for more threads to be created (if many tasks are being
created and deleted in rapid succession).

To further aid debugging, SIGINT (^C) is not blocked inside critical
sections. This allows it to be used break into GDB while in a critical
section. This means that care must be taken with any custom SIGINT
handlers as these are like NMIs.

This is somewhat inspired by an existing port by William Davy
(https://www.freertos.org/FreeRTOS-simulator-for-Linux.html) but it
takes a number of different approaches to make it switch tasks
reliableand there's little similarly with the original implementation.

- Critical sections block scheduling/"interrupts" by blocking signals
  using pthread_sigmask(). This is more expensive than attempting to
  use flags but works reliably and is analogous to the interrupt
  enable/disable on real hardware.

- Care is take to ensure that the SIGALRM handler (for the timer tick)
  is runnable only on the pthread for the running task. This makes
  tasks switches more straight-forward and reliable as we can suspend
  the thread while in the signal handler.

- Task switches save/restore the critical nesting on the stack.

- Only uses a single (SIGUSR1) signal which is ignored and thus GDB's
  default signal handling options won't trap/print on this signal.

- Extra per-thread data is stored on the task's stack, making it
  accessible in O(1) instead of performing a O(n) lookup of the array.

- Uses the task create/delete hooks in a similar way to the Windows
  port, rather than overloading trace points.

5 years agoUpdate tasks.c (#26)
WineQ圈9 [Thu, 19 Mar 2020 16:00:05 +0000 (00:00 +0800)]
Update tasks.c (#26)

Reopen this PR.

5 years agoAdding url to direct users to FreeRTOS-Kernel github page. (#32)
Yuhui Zheng [Wed, 18 Mar 2020 02:30:19 +0000 (19:30 -0700)]
Adding url to direct users to FreeRTOS-Kernel github page. (#32)

5 years agoCreate pull_request_template.md
Yuhui Zheng [Tue, 17 Mar 2020 20:11:11 +0000 (13:11 -0700)]
Create pull_request_template.md

Using the same pull request template as what we have in FreeRTOS/FreeRTOS.

5 years agoCreate SECURITY.md
Yuhui Zheng [Tue, 17 Mar 2020 20:08:50 +0000 (13:08 -0700)]
Create SECURITY.md

Bring in SECURITY.md from aws/.github.

5 years agoUpdate issue templates
Yuhui Zheng [Tue, 17 Mar 2020 20:06:09 +0000 (13:06 -0700)]
Update issue templates

Adding bug report, documentation, and general inquiry templates.

There's no easy way to redirect "general inquiry" directly to forum. If better option is available later, will update.

5 years agoAdd "Tickless Idle" support for ARMv8M ports (#29)
Gaurav-Aggarwal-AWS [Mon, 16 Mar 2020 17:50:49 +0000 (10:50 -0700)]
Add "Tickless Idle" support for ARMv8M ports (#29)

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
5 years agoFix Coverity warnings: In most cases the return value of xTaskResumeAll() is cast...
RichardBarry [Mon, 16 Mar 2020 16:59:32 +0000 (09:59 -0700)]
Fix Coverity warnings:  In most cases the return value of xTaskResumeAll() is cast to void when it is not needed.  This PR fixes a couple of instances in the heap_n.c implementations where that was not the case.

5 years agoImprove documentation for the ulTaskNotifyValueClear() and xTaskCatchUpTicks() API...
RichardBarry [Sun, 15 Mar 2020 04:07:41 +0000 (21:07 -0700)]
Improve documentation for the ulTaskNotifyValueClear() and xTaskCatchUpTicks() API functions.
Move the prototype and documentation for xTaskCatchUpTicks() into the correct place in the task.h header file (in the public documentation from the private documentation).
Rename the variable that holds the return value in xTaskCatchUpTicks() to more accurately represent its meaning.

5 years agoThe Windows port layer is built with both MSVC and GCC. GCC generated a warning...
RichardBarry [Sat, 14 Mar 2020 19:09:07 +0000 (12:09 -0700)]
The Windows port layer is built with both MSVC and GCC.  GCC generated a warning relating to the variable lWaitForYield being set but not used.  This change removes the variable.

5 years agoUpdate tasks.c (#24)
WineQ圈9 [Sat, 14 Mar 2020 18:58:19 +0000 (02:58 +0800)]
Update tasks.c (#24)

An error on trace argument.
In "xTaskPriorityDisinherit", the disinherit priority should be "pxTCB->uxBasePriority".
And, in "vTaskPriorityDisinheritAfterTimeout", the disinherit priority should be "uxPriorityToUse", which might not be "pxTCB->uxBasePriority".

5 years agoCortex-A9 port: Adding stack alignment directive to assembly code
Vladimir Umek [Thu, 5 Mar 2020 12:16:51 +0000 (13:16 +0100)]
Cortex-A9 port: Adding stack alignment directive to assembly code

5 years agoXtensa_ESP32: Change _iram_end to _iram_text_end
Sachin Parekh [Wed, 26 Feb 2020 13:38:26 +0000 (19:08 +0530)]
Xtensa_ESP32: Change _iram_end to _iram_text_end

xtensa_loadstore_handler.S uses _iram_end to prevent modification of IRAM
code. With the LoadStore exception handler in place, IRAM can also be
used for .bss and .data section. Hence the sanity check should be based
upon _iram_text_end and not _iram_end

5 years agoThis change prevents tickless idle mode potentially sleeping for an extra tick in...
RichardBarry [Fri, 28 Feb 2020 20:40:11 +0000 (12:40 -0800)]
This change prevents tickless idle mode potentially sleeping for an extra tick in the corer case that a tick interrupt occurred between the scheduler being suspended and the expected idle time being checked for a second time (within the idle task) - as described by the sequence below.  Th change updates eTaskConfirmSleepModeStatus() to specifically check if a tick is pending, and if so, abort entering sleep mode.

+ The idle task decides to enter sleep mode on the following line.
```
if( xExpectedIdleTime >= configEXPECTED_IDLE_TIME_BEFORE_SLEEP )
```

+ The scheduler is suspended, preventing any context switches.

[Potentially a tick interrupt could occur here.  That could happen if other tasks executing consumed a lot of time since the above code line executed.  If a tick interrupt occurs here the interrupt will be entered but the interrupt will not do anything other than increment xPendedTicks.]

+ The expected idle time is checked again.  No context switches can occur now so the code will execute until the scheduler is unsuspended.  Assuming configEXPECTED_IDLE_TIME_BEFORE_SLEEP is set to a sensible value, a tick interrupt won't occur for some time.

+ portSUPPRESS_TICKS_AND_SLEEP() is called.

+ The default implementation of the tickless function calls eTaskConfirmSleep() - which prior to this change does not return eAbortSleep even though xPendedTicks is not 0, and after this change does return eAbortSleep.

5 years agoBring license in sync with FreeRTOS/FreeRTOS. (#20)
Yuhui.Zheng [Thu, 27 Feb 2020 22:33:46 +0000 (14:33 -0800)]
Bring license in sync with FreeRTOS/FreeRTOS. (#20)

5 years agoUpdates vCoRoutineSchedule() so it returns without doing anything if if the co-routin...
ribarry [Sun, 23 Feb 2020 01:48:22 +0000 (17:48 -0800)]
Updates vCoRoutineSchedule() so it returns without doing anything if if the co-routine internal data structures have not been initialised.  The internal data structures are initialised when the first co-routine is created.
NOTE: Co-routines are a deprecated feature.  This change was made to close off an old ticket as the source control transitions from SourceForge to Github.

5 years agoAdded CONTRIBUTING (#18)
lundinc2 [Wed, 26 Feb 2020 00:22:57 +0000 (16:22 -0800)]
Added CONTRIBUTING (#18)

.md

5 years agoSmall typo on L1287 (#14)
AniruddhaKanhere [Wed, 19 Feb 2020 22:05:48 +0000 (14:05 -0800)]
Small typo on L1287 (#14)

Added a missing ')'

5 years agoversion bump to v10.3.1 (#16) V10.3.1-kernel-only
Yuhui.Zheng [Wed, 19 Feb 2020 06:03:54 +0000 (22:03 -0800)]
version bump to v10.3.1 (#16)

* Verion bump from 10.3.0 to 10.3.1.
* version bump in task.h
* change history for 10.3.1.

5 years agoRemoving License/license.txt and add LICENSE under root. (#12)
Yuhui.Zheng [Mon, 17 Feb 2020 17:52:58 +0000 (09:52 -0800)]
Removing License/license.txt and add LICENSE under root. (#12)

5 years agoReplacing readme.txt with README.md. (#11)
Yuhui.Zheng [Sun, 16 Feb 2020 21:18:58 +0000 (13:18 -0800)]
Replacing readme.txt with README.md. (#11)

5 years agoCorrect the xTimerCreate() documentation which said NULL was returned if the timer...
Yuhui.Zheng [Fri, 14 Feb 2020 20:16:10 +0000 (12:16 -0800)]
Correct the xTimerCreate() documentation which said NULL was returned if the timer period was passed into the function as 0, whereas that is not the case. (#10)

Add a note to the documentation for both the xTimerCreate() and xTimerCreateStatic() functions that the timer period must be greater than 0.

5 years agoRe-sync with upstream and stripping away none kernel related. V10.3.0-kernel-only
Yuhui Zheng [Mon, 10 Feb 2020 21:45:57 +0000 (13:45 -0800)]
Re-sync with upstream and stripping away none kernel related.

5 years agoAdded back some TCP/IP stack port layer files.
Richard Barry [Fri, 7 Feb 2020 21:51:48 +0000 (21:51 +0000)]
Added back some TCP/IP stack port layer files.

5 years ago(no commit message)
Richard Barry [Fri, 7 Feb 2020 21:49:55 +0000 (21:49 +0000)]

5 years agoUpdate version number in readiness for V10.3.0 release. Sync SVN with reviewed releas...
Yuhui.Zheng [Fri, 7 Feb 2020 20:14:50 +0000 (20:14 +0000)]
Update version number in readiness for V10.3.0 release. Sync SVN with reviewed release candidate.

5 years agoFix spelling issues.
Yuhui.Zheng [Fri, 7 Feb 2020 19:19:47 +0000 (19:19 +0000)]
Fix spelling issues.

5 years agoAdd "is inside interrupt" function to MPU ports.
Richard Barry [Fri, 7 Feb 2020 01:56:25 +0000 (01:56 +0000)]
Add "is inside interrupt" function to MPU ports.
Make clock setup functions weak symbols in ARMv8-M ports.
Update Cortex-M33 ports to use an interrupt mask in place of globally disabling interrupts, as per the other Cortex-M ports.

5 years agoUpdate TCP to last release versions in preparation for kernel V10.3.0 release.
Richard Barry [Thu, 6 Feb 2020 22:45:37 +0000 (22:45 +0000)]
Update TCP to last release versions in preparation for kernel V10.3.0 release.

5 years agoUpdate libraries and sundry check-ins ready for the V10.3.0 kernel release.
Richard Barry [Thu, 6 Feb 2020 18:52:35 +0000 (18:52 +0000)]
Update libraries and sundry check-ins ready for the V10.3.0 kernel release.

5 years agoESP GCC port -- Added LoadStore Exception handlers.
Yuhui.Zheng [Fri, 31 Jan 2020 19:31:50 +0000 (19:31 +0000)]
ESP GCC port -- Added LoadStore Exception handlers.

https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/9 -- Handles LoadStoreErrorCause and LoadStoreAlignmentCause allowing to use 32-bit memory region (IRAM) as 8-bit or 16-bit memory region

5 years agoSync FreeRTOS-Labs -CLI -TCP -Trace with the version in FreeRTOS-Plus.
Yuhui.Zheng [Fri, 31 Jan 2020 19:21:15 +0000 (19:21 +0000)]
Sync FreeRTOS-Labs -CLI -TCP -Trace with the version in FreeRTOS-Plus.

Projects under FreeRTOS-Labs directory are in beta, developers updating projects please make sure you are using the correct version of -CLI -TCP -Trace. If you must edit -CLI -TCP and -Trace, please ensure the copies are synced.

5 years agoSync FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP with the version in GitHub at (23665258ca...
Yuhui.Zheng [Fri, 31 Jan 2020 00:07:53 +0000 (00:07 +0000)]
Sync FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP with the version in GitHub at (23665258cabe49d5d68ba23968b6845a7c80eb34).

Notes:
- header has version 2.2.0.
- This sync did not bring in ./test directory, though we should.
- New NetworkInterfaces are introduced by this merge.
- Keil compiler support.
- FreeRTOS_IP.h new API xApplicationGetRandomNumber().
- FreeRTOS_IP_Private.h new eIPEvent_t eNetworkTxEvent.
- FreeRTOS_Stream_Buffer.h removing static xStreamBufferIsEmpty() and xStreamBufferIsFull().
- FreeRTOSConfigDefaults.h provides default ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS.
- other type changes.

5 years agoRemoving RISC-V port under ThirdParty.
Yuhui.Zheng [Thu, 30 Jan 2020 22:23:03 +0000 (22:23 +0000)]
Removing RISC-V port under ThirdParty.

RISC-V ports for IAR and GCC can now be found under \FreeRTOS\Source\portable\GCC\RISC-V and \FreeRTOS\Source\portable\IAR\RISC-V.

5 years agoRemoving unnecessary ThirdParty ports -- Wiced_CY and nrf52840-dk.
Yuhui.Zheng [Thu, 30 Jan 2020 19:45:03 +0000 (19:45 +0000)]
Removing unnecessary ThirdParty ports -- Wiced_CY and nrf52840-dk.

For projects depending on either of these two ports, please update your projects according to below:
Wiced_CY -- Use GCC/ARM_CRx_No_GIC instead.
nrf52840-dk -- Use GCC/ARM_CM7/r0p1 instead. Please note that, kernel port shall only take dependency on MCU core, not MCU peripherals. (Please take out RTC related from kernel port.) For low power feature (tickless) in FreeRTOS, please follow this page https://www.freertos.org/low-power-ARM-cortex-rtos.html. In case ARM_CM7/rop1 is missing any feature, reach out to us.

5 years agoRemove the FreeRTOS-IoT-Libraries from FreeRTOS-Plus as it was an old copy with a...
Richard Barry [Thu, 30 Jan 2020 00:05:23 +0000 (00:05 +0000)]
Remove the FreeRTOS-IoT-Libraries from FreeRTOS-Plus as it was an old copy with a newer copy in FreeRTOS-Labs.

5 years agoCorrect an err in queue.c introduced when previously updating behaviour when queue...
Richard Barry [Wed, 29 Jan 2020 19:52:38 +0000 (19:52 +0000)]
Correct an err in queue.c introduced when previously updating behaviour when queue sets are used in combination with queue overwrites.

5 years agoCleaning up LPC51U68 projects:
Yuhui.Zheng [Fri, 24 Jan 2020 07:53:14 +0000 (07:53 +0000)]
Cleaning up LPC51U68 projects:
- user playable settings are all in FreeRTOSConfig.h.
- removed reference to IntQueue.h in main_full.c
- readme.txt wording.

5 years agoIntroduce the portSOFTWARE_BARRIER macro which thus far is only used by the Win32...
Richard Barry [Thu, 23 Jan 2020 23:49:24 +0000 (23:49 +0000)]
Introduce the portSOFTWARE_BARRIER macro which thus far is only used by the Win32 demo to hold execution up in case a simulated interrupt is executing simultaneously.  That should never happen as all threads should execute on the same core, but we have had numerous reports that this and other Win32 port changes we have made fixed these issues - although we have not been able to replicate them ourselves.

5 years agoAdd MPU demo project for Nulceo-L152RE which is Coretx-M3.
Gaurav Aggarwal [Thu, 23 Jan 2020 01:56:36 +0000 (01:56 +0000)]
Add MPU demo project for Nulceo-L152RE which is Coretx-M3.

5 years agoUpdates to CM3_MPU GCC port
Gaurav Aggarwal [Thu, 23 Jan 2020 01:50:25 +0000 (01:50 +0000)]
Updates to CM3_MPU GCC port

- System calls are now only allowed from kernel code. This change can be turned on
  or off using configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY.
- MPU is disabled before reprogramming it and enabled afterwards to be compliant
  with ARM recommendations.

5 years agoEnsure both one-shot and auto-reload are written consistently with a hyphen in comments.
Richard Barry [Thu, 16 Jan 2020 04:25:29 +0000 (04:25 +0000)]
Ensure both one-shot and auto-reload are written consistently with a hyphen in comments.

5 years agoAdded uxTimerGetReloadMode() API function.
Richard Barry [Thu, 16 Jan 2020 04:10:18 +0000 (04:10 +0000)]
Added uxTimerGetReloadMode() API function.

5 years agoAdd MPU demo project for LPC54018 board.
Gaurav Aggarwal [Sun, 12 Jan 2020 12:33:17 +0000 (12:33 +0000)]
Add MPU demo project for LPC54018 board.

5 years agoIntroduce a port for T-HEAD CK802. A simple demo for T-HEAD CB2201 is also included.
Yuhui.Zheng [Fri, 10 Jan 2020 07:53:14 +0000 (07:53 +0000)]
Introduce a port for T-HEAD CK802. A simple demo for T-HEAD CB2201 is also included.

5 years agoUpdate the GCC and IAR SiFive HiFive rev-b demos to use the new configMTIME_BASE_ADDR...
Richard Barry [Thu, 9 Jan 2020 02:28:45 +0000 (02:28 +0000)]
Update the GCC and IAR SiFive HiFive rev-b demos to use the new configMTIME_BASE_ADDRESS and configMTIMECMP_BASE_ADDRESS constants in place of the deprecated configCLINT_BASE_ADDRESS constant.
Update the IAR RISC-V HiFive demo to use the latest IAR Embedded Workbench version.

5 years agoReplace portasmHAS_CLINT with configMTIME_BASE_ADDRESS and configMTIMECMP_BASE_ADDRES...
Richard Barry [Thu, 9 Jan 2020 02:23:51 +0000 (02:23 +0000)]
Replace portasmHAS_CLINT with configMTIME_BASE_ADDRESS and configMTIMECMP_BASE_ADDRESS definitions in the IAR RISC-V port - portasmHAS_CLIT will still work by deriving the new definitions from the old.

5 years agoWork in progress update of LPC51U68 MCUXpresso project to rearrange the folder struct...
Richard Barry [Thu, 9 Jan 2020 00:19:36 +0000 (00:19 +0000)]
Work in progress update of LPC51U68 MCUXpresso project to rearrange the folder structure and names.

5 years agoReplace portasmHAS_CLINT with configMTIME_BASE_ADDRESS and configMTIMECMP_BASE_ADDRES...
Richard Barry [Tue, 7 Jan 2020 01:14:36 +0000 (01:14 +0000)]
Replace portasmHAS_CLINT with configMTIME_BASE_ADDRESS and configMTIMECMP_BASE_ADDRESS definitions in the GCC RISC-V port - portasmHAS_CLIT will still work by deriving the new definitions from the old.

5 years agoAdd Source/portable/ARMClang file that directs users to the GCC port if they which...
Richard Barry [Sat, 4 Jan 2020 00:14:18 +0000 (00:14 +0000)]
Add Source/portable/ARMClang file that directs users to the GCC port if they which to use the ARMClang compiler.

6 years agoIf tickless idle mode is in use then ensure prvResetNextTaskUnblockTime() is called...
Richard Barry [Fri, 3 Jan 2020 22:50:31 +0000 (22:50 +0000)]
If tickless idle mode is in use then ensure prvResetNextTaskUnblockTime() is called after a task is unblocked due to a bit being set in an event group.  This allows the MCU to re-enter sleep mode at the earliest possible time (rather than waiting until the timeout that would occur had the task not being unblocked be the event group) and matches a similar change made for queues and derivative objects (semaphores, etc.) some time ago.

6 years agoCorrect #error text in multiple fat file system files.
Richard Barry [Fri, 3 Jan 2020 20:53:27 +0000 (20:53 +0000)]
Correct #error text in multiple fat file system files.

6 years agoAdd xPortIsInsideInterrupt() to the IAR ARMv7-M ports.
Richard Barry [Fri, 3 Jan 2020 01:17:29 +0000 (01:17 +0000)]
Add xPortIsInsideInterrupt() to the IAR ARMv7-M ports.

6 years agoAdded xTaskAbortDelayFromISR() and ulTaskNotifyValueClear() API functions.
Richard Barry [Thu, 2 Jan 2020 18:55:20 +0000 (18:55 +0000)]
Added xTaskAbortDelayFromISR() and ulTaskNotifyValueClear() API functions.
Added tests for xTaskAbortDelayFromISR() into Demo/Common/Minimal/AbortDelay.c.
Added tests for ulTaskNotifyValueClear() into Demo/Common/Minimal/TaskNotify.c.

6 years agoRenamed RISC-V_RV32_SiFive_HiFive1_IAR directory to RISC-V_RV32_SiFive_HiFive1-RevB_I...
Richard Barry [Wed, 1 Jan 2020 22:38:23 +0000 (22:38 +0000)]
Renamed RISC-V_RV32_SiFive_HiFive1_IAR directory to RISC-V_RV32_SiFive_HiFive1-RevB_IAR as it targets the RevB hardware.

6 years agoMinor updates to comment block for xTaskCheckForTimeOut().
Richard Barry [Wed, 1 Jan 2020 22:24:44 +0000 (22:24 +0000)]
Minor updates to comment block for xTaskCheckForTimeOut().

6 years agoRename RISC-V_RV32_SiFive_HiFive1-FreedomStudio directory to RISC-V_RV32_SiFive_HiFiv...
Richard Barry [Wed, 1 Jan 2020 22:05:35 +0000 (22:05 +0000)]
Rename RISC-V_RV32_SiFive_HiFive1-FreedomStudio directory to RISC-V_RV32_SiFive_HiFive1-RevB-FreedomStudio as it targets Rev B of the hardware.

6 years agoUpdate RISCC-V-RV32-SiFive_HiFive1_FreedomStudio project to latest tools and metal...
Richard Barry [Wed, 1 Jan 2020 22:02:06 +0000 (22:02 +0000)]
Update RISCC-V-RV32-SiFive_HiFive1_FreedomStudio project to latest tools and metal library versions.

6 years agoRename STM32Cube to GCC for STM32L4 Discovery projects as GCC is
Gaurav Aggarwal [Wed, 1 Jan 2020 00:35:42 +0000 (00:35 +0000)]
Rename STM32Cube to GCC for STM32L4 Discovery projects as GCC is
the compiler used.

6 years agoMake vSetupTimerInterrupt weak in the RVDS M4 MPU port to give the
Gaurav Aggarwal [Wed, 1 Jan 2020 00:04:10 +0000 (00:04 +0000)]
Make vSetupTimerInterrupt weak in the RVDS M4 MPU port to give the
application writer a chance to override this function. This gives
the application write ability to use a different timer.

6 years agoUpdate documentation of xTaskCheckForTimeOut function to reflect the
Gaurav Aggarwal [Tue, 31 Dec 2019 20:49:07 +0000 (20:49 +0000)]
Update documentation of xTaskCheckForTimeOut function to reflect the
intended use of this API.

6 years ago- Updates to projects due to demo folder name change. (IAR source file paths and...
Yuhui.Zheng [Tue, 31 Dec 2019 08:06:33 +0000 (08:06 +0000)]
- Updates to projects due to demo folder name change. (IAR source file paths and assembler path were fixed. Keil source file paths were fixed.)
- Added back power static library for GCC and IAR. (Power management related interface definitions are in drivers/fsl_power.h. power.c is empty due to "implementation is in header file and power library")
- Note for GCC link: the command used for linking is `arm-none-eabi-gcc -nostdlib -L<additional lib search path> -Xlinker ... -o "CORTEX_M0+_LPC51U68_LPCXpresso.axf" <all *.o> -lpower`. Per GCC doc, static library name in file system is libpower.a.

6 years agoPreviously the STM32F0518 compiler setting was changed to enable the use of the __wea...
Richard Barry [Mon, 30 Dec 2019 22:24:58 +0000 (22:24 +0000)]
Previously the STM32F0518 compiler setting was changed to enable the use of the __weak attribute - however changing the port layer to use #pragma weak in place of __weak means the compiler setting change is not required and removes the risk of introducing incompatibilities - so this check in reverts the compiler settings change.

6 years agoEnsure the CORTEX_M0_STM32F0518_IAR demo builds after updates to the Cortex-M0 port...
Richard Barry [Mon, 30 Dec 2019 22:07:33 +0000 (22:07 +0000)]
Ensure the CORTEX_M0_STM32F0518_IAR demo builds after updates to the Cortex-M0 port layer - required an update to the project settings to allow IAR extensions as the port layer now uses the _weak qualifier.

6 years agoEnsure the LPC1114 demo still builds after updates to the Cortex-M0 port layer -...
Richard Barry [Mon, 30 Dec 2019 22:00:26 +0000 (22:00 +0000)]
Ensure the LPC1114 demo still builds after updates to the Cortex-M0 port layer - includes minor update to remove compiler warning that resulted from a newer compiler version.

6 years agoEnsure the LPC1114 demo still builds after updates to the Cortex-M0 port layer -...
Richard Barry [Mon, 30 Dec 2019 21:59:11 +0000 (21:59 +0000)]
Ensure the LPC1114 demo still builds after updates to the Cortex-M0 port layer - includes minor update to remove compiler warning that resulted from a newer compiler version.

6 years agoEnsure the XMC1000_IAR_KEIL_GCC projects still build after updates to the Cortex...
Richard Barry [Mon, 30 Dec 2019 21:44:22 +0000 (21:44 +0000)]
Ensure the XMC1000_IAR_KEIL_GCC projects still build after updates to the Cortex-M0 port layer - minor change to remove warning related to using a newer version of the IAR tools.

6 years agoReplace the static prvSetupTimerInterrupt() function in the Cortex-M port layers...
Richard Barry [Mon, 30 Dec 2019 21:16:09 +0000 (21:16 +0000)]
Replace the static prvSetupTimerInterrupt() function in the Cortex-M port layers that still used it (other than MPU ports so far) with a weakly defined function call vPortSetupTimerInterrupt() - which allows application writers to override the function with one that uses a different clock.

6 years agoCorrect use of xStreamBufferRead() to xStreamBufferReceive() in code comments - no...
Richard Barry [Mon, 30 Dec 2019 20:00:49 +0000 (20:00 +0000)]
Correct use of xStreamBufferRead() to xStreamBufferReceive() in code comments - no source code changes.

6 years agoTidy up comments only.
Richard Barry [Fri, 27 Dec 2019 21:22:07 +0000 (21:22 +0000)]
Tidy up comments only.

6 years agoEnable the Win32 comprehensive test/demo build and run when configUSE_QUEUE_SETS...
Richard Barry [Fri, 27 Dec 2019 21:02:23 +0000 (21:02 +0000)]
Enable the Win32 comprehensive test/demo build and run when configUSE_QUEUE_SETS is set to 0.

6 years agoUpdate the LM3Sxxxx_IAR_Keil demo so the IAR project writes to the UART and executes...
Richard Barry [Fri, 27 Dec 2019 20:59:57 +0000 (20:59 +0000)]
Update the LM3Sxxxx_IAR_Keil demo so the IAR project writes to the UART and executes in QEMU.

6 years agoUpdates to CM4_MPU RCDS port
Gaurav Aggarwal [Tue, 24 Dec 2019 22:45:32 +0000 (22:45 +0000)]
Updates to CM4_MPU RCDS port

- System calls are now only allowed from kernel code. This change can be turned on
  or off using configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY.
- MPU is disabled before reprogramming it and enabled afterwards to be compliant
  with ARM recommendations.

6 years agoRemove local paths from the URL files
Gaurav Aggarwal [Tue, 24 Dec 2019 19:16:19 +0000 (19:16 +0000)]
Remove local paths from the URL files

6 years agoAdd readme into the third party RISC-V port that points to the directories that conta...
Richard Barry [Tue, 24 Dec 2019 17:24:23 +0000 (17:24 +0000)]
Add readme into the third party RISC-V port that points to the directories that contains the official ports.

6 years agoAdd IAR MPU project for STM32L475 Discovery Kit IoT Node
Gaurav Aggarwal [Sat, 21 Dec 2019 00:04:04 +0000 (00:04 +0000)]
Add IAR MPU project for STM32L475 Discovery Kit IoT Node

6 years agoUpdates to CM4_MPU IAR port
Gaurav Aggarwal [Sat, 21 Dec 2019 00:02:31 +0000 (00:02 +0000)]
Updates to CM4_MPU IAR port

- System calls are now only allowed from kernel code. This change can be turned on
  or off using configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY.
- MPU is disabled before reprogramming it and enabled afterwards to be compliant
  with ARM recommendations.

6 years agoIncrease test coverage for queue sets.
Richard Barry [Fri, 20 Dec 2019 02:54:30 +0000 (02:54 +0000)]
Increase test coverage for queue sets.
Rename the CORTEX_M0+_LPC51U68_LPCXpresso demo to CORTEX_M0+_LPC51U68_GCC_IAR_KEIL as it supports all three compilers.

6 years agoRemove build files accidentally checked in.
Richard Barry [Fri, 20 Dec 2019 02:49:15 +0000 (02:49 +0000)]
Remove build files accidentally checked in.
Remove the CMSIS math library as it is large and not used.

6 years agoAdd MPU projects for STM32L475 Discovery Kit IoT Node
Gaurav Aggarwal [Fri, 20 Dec 2019 02:07:09 +0000 (02:07 +0000)]
Add MPU projects for STM32L475 Discovery Kit IoT Node

6 years agoUpdates to CM4_MPU GCC port
Gaurav Aggarwal [Fri, 20 Dec 2019 02:05:44 +0000 (02:05 +0000)]
Updates to CM4_MPU GCC port

- System calls are now only allowed from kernel code. This change can be turned on
  or off using configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY.
- MPU is disabled before reprogramming it and enabled afterwards to be compliant
  with ARM recommendations.

6 years agoAdding GCC/Keil/IAR projects for NXP LPC51U68 (CM0+).
Yuhui.Zheng [Wed, 18 Dec 2019 10:06:30 +0000 (10:06 +0000)]
Adding GCC/Keil/IAR projects for NXP LPC51U68 (CM0+).

Please see readme.txt for todo items.

6 years agoCortex M0 GCC/IAR/Keil ports -- tickless support.
Yuhui.Zheng [Wed, 18 Dec 2019 09:55:08 +0000 (09:55 +0000)]
Cortex M0 GCC/IAR/Keil ports -- tickless support.

The default portMISSED_COUNTS_FACTOR is set to 45 cycles. User could override this value, if a more accurate count is available.