I’m trying to run FreeRtos RA4M2 (R7FA4M2AC3CFM) in Visual GDB (IDE: Visual studio 2022).
I Created 2 simple freertos tasks, inside the while loop incrementing a variable and calling vTaskdelay function to switch to next task.
Same project is working in E2 Studio. If i try same procedure in visual studio 2022, it is causing Default handler.
If i remove the vTaskDelay and taskYIELD it works fine but task is not switching into another task.
I created same project for RA2L1(R7FA2L1AB3CFL) microcontroller using visual studio 2022 IDE(Visual GDB). For RA2L1, if i use vTaskDelay and taskYELD inside the task code is working fine.
Hey @vinay and welcome to the FreeRTOS comunity!
Thanks for reaching out about your problem, I want to make sure I understand it fully so I can help you out. So you have a project using the RA4M2 with two tasks and are seeing different paths of execution based off of what IDE that you are using? You then mention that when using the RA2L1 microcontroller in visual studio that everything works correctly?
Is there any chance you have a place where you have these projects hosted so that I can take a look at the code, as this seems like a rather irregular error. Some first thoughts I would have would be to check if the same compiler is being used for when running in Visual Studio and in the E2 studio. Then you mention hitting the default handler, is there any chance your interrupt handler is being installed in an incorrect place when building with Visual Studio with the RA4M2 processor? The reason I’m wondering that is since you see it work correctly for the RA2L1 it seems like there is a fully working setup that you have for the project you’re starting on.
We are using visual studio 2022 IDE for RA4M2 project.
Please find the below link for RA4M2 and RA2L1 project.
please add “.”(dot) after the gitlab in given link, because for new users, not allowing to attach the link so i removed the dot(.) between the gitlab and com.
If i run these projects in visual studio 2022 IDE, RA2L1 microcontroller project is working good and RA4M2 microcontroller project is entering into default handler(If we use vTaskDelay and taskYIELD).
Hey @vinay, sorry for the delay on getting back to you and thank you for your patience! Okay so I cloned down your repository and tried to launch your projects. They’re currently set up to use a lot of absolute paths to your file system, so unfortunately I was not able to run your projects. Due to not being able to run these, or properly open the files that the project is attempting to link in, I’m unable to determine what the default handler that you are referring to is.
A thought I have would be that in the Visual Studio project the flags you are passing in for building the project are correct for the RA2L1 board, but not the RA4M2 board. Hence why you see the expected task swapping with that board. I looked at the CMakeLists.txt files you have in there and it seems that the proper microcontrollers are being selected in there. Though something I did notice was that the RA2L1 CMakeLists.txt is defiing more FreeRTOS config settings than in your RA4M2 CMakeLists.txt. Would you mind adding in these FreeRTOS configs into the CMakeList for the RA4M2 and seeing if that gets the project running correctly?
Additionally, if you can modify the projects to use relative paths and push those changes to your repo I’d be more than happy to try running them and provide additional help then.