Author Topic: Anyone having problems with arm-none-eabi 14.3  (Read 2671 times)

0 Members and 1 Guest are viewing this topic.

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Anyone having problems with arm-none-eabi 14.3
« on: November 26, 2025, 12:35:31 pm »
It is one of those things that drives one crazy. I bought a new computer and did a fresh install of Linux Mint 22.2. Installed my trusty Netbeans 8.2 (I know a very old version, but I like it) and the gcc-arm-none-eabi toolchain (Version 13.2). So far so good. Was able to compile my projects and upload them to the targets with openocd and a ST-link programmer.

Yesterday I wanted to do some debugging on a blackpill (STM32F411) to see what some reset values are in the USB OTG peripheral, only to find that I had not configured debugging yet. So hooked up my old machine and looked at the setup there. For debugging the arm-none-eabi-gdb program needed to be selected. Damn, this was not on my new machine. Apparently it has been omitted from the package for some reason. That led to part of the fun, not.  :palm:

Found some advice to install the latest version from the developers download page and a script to make a package for easier install, so I did that. Debugger was there, so back to Netbeans to just discover that a plugin is needed to make use of the debugger. Damn again. Plugins no longer available. After searching I found a page where the public ones are still available. Again damn, the version of gdbserver plugin did not match with the default C/C++ plugin, for which an update seems not findable.

So by by Netbeans 8.2, enter CLion that was recommended in the top 10 I found. Also tried latest version of Netbeans, but the C support needs some special setup that I did not want to go in to for now.

Problems in CLion with getting the toolchain setup. Error report was given, but rather obfuscated to read and get the details on the error. This brings me to today. I tried compiling with my old trusted Netbeans 8.2 again and that showed a nice clear error that CC1 was missing. Well clear, not so much. Took a bit of searching that the install also needs something in the libexec directory. This was not mentioned in the advice I found about installing the toolchain. https://askubuntu.com/questions/1243252/how-to-install-arm-none-eabi-gdb-on-ubuntu-20-04-lts-focal-fossa

After fixing that I'm now at the point where I'm in the dark.

TLDNR:
I'm trying to compile my project with the new 14.3 arm-none-eabi toolchain and get the following error:

Code: [Select]
Assembler messages:
Fatal error: invalid -march= option: `armv7-m'

The compiler call is:

Code: [Select]
arm-none-eabi-gcc -Wall -Wno-write-strings -Wno-char-subscripts -fno-stack-protector -DNO_STDLIB=1 -mcpu=cortex-m4 -mthumb -O0 -c -g -I../1_stm32f411_peripherals/include -MMD -MP -MF "build/Debug/GNU_ARM-Linux/_ext/4a0934f6/stm32f411_gpio.o.d" -o build/Debug/GNU_ARM-Linux/_ext/4a0934f6/stm32f411_gpio.o ../1_stm32f411_peripherals/source/stm32f411_gpio.c

I only found some old talk about this from 2017.  :palm:

Offline Pseudobyte

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: us
  • Embedded Systems Engineer / PCB Designer
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #1 on: November 26, 2025, 01:11:53 pm »
I would guess that gcc is invoking the host x86 assembler instead of arm-non-eabi-as.

Add the -v flag and see if it is calling /usr/bin/as or something.

If it is I think you can specify the where the binutils are by using the -B option when calling gcc.
“They Don’t Think It Be Like It Is, But It Do”
 
The following users thanked this post: pcprogrammer

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #2 on: November 26, 2025, 01:14:42 pm »
Thanks, I came to that conclusion too, after some more searching the net. Will try the options you mentioned to see if I can solve the problem.

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #3 on: November 26, 2025, 05:04:41 pm »
I took a better look at what was written here: https://askubuntu.com/questions/1243252/how-to-install-arm-none-eabi-gdb-on-ubuntu-20-04-lts-focal-fossa and noticed that I did not follow it to the letter. Assumed only the files in the bin directory where needed, but it turns out a lot more needs to be in the debian package.

Not all data from the file retrieved from the Arm GNU website (https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads) though.

There is also a link to this github page https://github.com/kmhallen/gcc-arm-none-eabi/tree/main where the .bash file gives information about which parts need to be deleted. Without these deletions you get errors when installing the package, telling that it is trying to overwrite files needed for gdb.

So far so good. Netbeans 8.2 is at least compiling my project again.

Now I have to try some newer IDE's with debugging to see which one I like best.

What a bloody waste of time for not a lot of gain.  |O

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 3290
  • Country: gb
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #4 on: November 26, 2025, 05:14:55 pm »
Choosing to use a separate code editor and debugger was one of the best decisions I've made for my embedded work. I use Segger J-Link with their Ozone debugger, and whatever editor. It really simplifies things and reduces stress!
 
The following users thanked this post: pcprogrammer

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #5 on: November 26, 2025, 05:27:32 pm »
Choosing to use a separate code editor and debugger was one of the best decisions I've made for my embedded work. I use Segger J-Link with their Ozone debugger, and whatever editor. It really simplifies things and reduces stress!

Depends a bit on if the software works with a cheap clone, because the official Segger J-Link devices are to expensive for my taste.

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 3290
  • Country: gb
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #6 on: November 26, 2025, 06:13:15 pm »
Yes, new prices are expensive, but there are good deals to be had for second-hand units. I got a j-link plus (lowest model with ozone license) for about £150 here on the forum. Also, Segger have a broad NC license if that suits.

Alternatively, there must be some decent gdb front ends, but I've not looked.
 

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #7 on: November 26, 2025, 06:24:05 pm »
I did see that they have a non commercial license scheme, and that is nice. If it works with a cheap clone to be found on Aliexpress (less then 20 euro) than it would be the solution for sure.

Will spend some time on browsing the web for other free solutions for both debugging and typing.

Not so sure that CLion is the one for me. The "problem" finding it has shows a bit to much bullshit for my taste. Checking on correct wording in comments and then telling me that UART, SYSCLK or PORTB, etc, has a typo, nah.  :palm:

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 985
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #8 on: November 26, 2025, 07:32:57 pm »
Maybe I misunderstand, but can't you just grab the toolchain from the Arm download and skip the distro install altogether? I used Linux Mint for many years and never used a distro provided toolchain for an mcu. You can also keep as many versions as you wish, in whatever location you want, and it can be easily transported to any other pc (assuming same os flavor).  It also means you are using the same toolchain as any other arm user, and not at the whims of what the distro package decided to do. Whether your other pc(s) are linux/mac/win, you get the same toolchain, from the same source.
 

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #9 on: November 26, 2025, 08:03:40 pm »
Maybe I misunderstand, but can't you just grab the toolchain from the Arm download and skip the distro install altogether? I used Linux Mint for many years and never used a distro provided toolchain for an mcu. You can also keep as many versions as you wish, in whatever location you want, and it can be easily transported to any other pc (assuming same os flavor).  It also means you are using the same toolchain as any other arm user, and not at the whims of what the distro package decided to do. Whether your other pc(s) are linux/mac/win, you get the same toolchain, from the same source.

It seems that for some years now, you have to go to the Arm download page to get the latest version. The distro versions are no longer updated, if I understood correctly.

I have not looked into how to invoke the compilers when they are not installed. Guess you have to add it to some system variable like $PATH to get it working.  :-//

Till now I just used the distro versions as it was the easiest to do. I don't like change, but that is obviously clear from the fact that I was still using Netbeans 8.2  :-DD

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #10 on: November 26, 2025, 08:06:27 pm »
Yes, new prices are expensive, but there are good deals to be had for second-hand units. I got a j-link plus (lowest model with ozone license) for about £150 here on the forum. Also, Segger have a broad NC license if that suits.

Alternatively, there must be some decent gdb front ends, but I've not looked.

Ah what the heck, I just pulled the trigger on a Jlink V9 (clone) on Aliexpress. With discounts only 8.57 euro.  :-DD

Plus a second USB logic analyzer for only 1.45 euro. Long live the Aliexpress coins.

Offline Pseudobyte

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: us
  • Embedded Systems Engineer / PCB Designer
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #11 on: November 26, 2025, 08:30:40 pm »
Get ready for Segger to scold you when you go to debug. The clone will definitely not work with ozone.
“They Don’t Think It Be Like It Is, But It Do”
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 3290
  • Country: gb
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #12 on: November 26, 2025, 08:46:39 pm »
If this is for NC work then the segger j-link edu is about £70, and IIUC it will work with ozone etc. I don't use counterfeit j-links but AFAIK they only work with the hacked software they are supplied with, because cloned serials are blacklisted by genuine segger software.
 

Offline cv007

  • Frequent Contributor
  • **
  • Posts: 985
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #13 on: November 26, 2025, 10:15:53 pm »
Quote
I have not looked into how to invoke the compilers when they are not installed. Guess you have to add it to some system variable like $PATH to get it working.
You simply tell the makefile/ide where the binaries are located. I think most ide's will let you build a list of toolchains by providing their binary paths, then selecting on a project by project basis which toolchain you want to use. If for some reason you want to invoke the binaries from the command line/shell, then you can temporarily set a path to whichever binary folder you want, or you simply use the path in invoking the binary.

edit- works the same for Windows. No install, just download the toolchain from arm, unzip where you want it.
« Last Edit: November 26, 2025, 10:44:03 pm by cv007 »
 

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #14 on: November 27, 2025, 06:38:35 am »
Get ready for Segger to scold you when you go to debug. The clone will definitely not work with ozone.

If this is for NC work then the segger j-link edu is about £70, and IIUC it will work with ozone etc. I don't use counterfeit j-links but AFAIK they only work with the hacked software they are supplied with, because cloned serials are blacklisted by genuine segger software.

I will see when it arrives. Some say it is possible to load new firmware with which it is possible to get them to work with Ozone. If not ,not a big loss, and I suppose it can still be used to program my targets using openocd.

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #15 on: December 06, 2025, 12:32:21 pm »
If this is for NC work then the segger j-link edu is about £70, and IIUC it will work with ozone etc. I don't use counterfeit j-links but AFAIK they only work with the hacked software they are supplied with, because cloned serials are blacklisted by genuine segger software.

Well what do you know, the Jlink arrived and I'm trying it with the Ozone software downloaded directly from the Segger website, installed it and started it. The Jlink is seen and it starts a debug session. So so far so good.  :)

Now I have to see how Ozone works in combination with my source files.

On the PCB it shows it to be a Hlink V9  :-DD

It uses a STM32F205VCT6 which differs from a schematic of a Jlink V9 I found.

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 3290
  • Country: gb
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #16 on: December 08, 2025, 09:43:47 am »
Now I have to see how Ozone works in combination with my source files.

Ozone gets source file paths from the elf, if compiled with say
gcc -g -O1
 
The following users thanked this post: pcprogrammer

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 3290
  • Country: gb
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #17 on: January 01, 2026, 09:50:17 pm »
Segger has recently added gdb support in their ozone debugger, so you can use any debugger setup (e.g. openocd, black magic etc.) with ozone. This is available free of charge for non-commercial users. For commercial use, you still need to buy a j-link plus (or higher) to get the ozone license.

https://www.segger.com/news/pr-250909-ozone-simulators/
 
The following users thanked this post: pcprogrammer

Offline pcprogrammerTopic starter

  • Super Contributor
  • ***
  • Posts: 5728
  • Country: nl
Re: Anyone having problems with arm-none-eabi 14.3
« Reply #18 on: January 02, 2026, 07:03:44 am »
I requested a free license for Ozone and got it without hassle.  :-+

Also managed to turn one of my ST-link V2 clones into a J-link plus. Segger has this oldish tool that only runs on Windows, but normally does not work with these ST-link V2 clones, so a bit of debugging and hacking was needed to get it done.  >:D

But good to know that there is now a version that can be used with openOCD. Have to see if it will work with the ESP32 Cadence Xtensa based MCU's. I started to play with those a week ago.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf