cancel
Showing results for 
Search instead for 
Did you mean: 

Do you use STM32cubeMX

tarzan2
Associate II
Posted on November 19, 2014 at 19:39

Hello,

ST announced that everybody should use the cubeMX software (or at least libraries) because the old libraries will not be supported anymore. I was a noob on STM32 so I decided to start with cubeMX.

It it clear that nobody use it since all examples found on the net (and especially on this forum) use the old libraries. They just do NOT compile on a project generated with cubeMX.

Moreover, I can't understand why a simple program that is just init. some peripherals (SPI/I2C/UART & FATFS/SDIO) do NOT compile with the free version of IAR or keil because of the code size limit (32kB). Without optimization, my program weight 33kB ! for something like init clock/init periph/mount SD card. WOW ! Same job was done with 2kB on low-cost 8 bits UC or 5-6kB on PIC32.

So what should I do ? Peripherals cannot be fully initialized with cubeMX (try to configure ADC+DMA and you will understand...), the ''solution'' is to do it manually but this look like spaghetti - and the ugly IAR/keil interfaces that ST choose don't help...
6 REPLIES 6
Posted on November 19, 2014 at 20:11

No, I like my abstractions thin, the SPL can get me a boot loader with SDIO and FATFS, plus, in under 16KB

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
stm32forum
Associate II
Posted on November 19, 2014 at 21:18

You must set in your compiler to use the Nano library to reduce the code size.

If you looking for a compiler with no sizelimit, take a look at

http://www.emblocks.org/web/

frankmeyer9
Associate II
Posted on November 20, 2014 at 10:23

If you looking for a compiler with no sizelimit, take a look at

http://www.emblocks.org/web/

 

And in addition to that, it automatically installs the SPL files for all supported STM32 variants. So porting SPL examples is not really difficult.

You might, however, need to download discovery board/evaluation board firmware packages or DSP lib packages separately for certain projects.

rchris
Associate II
Posted on November 20, 2014 at 11:44

Hi,

I am in the middle of a project the uses the old SPL and haven't decided yet, if I want to modify it. Unfortunately, I have Keil and want to use their new Middleware (USB, SD card), which now seems to cooperate nicely with RTX. This only works with the Cube drivers. I also have an issue with the USART HAL driver described [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/STM32Cube%20UART%20variable%20length%20receive&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&TopicsView=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/AllItems.aspx&currentviews=79]here. I would not want to use a mix of both drivers or stay with the old SPL, which would force me to use legacy middleware (dead end).

tarzan2
Associate II
Posted on November 20, 2014 at 16:35

@christopher: I agree with you. I am using fatFS to make a reliable filesystem on a SD card through SDIO/DMA. This works fine with the code generated by cubeMX but the code is not compatible with the old lib and I definitely don't want to use the old lib (and develop the SDIO/DMA low level driver).

em::blocks may be an alternative : I successfully import the code generated by cubeMX (keil mode). I'm now trying to generate a .hex file, as the files are compiling independently but the ''compile/F7'' cmd doesn't link anything.

If you have the time, just look at the (free) concurrent IDE (MCHIP/MPLAB-X), and you will see a huge difference ! The dilemma is:

- Good MCU / bad IDE => STM32

- Bad MCU / good IDE => PIC32

Both have a very bad, ugly forum.

stm322399
Senior
Posted on November 20, 2014 at 18:29

- Good MCU / bad IDE => STM32

 

- Bad MCU / good IDE => PIC32

Hopefully for me, I can avoid IDE, working with plain text editor, Makefile and command line tools. I prefer to work with good MCU anyway.

Both have a very bad, ugly forum.

It is really a pain to use, top posters deserve a decoration for using this forum daily.