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 two short videos (registration required) highlighting:

System Workbench for STM32


Migration from Keil to AC6

Hi there!

I’m move my project form Keil uVision 5 to System Workbench but I have a proble with header file.

First, I use STM32CubeMx to generete the project for AC6.

I setup the microcontroller peripheral with STM32CubeMx and I added the FreeRTOS.
Next I generate the project selecting:

  • Toolchain SW4STM32
  • Copy all used library into the file project.


Second, I import my project into AC6: File -> Import -> General -> Existing project.

I can build the project without errors and I can start the debug.

Now I need to import a folder which contain my source code (task, peripheral libraries, ...).

I create a new source folder into the root of the project and I import the source and header files.

Import -> General -> File system -> My folder.

Three, I build the project and I obtain an error: ../Local/task/task_init.c:13:21: fatal error: service.h: No such file or directory.

Local is the source folder that I added and its contain my code.

With Keil I haven’t compilation errors.

I need to specify the header file into compiler options?

Any suggestions?

Thanks in advance!

France

Hi,
Just a few questions:

  1. When generating under CubeMX, do you keep “generate in root directory” checked?
  2. Where is located the service.h file you want to include?
  3. How is it included (with quotes or angle brackets)?
  4. When importing your source code, do you copy the files in your project or link to them?


Bernard (Ac6)

Hi Bernard,

thanks for the reply.

I unchecked the “generate in root directory”.

The service.h is located in a folder contained into another folder placed into the project root directory.

The header file is included with quotes #include “service.h”

I made a copy of my code into the project directory and then I imported it trought file menu -> import.

Where I’m wrong?

Thanks

France

Hi,

The problem is due to unchecking “generate in root directory”; in this case you usually get strange ‘File not found” errors for new files, as the structure you see under the process explorer is different from th estructure seen by the compiler...

So try with keeping this option checked, it should work in a more understandable way.

Bernard (Ac6)

Hi,

if i check “generate in root directory”, System workbench ac6 can’t start to build the project. If i click build nothing happens.

I solved the problem adding one folder at time into linker processor.

Thanks


Hi Bernard,

I need your help once again!

Now my problem regards the redirection of printf to UART2.

My MCU is a STM32F103VDT and I use UART2 to print debug on serial console.

On Keil I used this code to redirect the printf trough UART2:

int fputc(int ch, FILE *f)
{
/* Place your implementation of fputc here */
/* e.g. write a character to the USART */

if ((char)ch == ‘\n’) /* Add a LF before \n — LF -> CR LF */
{
HAL_UART_Transmit(&huart2,(uint8_t*)”\r”,1,1);
}

HAL_UART_Transmit(&huart2,(uint8_t*)&ch,1,1); // 1 tick waiting (1ms) enough for 87us/byte at 115200

return ch;
}



But now this code not works when I compile with System WorkBench AC6.

Exploring the forum I found a hint regarding the redirection of UART.

It’s suggest to use this code to redirect the printf (I add my code into the function):

void __io_putchar(uint8_t ch)
{
/* Place your implementation of fputc here */
/* e.g. write a character to the USART */

if ((char)ch == ‘\n’) /* Add a LF before \n — LF -> CR LF */
{
HAL_UART_Transmit(&huart2,(uint8_t*)”\r”,1,1);
}

HAL_UART_Transmit(&huart2,(uint8_t*)&ch,1,1); // 1 tick waiting (1ms) enough for 87us/byte at 115200

//return ch;
}


But this code not works.

Any suggestion?

Thanks