GNU ARM Tools V4.8, code size and Devo7e features

More
04 Jan 2014 17:30 - 05 Jan 2014 21:02 #17931 by domcars0
Hi everybody and Happy New Year!
As the devo 7e lose the permanent Timer with the 4.x release, I've tried the new GNU Tools (V4.8 ) which has been optimized to reduce code size.
One very important feature of this new compiler for deviation is the Newlib-nano (newlib branch optimized for code size).
So I've tried this new crosscompiler on my Linux Box...
And I'm happy to say that now I'm able to have not only the permanent Timer on my devo 7e but also the Layout Editor :woohoo: !!!

Install the new compiler from:
launchpad.net/gcc-arm-embedded/+milestone/4.8-2013-q4-major

and then edit the src/libopencm3/lib/stm32/f1/Makefile
add the "--specs=nano.specs" to the CFLAGS variable

Edit also the src/target/common/devo/Makefile.inc
and add also the "--specs=nano.specs" to the CFLAGS variable
you have also to add the -lnosys to the LDFLAGS
(LFLAGS = -nostartfiles -Wl,-gc-sections -Wl,-Map=$(TARGET).map,--cref -lc -lnosys)

with #define HAS_PERMANENT_TIMER 1 and #define HAS_LAYOUT_EDITOR 1
I get :
+ Optimizing placement and re-linking
ROM: 0x08003000 - 0x0801ff94 = 115.89kB
RAM: 0x20000000 - 0x2000243c = 9.06kB


2014 is really a very good year is'nt it ? ;)
Enjoy!

[EDIT] Change the title and the link to the GNU ARM V4.8 compiler

Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers :angry:
Last edit: 05 Jan 2014 21:02 by domcars0.

Please Log in or Create an account to join the conversation.

More
04 Jan 2014 17:55 #17937 by PhracturedBlue
Replied by PhracturedBlue on topic GNU ARM Tools V4.7, code size and Devo7e features
I wonder if they'll have a 4.8 build with the nanolib. When we compared a summon-arm built 4.8 vs the 4.7 'embedded' build (without the nanolib), the code was ~1k smaller. If we additionally got the nanolib benefits, that would leave enough headroom I could actually make the production build have these features.

Please Log in or Create an account to join the conversation.

More
04 Jan 2014 17:57 - 04 Jan 2014 18:03 #17938 by sbstnp
Updating to 4.8-q3q4 as we speak. Will try it out in a couple of minutes.

So it works with 4-8-2013q4-0precise7 as well:

+ Optimizing placement and re-linking
ROM: 0x08003000 - 0x0801fc68 = 115.10kB
RAM: 0x20000000 - 0x2000243c = 9.06kB



Edit: ok this was on my flexible build, trying a clean repo now.

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire
Last edit: 04 Jan 2014 18:03 by sbstnp.

Please Log in or Create an account to join the conversation.

More
04 Jan 2014 18:04 #17939 by PhracturedBlue
Replied by PhracturedBlue on topic GNU ARM Tools V4.7, code size and Devo7e features
sbstnp, is that with the same option DomCars used?

Please Log in or Create an account to join the conversation.

More
04 Jan 2014 18:07 - 04 Jan 2014 18:11 #17940 by sbstnp
Edit: PB, yes, that build was with timer and editor.

So, standard build (no timer, no layout editor), clean repo:

+ Optimizing placement and re-linking
ROM: 0x08003000 - 0x0801f1ac = 112.42kB
RAM: 0x20000000 - 0x20002424 = 9.04kB


With timer and editor, clean repo:

+ Optimizing placement and re-linking
ROM: 0x08003000 - 0x0801fd64 = 115.35kB
RAM: 0x20000000 - 0x20002438 = 9.05kB


Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire
Last edit: 04 Jan 2014 18:11 by sbstnp.

Please Log in or Create an account to join the conversation.

More
04 Jan 2014 18:17 #17941 by PhracturedBlue
Replied by PhracturedBlue on topic GNU ARM Tools V4.7, code size and Devo7e features
That is pretty impressive. My default build is currently 115.09k on the compiler I use for releases. So for 250bytes, you can get the layout editor and the permanent timers.
The only issue is that we need to be able to build for Windows too.

If you provide instructions on what you are doing, I can try to cross-compile for windws and see how it goes.

Please Log in or Create an account to join the conversation.

More
04 Jan 2014 18:19 - 04 Jan 2014 18:25 #17942 by domcars0
You're right! I don't see that there was a newer release!!!
This is a must!

+ Optimizing placement and re-linking
ROM: 0x08003000 - 0x0801fdcc = 115.45kB
RAM: 0x20000000 - 0x2000244c = 9.07kB
(with 2 extra switches, Permanent timer and Layout editor)

Devo 10 (+7e) owner. It's mine, please don't touch it with your big fingers :angry:
Last edit: 04 Jan 2014 18:25 by domcars0.

Please Log in or Create an account to join the conversation.

More
04 Jan 2014 18:47 - 04 Jan 2014 18:47 #17945 by sbstnp

PhracturedBlue wrote: If you provide instructions on what you are doing, I can try to cross-compile for windws and see how it goes.


Haven't done anything special, that was on a Ubuntu 12.04 vm with gcc-arm-embedded 2103q4 and domcars0 mods to the Makefiles.

You reckon there would be a chance to have this gcc and newlib cross compiled for Windows?

Devo 10 + 4in1
Spektrum Dx9
FrSky Taranis + TBS Crossfire
Last edit: 04 Jan 2014 18:47 by sbstnp.

Please Log in or Create an account to join the conversation.

More
05 Jan 2014 00:21 - 05 Jan 2014 01:06 #17957 by HappyHarry
Replied by HappyHarry on topic GNU ARM Tools V4.7, code size and Devo7e features
ROM: 0x08003000 - 0x0801ff64 = 115.85kB
RAM: 0x20000000 - 0x200027ec = 9.98kB

that's with the 2x2way patch, perm timer and layout editor, built with tonights code using sbstnp's arch vm that hasn't been changed since it was downloaded.

and a completely stock build with no target_defs changes

ROM: 0x08003000 - 0x0801fd8c = 115.39kB
RAM: 0x20000000 - 0x200027d8 = 9.96kB

so is there a chance of getting the telemetry and the layout editor to fit with this new version of the compiler? as building the same source as above but with the permtimer off and switching telemetry on ends up being 1012 bytes over
Last edit: 05 Jan 2014 01:06 by HappyHarry.

Please Log in or Create an account to join the conversation.

More
05 Jan 2014 11:48 - 05 Jan 2014 11:50 #17981 by kreidler
You guys are great!

I tested https://launchpad.net/gcc-arm-embedded/4.8/4.8-2013-q4-major on the mingw environment with domcars options. Unfortunately I do not have a 7e on hand but the emu is running fine.

All builds done with 3430be7

Started with 4.7 2012q4
with telemetry, permanent timer, layout editor + 1x3sw patch
ROM: 0x08003000 - 0x0801fff0 = 115.98kB
RAM: 0x20000000 - 0x20002450 = 9.08kB

and on 4.7 2013q3
with telemetry, permanent timer, layout editor + 1x3sw patch
region `rom' overflowed by 4 bytes

now going to 4.8 2013q4
with telemetry, permanent timer, layout editor + 1x3sw patch
ROM: 0x08003000 - 0x0801fdb8 = 115.43kB
RAM: 0x20000000 - 0x20002450 = 9.08kB

For comparision with the linux users around:

Standard build with 4.8 2013q4 (telemetry only)
ROM: 0x08003000 - 0x0801f1a8 = 112.41kB
RAM: 0x20000000 - 0x20002424 = 9.04kB

with telemetry, permanent timer, layout editor
with 4.8 2013q4
ROM: 0x08003000 - 0x0801fd60 = 115.34kB
RAM: 0x20000000 - 0x20002438 = 9.05kB

Hey, is the Windows one now better than the others :P :P ?
Last edit: 05 Jan 2014 11:50 by kreidler.

Please Log in or Create an account to join the conversation.

More
05 Jan 2014 20:14 - 05 Jan 2014 20:27 #18015 by HappyHarry
Replied by HappyHarry on topic GNU ARM Tools V4.7, code size and Devo7e features
i've just built with these changes on xubuntu 12.04lts, devo7e with the 3way patch, telemetry, permanent timer and layout editor

ROM: 0x08003000 - 0x0801fdbc = 115.43kB
RAM: 0x20000000 - 0x20002450 = 9.08kB

great news indeed :D, thanks for the heads up domcars0
Last edit: 05 Jan 2014 20:27 by HappyHarry.

Please Log in or Create an account to join the conversation.

More
06 Jan 2014 08:33 #18054 by SeByDocKy
Is last PB compliled such way with those options activated ?

Please Log in or Create an account to join the conversation.

More
06 Jan 2014 10:17 #18060 by HappyHarry
Replied by HappyHarry on topic GNU ARM Tools V4.8, code size and Devo7e features
I'm not sure bud, but I have posted builds for the 7e with everything enabled in the builds forum

Please Log in or Create an account to join the conversation.

More
06 Jan 2014 11:00 #18065 by SeByDocKy

HappyHarry wrote: I'm not sure bud, but I have posted builds for the 7e with everything enabled in the builds forum


Thanks for sharing Harry :)

But the best option will be compile NB like this now by the way ...

Please Log in or Create an account to join the conversation.

More
06 Jan 2014 14:37 #18073 by PhracturedBlue
Replied by PhracturedBlue on topic GNU ARM Tools V4.8, code size and Devo7e features
I'm not yet sure I'll turn those options on by default. Once I turn them on, people won't expect them to go away, and that reduces the available memory I have to play with. Having the extra 2kB to play with for '5.0' features (whatever they may be) sounds appealing. We'll see.

Please Log in or Create an account to join the conversation.

More
14 Jan 2014 22:02 #18510 by robca
Is there a VM already made with the new optimizing compiler?

I'm being lazy, I know :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum