Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


No object file created for new c source file in project.

This is an STM32CubeMX generated project that has the FREERTOS option enabled.

Only the default thread is generated in code. All other threads I added manually using the default thread as an example of how to add them in freertos.c. The threads I added are defined in seperate file from freertos.c. The threads in that file are compiling without error.

Now I have new thread to add. I added it just like others in freertos.c, and I defined its start function “`StartThreadNew” in its own .c and .h files which I have newly added to the project. Just as all the other threads I created it with this code:

/* USER CODE BEGIN RTOS_THREADS */
  osThreadDef( ThreadReverseOutVProtect, StartThreadNew, osPriorityNormal, 0, 256);
  ThreadNewHandle = osThreadCreate(osThread(ThreadNew), NULL);

And just as the other threads are prototyped, so did I prototype the start function of this new thread:

/* USER CODE BEGIN FunctionPrototypes */
  void StartThreadNew(void const * argument);

When I compile it I get the error:

undefined reference to `StartThreadNew'	freertos.o	/TEC_Driver_SW4STM32

The new filename (with the .o extension) that StartThreadNew is defined in did not make it into the objects.list file. But that filename (with the .c extension) is listed in both the Project Explorer tab and the C/C++ Projects tab.

I added this new file by going to File => New => Source File. That file was created in the Eclipse project file system. I wanted it linked in the file system. So I deleted the new file from the project, moved that file to the directory all the other files in the project are in outside the Eclipse file system. Then I dragged the file from the Windows Explorer into the desired directory in Eclipse Project Explorer tab. I specified that the file is to be linked to in the pop up dialog box that appeared.

What has gone wrong here? Why isn’t an object file created for the new file that StartThreadNew() is defined in?

This problem is solved.

I right clicked the file in the Eclipse Project Explorer and selected Properties => Resurce (tree).

Under the Resource group to the right three types of paths, these are labled “Path”, “Location”, and “Resolved location”.

To the right of Path is the path and filename as it exists in the Eclipse file system.

To the right of Location is the Windows Operating System’s path to the file, using the Eclipse variable PROJECT_LOC. The value of this is the path to the project, and so makes rest of the path relative the project location.

To the right of “Resolved location” is the Windows Operating System’s path to the file. The filename at the end of this path did not have the .c file extension. The filename as it appeared in the Eclipse Project Explorer did have a .c extension. The actual file in the Windows Operating System did not, and so was not considered c source code, and so was not compiled

In the Windows Explorer I added the .c file extension. In Eclipse Properties for the file I clicked on Edit and added the .c file extension. The files was included in compilation after this.