Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jomoc_3144201
Level 4
Level 4
25 replies posted 10 replies posted 5 replies posted

When trying to add FreeRTOS from the ModusToolbox Middleware Selector I am getting the following error:

Unable to create link in project 'Honeywell_Sensor_PSoC6_mainapp'. Could not save

the project location for 'Honeywell_Sensor_PSoC6_mainapp'.

pastedImage_1.png

However, it looks like the FreeRTOS files were added to the Project:

pastedImage_2.png

Has anyone else seen this?

Thanks,

Jon

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

The _mainapp project maintains a link to generated source present in the _config folder. Hence whenever you change the files directory make sure you perform a clean and build to update the project configuration. It is always better to create a working set with all the project files than just _mainapp and then do a Team > Share Project.

I am not able to recreate your error. After sharing the project via Team to another directory, I added the middleware correctly. Looks like some step in integration to Git has gone wrong in your case. Please refer to the document attached for more information on how to integrate ModusToolbox projects with Git correctly.

Regards,

Dheeraj

View solution in original post

0 Likes
12 Replies
jepaz
Level 4
Level 4
25 replies posted 10 replies posted 10 questions asked

Hello Jon,

I was having a lot of trouble when my workspace directory included a path with spaces try changing it to somewhere more direct like C:/honeywell/

To make sure that is not the problem

0 Likes

Yeah, I don't see anything in the error that was posted to indicate there are spaces in the path.  Coming from a UNIX/Linux background, spaces in filenames and directory paths are a complete no-no for me, so I am certain that is not the issue here.

However, I do believe I know what happened. although I do not understand it.    I have been using this project for a number of weeks now to eval a Honeywell SEK002 Sensor Evaluation Kit for element14 and I have had no issues with the config to this point.  But, once I attempted to add FreeRTOS to the project via the ModusToolbox Middleware Selector, the project broke.  I am using the Git feature of the ModusToolbox/Eclipse so the actual project files were located in a separate location on a separate disk; say drive 'H:\'.  But, when I tried adding FreeRTOS to the project from the Middleware Selector, it was expecting the files to be located under the 'C:\ ' path where the workspace is located.  When the install failed, it somehow changed the reference to the project 'mainapp' so it was pointing to the 'C:\' location of the workspace.  I tried to clear this by restarting ModusToolbox, but when it restarted, the 'mainapp' folder in the application was closed.  When I right clicked on the folder, it shown a location on the 'C:\' drive and was empty since there is nothing there but I could not change this. I had backed up the files previously, so I just deleted the rouge .mainapp' folder from the project and then re-imported it from the Git repo and it seemed to recover the files which also included the rtos folder located under 'psoc6mw'.  So, it seems the files were somewhat added to the project from the Middleware Selector, but for some reason it changed the reference for the folder to the workspace location not the Git repo.

After all this, trying to build project, which was building fine prior, resulted in a number of errors.  I ended up creating a new workspace in the 'C:\' drive and imported the project to that location.  This still resulted in a number of build errors so I found I had to add a few items for FreeRTOS manually:

These were added to the project with links to:

C:\Users\jomodev\ModusToolbox_1.0\libraries\psoc6sw-1.0\components\psoc6mw\rtos

Under mainapp psoc6mw:

rtos->FreeRTOS->10.0.1->Source->portable

    Added MemMang which include the heap definitions

rtos->FreeRTOS->10.0.1->Source

    Added timers.c and queue.c

  FreeRTOSConfig.h was added under the mainapp Source folder.

    This was added from: C:\Users\jomodev\ModusToolbox_1.0\libraries\psoc6sw-1.0\components\psoc6mw\rtos\FreeRTOS\10.0.1\Source\portable

The starter project CE218136_EINK_CapSense_RTOS is a good one the compare with.

In the mainapp Source folder 'main.c' I added the following:

To test this I used this code to blink the Kit LED.

#include "cy_pdl.h"

#include "cycfg.h"

#include "FreeRTOS.h"

#include "task.h"

typedef enum {LED_OFF = 1u, LED_ON = 0u} LED_STATE;

/* create a handle for worker1_id*/

TaskHandle_t worker1_id;

static void worker1_task(void *pvParameters)

{

uint8 pinState = LED_OFF;

for(;;)

{

/* Task application */

pinState = (LED_OFF == pinState) ? LED_ON : LED_OFF;

    Cy_GPIO_Write(KIT_LED2_PORT, KIT_LED2_NUM, pinState);

    Cy_SysLib_Delay(CMD_TO_CMD_DELAY);

}

/* Should not get here */

vTaskDelete(NULL);

}

int main(void)

{

    /* Set up the device based on configurator selections */

    init_cycfg_all();

    /* Create a Task event*/

    xTaskCreate(worker1_task, "Worker 1", configMINIMAL_STACK_SIZE, NULL, 2, &worker1_id );

    vTaskStartScheduler();

    for(;;) {}

    /* Should not get here */

    return 0;

}

I have not gone back the project connected to the Git Repo so hopefully these changes will fix that as well.

0 Likes

Hello Jon,

Did you use the import feature to get the git project files into the workspace? From the behaviour, it seems like you created an application in a different workspace and then added the files to this workspace and started working on it. I'm not sure if you have the project files locally available in the workspace, because when you add files without importing, you might be essentially creating a link to the files and not having the files locally in the workspace.

Hence when you added the middleware, the files were added to the workspace but the project files (mainapp) weren't available in the workspace causing the error. This is my analogy.

I maybe wrong because I do not know how you have setup the application, but my suggestion would be to import the project files by performing the following steps: use File > Import > General > Existing projects into workspace; point to the root directory that contains the project(s) that make up the application. You must enable Copy project into workspace.

Please try this and it should work correctly. It will save you the hassle of adding RTOS files manually.

Regards,

Dheeraj

0 Likes

No, the project started from the CE221120_HighLevelSPIMaster starter project that was obtained from the ModusToolbox IDE Application list of projects.   I have been modifying this project to fit the project I am working on and have added CapSense (manually) and the RGB LED control.  I had taken the application files and moved them to a new workspace where they were imported and then I changed the name of the ModusToolbox project using the  'Rename ModusToolbox Application' by right clicking on the 'mainapp' project.   I then used the Share Project option from Team to create a Git Repo and add the project files and folders to the the Repo which are located on a separate disk.     This has been working without issue for a few weeks now and I did not have an issue with this until trying to add FreeRTOS from the ModusToolbox Middleware Selector option. 

I'm concerned that if I add anything else from ModusToolbox Middleware Selector that it will break my configuration again.

0 Likes

The question mark symbol seen on the files indicates that you are probably working on the files inside the Git Repo present on a seperate disk and is expecting you to commit the files.

Please check if you are working on files present in the workspace directory itself and not in some other disk. It has worked without issue until now maybe since you were editing existing files and Modus is maintaining links to those files and now creation of new files (ones added by the middleware) are not able to locate the mainapp files in the workspace directory.

Before you added the middleware, did you notice a small arrow mark symbol present on the files as shown below:

pastedImage_5.png

This will tell you if you are editing a linked file or a local file.

Regards,

Dheeraj

0 Likes

I believe I have already answered the question regarding where the files are located.

Regardless of where the files are located, especially when they are linked from a Git repo, adding something from the ModusToolbox Middleware Selector should not break the config.

0 Likes

Right click on mainapp and then click on Properties. In the Resource tab that opens, check the location specified. It should be pointing to the workspace directory. Let me know your observations.

Regards,

Dheeraj

0 Likes

Here you go.

Note, the Project Location is on the 'H' drive as I previously stated since this is where the Git repo is.

ModusToolbox_LinkedRes.png

This is the Git info from the project.

ModusToolbox_LinkedRes2.png

0 Likes
lock attach
Attachments are accessible only for community members.

The _mainapp project maintains a link to generated source present in the _config folder. Hence whenever you change the files directory make sure you perform a clean and build to update the project configuration. It is always better to create a working set with all the project files than just _mainapp and then do a Team > Share Project.

I am not able to recreate your error. After sharing the project via Team to another directory, I added the middleware correctly. Looks like some step in integration to Git has gone wrong in your case. Please refer to the document attached for more information on how to integrate ModusToolbox projects with Git correctly.

Regards,

Dheeraj

0 Likes

Yeah, of course. 

I'll just go back to using PSoC Creator or another device.

0 Likes

I created another project based on one of the examples and went through the Share project process to set up a Git Repo.  I then added FreeRTOS  from the ModusToolbox Middleware Selector and had no issue with the project missing a folder or with compiling it.   I'll have to go back and look at the other Git repo to see what happened, although it still seems to be working fine. 

Thanks.

0 Likes

Glad to hear that. My guess is some reference to files didn't get updated when the project was shared leading to the mainapp not being found. The pdf shared highlights all the key steps to set up the Git repo. Hope it helped

Regards,

Dheeraj

0 Likes