Code Monkey home page Code Monkey logo

freertos / freertos Goto Github PK

View Code? Open in Web Editor NEW
4.8K 4.8K 1.5K 131.1 MB

'Classic' FreeRTOS distribution. Started as Git clone of FreeRTOS SourceForge SVN repo. Submodules the kernel.

Home Page: https://www.FreeRTOS.org

License: MIT License

C 95.79% C++ 0.01% Python 0.06% Assembly 1.11% Batchfile 0.04% HTML 2.02% JavaScript 0.01% Makefile 0.29% Shell 0.02% Perl 0.01% CartoCSS 0.01% Tcl 0.60% GDB 0.01% LSL 0.01% PowerShell 0.01% PLSQL 0.01% Standard ML 0.01% Opa 0.01% CMake 0.02% FreeMarker 0.01%

freertos's Introduction

The FreeRTOS 202212.00 release updates FreeRTOS Kernel, FreeRTOS+TCP, coreMQTT, corePKCS11, coreHTTP, coreJSON, AWS IoT Over-the-air-Updates (OTA), AWS IoT Device Shadow, AWS IoT Jobs, AWS IoT Device Defender, Backoff Algorithm, AWS IoT Fleet Provisioning, coreSNTP, SigV4, and FreeRTOS Cellular Interface libraries to their LTS 2.0 versions. It also updates coreMQTT Agent to v1.2.0 to be compatible with coreMQTT v2.X.X, and updates MbedTLS to v3.2.1. This release also adds Visual Studio static library projects for the FreeRTOS Kernel, FreeRTOS+TCP, Logging, MbedTLS, coreHTTP, and corePKCS11. With the addition of the static library projects, all Visual Studio projects have been updated to use them. Additionally, all demos dependent on coreMQTT have been updated to work with coreMQTT v2.X.X.

Getting started

The FreeRTOS.org website contains a FreeRTOS Kernel Quick Start Guide, a list of supported devices and compilers, the API reference, and many other resources.

Getting help

You can use your Github login to get support from both the FreeRTOS community and directly from the primary FreeRTOS developers on our active support forum. The FAQ provides another support resource.

Cloning this repository

This repo uses Git Submodules to bring in dependent components.

Note: If you download the ZIP file provided by the GitHub UI, you will not get the contents of the submodules. (The ZIP file is also not a valid git repository)

If using Windows, because this repository and its submodules contain symbolic links, set core.symlinks to true with the following command:

git config --global core.symlinks true

In addition to this, either enable Developer Mode or, whenever using a git command that writes to the system (e.g. git pull, git clone, and git submodule update --init --recursive), use a console elevated as administrator so that git can properly create symbolic links for this repository. Otherwise, symbolic links will be written as normal files with the symbolic links' paths in them as text. This gives more explanation.

To clone using HTTPS:

git clone https://github.com/FreeRTOS/FreeRTOS.git --recurse-submodules

Using SSH:

git clone [email protected]:FreeRTOS/FreeRTOS.git --recurse-submodules

If you have downloaded the repo without using the --recurse-submodules argument, you need to run:

git submodule update --init --recursive

Repository structure

This repository contains the FreeRTOS Kernel, a number of supplementary libraries including the LTS ones, and a comprehensive set of example projects. Many libraries (including the FreeRTOS kernel) are included as Git submodules from their own Git repositories.

Kernel source code and example projects

FreeRTOS/Source contains the FreeRTOS kernel source code (submoduled from https://github.com/FreeRTOS/FreeRTOS-Kernel).

FreeRTOS/Demo contains pre-configured example projects that demonstrate the FreeRTOS kernel executing on different hardware platforms and using different compilers.

Supplementary library source code and example projects

FreeRTOS-Plus/Source contains source code for additional FreeRTOS component libraries, as well as select partner provided libraries. These subdirectories contain further readme files and links to documentation.

FreeRTOS-Plus/Demo contains pre-configured example projects that demonstrate the FreeRTOS kernel used with the additional FreeRTOS component libraries.

Previous releases

Releases contains older FreeRTOS releases.

FreeRTOS Lab Projects

FreeRTOS Lab projects are libraries and demos that are fully functional, but may be experimental or undergoing optimizations and refactorization to improve memory usage, modularity, documentation, demo usability, or test coverage.

Most FreeRTOS Lab libraries can be found in the FreeRTOS-Labs repository.

A number of FreeRTOS Lab Demos can be found in the FreeRTOS Github Organization by searching for "Lab" or following this link to the search results.

coreMQTT Agent Demos

The FreeRTOS/coreMQTT-Agent-Demos repository contains demos to showcase use of the coreMQTT-Agent library to share an MQTT connection between multiple application tasks.

The demos show a single MQTT connection usage between multiple application tasks for interacting with AWS services (including Over-the-air-Updates, Device Shadow, Device Defender) alongside performing simple Publish-Subscribe operations.

CBMC

The FreeRTOS/Test/CBMC/proofs directory contains CBMC proofs.

To learn more about CBMC and proofs specifically, review the training material here.

In order to run these proofs you will need to install CBMC and other tools by following the instructions here.

freertos's People

Contributors

actoryou avatar aggarg avatar aggarw13 avatar alfred2g avatar andysun2015 avatar aniruddhakanhere avatar archigup avatar chinglee-iot avatar cobusve avatar dachalco avatar dependabot[bot] avatar gshvang avatar jasonpcarroll avatar johnrhen avatar kar-rahul-aws avatar kstribrnamzn avatar lundinc2 avatar mingyue86010 avatar muneebahmed10 avatar n9wxu avatar nchong-at-aws avatar nomay-jp avatar paulbartell avatar richardbarry avatar skptak avatar sukhmanm avatar tianmc1 avatar tony-josi-aws avatar yourslab avatar yuhui-zheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freertos's Issues

why taskpool lib malloc memeory using static and dynamic both?

at iot_threads_freeftos.c please see the function as below. i am confonfused that ,it create threads use dynmaic . but creat mutex use static. if i only want to use dynamic . it' could not link susscessful.

``
bool Iot_CreateDetachedThread( IotThreadRoutine_t threadRoutine,
void * pArgument,
int32_t priority,
size_t stackSize )
{
bool status = true;

configASSERT( threadRoutine != NULL );

IotLogDebug( "Creating new thread." );
threadInfo_t * pThreadInfo = IotThreads_Malloc( sizeof( threadInfo_t ) );

if( pThreadInfo == NULL )
{
    IotLogDebug( "Unable to allocate memory for threadRoutine %p.", threadRoutine );
    status = false;
}

/* Create the FreeRTOS task that will run the thread. */
if( status )
{
    pThreadInfo->threadRoutine = threadRoutine;
    pThreadInfo->pArgument = pArgument;

    if( xTaskCreate( _threadRoutineWrapper,
                     "iot_thread",
                     ( configSTACK_DEPTH_TYPE ) stackSize,
                     pThreadInfo,
                     priority,
                     NULL ) != pdPASS )
    {
        /* Task creation failed. */
        IotLogWarn( "Failed to create thread." );
        IotThreads_Free( pThreadInfo );
        status = false;
    }
}

return status;

}

bool IotMutex_Create( IotMutex_t * pNewMutex,
bool recursive )
{
_IotSystemMutex_t * internalMutex = ( _IotSystemMutex_t * ) pNewMutex;

configASSERT( internalMutex != NULL );

IotLogDebug( "Creating new mutex %p.", pNewMutex );

if( recursive )
{
    ( void ) xSemaphoreCreateRecursiveMutexStatic( &internalMutex->xMutex );
}
else
{
    ( void ) xSemaphoreCreateMutexStatic( &internalMutex->xMutex );
}

/* remember the type of mutex */
if( recursive )
{
    internalMutex->recursive = pdTRUE;
}
else
{
    internalMutex->recursive = pdFALSE;
}

return true;

}``

FreeRTOS plus submodules

Would it be practical for the FreeRTOS plus libraries (like FreeRTOS+TCP) to be made submodules like the kernel?

I have been working with Rust bindings to the kernel, and the fact that the kernel is a submodule has made my task a lot easier.
I intend to write Rust bindings to FreeRTOS+TCP. If the same submodule approach were done for FreeRTOS+TCP, that would make this much easier as well.

[BUG] Invalid configASSERT() in MingW demo project

Describe the bug
A configASSERT() in the Eclipse/MingW demo project is now invalid and preventing the demo from executing.

Target

  • Development board: PC, MingW, Eclipse
  • Instruction Set Architecture: Windows x86
  • IDE and version: Eclipse
  • Toolchain and version: MingW

Host

  • Host OS: Windows
  • Version: 10

To Reproduce

  • Follow these instructions to build using MingW/Eclipse.
  • Start executing, an assert is hit in the function that initialises the heap, before any tasks are created.

Expected behavior
There shouldn't be an assert in FreeRTOS V10.3.x code.

Screenshots
N/A

Additional context
To fix, remove this assert, which is invalid and should not be there. You can then also remove the line above it (the call to vPortGetHeapStats()), and the xHeapStats and xZeroHeapStats variables which will then be defined but not used.

[Feature Request] Add a method to obtain the handle of the FreeRTOS+TCP IP task

Is your feature request related to a problem? Please describe.
The FreeRTOS+TCP stack creates a task in which it runs the TCP/IP protocol. A forum user needed access to the task's handle in order to place the task into the Suspended state, but currently none of the FreeRTOS+TCP API functions return the task's handle.

Describe the solution you'd like
Add a function that returns the handle of the task created by FreeRTOS+TCP.

Additional context
See the forum post https://forums.freertos.org/t/start-with-tcp-ip-task-suspended/12180

TCP support heap_1.c scheme for one socket using REUSE_LISTEN_SOCKET or similar flag

Is your feature request related to a problem? Please describe.

Currently, there is no option to use heap_1 and the TCP stack since any closing socket is result in vEventGroupDelete and vPortFree. Since any socket can be closed, it makes using TCP stack with heap1 scheme impractical.

Describe the solution you would like.
support heap_1 with reusing the socket in the following conditions:

  1. Only one connection supported, listening socket resources will be used for the client socket, same as current action with REUSE_LISTEN_SOCKET
  2. The socket shouldn't be closed, only shutdown
  3. After shutdown, calling listen() on the the socket will result in returning the socket to listening mode, allowing it to reconnect
  4. Like any other FreeRTOS object, the socket can be created and not destroyed, while the maintaining the socket behavior of opening and closing.

Additional context
This will allow implementing a simple server with one peer-to-peer connection only, without full implementation of static socket allocation. It's can be add with a new flag (e.g. FREERTOS_SO_ALLOW_RECONNECT_LISTEN_SOCKET) to keep the new behavior separated from the old REUSE_LISTEN_SOCKET.

The need for this feature came from a project I'm currently working on, and I believe that it can be useful for other device who want to implement TCP connection with restricted memory management.

I'm willing to work on it myself, if the community support the idea.

FreeRTOS+TCP should cache more than one DNS result IP address

FreeRTOS+TCP currently caches only a single DNS result IP address when ipconfigUSE_DNS_CACHE == 1. This doesn't work well with load balanced services where DNS returns a list of addresses for use โ€“ see AWS Route 53 FAQ as one example. As described in that FAQ, "IP addresses associated with load balancers can change at any time due to scaling up, scaling down, or software updates.". Because it can take time for DNS to update, sometimes the IP address cached by FreeRTOS+TCP will not be valid. For most clients, this is not an issue. For example in Linux, gethostbyname() returns all of the IP addresses associated with the hostname in a struct hostent structure. If a client can't connect to one of the IP addresses, it can simply retry with the next one in the list. However, in FreeRTOS+TCP if the single address stored in the cache is not valid, the application will be unable to connect to the service until the TTL expires and a new DNS query is sent.

Example DNS lookup of load-balanced service โ€“ FreeRTOS+TCP should allow the DNS result cache to be configured such that it contains multiple IP addresses per host, and applications should be able to cycle through these addresses if it can't connect to one of them.

$ nslookup xxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com
Server:		xxx.xxx.xxx.xxx
Address:	xxx.xxx.xxx.xxx#53

Non-authoritative answer:
Name:	xxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com
Address: 52.4x.xxx.xxx
Name:	xxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com
Address: 52.2x.xxx.xxx
Name:	xxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com
Address: 52.1x.xxx.xxx
Name:	xxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com
Address: 34.2xx.xxx.xxx
Name:	xxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com
Address: 52.3x.xx.xxx
Name:	xxxxxxxxxxxxxx-ats.iot.us-west-2.amazonaws.com
Address: 44.2xx.xx.xxx

[Feature Request] No prototypes for vApplicationGetXXXTaskMemory() callbacks

According to the docs the application writer must provide two callback functions if configSUPPORT_STATIC_ALLOCATION is set to 1: vApplicationGetIdleTaskMemory() and vApplicationGetTimerTaskMemory().

However, there is no header file available in the source code of FreeRTOS which provides proper prototypes for these functions. It is good practice to have a single function prototype shared by code implementing the function and code calling the function.

GCC emit warnings for this when compiled with -Wmissing-prototypes.

Right now there are 'external' declarations for these functions in task.c (e.g. here). Could these declarations be moved to e.g. tasks.h?

Unable to open mbedtls/check_config.h

I am trying to run the MQTT Demo with TLS (https://www.freertos.org/mqtt/preconfiguredexamplesTLS.html) on Visual Studio 2019(FreeRTOS WIndows Port). However, when I build the solution, (mqtt_basic_tls_demo.sln) I get the following error:

Error (active) E1696 cannot open source file "/mbedtls/check_config.h"
Error C1083 Cannot open include file: 'mbedtls_config.h': No such file or directory
Error C1083 Cannot open include file: 'mbedtls/ctr_drbg.h': No such file or directory

I checked the folder mbedtls which was empty. I deleted the empty folder and cloned mbedtls ( from https://github.com/ARMmbed/mbedtls)

and included the path in additional directories from project properties. However, errors still persist.

Prior to this, I had successfully built and ran the solution file for the plain text demo (https://www.freertos.org/mqtt/preconfiguredexamples.html)

What else can I try doing?
Any suggestions would be highly appreciated! Thanks!

Using Git X-Modules instead of Git submodules for smooth integration

Hi guys,

We have just published a new GitHub app, Git X-Modules. It makes modules' management in Git much more clear and straightforward, than it is with Git submodules. It allows you to combine repositories together as regular directories and work with them, using standard Git commands - with all sync jobs running in the background.

In your project this tool will let users to clone or download the zip file completely with all modules, without caring to init submodules etc.

Would you like to try it out? We would love to hear your feedback!

[BUG] Delete a task in competition will cause a crash

Task A deletes itself and triggers idle task to delete TCB A. When the idle task calls prvCheckTasksWaitingTermination->( void) uxListRemove( &( pxTCB->xStateListItem) ), then the pvContainer of the xStateListItem item in TCB A becomes NULL. When taskEXIT_CRITICAL is called, dispatch is triggered. At this time, task B just calls vTaskDelete to delete task A, vTaskDelete->uxListRemove( &( pxTCB->xStateListItem ), in the uxListRemove function call, pvContainer in TCB A has become NULL, and any assignment to this pointer will cause a crash
image
image
image

[BUG] Old Trace Recorder in FreeRTOS-Plus

Describe the bug
I have a pull request at #330 for the latest Trace Recorder.
Is this how I should draw attention to a pull request for an updated recorder so it makes it into coming releases?
Or just post in the forums? Which is better?

Target
N/A

Host
N/A

To Reproduce
N/A

Expected behavior
N/A

Screenshots
N/A

Additional context
N/A

SIM800 integration

How to interface FreeRtos with SIM800 to use the TCP layer supported by the module and connect to broker through FreeRTOS MQTT and TLS

Use a relative URL for the FreeRTOS-Kernel submodule.

The url option for the FreeRTOS-Kernel submodule can just be ../FreeRTOS-Kernel.git rather than the full github URL. This would help organizations that would like to mirror both of these repos without having the FreeRTOS-Kernel submodule always point at github, which is not desirable.

[DOC] xTaskResumeFromISR and maybe other api examples are not updated with correct portYIELD_FROM_ISR usage

Describe the issue
At example at bottom of page https://www.freertos.org/taskresumefromisr.html is code

if( xYieldRequired == pdTRUE )
     {
         // We should switch context so the ISR returns to a different task.
         // NOTE:  How this is done depends on the port you are using.  Check
         // the documentation and examples for your port.
         portYIELD_FROM_ISR();
     }

and i think it should be:

 // We should switch context so the ISR returns to a different task.
 // NOTE:  How this is done depends on the port you are using.  Check
 // the documentation and examples for your port.
 portYIELD_FROM_ISR(xYieldRequired);

Reference
https://www.freertos.org/taskresumefromisr.html

Screenshot
If applicable, please attach screenshot.

Browser

  • Browser: Chrome
  • Version: 90.xxx

Compiling tasks.c with configSUPPORT_DYNAMIC_ALLOCATION = 0

Compiling tasks.c with configSUPPORT_DYNAMIC_ALLOCATION = 0
Compiling tasks.c with configSUPPORT_DYNAMIC_ALLOCATION = 0 emits unused prvWriteNameToBuffer() function.

Target

  • any gcc-based compiler with "warnings as error" (-Werror) set

Host

  • presumably any

To Reproduce

  • Create a project with configSUPPORT_DYNAMIC_ALLOCATION set to zero
  • Configure compiler with Werror
  • Compile project
  • Observe error 'prvWriteNameToBuffer' defined but not used [-Werror=unused-function]

Expected behavior
Since prvWriteNameToBuffer() is only called by functions guarded by #if (configSUPPORT_DYNAMIC_ALLOCATION == 1), the
declaration and definition of prvWriteNameToBuffer() should have similar conditionals.

Additional context
This issue is being filed specifically to generate a bug # for a PR, coming soon...

[Feature Request] Improvement to UARTCommandConsole.c

Is your feature request related to a problem? Please describe.
UARTCommandConsole.c is a template that demonstrates how to use a UART as the IO interface for FreeRTOS+CLI. The file has two variables with the same name. First a file scope static intended to allow tasks other than the CLI task access the serial console. The second is function scope variable for use in the FreeRTOS+CLI task itself. The file scope variable is never changed from its initial value of 0, and its definition is hidden by the variable of the same name in FreeRTOS+CLI task.

Describe the solution you'd like

  1. Remove the function scope variable so all tasks, including the FreeRTOS+CLI task, use the file scope variable.
  2. Add a prototype for vOutputString

See the forum post here: https://forums.freertos.org/t/uninitialized-use-of-static-variable-in-rtosdemo-examples-uartcommandconsole-c/12181

[question] `mtvec` is not set in the demonstration of Spike?

int main( void )
{
int ret;
#if defined(DEMO_BLINKY)
ret = main_blinky();
#else
#error "Please add or select demo."
#endif
return ret;
}

I think this demonstration doesn't set mtvec since I don't see any context switching with my GDB on Spike.
I can see the output correctly after adding either of the modifications to the main(void) function.

__asm__ volatile( "csrw mtvec, %0" :: "r"( freertos_risc_v_trap_handler ) );

or

(Compile with vector_table.S)
__asm__ volatile( "csrw mtvec, %0" :: "r"( ( uintptr_t )freertos_vector_table | 0x1 ) );

[BUG] the code can not build with C++ complier, reboot error

Describe the bug
My project is usually written with c++ code, so I want to compiler the freertos with c++ compiler. My develop tool is IAR FOR ARM9.10.1, and I download the latest FreeRTOS code, and open the demo<FreeRTOSv202104.00\FreeRTOS\Demo\CORTEX_M4F_STM32F407ZG-SK>, it is build well with C compiler, but when I use C++ complier, it report errors,
Error[Pe513]: a value of type "void *" cannot be assigned to an entity of type "BlockLink_t *"
Error[Pe513]: a value of type "void *" cannot be assigned to an entity of type "TCB_t *"
Error[Pe513]: a value of type "void *" cannot be assigned to an entity of type "uint32_t *"

Target

  • Development board:
  • Instruction Set Architecture:
  • IDE and version: IAR FOR ARM 9.10.1
  • Toolchain and version:

Host

  • Host OS: win10 pro
  • Version:

To Reproduce

Expected behavior
A concise description of what you expected to happen.

Screenshots
image
image
Uploading image.pngโ€ฆ

[BUG] hardfault after xTimerStart in a task in NRF52832

``
static void sample_task_entry(void * pvParameter)
{
UNUSED_PARAMETER(pvParameter);
EventBits_t event;

check_err_timer = xTimerCreate("Timer", 2000, pdFALSE,(void *) 0, check_error_timer_callback);
if( check_err_timer == NULL )
{
NRF_LOG_ERROR("Timer create failure\r\n");
}

while (true)
{
    event = xEventGroupWaitBits(
        sample_task_event_handle,
        IMU_DATA_DRDY_EVENT,
        pdTRUE,  /* bit should be cleared before returning. */
        pdFALSE, /* Don't wait for both bits, either bit will do. */
        portMAX_DELAY);
    if(event == IMU_DATA_DRDY_EVENT)
    {
        xTimerStart(check_err_timer, 0);
        if(icm4x6xx_read_raw_data(icm42686_dev) != SENSOR_SUCCESS)
        {
            NRF_LOG_ERROR("imu data read failure\r\n");
            NRF_LOG_PROCESS();
        }
    }
}

}

HardFault Detail:
hardfault: HARD FAULT at 0x000075B6

hardfault: R0: 0x0000002E R1: 0x00004AB0 R2: 0xD1015F00 R3: 0xF0014601

hardfault: R12: 0x00000002 LR: 0x00008449 PSR: 0x41000000

hardfault: Cause: Data bus error (PC value stacked for the exception return points to the instruction that caused the fault)

FreeRTOSConfig_Template.h

Hi there!

I'm new to FreeRTOS and am creating a test project for an STM32L072 + GCC that does not have a demo project specifically for it.

Each demo project has it's own FreeRTOSConfig.h file, but their ages vary and the content does not seem to keep up with development (?) I have found this page that appears to be up to date with the latest configuration settings (but I'm not 100% sure):
Kernel > Developer Docs > FreeRTOSConfig.h

I want to recommend that a FreeRTOSConfig_Template.h be created and kept updated and in sync with all of the possible configuration settings. That way I will know that I have all of the bases covered.

Thanks for your consideration,
Pieter
https://piconomix.com

Increasing clock speed changes led blink frequency

When I change configCPU_CLOCK_HZ from 10000000 to 20000000 in the Atmega4809 demo the led blinks slower.
I was expecting that clk_config.h and configTICK_RATE_HZ should keep the led blink frequency the same.

Note: I'm running this on a custom board with a Atmega4808

[BUG] return type of xAreSemaphoreTasksStillRunning?

According to FreeRTOS/Demo/Common/include/semtest.h the return type is BaseType_t, according to FreeRTOS/Demo/Common/Full/semtest.c it is portBASE_TYPE. Obviously, this makes compilation fail when the two types differ.

Both files should use the same type.

I ran into this issue when trying to compile the Cygnal port with current SDCC. Apparently, for the Cygnal port one of the types is signed char, while the other is unsigned char.

Adding board support for shakti class of processors

Hi,

We want to add board support to Shakti class of processors. We want to upstream to the FreeRTOS official repository.

I want to know the possibilities of doing it ?
Also, the steps to do it. Please help here.

Background:
The SHAKTI Processor Program, was started as an academic initiative back in 2014 by the RISE group at IIT-Madras. Source code of all the components of the SHAKTI ecosystem are open under the 3 part BSD license.

We have a Hackathon kind of competition happening all over India. We have given an option to use FreeRTOS for the participants. We have ported the FreeRTOS on our boards. So, We feel up-streaming should help everyone of us.

Local ported repository is here

[Inquiry] FPU issue

I am using cortex m4 (stm32f303). I am trying to use FPU in it but every time it stuck in hard fault handler I even called vPORT_ENABLE_FPU() in the task but it does not helped. After that also used portTASK_USES_FLOATING_POINT(); but got nothing always stuck in hardfault handler if you float.
Thanks in advance

ICMP checksum offoloading [Inquiry]

I am tring to port the tcpip stack to the msp432E from ti. The emac peripheral can perform header checksum offloading thus i am using ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM set to 1.
My driver implementation works fine in the case of ip header checksum offloading. However it does not work in the case of ICMP, pings are discarded beacuse of checksum error. Looking at the function prvProcessICMPEchoRequest in FreeRTOS/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_IP.c i realized that the ICMP checksum is calculated despite of the option ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM.
Commenting out the checksum part in prvProcessICMPEchoRequest as follow

/* due to compiler warning "integer operation result is out of range" */
#if ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM
pxICMPHeader->usChecksum=0;
#else
usRequest = ( uint16_t ) ( ( uint16_t )ipICMP_ECHO_REQUEST << 8 );

if( pxICMPHeader->usChecksum >= FreeRTOS_htons( 0xFFFFu - usRequest ) )
{
	pxICMPHeader->usChecksum = ( uint16_t )
		( ( ( uint32_t ) pxICMPHeader->usChecksum ) +
			FreeRTOS_htons( usRequest + 1UL ) );
}
else
{
	pxICMPHeader->usChecksum = ( uint16_t )
		( ( ( uint32_t ) pxICMPHeader->usChecksum ) +
			FreeRTOS_htons( usRequest ) );
}
#endif

solve the problem. Is it possible to add an ipconfig defines
ipconfigDRIVER_INCLUDED_TX_ICMP_CHECKSUM to simplify porting?

[BUG] Renesas RSK64F Demo build errors (linker)

Describe the bug
There are 33 errors when trying to build the RX600_RX64M_RSK_Renesas_e2studio demo with the latest E2 Studio IDE.

Target

  • Development board: Renesas RSK+RX64M (R5F564MLLCDFC processor)
  • Instruction Set Architecture: RXv2
  • IDE and version: Renesas E2 Studio Version 3.0.1.09
  • Toolchain and version: RX Compiler CC-RX V2.01.00

Host

  • Host OS: Windows 10
  • Version: 10.0.15063 Build 15063

To Reproduce
You do not need hardware to reproduce this issue. Simply download the latest E2 Studio IDE from Renesas website [Windows only] and import the RX64M demo as described on the FreeRTOS website (https://www.freertos.org/RX64M_RTOS_Renesas_GCC_e2studio.html). The initial build fails with 33 linker errors related: 2 related to undefined ref to sprint and 31 related to undefined refs to stream buffer symbols.

Expected behavior
Building the demo project should complete successfully without any user modifications required.

Screenshots
N/A

Additional context
Console output:

Description	Resource	Path	Location	Type
E0562310: Undefined external symbol "_xStreamBufferReceiveFromISR" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferReceiveFromISR" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferSend" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferSend" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferAMP.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferSend" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
recipe for target 'RTOSDemo.abs' failed [Conflicting names] 	makefile	/RTOSDemo/HardwareDebug	line 119	C/C++ Problem
make: *** [RTOSDemo.abs] Error 1	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferIsEmpty" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferBytesAvailable" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferGenericCreate" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferGenericCreate" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferGenericCreate" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferAMP.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferIsEmpty" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferSendCompletedFromISR" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferAMP.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_sprintf" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_sprintf" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferAMP.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferGenericCreate" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferInterrupt.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferSendFromISR" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferSendFromISR" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferIsFull" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferIsFull" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferReceive" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferReceive" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferSendFromISR" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferInterrupt.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferReceive" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferAMP.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferSpacesAvailable" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferReset" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferReceive" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferInterrupt.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferSpacesAvailable" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_vStreamBufferDelete" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_vStreamBufferDelete" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferReset" referenced in ".\Source\Common_Demo_Source\Minimal\StreamBufferDemo.obj"	RTOSDemo		 	C/C++ Problem
E0562310: Undefined external symbol "_xStreamBufferNextMessageLengthBytes" referenced in ".\Source\Common_Demo_Source\Minimal\MessageBufferDemo.obj"	RTOSDemo		 	C/C++ Problem

[BUG] Compilation Error with Device Defender Windows Simulator Project

Describe the bug
A concise description of what the bug is.

Compilation error "xOutput': is not a member of 'MetricsType_t". The actual definition of this type in tcp_netstat.h is "XOutput". Uppercase "X" instead of the current "x"

Target

  • Development board: Windows Simulator
  • IDE and version: Visual Studio 2019

Host

  • Host OS: Windows 10

To Reproduce
Unable to build the demo project

[DOC]https demo return 400 error

Describe the issue
https demo return 400 error
Reference
https://www.freertos.org/https/preconfiguredexamples.html
Screenshot
If applicable, please attach screenshot.

Browser

  • Browser: vs 2019 console

i just change democonfigENABLE_TLS to 1

console notes:
The following network interfaces are available:

Interface 1 - rpcap://\Device\NPF_{4B9FC3C4-4218-45FA-9656-586F022C8B0E}
(Network adapter 'Intel(R) Ethernet Connection (7) I219-LM' on local host)

The interface that will be opened is set by "configNETWORK_INTERFACE_TO_USE", which
should be defined in FreeRTOSConfig.h
Attempting to open interface number 1.
Successfully opened interface number 1.
0 86 [MAC_ISR] Bounced back: 00:11:11:11:11:41
1 546 [IP-task] prvAllowIPPacket: UDP packet from 10.10.10.1 without CRC dropped
2 5326 [MAC_ISR] Bounced back: 00:11:11:11:11:41
3 5846 [IP-task] prvAllowIPPacket: UDP packet from 10.10.10.1 without CRC dropped
4 15566 [MAC_ISR] Bounced back: 00:11:11:11:11:41
5 16066 [IP-task] prvAllowIPPacket: UDP packet from 10.10.10.1 without CRC dropped
6 32386 [IP-task] prvAllowIPPacket: UDP packet from 10.10.10.1 without CRC dropped
7 35806 [MAC_ISR] Bounced back: 00:11:11:11:11:41
8 36306 [IP-task] prvAllowIPPacket: UDP packet from 10.10.10.1 without CRC dropped
9 76046 [MAC_ISR] Bounced back: 00:11:11:11:11:41
10 156276 [IP-task] ---------STARTING DEMO---------
11 156276 [IP-task]

IP Address: 10.10.10.200
12 156276 [IP-task] Subnet Mask: 255.0.0.0
13 156276 [IP-task] Gateway Address: 10.10.10.1
14 156276 [IP-task] DNS Server Address: 208.67.222.222

15 156276 [HTTPSDemo] Attempt to connect to httpbin.org:443
16 156346 [MAC_ISR] Bounced back: 00:11:11:11:11:41
17 156906 [MAC_ISR] Bounced back: 00:11:11:11:11:41
18 161386 [HTTPSDemo] DNS[0x727A]: The answer to 'httpbin.org' (3.221.81.55) will be stored
19 161546 [HTTPSDemo] Connected to httpbin.org:443
20 161546 [HTTPSDemo] Sending HTTPS GET request...
21 161687 [HTTPSDemo] Response status: 400
22 161687 [HTTPSDemo] Response body:
<html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
</body>
</html>

23 161687 [HTTPSDemo]

24 161687 [HTTPSDemo] [WARN ][NET][161687] (Network connection 01032190) Failed to close connection.
25 161687 [HTTPSDemo] [WARN ][HTTPS Client][161687] Failed to shutdown the socket with error code: 4
26 161687 [HTTPSDemo] Disconnected from httpbin.org:443

27 161687 [HTTPSDemo] prvHTTPSDemoTask() completed an iteration successfully. Total free heap is 2079024
28 161687 [HTTPSDemo] Demo completed successfully.
29 161687 [HTTPSDemo] Short delay before starting the next iteration....

30 166687 [HTTPSDemo] Attempt to connect to httpbin.org:443
31 166726 [MAC_ISR] Bounced back: 00:11:11:11:11:41
32 167346 [HTTPSDemo] Connected to httpbin.org:443
33 167346 [HTTPSDemo] Sending HTTPS GET request...

[BUG] FreeRTOS+TCP v2.2.2 does not compile when ipconfigUSE_TCP is set to 0

FreeRTOS_Sockets.c and FreeRTOS_TCP_WIN.c do not compile when ipconfigUSE_TCP is disabled in FreeRTOSIPConfig.h.

BuildLog.txt

Suggested fixes

Add #if( ipconfigUSE_TCP == 1 )/#endif guards as follows:

FreeRTOS_Sockets.c: declaration and implementation of prvSockopt_so_buffer().

FreeRTOS_TCP_WIN.c: entire source.

Patches for the fixes as described above are attached.

FreeRTOS_TCP_WIN.c.patch.txt
FreeRTOS_Sockets.c.patch.txt

[Devide by Zero] pollqCONSUMER_DELAY Devides by Zero when configTICK_RATE_HZ is greater than 1000

Describe the bug
If we want to let the configTICK_RATE_HZ is greater than 1000, pollqCONSUMER_DELAY will report Devides by Zero error.

Target

  • Development board: WIN32-MSVC
  • Instruction Set Architecture: Win32
  • IDE and version: Visual Studio 2013
  • Toolchain and version: Visual Studio 2013

Host

  • Host OS: Windows 10
  • Version: 18362.1016

To Reproduce

  • Use project WIN32-MSVC and configure with configTICK_RATE_HZ as 2000
  • Run on Visual Studio 2013 and could observe Error 18 error C2124: divide or mod by zero freertos\demo\common\minimal\pollq.c 192 1 RTOSDemo

Expected behavior
If we config configTICK_RATE_HZ as a number greater than 1000, it should define as below in PollQ.c line 71
#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( TickType_t ) ( 20 * configTICK_RATE_HZ/ 1000 ) )

Screenshots
image
If we define as below in PollQ.c line 71
#define pollqCONSUMER_DELAY ( pollqPRODUCER_DELAY - ( TickType_t ) ( 20 / portTICK_PERIOD_MS ) )
However, portmacro.h line 66
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )

When configTICK_RATE_HZ is greater than 1000, portTICK_PERIOD_MS will be 0, pollqCONSUMER_DELAY will happen 20/0.

Additional context
Add any other context about the problem here.
e.g. code snippet to reproduce the issue.
e.g. stack trace, memory dump, debugger log, and many etc.

A report of build check result using FreeRTOS V10.3.1 and CC-RX/GNURX/ICCRX for Renesas RX MCUs

Hello,

This is a report, not a question. After discussion the result with Renesas Electronics Corporation, I will consider what I can do.

Recently I noticed that Uncrustify breaks inline asm code for Renesas CC-RX compiler (FreeRTOS/FreeRTOS-Kernel#90). Additionally, I noticed open issue (#42) and open pull request (#43) regarding to a build problem of the RX600_RX64M_RSK_Renesas_e2studio RTOSDemo project. Today I was interested how many RTOSDemo projects for Renesas RX MCUs can be built with recent IDEs and recent compilers, so that I checked it. The result is as follows:

IDEs:

e2 studio v7.8.0
EWRX V4.14.1

Compilers:

CC-RX V3.02.00
GNURX 2020 q2 (8.3.0.202002)
ICCRX V4.14.1.5408 (included in EWRX V4.14.1)

Result:
                                        e2 studio   e2 studio   EWRX        
                                        CC-RX       GNURX       ICCRX       
RX100_RX113-RSK_GCC_e2studio_IAR        -           Fail        Pass        
RX100_RX113-RSK_Renesas_e2studio        Fail        -           -           
RX100-RSK_GCC_e2studio                  -           Fail        -           
RX100-RSK_IAR                           -           -           Pass        
RX100-RSK_Renesas_e2studio              Fail(*)     -           -           
RX200_RX210-RSK_Renesas                 N/A(HEW)    -           -           
RX200_RX231-RSK_GCC_e2studio_IAR        -           Fail        Fail        
RX200_RX231-RSK_Renesas_e2studio        Pass        -           -           
RX600_RX62N-RDK_GNURX                   -           N/A(HEW)    -           
RX600_RX62N-RDK_IAR                     -           -           Pass        
RX600_RX62N-RDK_Renesas                 N/A(HEW)    -           -           
RX600_RX62N-RSK_GNURX                   -           N/A(HEW)    -           
RX600_RX62N-RSK_IAR                     -           -           Pass        
RX600_RX62N-RSK_Renesas                 N/A(HEW)    -           -           
RX600_RX63N-RDK_Renesas                 N/A(HEW)    -           -           
RX600_RX630-RSK_Renesas                 N/A(HEW)    -           -           
RX600_RX64M_RSK_GCC_e2studio            -           Fail        -           
RX600_RX64M_RSK_Renesas_e2studio        Fail        -           -           
RX700_RX71M_RSK_GCC_e2studio_IAR        -           Fail        Pass        
RX700_RX71M_RSK_Renesas_e2studio        Pass        -           -           

Note:

'Pass' : The project can be built. (Note that only build check is passed.)
'Fail' : The project cannot be built. (i.e. compiler error(s) or linker error(s) are caused.)
'Fail(*)' : The project file cannot be migrated to the latest project file format. (i.e. I cannot start build.)
'N/A(HEW)' : The project is for HEW (another IDE) which is no longer as important as it was.
'-' : The project is not for the compiler.

All projects of Pass/Fail needed to be migrated to the latest project file format.
Additionally, when using e2 studio, toolchain type and toolchain version needed to be re-selected.

Possible Error in serial.c at AVR_ATMega323_WinAVR Demo [BUG]

Hello,
When building the AVR_ATMega323_WinAVR Demo with "make", poisoned signal errors raise.
Specifically, these errors are the following:
serial/serial.c:188:9: error: attempt to use poisoned "SIG_UART_RECV" SIGNAL( SIG_UART_RECV ) ^ serial/serial.c:207:9: error: attempt to use poisoned "SIG_UART_DATA" SIGNAL( SIG_UART_DATA )
To solve the problem, I simply changed both signal names as this documentation suggests.
That is, SIG_UART_RECV is replaced by USART_RXC_vect and SIG_UART_DATA by USART_UDRE_vect.

I'm new to these kind of projects, so I hope this solves the problem successfully.

Integrating espressif ULP assmbler files with Amazon FreeRTOS

Hi,

I am currently trying to build and link my assembler files within ESP32 vendor code within the Amazon FreeRTOS platform.
I have followed the instructions by espressif and in the .rst files within Amazon FreeRTOS. However when I try to compile I get the following error logs:

-- Building for target esp32
CMake Error at vendors/espressif/esp-idf/components/ulp/component_ulp_common.cmake:55 (add_dependencies):
add_dependencies called with incorrect number of arguments
Call Stack (most recent call first):
vendors/espressif/boards/esp32/CMakeLists.txt:397 (include)
CMakeLists.txt:70 (include)

CMake Error at vendors/espressif/esp-idf/components/ulp/component_ulp_common.cmake:58 (target_add_binary_data):
target_add_binary_data Function invoked with incorrect arguments for
function named: target_add_binary_data
Call Stack (most recent call first):
vendors/espressif/boards/esp32/CMakeLists.txt:397 (include)
CMakeLists.txt:70 (include)

The relevant code in the CMakeLists.txt file is as follows and i Have highlighted the error line below:

set(ULP_APP_NAME ulp_${COMPONENT_NAME})
set(ULP_S_SOURCES "${board_dir}/application_code/ulp/ulp_adc.S")
set(ULP_EXP_DEP_SRCS "${board_dir}/application_code/ulp_adc_example_main.c ${board_dir}/application_code/params.c")
include(${esp_idf_dir}/components/ulp/component_ulp_common.cmake) # <------- this line is the issue

The section of code from the component_ulp_common.cmake file is as follows:

add_dependencies(${COMPONENT_TARGET} ${ULP_APP_NAME}_artifacts)
target_linker_script(${COMPONENT_TARGET} ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}/${ULP_APP_NAME}.ld)
target_add_binary_data(${COMPONENT_TARGET} ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}/${ULP_APP_NAME}.bin BINARY)
endif()

How to submit new port

Hi :

I 'd lke t submit a new platform porting to FREERTOS repo. but Got fail to commit.
I tried to pull a new request, but there is no different branch to create. how to fix ?

Vincent

[Feature Request] Enable use of the TaskNotificationArray.c test file on 16-bit devices

Is your feature request related to a problem? Please describe.
The TaskNotificationArray.c demo/test file contains a file scope function named prvRand() that uses size_t types. The implementation of the function assumes size_t is at least 32-bits, preventing its use on 16 and 8-bit devices.

Describe the solution you'd like
Replace size_t with uint32_t - and check there are no other test/demo files that need the same change.

Additional context
See https://forums.freertos.org/t/portability-issue-of-rtosdemo-examples-tasknotify-c-and-tasknotifyarray-c-for-16bit-mcu/12176

[BUG]

Describe the bug
A concise description of what the bug is.

Target

  • Development board: [e.g. HiFive11 RevB]
  • Instruction Set Architecture: [e.g. RV32IMAC]
  • IDE and version: [e.g. Freedom Studio 4.12.0.2019-08-2]
  • Toolchain and version: [e.g. riscv64-unknown-elf-gcc-8.3.0-2019.08.0]

Host

  • Host OS: [e.g. MacOS]
  • Version: [e.g. Mojave 10.14.6]

To Reproduce

  • Use project ... and configure with ...
  • Run on ... and could observe ...

Expected behavior
A concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.
e.g. code snippet to reproduce the issue.
e.g. stack trace, memory dump, debugger log, and many etc.

Integration of Trusted Firmware-M with FreeRTOS Kernel

Trusted Firmware M(TF-M) is an open-source project. It provides a reference implementation of PSA for Arm M-profile architecture.

This port adds the support that FreeRTOS applications can call the secure services in Trusted Firmware M(TF-M) through Platform Security Architecture(PSA) API based on the ARM Cortex-M33 platform.

[BUG] _MSC_VER limit will cause no define about snprintf in vs2013

Describe the bug
When load FreeRTOS_Plus_TCP_Minimal_Windows_Simulator by vs2013, it will compile failed with no snprintf define
The _MSC_VER of vs2013 is 1800, it can not define snprintf in pcap-stdinc.h line 64
#if _MSC_VER < 1500
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#define strdup _strdup
#endif

Target

  • Development board: FreeRTOS_Plus_TCP_Minimal_Windows_Simulator
  • Instruction Set Architecture: FreeRTOS_Plus_TCP_Minimal_Windows_Simulator
  • IDE and version: visual studio 2013
  • Toolchain and version: visual studio 2013

Host

  • Host OS: Windows10
  • Version: 18363.1440

To Reproduce

  • Use project FreeRTOS_Plus_TCP_Minimal_Windows_Simulator and configure with Platform Toolset as Visual Studio 2013 (v120)
  • Run on ... and could observe ...

Expected behavior
Compile successfully
image

Screenshots
Compile failed with no snprintf define
image

Additional context
Suggest update the following files about _MSC_VER limit as _MSC_VER < 1900
FreeRTOS\Demo\Common\ethernet\lwip-1.4.0\ports\win32\WinPCap\pcap-stdinc.h
Line 63: #if _MSC_VER < 1500
FreeRTOS-Plus\Demo\AWS\Device_Defender_Windows_Simulator\Device_Defender_Demo\FreeRTOSConfig.h
Line 190: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\AWS\Device_Shadow_Windows_Simulator\Device_Shadow_Demo\FreeRTOSConfig.h
Line 191: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\AWS\Jobs_Windows_Simulator\Jobs_Demo\FreeRTOSConfig.h
Line 191: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\Common\WinPCap\pcap-stdinc.h
Line 63: #if _MSC_VER < 1500
FreeRTOS-Plus\Demo\coreHTTP_Windows_Simulator\HTTP_Mutual_Auth\FreeRTOSConfig.h
Line 192: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreHTTP_Windows_Simulator\HTTP_Plaintext\FreeRTOSConfig.h
Line 192: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreHTTP_Windows_Simulator\HTTP_S3_Download\FreeRTOSConfig.h
Line 192: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreHTTP_Windows_Simulator\HTTP_S3_Download_Multithreaded\FreeRTOSConfig.h
Line 192: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreHTTP_Windows_Simulator\HTTP_S3_Upload\FreeRTOSConfig.h
Line 192: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreMQTT_Windows_Simulator\Common\WinPCap\pcap-stdinc.h
Line 63: #if _MSC_VER < 1500
FreeRTOS-Plus\Demo\coreMQTT_Windows_Simulator\MQTT_Basic_TLS\FreeRTOSConfig.h
Line 191: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreMQTT_Windows_Simulator\MQTT_Keep_Alive\FreeRTOSConfig.h
Line 193: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreMQTT_Windows_Simulator\MQTT_Multitask\FreeRTOSConfig.h
Line 193: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreMQTT_Windows_Simulator\MQTT_Mutual_Auth\FreeRTOSConfig.h
Line 191: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreMQTT_Windows_Simulator\MQTT_Mutual_Auth_wolfSSL\FreeRTOSConfig.h
Line 197: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreMQTT_Windows_Simulator\MQTT_Plain_Text\FreeRTOSConfig.h
Line 193: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\coreMQTT_Windows_Simulator\MQTT_Serializer\FreeRTOSConfig.h
Line 193: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\corePKCS11_MQTT_Mutual_Auth_Windows_Simulator\FreeRTOSConfig.h
Line 191: #if ( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\corePKCS11_Windows_Simulator\FreeRTOSConfig.h
Line 126: #if( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\FreeRTOS_Plus_TCP_Minimal_Windows_Simulator\FreeRTOSConfig.h
Line 207: #if( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Demo\FreeRTOS_Plus_TCP_Minimal_Windows_Simulator\WinPCap\pcap-stdinc.h
Line 63: #if _MSC_VER < 1500
FreeRTOS-Plus\Demo\FreeRTOS_Plus_TCP_UDP_Mode_CLI_Windows_Simulator\FreeRTOSConfig.h
Line 206: #if( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Test\FreeRTOS-Plus-TCP\Integration\Full-TCP-Networkless\Config\FreeRTOSConfig.h
Line 207: #if( defined( _MSC_VER ) && ( _MSC_VER <= 1600 ) && !defined( snprintf ) )
FreeRTOS-Plus\Test\FreeRTOS-Plus-TCP\Integration\Full-TCP-Networkless\WinPCap\pcap-stdinc.h
Line 63: #if _MSC_VER < 1500
FreeRTOS-Plus\Test\FreeRTOS-Plus-TCP\Integration\Full-TCP-Suite\WinPCap\pcap-stdinc.h
Line 63: #if _MSC_VER < 1500

[Feature Request] xStreamBufferDiscard() macro to remove X bytes from a buffer

Is your feature request related to a problem? Please describe.
Sometimes I use buffers/queues as backups for data that might be re-/needed just-in-case. When it is clear it is no longer needed, I want to discard X many bytes/elements from the buffer/queue.

Describe the solution you'd like
A simple pop/discard function that simply advances the internal pointers of buffers/queues, defacto discarding what was before.

Describe alternatives you've considered
Currently I have to manually create a temporary array on the heap, copy into it, then delete, which is inefficient.

Additional context
Equally beneficial would be able to read any arbitrary segment of existing data/items in the buffer/queue, while keeping the data in the buffer. Although queues have a peek() functionality, it is limited, and it is totally missing for other primitives such as stream buffers.

[BUG] compile error on Infineon Tricore_1782 demo

Describe the bug
I want to compile the demo on the Infineon. Some errors can't be resolved.
Target

  • Development board:
    Infinenon Tricore_1782
  • Instruction Set Architecture: [Tricore 1782]
  • IDE and version:
    HighTec Development Platform
    Version: 2.2.4
    Git revision: 4ac71400b9fb787e5d578fdc7ec2ba168af2e714
    Build date: 2019-07-10T08:52:24+0000
  • Toolchain and version:
    Tricore_1782 v4.9.3.0-infineon-1.0

Host

  • Host OS: [Win10]
  • Version: [Build 19041]

To Reproduce

  • Use the Hightec Ide, create new Hightec procject, choose the Tricore 1782 toolchain
  • import the FeeRTOS to the project, import the files: Source/include, Portable/gcc/Tricroe_1782, MemMang, including the headers and so on.
  • compile the project, then you can hit the compiling error

Expected behavior
compile success without any errors.

Screenshots
Below is the compile error msg. Please take a look.

16:13:38 **** Incremental Build of configuration iROM for project demo2 ****
"C:\\HighTec\\toolchains\\tricore\\v4.9.3.0-infineon-1.0\\bin\\make.exe" all 
'Building file: C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c'
'Invoking: TriCore C Compiler'
"C:\HighTec\toolchains\tricore\v4.9.3.0-infineon-1.0/bin/tricore-gcc" -c -I"C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include" -I"C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782" -I"../h" -fno-common -Os -g3 -W -Wall -Wextra -Wdiv-by-zero -Warray-bounds -Wcast-align -Wignored-qualifiers -Wformat -Wformat-security -pipe -DTRIBOARD_TC1782 -fshort-double -mcpu=tc1782 -mversion-info -MMD -MP -MF"FreeRTOS/Source/portable/MemMang/heap_4.d" -MT"FreeRTOS/Source/portable/MemMang/heap_4.o" -o "FreeRTOS/Source/portable/MemMang/heap_4.o" "C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c"
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c: In function 'pvPortMalloc':
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:119:18: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
           _mtcr( &ICR, ulICR );  /* Write back updated ICR. */          \
                  ^
../h/FreeRTOSConfig.h:104:48: note: in expansion of macro 'portDISABLE_INTERRUPTS'
 #define configASSERT( x ) if( ( x ) == 0 )   { portDISABLE_INTERRUPTS(); for( ;; ); }
                                                ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:154:25: note: in expansion of macro 'configASSERT'
                         configASSERT( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) == 0 );
                         ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:37:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:119:18: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
           _mtcr( &ICR, ulICR );  /* Write back updated ICR. */          \
                  ^
../h/FreeRTOSConfig.h:104:48: note: in expansion of macro 'portDISABLE_INTERRUPTS'
 #define configASSERT( x ) if( ( x ) == 0 )   { portDISABLE_INTERRUPTS(); for( ;; ); }
                                                ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:205:25: note: in expansion of macro 'configASSERT'
                         configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 );
                         ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:37:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:119:18: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
           _mtcr( &ICR, ulICR );  /* Write back updated ICR. */          \
                  ^
../h/FreeRTOSConfig.h:104:48: note: in expansion of macro 'portDISABLE_INTERRUPTS'
 #define configASSERT( x ) if( ( x ) == 0 )   { portDISABLE_INTERRUPTS(); for( ;; ); }
                                                ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:270:5: note: in expansion of macro 'configASSERT'
     configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 );
     ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:37:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c: In function 'vPortFree':
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:119:18: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
           _mtcr( &ICR, ulICR );  /* Write back updated ICR. */          \
                  ^
../h/FreeRTOSConfig.h:104:48: note: in expansion of macro 'portDISABLE_INTERRUPTS'
 #define configASSERT( x ) if( ( x ) == 0 )   { portDISABLE_INTERRUPTS(); for( ;; ); }
                                                ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:290:9: note: in expansion of macro 'configASSERT'
         configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );
         ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:37:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:119:18: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
           _mtcr( &ICR, ulICR );  /* Write back updated ICR. */          \
                  ^
../h/FreeRTOSConfig.h:104:48: note: in expansion of macro 'portDISABLE_INTERRUPTS'
 #define configASSERT( x ) if( ( x ) == 0 )   { portDISABLE_INTERRUPTS(); for( ;; ); }
                                                ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:291:9: note: in expansion of macro 'configASSERT'
         configASSERT( pxLink->pxNextFreeBlock == NULL );
         ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:37:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c:42:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
'Finished building: C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/MemMang/heap_4.c'
' '
'Building file: C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c'
'Invoking: TriCore C Compiler'
"C:\HighTec\toolchains\tricore\v4.9.3.0-infineon-1.0/bin/tricore-gcc" -c -I"C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include" -I"C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782" -I"../h" -fno-common -Os -g3 -W -Wall -Wextra -Wdiv-by-zero -Warray-bounds -Wcast-align -Wignored-qualifiers -Wformat -Wformat-security -pipe -DTRIBOARD_TC1782 -fshort-double -mcpu=tc1782 -mversion-info -MMD -MP -MF"FreeRTOS/Source/portable/GCC/TriCore_1782/port.d" -MT"FreeRTOS/Source/portable/GCC/TriCore_1782/port.o" -o "FreeRTOS/Source/portable/GCC/TriCore_1782/port.o" "C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c"
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c: In function 'pxPortInitialiseStack':
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:141:4: error: stray '$' in program
    _mtcr( $FCX, pulUpperCSA[ 0 ] );
    ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:141:4: error: incompatible type for argument 1 of '_mtcr'
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'FCX_t'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:39:
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c: In function 'xPortStartScheduler':
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:119:18: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
           _mtcr( &ICR, ulICR );  /* Write back updated ICR. */          \
                  ^
../h/FreeRTOSConfig.h:104:48: note: in expansion of macro 'portDISABLE_INTERRUPTS'
 #define configASSERT( x ) if( ( x ) == 0 )   { portDISABLE_INTERRUPTS(); for( ;; ); }
                                                ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:200:3: note: in expansion of macro 'configASSERT'
   configASSERT( ( ( volatile void * ) NULL ) );
   ^
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:39:
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:119:18: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
           _mtcr( &ICR, ulICR );  /* Write back updated ICR. */          \
                  ^
../h/FreeRTOSConfig.h:104:48: note: in expansion of macro 'portDISABLE_INTERRUPTS'
 #define configASSERT( x ) if( ( x ) == 0 )   { portDISABLE_INTERRUPTS(); for( ;; ); }
                                                ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:209:3: note: in expansion of macro 'configASSERT'
   configASSERT( ( ( volatile void * ) NULL ) );
   ^
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:215:2: error: stray '$' in program
  _mtcr( $SYSCON, portINITIAL_SYSCON );
  ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:215:2: error: incompatible type for argument 1 of '_mtcr'
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'SYSCON_t'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:225:2: error: stray '$' in program
  _mtcr( $PSW, ulMFCR );
  ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:225:2: error: incompatible type for argument 1 of '_mtcr'
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'PSW_t'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:232:2: error: stray '$' in program
  _mtcr( $PCXI, *pxCurrentTCB );
  ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:232:2: error: incompatible type for argument 1 of '_mtcr'
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'PCXI_t'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:184:11: warning: variable 'pulUpperCSA' set but not used [-Wunused-but-set-variable]
 uint32_t *pulUpperCSA = NULL;
           ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:39:
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c: In function 'prvSetupTimerInterrupt':
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:119:18: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
           _mtcr( &ICR, ulICR );  /* Write back updated ICR. */          \
                  ^
../h/FreeRTOSConfig.h:104:48: note: in expansion of macro 'portDISABLE_INTERRUPTS'
 #define configASSERT( x ) if( ( x ) == 0 )   { portDISABLE_INTERRUPTS(); for( ;; ); }
                                                ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:280:3: note: in expansion of macro 'configASSERT'
   configASSERT( ( ( volatile void * ) NULL ) );
   ^
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:39:
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c: In function 'prvSystemTickHandler':
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:142:25: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
                  _mtcr( &ICR, ulICR );  /* Write back updated ICR. */       \
                         ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:324:2: note: in expansion of macro 'portCLEAR_INTERRUPT_MASK_FROM_ISR'
  portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask );
  ^
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c: In function 'vPortReclaimCSA':
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:426:3: error: stray '$' in program
   _mtcr( $FCX, pxHeadCSA );
   ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:426:3: error: incompatible type for argument 1 of '_mtcr'
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'FCX_t'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
In file included from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/portable.h:51:0,
                 from C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\include/FreeRTOS.h:63,
                 from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:39:
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c: In function 'prvTrapYield':
C:\Users\Jason\Documents\FreeRTOSv202104.00\FreeRTOSv202104.00\FreeRTOS\Source\portable\GCC\TriCore_1782/portmacro.h:119:18: warning: passing argument 1 of '_mtcr' makes integer from pointer without a cast
           _mtcr( &ICR, ulICR );  /* Write back updated ICR. */          \
                  ^
../h/FreeRTOSConfig.h:104:48: note: in expansion of macro 'portDISABLE_INTERRUPTS'
 #define configASSERT( x ) if( ( x ) == 0 )   { portDISABLE_INTERRUPTS(); for( ;; ); }
                                                ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:480:4: note: in expansion of macro 'configASSERT'
    configASSERT( ( ( volatile void * ) NULL ) );
    ^
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'volatile union ICR_t *'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c: In function 'uxPortSetInterruptMaskFromISR':
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:532:2: error: stray '$' in program
  _mtcr( $ICR, ( ( uxReturn & ~portCCPN_MASK ) | configMAX_SYSCALL_INTERRUPT_PRIORITY ) );
  ^
C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:532:2: error: incompatible type for argument 1 of '_mtcr'
In file included from C:/Users/Jason/Documents/FreeRTOSv202104.00/FreeRTOSv202104.00/FreeRTOS/Source/portable/GCC/TriCore_1782/port.c:34:0:
c:\hightec\toolchains\tricore\v4.9.3.0-infineon-1.0\tricore\include\machine\intrinsics.h:135:6: note: expected 'unsigned int' but argument is of type 'ICR_t'
 void _mtcr (const unsigned __regaddr, const unsigned __val)
      ^
FreeRTOS/Source/portable/GCC/TriCore_1782/subdir.mk:21: recipe for target 'FreeRTOS/Source/portable/GCC/TriCore_1782/port.o' failed
make: *** [FreeRTOS/Source/portable/GCC/TriCore_1782/port.o] Error 1

16:13:39 Build Finished (took 1s.371ms)

Additional context
none

[BUG] PIC24_MPLAB Demo Fail#2 and crash

Describe the bug
PIC24_MPLAB Demo Fail#2 and crash after some time.
The Demo on PIC24FJ128GA010

Target

  • Development board: Explorer 16/32 Developement Board & PIC24F 100P TO 100P QFP PLUG IN MODULE
  • Instruction Set Architecture: PIC24F
  • IDE and version: MPLABX 5.15
  • Toolchain and version: xc16 v1.41

Host

  • Host OS: Windows
  • Version: 10

To Reproduce

  • Use project RTOSDemo_PIC24.zip
  • Run on the Development Board and could observe wrong blinking LEDs and after some time the text "Fail#2" on display occured.

Expected behavior
The expected behavior should be like described on the demo application page

A report of build check result using FreeRTOS V10.3.1 and ICCRL78 for Renesas RL78 MCUs

Hello,

This is a report, not a question. I'd like to post a pull request when I can fix it.

I was interested how many RTOSDemo projects for Renesas RL78 MCUs can be built with recent IDE and recent compiler because the following build problem was reported. So, I checked it. The result is the following.

Compilation/Linker Issues in Running the Demo Example for FreeRTOS/Demo/RL78_RL78G13_Promo_Board_IAR directory
https://forums.freertos.org/t/compilation-linker-issues-in-running-the-demo-example-for-freertos-demo-rl78-rl78g13-promo-board-iar-directory/9218

IDE:

EWRL78 V4.20.1

Compiler:

ICCRL78 V4.20.1.2260 (included in EWRL78 V4.20.1)

Result:
                                        EWRX        
                                        ICCRX       
RL78_multiple_IAR                       Fail        
RL78_RL78G13_Promo_Board_IAR            Fail        

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.