Skip to content

Conversation

@Donny9
Copy link
Contributor

@Donny9 Donny9 commented Dec 31, 2025

Summary

board/lm3s6432-s2e/nsh: disable LIBC_LONG_LONG to fix ci bb

00086373 00000634 T __aeabi_dsub
00086373 00000634 T __subdf3
00087841 00000724 T __udivmoddi4
and other small symbol, save total flash size 3K

current flash show size:

NuttX executable: nuttx
TOP 10 BIG DATA
536878108 00000192 b g_iob_qpool
536881040 00000240 b g_prealloctimers
536882232 00000256 b g_uart0rxbuffer
536882488 00000256 b g_uart0txbuffer
536882744 00000256 b g_uart1rxbuffer
536883000 00000256 b g_uart1txbuffer
536883292 00000320 b g_arptable
536884040 00000352 b g_icmp_connections_buffer
536883612 00000384 b g_cbprealloc_buffer
536872440 00000448 b g_gpioportirqvector
536871868 00000516 d g_tempbuffer
536878300 00000568 b g_irqvector
536880448 00000592 b g_pktbuf
536878868 00000648 b g_kthread_group
536881452 00000672 b g_sigpool
536879716 00000704 b g_msgpool
536886208 00000736 b g_udp_connections_buffer
536887028 00001200 b g_dns_cache
536884444 00001760 b g_tcp_connections_buffer
536873104 00004995 b g_iob_buffer
TOP 10 BIG CODE
00027377 00000620 t nsh_main
00047345 00000640 T cmd_mv
00080533 00000728 T _assert.constprop.0
00034937 00000792 t expression
00090708 00000800 T g_cmdmap.lto_priv.0
00050233 00000856 T cmd_arp
00026201 00000958 T nsh_strcat.lto_priv.0
00086981 00000980 t devif_poll_connections.isra.0
00069685 00000988 t inet_recvmsg
00077017 00000996 T getaddrinfo.constprop.0
00020049 00001068 T nxsig_tcbdispatch
00012169 00001208 T lib_vsprintf
00012169 00001208 T lib_vsprintf_internal
00078937 00001212 T nxtask_init.constprop.0
00038885 00001284 T psock_ioctl
00063757 00001520 t lib_vscanf.constprop.0
00017741 00001712 t nsh_parse_command
00023201 00002536 t nx_start
00043505 00002804 T ipv4_in.lto_priv.0
00051313 00003308 t webclient_perform

Impact

disable LIBC_LONG_LONG, it's not necessary function for board/lm3s6432-s2e/nsh

Testing

local compile pass

@github-actions github-actions bot added Board: arm Size: XS The size of the change in this PR is very small labels Dec 31, 2025
@Donny9
Copy link
Contributor Author

Donny9 commented Dec 31, 2025

Why did the size change? It's because of the recent network-related patches. It might be the consequence of multiple PRs being merged together. @zhhyu7 @wenquan2015 will continue to optimize the use of net lock. Let's merge this PR first to ensure that the mainline is not broken.

The relevant patch might be:
5032377 net/tcp: replace net_lock with conn_lock and conn_lock_dev
6196550 tcp:add net_lock to protect tcp resource
8ef8765 net/icmpv6: replace net_lock with conn_lock and conn_lock_dev

image

@acassis @raiden00pl

@xiaoxiang781216
Copy link
Contributor

@Donny9 could we avoid use float point and 64bit dvide in the normal config to remove the lop 3 big functions:

00086373 00000634 T __aeabi_dsub
00086373 00000634 T __subdf3
00087841 00000724 T __udivmoddi4

@Donny9
Copy link
Contributor Author

Donny9 commented Dec 31, 2025

@Donny9 could we avoid use float point and 64bit dvide in the normal config to remove the lop 3 big functions:

00086373 00000634 T __aeabi_dsub
00086373 00000634 T __subdf3
00087841 00000724 T __udivmoddi4

@xiaoxiang781216
Floating-point operations were introduced due to the introduction of the ls handler and have been optimized to integer operations. apache/nuttx-apps#3293
This issue occurs during 64-bit operations due to stroull. By disabling LIBC_LONG_LONG, this problem can be resolved.

An additional script has also been provided, which makes it convenient to use this script to view the cross-references of the symbols.

image image

00086373 00000634 T __aeabi_dsub
00086373 00000634 T __subdf3
00087841 00000724 T __udivmoddi4
and other small symbol, save total flash size 3K

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
@Donny9 Donny9 changed the title board/lm3s6432-s2e/nsh: disable some nsh feature to fix ci bb board/lm3s6432-s2e/nsh: disable LIBC_LONG_LONG to fix ci bb Dec 31, 2025
raiden00pl
raiden00pl previously approved these changes Dec 31, 2025
Usage: ./tools/find_symbol_callers.sh <elf_file> <symbol_name> [source_root]

Examples:
  ./tools/find_symbol_callers.sh nuttx __aeabi_f2d
  ./tools/find_symbol_callers.sh nuttx malloc

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
@acassis acassis merged commit 8c0850b into apache:master Dec 31, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Tooling Board: arm Size: M The size of the change in this PR is medium Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants