From d70f848b0867fa5f7748a242d06e95d140fd7736 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 14 Feb 2009 06:54:06 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@759 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARMCM3-STM32F103-GCC/Makefile | 57 +++++++----- docs/reports/STM32F103-72.txt | 10 +-- docs/reports/kernel.txt | 132 ++++++++++++++++++++++++++++ readme.txt | 1 + 4 files changed, 171 insertions(+), 29 deletions(-) create mode 100644 docs/reports/kernel.txt diff --git a/demos/ARMCM3-STM32F103-GCC/Makefile b/demos/ARMCM3-STM32F103-GCC/Makefile index c476d8cda..12a819086 100644 --- a/demos/ARMCM3-STM32F103-GCC/Makefile +++ b/demos/ARMCM3-STM32F103-GCC/Makefile @@ -12,6 +12,29 @@ # To rebuild project do "make clean" and "make all". # +############################################################################################## +# OS, compiler and demo options + +# Compiler options here +OPT = -O2 -ggdb -fomit-frame-pointer -mabi=apcs-gnu -falign-functions=16 + +# Enable this if you want the linker to remove unused code and data +LINK_GC = yes + +# Enable this if you really want to use the STM FWLib. ChibiOS/RT does not +# require it and does not support the library except for this Makefile option. +USE_FWLIB = no + +# Enable register caching optimization. This option greatly improves both +# code size and execution speed but is incompatible with libraries compiled +# without the very same options. The register R7 becomes a global variable +# and MUST NOT be used anywhere in the code. +USE_CURRP_CACHING = no + +# +# End of OS and demo options +############################################################################################## + ############################################################################################## # Start of default section # @@ -28,13 +51,6 @@ BIN = $(CP) -O binary MCU = cortex-m3 -# Enable this if you want the linker to remove unused code and data -LINK_GC = yes - -# Enable this if you really want to use the STM FWLib. ChibiOS/RT does not -# require it and does not support the library except for this Makefile option. -USE_FWLIB = no - # List all default C defines here, like -D_DEBUG=1 DDEFS = @@ -103,23 +119,6 @@ ULIBDIR = # List all user libraries here ULIBS = -# Common options here -# NOTE: -ffixed-r7 is only needed if you enabled CH_CURRP_REGISTER_CACHE in -# chconf.h. -# NOTE: -falign-functions=16 may improve the performance, not always, but -# increases the code size. -# NOTE: Add -fno-strict-aliasing if you are tired to see all the warnings -# generated by the STM FWLib, this option increases code size too. -OPT = -O2 -ggdb -fomit-frame-pointer -mabi=apcs-gnu -#OPT += -ffixed-r7 -OPT += -falign-functions=16 - -ifeq ($(USE_FWLIB),yes) -# The thing generates a lot of aliasing warnings, this disables an optimization -# and the warning disappears, the code is a bit larger however. -OPT += -fno-strict-aliasing -endif - # Define warning options here WARN = -Wall -Wstrict-prototypes @@ -127,6 +126,16 @@ WARN = -Wall -Wstrict-prototypes # End of user defines ############################################################################################## +ifeq ($(USE_CURRP_CACHING),yes) +OPT += -ffixed-r7 -DCH_CURRP_REGISTER_CACHE='"r7"' +endif + +ifeq ($(USE_FWLIB),yes) +# The thing generates a lot of aliasing warnings, this disables an optimization +# and the warning disappears, the code is a bit larger however. +OPT += -fno-strict-aliasing +endif + ifeq ($(LINK_GC),yes) OPT += -ffunction-sections -fdata-sections endif diff --git a/docs/reports/STM32F103-72.txt b/docs/reports/STM32F103-72.txt index 973dd11ec..602ff796c 100644 --- a/docs/reports/STM32F103-72.txt +++ b/docs/reports/STM32F103-72.txt @@ -1,5 +1,5 @@ *************************************************************************** -Kernel: ChibiOS/RT 1.0.0 final +Kernel: ChibiOS/RT 1.1.0 unstable Compiler: GCC 4.3.2 (YAGARTO 28.09.2008) Options: -O2 -fomit-frame-pointer -mabi=apcs-gnu -falign-functions=16 Settings: SYSCLK=72, ACR=0x12 (2 wait states) @@ -40,7 +40,7 @@ Settings: SYSCLK=72, ACR=0x12 (2 wait states) --- Result: SUCCESS --------------------------------------------------------------------------- --- Test Case 12 (Heap, allocation and fragmentation test) ---- Size : 17284 bytes, not fragmented +--- Size : 17296 bytes, not fragmented --- Result: SUCCESS --------------------------------------------------------------------------- --- Test Case 13 (Memory Pools, allocation and enqueuing test) @@ -53,7 +53,7 @@ Settings: SYSCLK=72, ACR=0x12 (2 wait states) --- Result: SUCCESS --------------------------------------------------------------------------- --- Test Case 16 (Benchmark, context switch #1, optimal) ---- Score : 216994 msgs/S, 433988 ctxswc/S +--- Score : 216993 msgs/S, 433986 ctxswc/S --- Result: SUCCESS --------------------------------------------------------------------------- --- Test Case 17 (Benchmark, context switch #2, empty ready list) @@ -65,11 +65,11 @@ Settings: SYSCLK=72, ACR=0x12 (2 wait states) --- Result: SUCCESS --------------------------------------------------------------------------- --- Test Case 19 (Benchmark, threads creation/termination, worst case) ---- Score : 161766 threads/S +--- Score : 164734 threads/S --- Result: SUCCESS --------------------------------------------------------------------------- --- Test Case 20 (Benchmark, threads creation/termination, optimal) ---- Score : 205805 threads/S +--- Score : 210634 threads/S --- Result: SUCCESS --------------------------------------------------------------------------- --- Test Case 21 (Benchmark, mass reschedulation, 5 threads) diff --git a/docs/reports/kernel.txt b/docs/reports/kernel.txt new file mode 100644 index 000000000..9014c2418 --- /dev/null +++ b/docs/reports/kernel.txt @@ -0,0 +1,132 @@ +Platform : ARM Cortex-M3 +OS Setup : Full kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -O2 -mthumb +Kernel Size = 5648 + +Platform : ARM Cortex-M3 +OS Setup : Minimal kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -O2 -mthumb +Kernel Size = 1296 + +Platform : ARM Cortex-M3 +OS Setup : Full kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -mthumb +Kernel Size = 5408 + +Platform : ARM Cortex-M3 +OS Setup : Minimal kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -mthumb +Kernel Size = 1344 + +Platform : ARM Cortex-M3 +OS Setup : Full kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" +Kernel Size = 5056 + +Platform : ARM Cortex-M3 +OS Setup : Minimal kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" +Kernel Size = 1264 + +Platform : ARM7TDMI (ARM mode) +OS Setup : Full kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -O2 +Kernel Size = 8192 + +Platform : ARM7TDMI (ARM mode) +OS Setup : Minimal kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -O2 +Kernel Size = 2000 + +Platform : ARM7TDMI (ARM mode) +OS Setup : Full kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os +Kernel Size = 7808 + +Platform : ARM7TDMI (ARM mode) +OS Setup : Minimal kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os +Kernel Size = 1904 + +Platform : ARM7TDMI (ARM mode) +OS Setup : Full kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" +Kernel Size = 7328 + +Platform : ARM7TDMI (ARM mode) +OS Setup : Minimal kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" +Kernel Size = 1856 + +Platform : ARM7TDMI (THUMB mode) +OS Setup : Full kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -O2 -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING +Kernel Size = 5376 + +Platform : ARM7TDMI (THUMB mode) +OS Setup : Minimal kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -O2 -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING +Kernel Size = 1376 + +Platform : ARM7TDMI (THUMB mode) +OS Setup : Full kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING +Kernel Size = 5152 + +Platform : ARM7TDMI (THUMB mode) +OS Setup : Minimal kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -mthumb -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING +Kernel Size = 1344 + +Platform : ARM7TDMI (THUMB mode) +OS Setup : Full kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING +Kernel Size = 4832 + +Platform : ARM7TDMI (THUMB mode) +OS Setup : Minimal kernel +Compiler : arm-elf-gcc (GCC) 4.3.2 +Options : -Os -mthumb -ffixed-r7 -DCH_CURRP_REGISTER_CACHE=\"r7\" -DTHUMB -DTHUMB_PRESENT -DTHUMB_NO_INTERWORKING +Kernel Size = 1280 + +Platform : MSP430 +OS Setup : Full kernel +Compiler : msp430-gcc (GCC) 3.2.3 +Options : -O2 +Kernel Size = 5696 + +Platform : MSP430 +OS Setup : Minimal kernel +Compiler : msp430-gcc (GCC) 3.2.3 +Options : -O2 +Kernel Size = 1136 + +Platform : MSP430 +OS Setup : Full kernel +Compiler : msp430-gcc (GCC) 3.2.3 +Options : -Os +Kernel Size = 5680 + +Platform : MSP430 +OS Setup : Minimal kernel +Compiler : msp430-gcc (GCC) 3.2.3 +Options : -Os +Kernel Size = 1136 + diff --git a/readme.txt b/readme.txt index 1026c34dc..859d8cd2b 100644 --- a/readme.txt +++ b/readme.txt @@ -129,6 +129,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, - Articles and notes previously in the wiki now merged in the general documentation and updated, the wiki entries are obsolete and will be removed. - New application notes and articles added. +- Added kernel size metrics to the test reports. - Removed the inclusion graph from the documentation because the little info they add and the size of all the images. It is possible to configure Doxygen to have them again (and more graph types).