somnium® drt benchmarks whitepaper · 2016. 9. 1. · kds project importer/convertor to avoid the...
TRANSCRIPT
-
SOMNIUM® DRT Benchmarks Whitepaper DRT v3.4 release : August 2016
www.somniumtech.com
SOMNIUM® DRT is a complete embedded softwaredevelopment environment which supports ARM® Cortex® Mdevices from major semiconductor vendors.
Vendor Family Cortex
Atmel (a subsidiary ofMicrochip Technology Inc.)
SMART M0+, M3, M4
NXPKinetis M0+, M4
LPC M0, M0+, M3, M4
STMicroelectronics STM32 M0, M0+, M3, M4
Other software vendors use adjectives. SOMNIUM usefacts. This whitepaper compares benchmarking results forSOMNIUM DRT against other toolchain products todemonstrate that DRT builds the smallest, fastest mostenergy efficient code with no source code changes required.
No defeat devices! Unlike many well known softwarevendors, SOMNIUM play fair and do not put “benchmarkspecial” features in our products to change their behavior inthe presence of known tests. We don't alter the benchmarksource code, and we always use the same tool options to getan honest and fair comparison.
Small memory footprint for C executionDRT uses a highly tuned and specifically configured Cruntime library with a reduced memory footprint:
Over 100% smaller ROM usage than GNU Newlib. Smaller ROM usage than GNU Newlib Nano. Around 100% smaller statically allocated RAM overheadthan GNU Newlib Nano and GNU Newlib. Unlike vanilla GNU Newlib Nano, memory is staticallyallocated (where possible) and so RAM usage is easilypredicted by build time pass/fail. Vastly smaller ROM and RAM usage than NXP RedLib. Full support for C++ exception handling.
A simple “empty” C program was used to show the minimumROM/RAM requirement to establish a C environment:
int main (int argc, char *argv[]){ while (1) {} return 0;}
These memory savings made by DRT can have hugepractical impact on the usability of small memorydevices. DRT can save development time (by allowingsoftware development in C rather than ARM assemblylanguage), and increase the potential to use smallermemory (and lower cost, lower energy) devices.
NXP Kinetis examples NXP provided CMSIS-Core routines(from Kinetis Design Studio) are called before main() toconfigure the on-chip PLL to highest possible frequency.DRT's savings are significant on small memory devicessuch as the KL series (starting at 8K ROM, 1K RAM).
Kinetis Cortex M0+ example (KL46Z)
Kinetis Cortex M4 example (K64F)
NXP LPC examples DRT leaves more space for yourapplication by making significant memory savings onsmall memory devices such as the LPC8xx series (startingat 8K ROM, 2K RAM).
LPC Cortex M0+ example (LPC824)
LPC Cortex M4 example (LPC5411)
STMicroelectronics STM32 examples
We created an “Empty” C program natively in each IDE. DRTsaves a huge amount of memory versus SW4STM32making the use of small memory STM32 devices far morepractical.
SOMNIUM and the SOMNIUM logo are registered trademarks of SOMNIUM® Technologies Limited 2016 SOMNIUM® Technologies LimitedAll other product or service names are the property of their respected owners. SOMNIUM-MS-0049 v3.0d
ROM RAM
KBytes KBytesDRT 1.4 n/a n/a 0.1 n/a n/a
KDS 3 Nano 2.5 75% 1108 0.6 314% 440KDS3 Newlib 4.0 178% 2608 1.5 1009% 1412
CW10.6 Nano 2.6 82% 1208 0.6 317% 444CW10.6 Newlib 4.6 223% 3276 1.5 1009% 1412
DRT saving(% and bytes)
DRT saving(% and bytes)
ROM RAM
KBytes KBytesDRT 0.5 n/a n/a 0.1 n/a n/a
LPCX Nano 0.9 91% 424 0.1 -3% -4LPCX RedLib 2.5 455% 2112 1.1 691% 968
DRT saving(% and bytes)
DRT saving(% and bytes)
ROM RAM
KBytes KBytesDRT 1.5 n/a n/a 0.1 n/a n/a
KDS3 Nano 2.4 59% 908 0.6 314% 440KDS3 Newlib 3.9 164% 2504 1.5 1009% 1412
CW10.6 Nano 2.5 66% 1004 0.6 317% 444CW10.6 Newlib 4.5 201% 3064 1.5 1009% 1412
DRT saving(% and bytes)
DRT saving(% and bytes)
ROM RAM
KBytes KBytesDRT 0.6 n/a n/a 0.1 n/a n/a
LPCX Nano 1.0 72% 424 0.1 -3% -4LPCX RedLib 2.6 359% 2112 1.1 691% 968
DRT saving(% and bytes)
DRT saving(% and bytes)
-
SOMNIUM® DRT Benchmarks Whitepaper
STM32F0 : Cortex M0+
STM32F4 : Cortex M4
Industry standard benchmarksSOMNIUM are members of the EEMBC® AutomotiveSubcommittee and use their industry standard benchmarks.We believe that in order to be useful, benchmarks shouldshow 3 dimensions. Not just performance, but memorysize and energy. It's easy to obtain higher performance by
unrolling, inlining andspecializing functions to theextreme, but real worldsystems are memory limitedso this approach makes littlesense if you want to get anaccurate understanding of realworld behaviour. We alwaysmeasure both memory size,performance and wherepossible we measure energy,
measured to the uJ using the high accuracy EEMBCEnergyMonitor™ (due to its 29mA current limitation wecouldn't use it to perform measurements on all devices).CoreMark™ is used to demonstrate the usable performanceof a processor system running typical algorithms includinglist processing (to stress test data accesses), matrixmanipulation (to stress test and mathematical operations,and state machines (to stress test complex control flows).
Atmel SMART results
We compare DRT to the vanilla GNU tools from Atmel Studio.
DRT didn't affect RAM usage, but always generated thesmallest codesize, the fastest and lowest energy results.
NXP Kinetis results
We compared against the latest KDS3.2 tools and the stableGNU ARM Launchpad 4.9 tools - the vanilla GCC 5x/6x toolsused in other commercial products have code generationbugs (not present in DRT) which manifest with the Kinetissoftware enablement and so we recommend against theiruse with Kinetis.
KL02 devices are quite constrained by their memory size andperformance. Using DRT increases performance whilstsaving significant amounts of ROM, RAM and energy.
KV10 devices have high performance memory systems, witha 16-entry, 4-way set associated flash cache. Even with thishigh performance hardware, DRT still increases KV10performance and saves energy whilst reducing codesize.
SOMNIUM and the SOMNIUM logo are registered trademarks of SOMNIUM® Technologies Limited 2016 SOMNIUM® Technologies LimitedAll other product or service names are the property of their respected owners. SOMNIUM-MS-0049 v3.0d
ROM RAM
KBytes KBytesDRT 0.6 n/a n/a 0.1 n/a n/a
SW4STM32 2.1 261% 1544 2.1 1423% 1992
DRT saving(% and bytes)
DRT saving(% and bytes)
ROM RAM
KBytes KBytesDRT 0.8 n/a n/a 0.1 n/a n/a
SW4STM32 2.0 164% 1280 2.1 1423% 1992
DRT saving(% and bytes)
DRT saving(% and bytes)
-
SOMNIUM® DRT Benchmarks Whitepaper
K21 devices DRT significantly improves performance andreduces energy consumption.
NXP LPC results
We compared DRT to the LPCXpresso tools which use vanillaGCC5x (similar to the GNU tools as used in AtollicTrueStudio) both of which contain code generation bugs.
LPC8xx devices LPC824 is an entry level device with no flashcache. DRT slightly improved performance and energy usagewhilst producing significant reductions in memory usage.
STMicroelectronics STM32 results
We compared DRT against the SW4STM32 tools andTrueSTUDIO (both of which use the same vanilla GNU GCC 5xtools as free of charge products and contain the same bugs).
STM32F446 has 64-bit wide flash, with a very sophisticated1KByte flash cache comprising 32 * 32 byte lines and asimilar 256byte structure for data accesses to flash whichallow the Cortex M4 processor to run at full speed withoutbeing impacted by instruction fetch latency.
DRT maintained performance whilst also producingsignificant memory reductions. Sadly we couldn't measurethe energy benefits of DRT as EEMBC EnergyMonitor can'tsupply enough current to power this MCU.
STM32L053 is an ultra low power device with a very simpleflash buffer rather than a cache. DRT can significantlyimprove its performance and energy behaviour.
“Real world” demonstration systemsIts not just benchmarks! We examined applications whichuse “real world” middleware including FreeRTOS, MicriumuCOS, code generated using Atmel START and AtmelSoftware Framework, (Kinetis) Processor Expert, Kinetis SDKv2, Sensor Fusion Library, LPCOpen, STM32CubeMX, and theeGUI graphic library.
Atmel ASF examples
Across the 2,343 unique ASF examples built @ Os (optimizefor size) on average DRT consumes 32% less ROM than codegenerated with the default Atmel Studio GNU tools.
SOMNIUM DRT Cortex-M IDE 3.4 introduces support forAtmel SMART devices and is available on Windows, Linux(with MacOSX support coming soon). It is fully integratedwith Atmel START for ASF project creation. We also offerSOMNIUM DRT Atmel Studio Extension - a plugin forAtmel Studio 6.2 and Atmel Studio 7. It seamlesslyintegrates with Atmel's tools and is provided as a newtoolchain “flavor”. Using DRT rather than the default GNUtools is a simple press button activity requiring no sourcecode changes or change of environment.
SAMD21freertos_oled1_tickless_xpro_example
A basic FreeRTOS demo from ASF 3.24.21 using SAMD21(Cortex M0+):
SOMNIUM and the SOMNIUM logo are registered trademarks of SOMNIUM® Technologies Limited 2016 SOMNIUM® Technologies LimitedAll other product or service names are the property of their respected owners. SOMNIUM-MS-0049 v3.0d
ROM RAMKBytes DRT saving KBytes DRT saving
“out of box” @ -O1 using Newlib NanoDRT 17.8 n/a 24.4 n/a
Studio 6.2 19.7 10% 24.4 0% “size optimized” @ -Os using Newlib Nano
DRT 16.2 n/a 24.4 n/aStudio 6.2 18.0 11% 24.4 0.0%
-
SOMNIUM® DRT Benchmarks Whitepaper
Micrium_uCOSII_Led_Blink_SAM4S_Xpro example
A basic Micrium Demo supplied with Studio 6.2 shows theROM/RAM overhead on a SAM4S (Cortex M4):
SAMB11 PXP demo uses a BLE software stack supplied as aprebuilt library in ROM, which can't be further optimized byDRT. Despite this library forming over 70% of the codesize ofthis demo, DRT still provides significant memory savings.This shows how DRT can leave more memory available foryour application in resource constrained devices.
NXP Kinetis examples
We examined a number of examples of NXP's Kinetissoftware enablement which is supported for CodeWarriorand KDS. Some Kinetis components (such as CMSIS) are alsosupported for IAR tools, but several key items of softwareenablement (including Sensor Fusion and Intelligent SensorFramework) are only provided for GNU compatible tools(CodeWarrior and KDS). As DRT is fully GNU compatible itsupports all NXP Kinetis software enablement withoutrequiring any source code changes.
“Attach” is a Freescale produced demonstration program,originally written using CodeWarrior 10.6, then ported byFreescale to KDS2.
Attach V1: only fits when built with DRT
No KDS configurations (KDS2, KDS3, Newlib or Newlib Nano)result in an executable which fits within the MKL26Z128device (ROM usage is too large, and RAM is almost full evenbefore heap and stack are allocated!)
Attach V2: reduced features to fit with KDS3
Freescale made significant source modifications such thatwhen built with KDS3 Newlib Nano, Attach V2 “just” fits into
the available ROM and RAM.
When built with DRT, both Attach V1 and V2 fit into theavailable ROM and RAM. No source code changes wererequired, no features were removed, and DRT made thesesavings automatically.
NXP Sensor Fusion Library
The Sensor Fusion Library and its example programs aresupplied as KDS3 source projects. We used DRT's automaticKDS project importer/convertor to avoid the need for anymanual steps (this isn't possible with Atollic's tools whichrequire manual conversion so we don't quote Atollic results).
This demonstration shows that “off the shelf” Kinetissoftware enablement ports to DRT with no changesrequired and uses significantly less ROM built with DRT.When options are modified to optimize for size, DRT stillproduces the smallest executable.
NXP LPC examples
We examined a number of examples of NXP's LPC softwareenablement for LPCXpresso which make use of LPCOpencomponents.
LPCOpen FreeRTOS blinky demo @ -Os
A basic FreeRTOS demo from LPCOpen showing the basicoverhead required for LPCOpen & FreeRTOS. DRT's ROMsavings show how using DRT frees up valuable memory,leaving space for your application.
SOMNIUM and the SOMNIUM logo are registered trademarks of SOMNIUM® Technologies Limited 2016 SOMNIUM® Technologies LimitedAll other product or service names are the property of their respected owners. SOMNIUM-MS-0049 v3.0d
KL46Z Sensor Fusion ROM RAM
KBytes KBytes “Out of box” @ O3
DRT 39.7 n/a n/a 7.1 n/a n/aKDS3 Nano 47.9 21% 8448 7.1 0% 4
CW10.6 Nano 43.2 9% 3617 6.9 -2% -158 Optimized for size @ Os
DRT 34.9 n/a n/a 7.1 n/a n/a
DRT saving(% and bytes)
DRT saving(% and bytes)
ROM RAMKBytes DRT saving KBytes DRT saving
“size optimized” @ -Os using Newlib NanoDRT 35.7 n/a 7.7 n/a
Studio 7 38.2 7% 7.8 0.2%
ROM RAMKBytes DRT saving KBytes DRT saving
“out of box” @ -O1 using NewlibDRT 12.0 n/a 17.9 n/a
Studio 6.2 22.8 90% 20.0 12% “size optimized” @ -Os using Newlib Nano
DRT 11.5 n/a 17.9 n/aStudio 6.2 12.3 7% 18.0 0.1%
Attach V2 Demo @ -Os : features cut so KDS3 Nano just fitsROM RAM
KBytes DRT saving KBytes DRT savingDRT 122.0 n/a 14.9 n/a
KDS3 Nano 127.0 3% 14.9 0%KDS3 Newlib 144.8 17% 17.0 26%
Attach V1 Demo @ Os : doesn't fit with KDS3 NanoROM RAM
KBytes DRT saving KBytes DRT savingDRT 123.5 n/a 13.5 n/a
KDS3 Nano 128.4 4% 13.4 0%KDS3 Newlib 137.3 11% 15.4 15% ROM RAM
KBytes DRT saving KBytes DRT savingDRT 6.0 n/a 0.4 n/a
LPCX Nano 6.5 8% 0.4 0%LPCX RedLib 7.0 16% 0.6 50%
-
SOMNIUM® DRT Benchmarks Whitepaper
LPC824 QuickJack demo
"The flexible Smartphone Quick-Jack Solution adapts thestandard 3.5 mm stereo audio jack found on most iOS orAndroid smart devices into a self-powered data port andprovides a universal interface for external sensors, switchesand other external devices. It gives both consumer andindustrial product designers a simple, plug-and-go way to getdata into an endless variety of control, monitoring, datacollection, maintenance, medical and even fun applications."
Built with DRT this demo is almost half the size of thedemo when built with LPCXpresso using RedLib.
Gesture recognition demo
The LPC824 Touch Library API is used to drive and scancapacitive sensors, processes their signal data, filters outnoise and provides touch data to a gesture recognitionapplication. The Touch Library accounts for ~45% of thisdemo's ROM usage and is supplied with LPCOpen as a prebuilt library (as its prebuilt it can't be optimized by DRT).DRT still provides significant memory savings comparedto vanilla GNU tools used in LPCXpresso and TrueSTUDIO.
STMicroelectronics STM32 examples
We tested DRT a the demo examples built with SW4STM32and TrueSTUDIO.
STM32F4 “Animated picture from SDCard” demo DRT uses significantly less ROM and RAM than other tools.
STM32F0: "No name" image browser from SDcard demo DRT uses significantly less ROM and RAM than SW4STM32.
Software manifest
Vendor Product Version
SW4STM32 System Workbench for STM32 1.8.0
AtmelStudio 6.2 and 7.0
Software Framework 3.30.1
Atollic TrueSTUDIO for ARM 6.0.0
EEMBC Energy Monitor 1.1.3
NXP/Freescale
Codewarrior for MCUs 10.6
Kinetis Design Studio 3.2
LPCXpresso 8.2.0
SOMNIUM
DRT Cortex-M IDE 3.4
DRT NXP Edition 3.4
DRT Atmel Studio Extension 3.4
Not all tools are equal
Free of charge tools use vanilla GNU and Eclipse tools. Manycommercial products freeload on the same vanilla tools andoffer no benefits over free products.
SOMNIUM are experts in GNU and Eclipse internals andmaintain GNU tools for major semiconductor vendors. Weare NXP Proven Partners and produced Kinetis Design Studiofor Freescale.
SummaryDRT is the ideal upgrade path from entry level tools, with unique features to generate the best code quality and save development time and money. DRT's device-aware code generation builds the most efficient program for your choice of Cortex-M device, with no source code changes required.DRT IDEs also include leading edge debug and trace features to improve productivity and help you reach market faster.DRT is available in three flavors.
DRT MCU support IDE
Atmel StudioExtension
Atmel SMART Windows hosted Atmel Visual Studio
Cortex-M IDE1 Atmel SMART, NXP Kinetis & LPC, STMicroelectronicsSTM32
Windows & Linux hosted, Eclipse IDE with debug and trace
Trial and buyFind out more and get a free of charge fully featured trial ofDRT from the SOMNIUM portal:
www.somniumtech.com/product-selector
Watch video tutorials and demonstrations at:
www.youtube.com/c/somniumtech
1 SOMNIUM NXP Edition IDE also available (only supporting NXP devices)
SOMNIUM and the SOMNIUM logo are registered trademarks of SOMNIUM® Technologies Limited 2016 SOMNIUM® Technologies LimitedAll other product or service names are the property of their respected owners. SOMNIUM-MS-0049 v3.0d
ROM RAM
KBytes KBytes
DRT 33.2 n/a n/a 8.5 n/a n/aSW4STM32 43.1 30% 10080 9.2 8% 676
TrueSTUDIO 33.7 1% 456 9.1 6% 560
DRT saving(% and bytes)
DRT saving(% and bytes)
ROM RAMKBytes DRT saving KBytes DRT saving
DRT 10.3 n/a 3.4 n/aLPCX Nano 11.0 6% 3.4 0%
LPCX RedLib 12.2 17% 3.8 10%
ROM RAM
KBytes KBytes
DRT 53.5 n/a n/a 24.3 n/a n/aSW4STM32 80.5 50% 27620 26.5 9% 2192
TrueSTUDIO 55.1 3% 1676 24.4 0% 52
DRT saving(% and bytes)
DRT saving(% and bytes)
ROM RAMKBytes DRT saving KBytes DRT saving
DRT 3.2 n/a 0.2 n/aLPCX Nano 3.4 7% 0.2 7%
LPCX RedLib 5.0 57% 0.5 202%