Skip to content

Conversation

@NoMaY-jp
Copy link
Contributor

The project in this folder is very old and it is necessary to do the following step (1) and (2) before starting build.

(1) Run the following bat file in the Demo/RX100-RSK_GCC_e2studio folder
CreateProjectDirectoryStructure.bat
(2) Comment out the following #error in the Demo/RX100-RSK_GCC_e2studio/RTOSDemo/FreeRTOSConfig.h
#error Ensure CreateProjectDirectoryStructure.bat has been executed before building. See comment immediately above.
(3) Import the project
(4) Clean all projects and start a build

I'm trying to remove CreateProjectDirectoryStructure.bat because I think that executing this batch file is inconvenient. But it will be another pull request because updating document of the following page will be necessary.

Low Power RTOS Demo - Renesas RX100
https://www.freertos.org/RX100_RSK_Low_Power_Tick-less_RTOS_Demo.html

Building and executing the demo application - e2studio

Create the directory structure required by the Eclipse managed make system by executing the appropriate CreateProjectDirectoryStructure.bat batch file.

If you are using e2studio with the Renesas compiler then execute FreeRTOS/Demo/RX100-RSK_Renesas/CreateProjectDirectoryStructure.bat.

If you are using e2studio with the GCC compiler then execute FreeRTOS/Demo/RX100-RSK_GCC/CreateProjectDirectoryStructure.bat.


The following Description, Test Steps, Related Issue and Additional Information are the same as 'Build: Upgrade GCC project files for e2 studio v7.8.0 in Demo/RX200_RX231-RSK_GCC_e2studio_IAR folder #255' other than project folder name, zip file name, some screen copies of e2 studio project settings and the following things.

Original e2 studio version:

Demo/RX200_RX231-RSK_GCC_e2studio_IAR ==> e2 studio v4.0.2.008

Demo/RX100-RSK_GCC_e2studio (this PR) ==> e2 studio v2.0.1.4

Original GNURX version:

Demo/RX200_RX231-RSK_GCC_e2studio_IAR ==> KPIT GNURX v15.01-SP1 (or v15.01)

Demo/RX100-RSK_GCC_e2studio (this PR) ==> KPIT GNURX v12.03

Fewer updated file in this PR:

Demo/RX200_RX231-RSK_GCC_e2studio_IAR ==> RTOSDemo HardwareDebug.launch is updated.

Demo/RX100-RSK_GCC_e2studio (this PR) ==> RTOSDemo HardwareDebug.launch doesn't exist.

Fewer removed files in this PR:

Demo/RX200_RX231-RSK_GCC_e2studio_IAR ==> .settings/Dependency_Scan_Preferences.prefs is removed.
                                      ==> makefile.init is removed.

Demo/RX100-RSK_GCC_e2studio (this PR) ==> .settings/Dependency_Scan_Preferences.prefs doesn't exist.
                                      ==> makefile.init  doesn't exist.

Added file to different folder in this PR:

Demo/RX200_RX231-RSK_GCC_e2studio_IAR ==> src/linker_scriptHardwareDebug.ld is added.

Demo/RX100-RSK_GCC_e2studio (this PR) ==> RTOSDemo/linker_scriptHardwareDebug.ld is added.

Description

Renesas e2 studio v7.8.0 (to be precise, v6.0 or later) requests us to upgrade project which was created by e2 studio v5.4 or earlier. Nevertheless, in case of GCC project, e2 studio doesn't upgrade the project correctly, so that modifying the upgraded project by hand is mandatory to build the project successfully.

This PR upgrades and fixes such GCC project in Demo/RX100-RSK_GCC_e2studio and makes the project able to be built successfully using e2 studio v7.8.0 (to be precise, v6.0 or later).

But, after this PR is applied, the project is unable to be built using e2 studio v5.4 or earlier. If this isn't acceptable for you, please let me know.

This PR updates the following files:

.project
.cproject
.settings/language.settings.xml

This PR adds the following files:

RTOSDemo/linker_scriptHardwareDebug.ld

This PR removes the following files which are no longer necessary (no longer generated when creating new project):

.HardwareDebuglinker
.info
custom.bat
.settings/Project_Generation_Preferences.prefs

Test Steps

At first, I built this project using the following source code and tools to get a MOT file.

COMBINATION 1)

(S) FreeRTOS/FreeRTOS-Kernel@82fdc1c (Aug 29, 2020), FreeRTOS/FreeRTOS bcd5dec (Aug 29, 2020)
(O) Without this PR
(1) e2 studio v2.0.1.4 and KPIT GNURX v12.03 and KPIT OPTLIB

Then, I built this project using the following source code and tools to get new MOT file and I confirmed that there are no changes in new MOT file.

COMBINATION 2)

(S) same source code
(P) With this PR
(2) e2 studio v7.8.0 and KPIT GNURX v12.03 and KPIT OPTLIB

COMBINATION 3)

(S) same source code
(P) With this PR
(3) e2 studio v2020-07 (64bit version) and KPIT GNURX v12.03 and KPIT OPTLIB

And I built this project using the following source code and tools and I confirmed that this project is able to be built.

COMBINATION 4)

(S) same source code
(P) With this PR
(P') Additionally, toolchain type and toolchain version are re-selected.
(4) e2 studio v7.8.0 and GCC for Renesas RX 8.3.0.202002 and KPIT OPTLIB

COMBINATION 5)

(S) same source code
(P) With this PR
(P') Additionally, toolchain type and toolchain version are re-selected.
(5) e2 studio v2020-07 (64bit version) and GCC for Renesas RX 8.3.0.202002 and KPIT OPTLIB

But I don't have the evaluation board therefore I can't check the program which are built.
If this isn't acceptable for you, please let me know.

Related Issue

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

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

Additional Information

The following ZIPs contain MOT, MAP and build.log files which were built using COMBINATION 1) and COMBINATION 2).

RX100-RSK_GCC_e2studio_Demo_MOT_e2_2_0_1_4_GNURX_12_03_optlib__20200905.zip
RX100-RSK_GCC_e2studio_Demo_MOT_e2_7_8_0_GNURX_12_03_optlib__20200909.zip

To build the same MOT file, the following unusual settings are used.

e2studio_freertos_build_issues_131
e2studio_freertos_build_issues_142

Toolchain type and toolchain version are as follows.

COMBINATION 2) and COMBINATION 3) and also COMBINATION 1)
e2studio_freertos_build_issues_143

COMBINATION 4) and COMBINATION 5)
e2studio_freertos_build_issues_104

@NoMaY-jp
Copy link
Contributor Author

Hello @mingyue86010 and @VanNamDinh,

Thank you very much for taking care of #228, #239 and other PRs.

But it seems that this PR is not taken care. Would you take care of also this PR?

Best regards,
NoMaY

@NoMaY-jp
Copy link
Contributor Author

Hello @mingyue86010 and @VanNamDinh,

I'm sorry that I ask you to postpone this PR until GCC/RX100 portable layer is fixed. In the following commit and PR, there was a mistake.

Update Renesas GCC compiler ports
FreeRTOS/FreeRTOS-Kernel@1d8df47

Update Renesas GCC compiler ports
FreeRTOS/FreeRTOS-Kernel#135

Best regards,
NoMaY

@cobusve cobusve requested a review from a team as a code owner October 27, 2020 07:37
@mingyue86010
Copy link
Contributor

Hello @mingyue86010 and @VanNamDinh,

I'm sorry that I ask you to postpone this PR until GCC/RX100 portable layer is fixed. In the following commit and PR, there was a mistake.

Update Renesas GCC compiler ports
FreeRTOS/FreeRTOS-Kernel@1d8df47

Update Renesas GCC compiler ports
FreeRTOS/FreeRTOS-Kernel#135

Best regards,
NoMaY

Hello @NoMaY-jp,

Sorry for the late response. But I'm wondering what mistake you found in the GCC/RX100 port? Can you point it out so we can take a look. Or maybe you have already have some idea about how to fix it (then that would be great~).

Thank you!

Regards,
Ming Yue

@NoMaY-jp
Copy link
Contributor Author

Hello @mingyue86010

Thank you for your reply. The mistake is a mismatch of names of functions which have __attribute__((naked)) or __attribute__((interrupt)). So the compiler doesn't generate expected code as 'naked' or 'interrupt' for the expected functions. The detail of mistake and a fix of this mistake are as follows:

portable/GCC/RX100/port.c

The pull request by Dinh Van Nam:

#if defined(configTICK_VECTOR)
void vPortSoftwareInterruptISR( void ) __attribute__((naked, vector( R_BSP_SECNAME_INTVECTTBL, VECT_ICU_SWINT )));
#else
void vPortSoftwareInterruptISR( void ) __attribute__((naked));
#endif

'

#if defined(configTICK_VECTOR)
void vPortTickISR( void ) __attribute__((interrupt( R_BSP_SECNAME_INTVECTTBL, _VECT( configTICK_VECTOR ) )));
#else
void vPortTickISR( void ) __attribute__((interrupt));
#endif

The commit by ravibhagavandas (Function names are mistakenly changed):

(CORRECT:above) vPortSoftwareInterruptISR --> (WRONG:below) vSoftwareInterruptISR
(CORRECT:above) vPortTickISR --> (WRONG:below) vTickISR

#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )

    R_BSP_PRAGMA_INTERRUPT( vSoftwareInterruptISR, VECT( ICU, SWINT ) )
    R_BSP_ATTRIB_INTERRUPT void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );

#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */

    void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );

#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H  */

'

#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )

    R_BSP_PRAGMA_INTERRUPT( vTickISR, _VECT( configTICK_VECTOR ) )
    R_BSP_ATTRIB_INTERRUPT void vTickISR( void ); /* Do not add __attribute__( ( interrupt ) ). */

#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */

    void vTickISR( void ) __attribute__( ( interrupt ) );

#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */

A fixed code(I tested this code using new hardware(TB-RX130) and new RTOSDemo program for the hardware):
NoMaY-jp/FreeRTOS-Kernel@b4256e1#diff-53ed073c973c9fa04bd12fe7c0e6e9aa26ebee51190a1f3756df815a8c1e0c4f
portable/GCC/RX100/port.c

#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )

    R_BSP_PRAGMA_INTERRUPT( vPortSoftwareInterruptISR, VECT( ICU, SWINT ) )
    R_BSP_ATTRIB_INTERRUPT void vPortSoftwareInterruptISR( void ) __attribute__( ( naked ) );

#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */

    void vPortSoftwareInterruptISR( void ) __attribute__( ( naked ) );

#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H  */

'

#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )

    R_BSP_PRAGMA_INTERRUPT( vPortTickISR, _VECT( configTICK_VECTOR ) )
    R_BSP_ATTRIB_INTERRUPT void vPortTickISR( void ); /* Do not add __attribute__( ( interrupt ) ). */

#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */

    void vPortTickISR( void ) __attribute__( ( interrupt ) );

#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */

Best regards,
NoMaY

@NoMaY-jp
Copy link
Contributor Author

Hello @mingyue86010

By the way, I informed the detail of this issue to Renesas Electronics Corporation already and they seemed to decide this issue by themselves, so that I didn't post a PR which fixes this mistake.

Moreover, there are new conversations between I and them about new another port and I think that they will inform their decision to you later (maybe on November or December).

Best regards,
NoMaY

@mingyue86010
Copy link
Contributor

Hello @NoMaY-jp ,

I see. Thank you for all the updated informations. Since Renesas Electronics Corporation decide to address this issue by themselves, then I will just leave this PR until they submit a fix. I will follow up this if there is any updates.

Thank you!

Best Regards,
Ming

@mingyue86010
Copy link
Contributor

mingyue86010 commented Jan 12, 2022

Hi @NoMaY-jp,

I fixed the GCC/RX100 port function naming issue that you pointed out here FreeRTOS/FreeRTOS-Kernel#440 which shoule be just enough to unblock merging the changes in this PR. I include your commits in PR #776 and made some further update. It would be appreciate if you can help take a look of the changes as well~

For the other fixs that you mentioned in NoMaY-jp/FreeRTOS-Kernel@b4256e1#diff-53ed073c973c9fa04bd12fe7c0e6e9aa26ebee51190a1f3756df815a8c1e0c4f. We will let Renesas decide by themselves.

Once PR #776 get merged, then we can just close this one.

Thank you for your contribuition,

Regards,
Ming

moninom1 pushed a commit that referenced this pull request Sep 14, 2022
…able is not automatically intialized to zero, causing the phy discovery process to detect multiple PHY (#264)
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.

6 participants