Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 07:14 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Getting started coding for the STM32 in C

Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 05:20pm 31 May 2020
Copy link to clipboard 
Print this post

Someone asked in the Colour Maximite 2 thread about getting started with programming the STM32 in C. I didn't answer in that thread as without writing a major tutorial there was no easy answer. However, I've just found some video tutorials done by Digikey . I can thoroughly recommend these. They are fast paced but contain the information you need, plus they are completely up-to-date in using the latest free STM32 IDE. This is the IDE I used for the CMM2 and includes everything you could need to program and debug code for these chips

This video shows how to deal with a board that isn't directly supported by STM32CubeIDE
Edited 2020-06-01 04:00 by matherp
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 09:47pm 31 May 2020
Copy link to clipboard 
Print this post

Thanks, Peter.

I'd not met those before.  (Not that I asked LOL)

John
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 582
Posted: 05:05am 02 Jun 2020
Copy link to clipboard 
Print this post

  matherp said  about getting started with programming the STM32


Thanks for the links.

I am fine with C on pic32s and was OK using the MZ pre-DA but was not pleased with harmony. I got the (superficial) impression the SAM memory wasn't as convenient as microchip but don't know about the STM model, haven't gone further though.

The MM development has gone from pic32 and mplabx IDE to the MZ and later DA with harmony, then SAM ics and is now on the STM and cube. Few people would have your breadth of experience ! Any overall comments you might have about trying the platforms would be good. I know, it is a huge subject and maybe not possible to sum up briefly.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 06:54am 02 Jun 2020
Copy link to clipboard 
Print this post

If it was a football match the score would be

Microchip/Harmony 0: ST/CubeMX 10

  Quote  and maybe not possible to sum up briefly.


brief enough?
 
Raul
Newbie

Joined: 06/05/2020
Location: United Kingdom
Posts: 11
Posted: 09:18am 02 Jun 2020
Copy link to clipboard 
Print this post

What professionals have to say about CubeMX.

https://www.eevblog.com/forum/microcontrollers/stm32cube-embedded-software-now-on-github/

  Quote  They should bury that software under a rock somewhere instead of making that cancer spread even more.

Beginners: For the mother of Hades, please do not use this junk. It'll only take a couple of minutes extra to do it the proper way.


  Quote  STM32Cube just went a little to far.
The goal of it seemed to be to hide away all the registers so idiots can code. (My guess is they were trying to do Arduino2.0 using their chip)
When the goal should have been a system to show how the registers can be used to do various tasks.


Why so many trivial bugs in this version of MMbasic?
Hmmm, why isn't the source code for this basic available, is there a reason to hide something?
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 10:11am 02 Jun 2020
Copy link to clipboard 
Print this post

I'll leave Peter to answer (and take his as gospel), though some of the bugs were probably in previous MMBasic but not noticed.

The source code was already asked about and IIRC as the CMM2 was not yet released but rather still being tested (on TBS for example), then the source was not yet available but will be.

On STM32Cube it depends a bit (or a lot) if someone's used to coding for a uC and happy figuring out things like clock divisors.

If you're happy with that kind of stuff then you might like to try STM32Cube just to see what you think and if unhappy there's no need to use it.

With the much older chips the overheads of the tool (STM32Cube) might annoy but the CPU in the CMM2 is really fast with lots of memory so you might decide the convenience of the tool is worthwhile.

It's quite nice to have the choice of a good tool or DIY!

An advantage of using STM32Cube is that you could move to another CPU and just click to regenerate the setup code, after clicking on the various pins as shown in the videos, which you otherwise have to DIY.

John
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 582
Posted: 01:27pm 02 Jun 2020
Copy link to clipboard 
Print this post

Which leaves the  Armmite h7 and f4... ed - and their ongoing status (?)

(edited to cover up my mistake    I thought they were Atmel )
Edited 2020-06-02 23:36 by zeitfest
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 01:36pm 02 Jun 2020
Copy link to clipboard 
Print this post

  Quote  Which leaves the  Armmite h7 and f4. They were Atmel/Microchip (?) and their ongoing status (?)


The Armmite H7 and F4 are both STM32 ports developed in STM32CubeIDE. They both target specific H/W, The Nucleo-H743 and a specific F4 board (see the ArmmiteF4 thread). Both versions of core MMBasic are fully up-to-date but there are developments done in the CMM2 which can, in some cases be retrofitted. Peripheral handling and LCDs are unique to the port.

The only Microchip port I have done is the Micromite eXtreme (MMX). This again has an up-to-date core MMBasic
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025