bldc icon indicating copy to clipboard operation
bldc copied to clipboard

Update gcc/gdb version

Open Teslafly opened this issue 3 years ago • 5 comments

Some tools have depreciated the older version of gdb we use and the issue causing https://github.com/vedderb/bldc/issues/210 on newer versions of gcc have been fixed. So it may be worth upgrading toolchains now.

Tested with vesc 6.0 mk4 in windows. Detecting and running a motor works. Also successfully tested compilation in wsl linux. Mac not tested.

One things with the newer gcc version is it throws a lot more warnings about casts and implicit conversions.

closes #210

Teslafly avatar Nov 06 '22 06:11 Teslafly

It would be good to check how the binary size and performance changes with later versions of gcc. Last time I tried the binary would get quite a bit larger and the code got slightly slower.

vedderb avatar Nov 06 '22 09:11 vedderb

I gave it a try now on the same hw. As the last time I tried, the code got larger and slightly slower. For now I would prefer to stay with the old compiler for that reason. It would be great to know what is going on.

Compiler : 7.3.1

   text	   data	    bss	    dec	    hex
 428988	   4300	 173812	 607100	  9437c

LBM speed test 3x: ("Seconds elapsed: " {5.257800}) ("Seconds elapsed: " {5.276200}) ("Seconds elapsed: " {5.272000})

ADC interrupt test 3x with motor running: Latest injected ADC duration: 0.0239 ms Latest injected ADC duration: 0.0239 ms Latest injected ADC duration: 0.0243 ms


Compiler : 10.3.1

   text	   data	    bss	    dec	    hex
 445040	   4304	 173788	 623132	  9821c

LBM speed test 3x: ("Seconds elapsed: " {5.361800}) ("Seconds elapsed: " {5.375900}) ("Seconds elapsed: " {5.373300})

ADC interrupt test 3x with motor running: Latest injected ADC duration: 0.0239 ms Latest injected ADC duration: 0.0239 ms Latest injected ADC duration: 0.0251 ms

vedderb avatar Nov 06 '22 09:11 vedderb

looking at the notes on releases since the gcc-arm-none-eabi-7-2018-q2-update release,

There is this which could be increasing the memory size. Thumb1 code size regression due to new register allocation: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59535 which may be fixed now in the 10.3-2021.10 version?

Otherwise the other notes seem nonrelevant. And it's mainly changes to mainline gcc that are getting pulled in. Which would be exploit vulnerability fixes, memory safety improvements, bux fixes and tool improvements.

Teslafly avatar Nov 06 '22 20:11 Teslafly

Not a candidate for the fw6.0 release. But keeping this open to potentially include in the future. unless this should really be closed?

Teslafly avatar Dec 01 '22 05:12 Teslafly

We can leave this one open for now and revisit it later.

vedderb avatar Dec 02 '22 08:12 vedderb