Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gcc/gdb version #548

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Teslafly
Copy link
Contributor

@Teslafly Teslafly commented Nov 6, 2022

Some tools have depreciated the older version of gdb we use and the issue causing #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

@@ -16,3 +16,6 @@ workspace.code-workspace
*.pro.shared

.vscode
*.log
null.d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is null.d?

Copy link
Contributor Author

@Teslafly Teslafly Nov 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's generated by the makefile extension.
https://marketplace.visualstudio.com/items?itemName=ms-vscode.makefile-tools

I can't figure out how to suppress it's generation so it goes into the gitignore.

Copy link
Contributor

@kalvdans kalvdans Nov 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find any reference to null.d on the help page. It is strange that they choose NUL.D is a reserved filename on msdos / command.com. https://answers.microsoft.com/en-us/windows/forum/all/unable-to-rename-a-folder-to-com-errorthe/ff48c793-ab97-4881-952a-df195321c11c

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. i haven't been able to figure it out. i just know it gets generated when they generate the list of make options. and it's not consistent either.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove from PR then, and complain to microsoft :)

@vedderb
Copy link
Owner

vedderb commented Nov 6, 2022

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
Copy link
Owner

vedderb commented Nov 6, 2022

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.

@Teslafly
Copy link
Contributor Author

Teslafly commented Nov 6, 2022

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
Copy link
Contributor Author

Teslafly commented Dec 1, 2022

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

@vedderb
Copy link
Owner

vedderb commented Dec 2, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v5.01 master branch goes into a boot loop on all tested hardwares
3 participants