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


Importing an STM32CubeMX generated project under System Workbench for STM32

I have created a project in STM32CubeMX version 4.17.0 using firmware package STM32Cube_FW_F4_V1.13.0. I have selected the toolchain SW4STM32, with “Generate Under Root” checked. I have selected “Copy only the necessary library files” in order to generate the FreeRTOS and USB_Device libraries. When I generate code in Cube, the following folders are created; Drivers/CMSIS, Drivers/STM32F4xx_HAL_Driver, Inc, Middlewares/ST/STM32_USB_Device_Library, Middlewares/Third_Party/FreeRTOS, and Src. The generated code looks like what I would expect.

I have then imported the cube output as an existing project into eclipse. I have installed system workbench from the eclipse using “Install New Software...”. So I am using the latest version of System Workbench.

When I build the application, I get hundreds of errors. It appears that the compiler cannot see all the include directories.

I noticed that all the include directories were references to outside of the workspace. I have changed all the includes to the same folders but within the workspace; i.e. the folders which were included by selecting “Copy only the necessary library files” in cube. I also noticed that the includes were only listed under Properties > C/C++ Build > Settings > MCU GCC Assembler > General. I have copied them into Properties > C/C++ Build > Settings > MCU GCC Compiler > Includes.

However, I still get hundreds of errors; such as:

../Src/main.c:544:17: error: ‘GPIOC’ undeclared (first use in this function)
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

In file included from /home/gateway/workspace/target-actuator/Inc/stm32f4xx_hal_conf.h:358:0,
from /home/gateway/workspace/target-actuator/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:48,
from ../Src/main.c:45:
/home/gateway/workspace/target-actuator/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h:291:3: error: unknown type name ‘TIM_TypeDef’
TIM_TypeDef *Instance; /*!< Register base address */



I assume doing an import is correct. I have seen other videos which create a cube project, then create a new project in eclipse. I will give that a go. I will also create a simpler cube project (i.e. without FreeRTOS). Just needed some confirmation that I’m using the right settings in cube and following the right import steps in eclipse.

Also, since im using a custom made board, I need a configuration file for the debugger. It appears in order to do this, I need to create a new project in eclipse anyway. As the import doesn’t generate anything, and the debugger assumes I am using a development kit. Is this correct?

I started again from a bare bones cube project; configured RCC, SYS, and clock configuration. I’ve generated the code as described above, and imported the project into eclipse. It now builds. I’ll continue to incrementally add code from the existing project. I’m happy now biggrin

Dear Mkerr,

Nice to know that you have sucessed to complie/build/run/load your project.

I am facing some problem while editing a exsisting code that was build in Cocooex, but as the coocox website is inactive so I need to work with Eclipse.

I was getting many errors in AC6 version of Eclipse, so thought to change Eclipse Nion1 version. Still this problem is going.

In the project properties setting, I am using MinGW gcc toolchain, also I see GCC assembler and compailer here.
In Properties > C/C++ Build > Settings > MCU GCC Compiler > Includes, dont we need to add toolchain include path? I mean C:\MinGW\include or C:\STM32_toolchain\arm-none-eabi\include.
What about the Prerefference setting from Window?

Do you mean, just project in same folders but within the workspace?

My cubemx setting do not contain , RCC,SYS, because my application is low power.


Kindly suggest me what to do!
Do you think GCC compailer is enough for it? Do you want me to use toolchain SW4STM32?

France

Hi Shin2016

Why do you try to use the MinGW GCC compiler? It’s a nice compiler, but for generating code running on the PC, not on an STM32 ARM-based chip.

What erors did you get with Ac6 System Workbench for STM32?

Without more details, nobody could help you.

Bernard (Ac6)

Dear Sir Bernard ,

I have been spend a lot of time on solving my project properties build problem.
Now, solved some issues regarding including files.

Right now the problem is,

arm-none-eabi-gcc: fatal error: no input files
compilation terminated.

People are tring to solve this issue in many ways, but still looks tough.
Some people said to install right verrsion of JAVA.
Someone says, http://forums.devshed.com/programming-42/gcc-exe-fatal-error-input-files-952863.htmlQuestion , https://www.eclipse.org/forums/index.php/t/49848/Question

http://askubuntu.com/questions/575444/no-input-files-running-c-programQuestion // for using basic code

I wanted to use Ac6 stm32 MCU GCC Compiler, but same thing happens.

Do you have any suggestion ? I already use MinGW /Cygwin etc.

Hi Shin2016. I am still migrating my project and evaluating Ac6, so please take the following with a grain of salt.

I solved my compilation issues by starting with a very simple project (generated by CubeMX and imported into Eclipse as an Ac6 project) with no middle ware and minimum peripheral selected. Then I built up progressively from there. I would highly recommend doing the same. It will be easier for people to help if you start with a simple project.

For me, my compilation issues were actually some missing includes.The errors were just noise, and I only worked it out by progressively adding the existing code. The build issues had nothing to do with Eclipse, the build chain, or Ac6.

I don’t know what Cocooex is, so I can’t help there.

I recall looking into Eclipse Neon. I believe I read that Ac6 (or could have been the STM32CubeMX plugin) supported Mars; there was no mention of Neon. So I stuck with Mars. However, I would be surprised if using Neon caused compilation issues.

I don’t believe you should be using MinGW. Ac6 comes with built tools and you need to use those. I assume you are trying to compile for a STM32 device? MinGW is for compiling for a Windows target. If you could explain why you are using MinGW?

The SW4 toolchain is GCC. I am migrating to SW4STM32 because I need a development environment which runs on Linux, uses Eclipse, and is low cost. Previously I was using VisualStudio and VisualGDB; which is a great tool, but all my other products are developed on Linux using Eclipse, and I prefer to maintain a single development environment.

Dear Mkerr,

Thank you ver much for your response.

You have nicely fugureout things.
I am just a Electronics circuit engineer, having insufficient knowledge on firmware.

I do believe there is nothing wrong with both Neon and Ac6 IDE. Even I learn latter that ARM cant be applicable by MinGW /Cygwin etc.

I need to know following things that important,

1. From your suggestion, is there any way to connect automatically Ac6 after generating code in STM32CubeMX plugin?
2. I did open src main file from cubemx folder to eclipse IDE.
3. What about your setting of windows>prereference?I mean build environment, makefile setting, indexer etc.
4. What current builder you have been used? CDT in case of Ac6 STM MCU GCC compailer ?


Help me please.

Regards
Hasan