Author Topic: I want to start "playing" with ARM micros  (Read 5495 times)

0 Members and 5 Guests are viewing this topic.

Offline davep238Topic starter

  • Contributor
  • Posts: 38
  • Country: us
I want to start "playing" with ARM micros
« on: December 20, 2024, 03:27:44 pm »
I'm 69, retired, and bored. In the past I've done embedded programming on 8-bit micros using C and assembler. The MC6809 is my favorite 8-bitter. A long time ago, I also programmed on PCs using Turbo C and Turbo Pascal. More recently, I've fooled around with Arduino, creating simple holiday light displays. I've also been doing some Xilinx CPLD and FPGA designs using VHDL. Lately, I've written Windows 10 console apps using C and compiling with mingw and gcc.

I'd like to get into working with ARM micros. I don't have anything in mind at all, thus "playing". It seems like ST is a big player, but I see people griping about HAL and the tools. Is ST still good to start with, or should I be looking at other vendors and tools?
Thanks.
-Dave Pollum
 

Offline Dazed_N_Confused

  • Contributor
  • Posts: 11
  • Country: us
Re: I want to start "playing" with ARM micros
« Reply #1 on: December 20, 2024, 03:33:21 pm »
. It seems like ST is a big player, but I see people griping about HAL and the tools. Is ST still good to start with, or should I be looking at other vendors and tools?
Thanks.
-Dave Pollum

You don't have to use HAL they have LL and you can also breakout the reference manual if you like and do bare metal.
STM also has cheap Nucleo boards that can be had for 10 to 15 bucks
« Last Edit: December 20, 2024, 03:34:52 pm by Dazed_N_Confused »
Windows: Tailor-Made Technology for the Soccer Mom!
Linux: Unleashing the Alpha Male in the Digital Domain!
"Premature optimization is the root of all evil" ~ Donald Knuth
 
The following users thanked this post: davep238

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 9491
  • Country: fi
Re: I want to start "playing" with ARM micros
« Reply #2 on: December 20, 2024, 03:58:33 pm »
ST is fine, everyone else is fine too. Continue the PIC way, don't use manufacturer's bullshit libraries.
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4853
  • Country: nz
Re: I want to start "playing" with ARM micros
« Reply #3 on: December 20, 2024, 09:53:08 pm »
I'd like to get into working with ARM micros. I don't have anything in mind at all, thus "playing". It seems like ST is a big player, but I see people griping about HAL and the tools. Is ST still good to start with, or should I be looking at other vendors and tools?

Arm is everywhere outside of PCs and servers!  As someone said in the 1970s (about IBM) "Arm isn't the competition, it's the environment".

If you're wanting to do bare metal programming, as you were on everything you mention except Windows 10 console apps, then I'd suggest the best "toe in the water" approach right now is the RaspberryPi Pico, or better the Pico 2 which has twice the speed, twice the RAM, and lets you try RISC-V as well as Arm.

Raspberry Pi hardware is not the cheapest -- though the Pico 2 is only $5 -- but they have superb documentation of the chip (which they designed themselves, using an Arm Cortex-M33 Arm core and their own RISC-V core (which is itself open source)), example code and tutorials, and a huge community.

Physically programming the Pico is simplicity itself. You compile your program to a ELF file, plug the Pico into your PC/Mac/Linux, it appears as a disk drive, and you simply drag your Arm or RISC-V program on to the disk (or use a command line file copy command) and then reboot the Pico.

Take a look at the documentation here:

https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html
 
The following users thanked this post: davep238

Offline mwb1100

  • Frequent Contributor
  • **
  • Posts: 631
  • Country: us
Re: I want to start "playing" with ARM micros
« Reply #4 on: December 20, 2024, 10:05:22 pm »
Many of ST's Nucleo boards are extremely cheap.  I'd suggest looking around for books or a blog with a tutorial that you like - especially if there's an active community/forum - then buy the devkit they are using.

Espressif ESP8286 and ESP32 gadgets are also super cheap and have a lot of online tutorials and examples.  They aren't ARM chips though.

Personally, I'd go for an STM32 ARM Nucleo devkit for starters.  But I'm probably biased from having done STM32 stuff for a long time.
 
The following users thanked this post: davep238

Offline Dazed_N_Confused

  • Contributor
  • Posts: 11
  • Country: us
Re: I want to start "playing" with ARM micros
« Reply #5 on: December 21, 2024, 12:08:05 am »


Personally, I'd go for an STM32 ARM Nucleo devkit for starters.  But I'm probably biased from having done STM32 stuff for a long time.

 It should be noted that all Nucleo's come with a builtin ST-Link V2 programmer that you can easily break off (by design) and use with all STM32 and STM8 micros.
Windows: Tailor-Made Technology for the Soccer Mom!
Linux: Unleashing the Alpha Male in the Digital Domain!
"Premature optimization is the root of all evil" ~ Donald Knuth
 

Offline luiHS

  • Frequent Contributor
  • **
  • Posts: 609
  • Country: es
Re: I want to start "playing" with ARM micros
« Reply #6 on: December 21, 2024, 02:09:26 am »

MCU; RT1024 or RT1064 from NXP,  any STM32 from ST. 
Programmers; Stlink V3 for STM32,  MCU-LINK for NXP.
Development environments; MCUXpresso for NXP,  STM32CubeIDE for STM32.

There are very cheap evaluation boards for all these microcontrollers, I have them for STM32H747, RT1024, RT1064 and RT1176, you can buy them at Mouser.
« Last Edit: December 21, 2024, 02:18:26 am by luiHS »
 

Offline betocool

  • Regular Contributor
  • *
  • Posts: 127
  • Country: au
Re: I want to start "playing" with ARM micros
« Reply #7 on: December 21, 2024, 02:49:11 am »
I've gone the STM32 way and haven't looked back!

I started compiling under Linux when you had to build your own compiler, these days ST offers the whole suite of IDEs and board configurators in one place, which makes it very easy. Some people complain about the configurator and the libraries, I use a mix and match approach. Configure the chip in the configurator and then add or change peripherals manually (especially interrupts!). To each their own I guess.

I started with an STM32F103 and built a small guitar effects processor out of it, it worked ok for 72MHz. Last I built was an audio spectrum analyzer using an STM32H7 that sends live audio data to a PC over Ethernet. I guess it depends on what your application is. Best way to start with a microcontroller is a blinky, and then think of something that would be fun for you. You may have to build a bit of hardware around, but that's part of the fun.

Cheers,

Alberto
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3305
  • Country: ca
Re: I want to start "playing" with ARM micros
« Reply #8 on: December 21, 2024, 08:43:16 pm »
I'd like to get into working with ARM micros. I don't have anything in mind at all, thus "playing". It seems like ST is a big player, but I see people griping about HAL and the tools. Is ST still good to start with, or should I be looking at other vendors and tools?

ARM covers everything from primitive MCUs with M0 cores, through very fast MCUs, through MPUs capable of running Linux and Single-Board-Computers, through Mac and high end Windows Surface laptops, to very expensive servers with enormous amount of cores.

STM manufactures devices from the bottom half of the spectre.

"HAL" and tools are roughly the same across all the manufacturers. Luckily, you do not have to use any of the tools except the compiler chain.
 

Offline Warhawk

  • Frequent Contributor
  • **
  • Posts: 839
  • Country: 00
    • Personal resume
Re: I want to start "playing" with ARM micros
« Reply #9 on: December 21, 2024, 11:26:20 pm »
I'm 69, retired, and bored. In the past I've done embedded programming on 8-bit micros using C and assembler. The MC6809 is my favorite 8-bitter. A long time ago, I also programmed on PCs using Turbo C and Turbo Pascal. More recently, I've fooled around with Arduino, creating simple holiday light displays. I've also been doing some Xilinx CPLD and FPGA designs using VHDL. Lately, I've written Windows 10 console apps using C and compiling with mingw and gcc.

I'd like to get into working with ARM micros. I don't have anything in mind at all, thus "playing". It seems like ST is a big player, but I see people griping about HAL and the tools. Is ST still good to start with, or should I be looking at other vendors and tools?
Thanks.
-Dave Pollum

ST Micro has by far the biggest funclub. There are also plenty of STM32 copies from China. If you want to try something different then TI has recently released a new MSPM0 family that is, in my opinion, interesting. Also, packages are not bad. Most importantly, there are libraries that work well and plenty of simple examples as a part of the MSPM0 SDK. (Software development kit). My favorite part for now is MSPM0L1306.

You should be ready with just the launchpad: https://www.ti.com/tool/LP-MSPM0L1306

PS: I am a TI employee thus I might be biased
 
The following users thanked this post: Dazed_N_Confused

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15984
  • Country: fr
Re: I want to start "playing" with ARM micros
« Reply #10 on: December 22, 2024, 12:56:45 am »
There is so much available that it's hard to recommend anything - we'll all be biased. For sure STM32 are popular and pretty good, with a wide range of MCUs, from ultra-low power to "high-performance" Cortex-M7 stuff, with a wide range of peripherals too. But there are tons of alternatives.

Also, although there are still not as many available for now, I would suggest looking at RISC-V MCUs.

You can find dev boards of either for just a few bucks these days, so if you have time and even if your means are limited, you can experiment with various vendors and see what you like best!
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4361
  • Country: us
Re: I want to start "playing" with ARM micros
« Reply #11 on: December 22, 2024, 01:20:17 am »
If you didn’t hate Arduino, there are a bunch of ARM-based arduino-compatible boards..  Adafruit has a good range.

 
The following users thanked this post: davep238

Offline WillTurner

  • Regular Contributor
  • *
  • Posts: 66
  • Country: au
Re: I want to start "playing" with ARM micros
« Reply #12 on: December 22, 2024, 01:23:43 am »
How about the (printed) book :-
Smith, Stephen "RP2040 Assembly Language Programming", Apress, 2022?
  I hope there is an RP2350 version on the way.
 
The following users thanked this post: cfbsoftware

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4853
  • Country: nz
Re: I want to start "playing" with ARM micros
« Reply #13 on: December 22, 2024, 01:25:04 am »
Also, although there are still not as many available for now, I would suggest looking at RISC-V MCUs.

You can find dev boards of either for just a few bucks these days, so if you have time and even if your means are limited, you can experiment with various vendors and see what you like best!

As I said before, for $5 a Raspberry Pi Pico 2 lets you look at both Arm and RISC-V in one board, using all the same peripherals, and with some of the best documentation around. The only real asymmetry is they put an Arm with FPU, but integer-only RISC-V.
 
The following users thanked this post: MK14

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 4853
  • Country: nz
Re: I want to start "playing" with ARM micros
« Reply #14 on: December 22, 2024, 01:28:44 am »
How about the (printed) book :-
Smith, Stephen "RP2040 Assembly Language Programming", Apress, 2022?
  I hope there is an RP2350 version on the way.

Cortex-M0 / Thumb1 (RP2040) is a bit of a PITA in assembly language because access to the upper 8 registers (5 GP after removing PC, LR, SP) is so restrictive -- you can only do MOV, ADD, CMP, and BX using them.

RP2350 (Pico 2) has a much more natural and flexible instruction set on the M33 .. and on the RISC-V Hazard3 too.
 
The following users thanked this post: MK14, davep238

Offline cfbsoftware

  • Regular Contributor
  • *
  • Posts: 137
  • Country: au
    • Astrobe: Oberon IDE for Cortex-M and FPGA Development
Re: I want to start "playing" with ARM micros
« Reply #15 on: December 22, 2024, 02:44:12 am »
Cortex-M0 / Thumb1 (RP2040) is a bit of a PITA in assembly language because access to the upper 8 registers (5 GP after removing PC, LR, SP) is so restrictive -- you can only do MOV, ADD, CMP, and BX using them.

RP2350 (Pico 2) has a much more natural and flexible instruction set on the M33 .. and on the RISC-V Hazard3 too.
I don't see it as being a huge problem if you are writing assembly language by hand. Still having access to the 8 lower general purpose registers is still a bit of a luxury compared to the 'good old days'.

In our Astrobe Oberon language compilers we use the best of both worlds. Initially we only used the 32-bit Thumb-2 instruction set for M3, M4 and M7 as it was much simpler than having to contend with a mixed 16-bit/32-bit instruction set. However, after we had to tackle the (mostly) 16-bit Thumb-1 instructions for Cortex-M0 we introduced these as optional instructions for M3. M4 and M7. It was surprising how much of the code could use these and save code space. Having only the lower 8 registers generally available in Thumb-1 in the Oberon compiler was only really a limitation when using registers for local variables and for passing parameters. There are more than enough registers available for complex expressions using array indexing, record field addressing etc. etc.

All of this work was initially done on STM microcontrollers. The M33 is very similar to M4 so when the RP2040 and RP2350 came along the main work we had to do was to port the initialisation code and peripheral libraries. SPI was very similar, I2C had the most differences. Once that was done it was an easy job to get our STM Nucleo board application examples working on the Raspberry Pi Pico and Pico 2 boards.

There are other performance advantages when using Thumb-2 over Thumb-1. We have described these in a simple performance comparison between the RP2040 and RP2350:

https://www.astrobe.com/forum/viewtopic.php?f=19&t=803


Chris Burrows
CFB Software
https://www.astrobe.com
 

Offline wilfred

  • Super Contributor
  • ***
  • Posts: 1421
  • Country: au
Re: I want to start "playing" with ARM micros
« Reply #16 on: December 22, 2024, 03:07:52 am »
I found this course available on YT channel Quantum Leaps. It seemed good to me and is well presented, clear and logically organised. It started out using the IAR toolchain but by this video switched to more freely  (and free) open source compiler along with Code Composer Studio from Texas Instruments.

For this and no other reason I suggest the TI TIVA Launchpad used in the course. Available from Mouser. https://au.mouser.com/ProductDetail/Texas-Instruments/EK-TM4C123GXL?qs=TB%2FQ0sBK%2FGefKGr%252BQsiJWQ%3D%3D

TI also sold it and that was where I bought them. Back then TI had various special offers and I got them so nearly free I couldn't resist.

Ultimately I think for someone like me who was a complete beginner the course was it and the chip platform was a secondary consideration. I'd like to say price was a distant third but I got them very cheap. But even for 20-30 dollars it is still hours of fun and education.
 
The following users thanked this post: davep238

Offline ocelot

  • Contributor
  • Posts: 12
  • Country: gb
Re: I want to start "playing" with ARM micros
« Reply #17 on: December 22, 2024, 04:10:53 pm »
After years of wallowing about with Eclipse based IDEs that are sluggish and sometimes inconsistent when it comes to setting up projects, I switched to using VS Code, as I also use that professionally for developing C/C++ at work.

There are a few plugins for VSCode that allows you to talk to ARM debuggers, both STLINK style and CMSIS/DAP style (via OpenOCD)

I use STM32 Blue Pill boards in a lot of small projects, mostly around my old VW camper van, things like an ECU controlling the ignition, a sensors computer and a dashboard display computer.

I think that I may switch to the Raspberry PI 2040 boards soon, but I have worked with STM32 for years as a hobbyist and at work (biggest system having 14 MCUs,  seven running ChibiOS, seven supervisors using bare metal, all networked over CANBUS on a one-off project)

I have used STM32 ever since being made redundant by Philips, and so never again specifying any of the Philips/NXP parts in revenge...
« Last Edit: December 22, 2024, 05:38:04 pm by ocelot »
 

Offline davep238Topic starter

  • Contributor
  • Posts: 38
  • Country: us
Re: I want to start "playing" with ARM micros
« Reply #18 on: December 22, 2024, 04:46:49 pm »
If you didn’t hate Arduino, there are a bunch of ARM-based arduino-compatible boards..  Adafruit has a good range.
I don't hate Arduino. I've used the UNO, and although very limited, was fine for my simple projects. I'll take a look at the ARM Arduino compatible boards. Thanks for the suggestion.
-Dave
 

Offline davep238Topic starter

  • Contributor
  • Posts: 38
  • Country: us
Re: I want to start "playing" with ARM micros
« Reply #19 on: December 22, 2024, 04:59:10 pm »
Many of ST's Nucleo boards are extremely cheap.  I'd suggest looking around for books or a blog with a tutorial that you like - especially if there's an active community/forum - then buy the devkit they are using.

Espressif ESP8286 and ESP32 gadgets are also super cheap and have a lot of online tutorials and examples.  They aren't ARM chips though.

Personally, I'd go for an STM32 ARM Nucleo devkit for starters.  But I'm probably biased from having done STM32 stuff for a long time.

Since I don't have any projects in mind, finding a blog or tutorial sounds like a good idea. Thanks.
I already have a bunch of obsolete FPGA dev boards, and don't want to repeat that with micros, although I know that the microcontroller devkits are waaay cheaper.
I am looking for something more powerful than an 8-bitter. Thus, ARM. However, I know that RISC-V is starting, too.
It seems like the industry spent little time on 16-bitters and just jumped to 32-bitters.
-Dave
« Last Edit: December 22, 2024, 05:01:47 pm by davep238 »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 9491
  • Country: fi
Re: I want to start "playing" with ARM micros
« Reply #20 on: December 22, 2024, 06:20:13 pm »
Well, microcontrollers don't go obsolete in the performance sense; if they are good for task X now, they are good for task X in 20 years, too. Of course with new micros, scope widens, but computationally "simple" projects are not disappearing. (And that "simple" can be quite astonishing for today's $2-3 32-bitter; they are overkill for 95% of projects today, and will be overkill for many projects still in 2035.)

But keep in mind that a devboard/demoboard with a discontinued MCU isn't that useful; you can use it to do one-off hobby projects but can't then order the MCU from Digikey and make a PCB for it.

Your best bet is to look which MCU is very popular (like in top-10) and has been there for a few years. Like, ATMega328 was very popular in 2010, and consequently, you can get ATMega328(P(B)) today even though it's much less popular now, and many other Atmel MCUs from the same era has been discontinued (or are to be discontinued in near future), and even though 8-bitters in general are in decline. So those old Arduino boards are still just as useful they were when shiny and new, thanks to them being popular.

Same with 32-bit ARM. Just because a chip is ARM and 32-bit doesn't mean it's going to be here forever. But if you pick some of the most popular chips chances are better than with some esoteric part randomly picked from Digikey's parametric search only because it seems to fit your requirements best now. Manufacturers like ST have some commitment how long they produce the part, but those (quite a) few parts that sell really well obviously get extended.

Then again - remember, a devboard is not an absolute necessity! I have been using devboards for FPGAs because of their relative PCB complexity, but last time I used MCU devboard was in early 2000's (Atmel STK200 bought in 1999). After that, for quick testing, I have just taken an MCU, glued it dead-bug on a piece of copper clad or even plastic, and soldered some wires. For 0.5mm pitch QFP packages, an adapter PCB might make your life easier (still optional, you can dead-bug+air-wire these, too). If you then so wish, the prototype becomes a permanent one-off by applying some glue to hold things together, or you can desolder the few IOs that are different in the next project.
« Last Edit: December 22, 2024, 06:29:34 pm by Siwastaja »
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 13281
  • Country: ch
Re: I want to start "playing" with ARM micros
« Reply #21 on: December 22, 2024, 07:14:09 pm »


Personally, I'd go for an STM32 ARM Nucleo devkit for starters.  But I'm probably biased from having done STM32 stuff for a long time.

 It should be noted that all Nucleo's come with a builtin ST-Link V2 programmer that you can easily break off (by design) and use with all STM32 and STM8 micros.
All the Nucleos have some version of ST-LINK built in, but there are several versions, and not all are designed to be separated. (For example, the Nucleo U575ZI-Q board I have has a built-in STLINK-V3E, which is not removable.
https://www.st.com/resource/en/data_brief/nucleo-u575zi-q.pdf )
 

Offline TomS_

  • Frequent Contributor
  • **
  • Posts: 854
  • Country: gb
Re: I want to start "playing" with ARM micros
« Reply #22 on: December 22, 2024, 09:14:46 pm »
It seems like ST is a big player, but I see people griping about HAL and the tools. Is ST still good to start with, or should I be looking at other vendors and tools?

You can read horror stories all day about vendor X, Y or Z's tools. But what you often don't read are the countless other stories from people who are just getting on with the job with a set of tools that works for them.

Me personally? I use PIC microcontrollers, and I use MPLABX and Microchip compilers to do my development for them - just as Microchip intended. Depending on who you ask, this combination is a steaming pile of junk. But I must somehow be lucky, because I don't seem to have any major issues with it. Is it perfect? No, surely not. There are occasional little niggling issues, but nothing that is a complete show stopper like some people seem to claim. Or maybe my use cases just don't bring me into the same territory as these other people. I'm still writing, compiling, and debugging code with the same tools as them though... But what ever the circumstances, I feel like I've got a "good news story" to tell about Microchips tools.

IMO forums tend to be biased towards negative reviews because people have to vent when things aren't working the way they want it to. However, consider all of the projects that have been completed successfully, and if these tools really didn't work then would any of them have been completed at all?

So the basic gist of what I'm trying to say is, you wont know about something until you try it yourself and form your own opinion. Dev boards are cheap, and a lot of the software development tools are free. If you're just tinkering, give a couple of them a try and see how you go. You'll gravitate towards what works or feels best for you.
 
The following users thanked this post: tooki, davep238

Offline __george__

  • Contributor
  • Posts: 13
  • Country: no
Re: I want to start "playing" with ARM micros
« Reply #23 on: December 23, 2024, 01:24:50 am »
If you are interested in exploring different chips a good approach in my opinion is to get a cheap DAPLINK debugger for a couple of dollars and then get cheap small dev boards from different manufacturers.
Most of the popular enough companies (ST/NXP/TI/Nordic/Silabs/Atmel etc) have a lot of educational material (even online courses!) which you can use to have some fun :)

If checking different options is not interesting for you, I would also go for an Nucleo board. Keep in mind that there is an (unofficial) Arduino core called stm32duino which supports a good selection of Nucleo boards, they keep a list of the supported boards here:
https://github.com/stm32duino/Arduino_Core_STM32/blob/main/README.md

So with a Nucleo you can both experiment with ST's ecosystem and with the Arduino ecosystem as well.

ST is not the only one which has this of course, Arduino actually keeps a list of all the third party cores:
https://github.com/arduino/Arduino/wiki/Unofficial-list-of-3rd-party-boards-support-urls
 
The following users thanked this post: davep238

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4361
  • Country: us
Re: I want to start "playing" with ARM micros
« Reply #24 on: December 23, 2024, 02:33:23 am »
Quote
Cortex-M0 / Thumb1 (RP2040) is a bit of a PITA in assembly language
I agree.  In addition to the register limitations (which aren't THAT bad - you still have 8x 32bit registers), you have other annoyances like:
  • Lack of the Thumb2 instructions, including the "flexible second operand."  That means only a couple instructions have "immediate" operand modes.
  • Very limited ranges on Immediate operands, including offsets for index addressing and such.  None of the "8bit value shifted by N bits) (which is part of the "flexible 2nd operand.")
  • Limited conditionals.  Missing "set flags" or "don't set flags" modes for instructions.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf