STM32 Cube integration.

Comments

22 comments

  • Avatar
    Michael Johnson

    Hi Mark,

    We released an updated STM32 CPU support package that supplies the CMSIS files used in the STM32 Cube distributions. Unfortunately ST removed the PLL setup code from the SystemInit() function so we had to update each affected (ST haven't dared to touch STM32F1/STM32L1) board support package with a constructor function to setup the PLL.

    We have a program that can create crossstudio project files from their Atollic equivalents as shipped in the STM32 Cube distributions. Not sure how to release this program at the moment.

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    peets

    Hi Michael, Mark,

    same problem; want to use Cube with STM32F303VC; a 'howto' would be great until integration is ready. Thanks, Peter 

    0
    Comment actions Permalink
  • Avatar
    Gerry Steyn

    Hi Michael

    Is it possible to get the Cube Atolic to Crossworks project convert program?

    Thanks

    Gerry

     

     

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Hi Gerry,

    Had a change of tack (the eclipse project files are a mess) the 3.3.1 release has a Keil MDK project file import capability. You can get early access to this here

    http://www.rowleydownload.co.uk/snapshots/arm_crossworks_crossworks_v3_macos_x86.dmg

    http://www.rowleydownload.co.uk/snapshots/arm_crossworks_crossworks_v3_linux_x86.tar.gz

    http://www.rowleydownload.co.uk/snapshots/arm_crossworks_crossworks_v3_win_x86_setup.exe

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Carl Sherbino

    Will this be the final approach to provide support for the STM32 Cube projects?

    I currently have version 2  and I am thinking about upgrading to the newest version and want to ensure that this support will be part of what I am purchasing (i.e. if I upgrade now, will I be able to get the 3.3.1 update? )

    0
    Comment actions Permalink
  • Avatar
    Gerry Steyn

    Hi Michael

    I've managed to inport a basic STMCobeMX project. Thanks!!

    It works fine, but when I include FreeRTOS in Cube, the Crossworks compiler complains about FPU unit that needs to be defined?

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Hi Gerry,

    Set the fpabi property to hard.

     

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Gerry Steyn

    Hi Michael

    Thanks for your prompt response!

    Setting FPABI to hard does not solve the problem.

    I've attached a file with the CW errors.

    Regards

    Gerry

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Hi Gerry,

    Is the FreeRTOS port file for keil-mdk or for gcc? There appears to be separate files for different compilers (no idea why).

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Gerry Steyn

    Hi Michael

    I tick the Enable box for FreeRTOS in CubeMX. It then generate the source code for Keil. So I recon it is the Keil port file??

     

    Regard

    Gerry

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Hi Gerry,

    This is where is get's hard. With the STM32Cube samples the freertos source is provided for gcc in a directory next to the keil one. Is it the same for CubeMX?

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Gerry Steyn

    Hi Michael

    I see only one FreeRTOS directory, it is in the /Middlewares/Third_PArty directory.

    What version of STMCube are you using?

    Regards

    Gerry

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Hi Gerry,

    I just downloaded the CUBE library/examples I haven't used the CubeMX tool.

     

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Gerry Steyn

    Hi Michael

    Seems that STMCube is still not stable. I've done many tests, and it is not doing what it should.

    There is a Crossworks and FreeRTOS demo on the FreeRTOS site, those examples all work. I will use that as my basis, and then pull the STM StdPeripheral library into my project.

    Thanks

    Gerry

    0
    Comment actions Permalink
  • Avatar
    Robert Brown

    Hi.

    Thanks for adding the Keil project importer - a pragmatic and important step for getting code from STMCube into Crossworks.

    I've found similar problems to Gerry and got past them, so maybe some of my notes can be helpful -

    I wanted to base a project off the STM32F429I-DISCO demonstration project. So I downloaded the stm32cubef4.zip file and extracted it so I had a STM32Cube_FW_F4_V1.3.0 folder. I imported the project Projects\STM32F429I-Discovery\Demonstrations\MDK-ARM\Project.uvproj using the template "ST_STM32F429I_DISCOVERY_EXE". The import was successful but the project didn't build.

    - From the source files folder "Middlewares/FreeRTOS/Portable", removed the "Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c" file and added "Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c" instead

    - In the Project Properties -> User Include Directories, changed "../../../../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F" to "../../../../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F"

    - In the Code Generation Options, changed ARM FP ABI Type to "Hard"

    - Got a strange error "X:/2/STM32Cube_FW_F4_V1.3.0/Projects/STM32F429I-Discovery/Demonstrations/MDK-ARM/../Config/LCDConf.c: No such file or directory". Removed "LCDConf.c" from the "Middlewares/STemWin/Config" folder (there is also a "LCDConf_stm32f429i_disco_MB1075.c" file, and I think it's really the absent "LCDConf.c" file).

    - Removed the file "STemWin524b_CM4_OS_Keil.lib" file from the "Middlewares/STemWin/Library" source folder, and added "Middlewares/ST/STemWin/Lib/STemWin524b_CM4_OS_GCC.a" file instead.

    - Imported the segment placement xml file into the project, and added a new segment:

    <MemorySegment name="SDRAM1" >
    <ProgramSection alignment="4" Load="No" name=".ExtRAMData" />
    </MemorySegment>

    I guess only the first 3 points will be relevant to you. Anyway, I hope this helps.

    Cheers,

    Rob.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Hi Rob,


    Thanks for that - another customer has reported that the SDRAM memory space needs allocating in the memory map.

    This can be done with

    SDRAM1_SIZE=0x100000

    in the memory map macro's property.

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Robert Brown

    Hi Michael,

    Just a small point - on the STM32F429I-DISCO board, the SDRAM is 64Mbit, so shouldn't the size be 0x800000?

    Cheers,

    Rob.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    Hi Rob,

    I didn't check the datasheet - I'm sure you're correct.

    Regards

    Michael

    0
    Comment actions Permalink
  • Avatar
    Harjit Singh

    Thank you for implementing this - it is quite useful. FWIW, the first time I used it, CrossStudio crashed. I restarted CrossStudio and tried the import again and it succeeded. If I can provide any info. to help with debugging the reason for the first crash, please let me know what you need.

    0
    Comment actions Permalink
  • Avatar
    Michael Johnson

    There seems to be a first run of the day problem with crossworks - could this be the problem?

    0
    Comment actions Permalink
  • Avatar
    Harjit Singh

    Michael, it could have been. I don't remember the exact circumstances. I'll pay more attention and if I run into it again, will let you know.

    0
    Comment actions Permalink
  • Avatar
    jnz

    Can anyone commend about implementing CTL with when importing the CubeMX HAL?

    I don't care if I use the MX/HAL or the older STM32's standard libs, but I'd like to try CTL along with that. Seems like it's a lot of trouble to use CubeMX, but there are advantages too.

    Any thoughts on how to accomplish this? Would it be as simple as

    - Create the project in CubeMX

    - Import as uVision into Rowley

    - Then add the CTL libs in and start creating the tasks?

    Surely I'll have to look at what CTL needs for NVIC, Clock, Timers, but is this worth trying?

    0
    Comment actions Permalink

Please sign in to leave a comment.