Skip to content

Conversation

@kar-rahul-aws
Copy link
Member

Fix issues in TCP QEMU Demo

Description

  1. configKERNEL_INTERRUPT_PRIORITY should be 255.
  2. Ethernet ISR calls FreeRTOS APIs and therefore configMAC_INTERRUPT_PRIORITY should be equal to or greater than configMAX_SYSCALL_INTERRUPT_PRIORITY.
  3. The demo does not set the Ethernet interrupt priority and as a result, it remains at the highest priority. So the Ethernet interrupt priority is set to configMAC_INTERRUPT_PRIORITY .
  4. __NVIC_PRIO_BITS set to 8 to match the QEMU implementation of PRIO bits.

Test Steps

TCP_Echo_QEMU_mps2 Demo is run with these modifications successfully.

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

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

@kar-rahul-aws kar-rahul-aws requested a review from a team as a code owner March 6, 2023 03:28
{
BaseType_t x;

/*set Ethernet interrupt priority to configMAC_INTERRUPT_PRIORITY*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/*set Ethernet interrupt priority to configMAC_INTERRUPT_PRIORITY*/
/* Set Ethernet interrupt priority to configMAC_INTERRUPT_PRIORITY. */

aggarg
aggarg previously approved these changes Mar 6, 2023
#define __CM3_REV 0x0201 /* Core revision r2p1 */
#define __MPU_PRESENT 1 /* MPU present or not */
#define __NVIC_PRIO_BITS 3 /* Number of Bits used for Priority Levels */
#define __NVIC_PRIO_BITS 8 /* Number of Bits used for Priority Levels */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid changing this file, as it is a copy from CMSDK library

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed because QEMU reports as all 8 bits implemented.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to set a note somewhere if someone updates the library, to make the necessary changes ? (possibly in the readme)

Signed-off-by: Gaurav Aggarwal <[email protected]>
@kar-rahul-aws kar-rahul-aws merged commit 25d9826 into FreeRTOS:main Mar 7, 2023
@moninom1 moninom1 mentioned this pull request Mar 7, 2023
moninom1 added a commit that referenced this pull request Mar 7, 2023
* update the freertos + TCP demos to use the neew API for getting the UDP pyaload buffer [FreeRTOS_GetUDPPayloadBuffer_ByIPType] (#938)

* Add CBMC proof-running GitHub Action (#924)

* Added two config options to the FreeRTOSConfig file to get the demo running again. Fixed a typo in a file. Added a section to the link file (#940)

* Create SMP on target test framework. (#911)

* Fix CBMC proof failures (#946)

These were introduced in PR #620.

* Make static IP address configurable (#947)

* Fix issues in TCP QEMU Demo (#948)
@kar-rahul-aws kar-rahul-aws deleted the TCP-QEMU-Demo branch April 24, 2023 15:04
every-breaking-wave pushed a commit to every-breaking-wave/FreeRTOS that referenced this pull request Nov 15, 2024
Zangetsu112 pushed a commit to Zangetsu112/FreeRTOS-evpp that referenced this pull request Aug 18, 2025
* Fix issues in TCP QEMU Demo

* set the Ethernet interrupt priority

* Include CMSIS header files to fix build issues

* Review suggestion

Signed-off-by: Gaurav Aggarwal <[email protected]>

---------

Signed-off-by: Gaurav Aggarwal <[email protected]>
Co-authored-by: Gaurav Aggarwal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants