Skip to content

Commit

Permalink
[bsp] Switch qemu-vexpress-gemini sample to picolibc
Browse files Browse the repository at this point in the history
Before:
   text	   data	    bss	    dec	    hex	filename
 165330	   2256	  14256	 181842	  2c652	rtthread-vexpress.elf

After:
   text	   data	    bss	    dec	    hex	filename
 156747	   1200	  14128	 172075	  2a02b	rtthread-vexpress.elf

Signed-off-by: Keith Packard <keithp@keithp.com>
  • Loading branch information
keith-packard committed Apr 2, 2022
1 parent c83758b commit 59073ef
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bsp/qemu-vexpress-gemini/.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ CONFIG_IDLE_THREAD_STACK_SIZE=512
#
# kservice optimization
#
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
CONFIG_RT_KSERVICE_USING_STDLIB=y
CONFIG_RT_KSERVICE_USING_STDLIB_MEMCPY=y
CONFIG_RT_KSERVICE_USING_STDLIB_MEMSET=y
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
# CONFIG_RT_USING_TINY_FFS is not set
CONFIG_RT_KSERVICE_USING_PRINTF=y
# CONFIG_RT_PRINTF_LONGLONG is not set
# CONFIG_RT_PRINTF_FLOAT is not set
CONFIG_RT_DEBUG=y
CONFIG_RT_DEBUG_COLOR=y
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
Expand Down
4 changes: 4 additions & 0 deletions bsp/qemu-vexpress-gemini/rtconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

/* kservice optimization */

#define RT_KSERVICE_USING_STDLIB
#define RT_KSERVICE_USING_STDLIB_MEMCPY
#define RT_KSERVICE_USING_STDLIB_MEMSET
#define RT_KSERVICE_USING_PRINTF
#define RT_DEBUG
#define RT_DEBUG_COLOR

Expand Down
1 change: 1 addition & 0 deletions bsp/qemu-vexpress-gemini/rtconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
ARCH='arm'
CPU='vexpress-a9'
CROSS_TOOL='gcc'
LIBC='picolibc'

if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
Expand Down
17 changes: 17 additions & 0 deletions bsp/qemu-vexpress-gemini/vexpress.lds
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,23 @@ SECTIONS
} =0
__text_end = .;

. = ALIGN(8);
.tdata : {
*(.tdata)
*(.tdata.*)
*(.gnu.linkonce.td.*)
}

.tbss (NOLOAD) : {
*(.tbss .tbss.* .gnu.linkonce.tb.*)
*(.tcommon)
}

__tdata_source = ADDR(.tdata);
__tdata_size = SIZEOF(.tdata);
__tbss_size = SIZEOF(.tbss);
__tls_size = SIZEOF(.tdata) + SIZEOF(.tbss);

__rodata_start = .;
.rodata : { *(.rodata) *(.rodata.*) }
__rodata_end = .;
Expand Down

0 comments on commit 59073ef

Please sign in to comment.