cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I try to start with azure RTOS on a H723ZG and when looking at the examples (e.g. TCP-Client) it is completely different from code generated through CubeIDE from scratch. I hoped that generated code will be a working framework that I adjust/add.

GRand.1
Associate II

CubeIDE makes a completely different file structure, some includes cannot be found "VOID" is written capital and causes an error, etc. I am completely new to RTOS, I did some bare metal HAL with CubeIDE and that worked quite well, but just started recently with STM32 (LabVIEW programmer...).

If there is a good tutorial that really starts from scratch with azure and CubeIDE and not just opens and example, that would be very helpful.

Any help is much appreciated! Nice greetings, Guenter.

10 REPLIES 10
Haithem Rahmani
ST Employee

Hi Guenter,

to better understand your usecase, did you use the STM32CubeMX to generate the project for the STM32CubeIDE?

regards

Haithem.

GRand.1
Associate II

Hello Haithem, thanks for helping!

I used STM32CubdeIDE, startet a new project and selected my board (H723ZG Nucleo).

Then I selected my peripherals, timers, SPI, etc., in the .ioc, just as I did before on my F4 boards. However, this time I also selected software packs (Azure App, ThreadX, FileX, NeXtDuo, Network interface, BSP) similar to the STM32 video. So far so good, no problems, all green checks. When I then generate code it went a bit sideways. The file tree looks quite different form the examples, no \Application\User\ and also in the Middlewares, no \NX Core\, etc. and missing includes (nx_stm32_custom_driver.h).

I noticed a difference in capitalization, not sure where it matters and where it does not, "VOID" is certainly a mistake. I copied some of the errors below. When I open an example and clean and build it everything is fine, what do I have to do to make STM32CubeIDE do it in the same way?

Again thank you for your help and apologies for my lack of knowledge.

expected identifier or '(' before '[' token

fatal error: nx_stm32_custom_driver.h: No such file or directory

fatal error: stm32NNxx_hal.h: No such file or directory

make: ...

...

stray '#' in program

unknown type name 'NX_IP_DRIVER'; did you mean 'NX_ETH_DRIVER_H'?

unknown type name 'NX_IP_DRIVER'; did you mean 'NX_ETH_DRIVER_H'?

unknown type name 'VOID'

unknown type name 'VOID'

Haithem Rahmani
ST Employee

Hi,

I think you didn't enable the Azure RTOS components in the Mode UI did you?

0693W000008y8kEQAQ.png 

regards

haithem.

GRand.1
Associate II

Hello Haithem, no, I did enable all of them.

Greetings, Guenter

Haithem Rahmani
ST Employee

Hi,

this is a bit strange as you can see below, my project is correctly configured.

are you using the STM32CubeIDE 1.6.0?

regards

Haithem.

0693W000008yAMYQA2.png

GRand.1
Associate II

Hello Haithem,

yes, I do use the latest (1.6.0). I tried a bare HAL project and it worked. I will next successively add one component after the other and see where it will lead me. But even in your (working) screen shot, the file structure is different from the examples where they have /Application/User/AZURE_RTOS/.. and others as well. I understand that there a many ways leading to the same result, but it would be way easier for a beginner to be able to reproduce the same outcome with the same tools.

Nice greetings, Guenter

Haithem Rahmani
ST Employee

Hi Guenter,

Please find attached a screencast showing how to create an Azure RTOS project from scratch using the STM32CubeIDE + STM"2CubeMX tools.

let us know if this is working fine for you or not.

regards

haithem.

ADyke.1
Associate

Hi Haithem,

I followed the video and got the same results as I went though as you show. But at the end, when I clicked the "compile" button, the code would not compile.0693W000008zK2aQAE.pngIt appears there are syntax errors and numerous missing files?

arm-none-eabi-gcc "../Middlewares/ST/netxduo/common/drivers/lan8742/nx_stm32_phy_driver.c" -mcpu=cortex-m7 -std=gnu11 -g3 -DDEBUG -DUSE_HAL_DRIVER -DSTM32H723xx -DTX_INCLUDE_USER_DEFINE_FILE -DNX_INCLUDE_USER_DEFINE_FILE -c -I../Core/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc -I../Drivers/STM32H7xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../Drivers/CMSIS/Include -I../AZURE_RTOS/App -I../NetXDuo/App -I../NetXDuo/Target -I../Drivers/BSP/Components/lan8742/ -I../Middlewares/ST/netxduo/common/drivers/ -I../Middlewares/ST/netxduo/addons/dhcp/ -I../Middlewares/ST/netxduo/common/inc/ -I../Middlewares/ST/netxduo/ports/cortex_m7/gnu/inc/ -I../Middlewares/ST/threadx/common/inc/ -I../Middlewares/ST/threadx/ports/cortex_m7/gnu/inc/ -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"Middlewares/ST/netxduo/common/drivers/lan8742/nx_stm32_phy_driver.d" -MT"Middlewares/ST/netxduo/common/drivers/lan8742/nx_stm32_phy_driver.o" --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -o "Middlewares/ST/netxduo/common/drivers/lan8742/nx_stm32_phy_driver.o"
../Middlewares/ST/netxduo/common/drivers/template/nx_custom_driver.c:1:1: error: expected identifier or '(' before '[' token
    1 | [#ftl]
      | ^
../Middlewares/ST/netxduo/common/drivers/template/nx_custom_driver.c:1:2: error: stray '#' in program
    1 | [#ftl]
      |  ^
../Middlewares/ST/netxduo/common/drivers/template/nx_custom_driver.c:14:10: fatal error: nx_stm32_custom_driver.h: No such file or directory
   14 | #include "nx_stm32_custom_driver.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ../Middlewares/ST/netxduo/common/drivers/template/nx_eth_driver.c:14:
../Middlewares/ST/netxduo/common/drivers/template/nx_eth_driver.h:47:1: error: unknown type name 'VOID'
   47 | VOID  nx_eth_driver(NX_IP_DRIVER *driver_req_ptr);
      | ^~~~
../Middlewares/ST/netxduo/common/drivers/template/nx_eth_driver.h:47:21: error: unknown type name 'NX_IP_DRIVER'; did you mean 'NX_ETH_DRIVER_H'?
   47 | VOID  nx_eth_driver(NX_IP_DRIVER *driver_req_ptr);
      |                     ^~~~~~~~~~~~
      |                     NX_ETH_DRIVER_H
../Middlewares/ST/netxduo/common/drivers/template/nx_eth_driver.c:28:1: error: unknown type name 'VOID'
   28 | VOID  nx_eth_driver(NX_IP_DRIVER *driver_req_ptr)
      | ^~~~
../Middlewares/ST/netxduo/common/drivers/template/nx_eth_driver.c:28:21: error: unknown type name 'NX_IP_DRIVER'; did you mean 'NX_ETH_DRIVER_H'?
   28 | VOID  nx_eth_driver(NX_IP_DRIVER *driver_req_ptr)
      |                     ^~~~~~~~~~~~
      |                     NX_ETH_DRIVER_H
make: *** [Middlewares/ST/netxduo/common/drivers/template/subdir.mk:25: Middlewares/ST/netxduo/common/drivers/template/nx_custom_driver.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Middlewares/ST/netxduo/common/drivers/template/subdir.mk:27: Middlewares/ST/netxduo/common/drivers/template/nx_eth_driver.o] Error 1
In file included from ../Middlewares/ST/netxduo/common/drivers/template/nx_eth_phy_driver.c:14:
../Middlewares/ST/netxduo/common/drivers/template/nx_stm32_eth_config.h:22:10: fatal error: stm32NNxx_hal.h: No such file or directory
   22 | #include "stm32NNxx_hal.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Middlewares/ST/netxduo/common/drivers/template/subdir.mk:29: Middlewares/ST/netxduo/common/drivers/template/nx_eth_phy_driver.o] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.
 
10:58:53 Build Failed. 12 errors, 0 warnings. (took 59s.354ms)
 

Any suggestions or things that might be worth trying?

GRand.1
Associate II

Hello Haithem,

I followed your screen cast (thank you for posting it) and run into the same problems as ADyke.1. The set-up was never an issue, although I started from a Nucleo template rather than from the uC like you, the problem started with the compiling.

  • the compiler does not know what "[#ftl]" is (and neither do I),
  • the include file "nx_stm32_custom_driver.h" does not exist in the ..\template\-path, only "nx_custom_driver.h"
  • the include file "stm32NNxx_hal.h" does not exist anywhere, should that be "stm32h7xx_hal.h" from ..\Drivers\STM32H7xx-HAL_DRIVER\..?
  • I guess once those issues are solved then so will be the others.

Thanks for your help and greetings, Guenter