Re: Re: SW4STM32 or CubeMX to init STM32 device
Hello dautrevaux,
The process I took yesterday is as you described, I think - start with an existing (empty, in my case) workspace, generate files in a subdirectory of that workspace, create a new project in the workspace, and import the files without copying. I did not check the “copy projects” checkbox because I may add some options later and want to be able to modify options in CubeMX.
System Workbench created a project tree:
Project Configuration
> Binaries
> Includes
>> C:/Ac6/.../stock includes
>> includes from CubeMX, incorrect paths as noted before
> Application
>> SW4STM32
>>> startup_stm32f427xx.s
>> user
>>> files from CubeMX e.g. adc.c, dma.c, tim.c; incorrect paths as noted before
> Debug
> Drivers
>>> CMSIS
>>>> system_stm32f4xx.c
>>> STM32F4xx_HAL_Driver
>>>> HAL files
> Middlewares
>> USB_Device_Library
>>>> USB files, e.g. usbd_cdc.c and usbd_core.c
> user
STM32F427IIHx_FLASH.ld
... The layout looks good, but each symbolic link had the same error, for example the file stm32f4xx_hal_i2c_ex.c:
Generated symlink: PROJECT_LOC..\..\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c
Symlink should have been: PROJECT_LOC..\CubeMX\Drivers\STM32F4xx_HAL_Driver\Src\stm32f4xx_hal_i2c_ex.c
... for each symbolic link, the pathname had the same error. I went to the list of linked resources in the project configuration (I could have edited the .project file but did not feel comfortable doing that) and corrected that, and also made the same correction in the include paths, and now I am able to build the project.
Revision control comes next and then some more complex code but I’m able to build code that runs on the chip so I feel like this was the only major hitch.
Thanks!
--
Elliott