Skip to content

Commit

Permalink
mps/profile: Add mps configuration
Browse files Browse the repository at this point in the history
Use the toolchain's own rt.builtin and libbuildin's rt.profile to instrument the code using parameters such as "-fprofile-generate --coverage"

Signed-off-by: wangmingrong1 <[email protected]>
  • Loading branch information
W-M-R committed Nov 7, 2024
1 parent a60c909 commit acf45f8
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 3 deletions.
82 changes: 82 additions & 0 deletions boards/arm/mps/mps3-an547/configs/profile/defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#
# This file is autogenerated: PLEASE DO NOT EDIT IT.
#
# You can use "make menuconfig" to make any modifications to the installed .config file.
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
# modifications.
#
# CONFIG_DEBUG_WARN is not set
CONFIG_ARCH="arm"
CONFIG_ARCH_BOARD="mps3-an547"
CONFIG_ARCH_BOARD_MPS3_AN547=y
CONFIG_ARCH_CHIP="mps"
CONFIG_ARCH_CHIP_MPS3_AN547=y
CONFIG_ARCH_CHIP_MPS=y
CONFIG_ARCH_INTERRUPTSTACK=2048
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARMV8M_SYSTICK=y
CONFIG_ARMV8M_USEBASEPRI=y
CONFIG_ARM_TOOLCHAIN_CLANG=y
CONFIG_BUILTIN=y
CONFIG_BUILTIN_COMPILER_RT=y
CONFIG_CMSDK_UART0=y
CONFIG_CMSDK_UART0_BASE=0x49303000
CONFIG_CMSDK_UART0_CLOCK=25000000
CONFIG_CMSDK_UART0_OV_IRQ=59
CONFIG_CMSDK_UART0_RX_IRQ=50
CONFIG_CMSDK_UART0_SERIAL_CONSOLE=y
CONFIG_CMSDK_UART0_TX_IRQ=49
CONFIG_CMSDK_UART=y
CONFIG_COMPILER_RT_PROFILE=y
CONFIG_DEBUG_ASSERTIONS=y
CONFIG_DEBUG_BUSFAULT=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_HARDFAULT_ALERT=y
CONFIG_DEBUG_SCHED=y
CONFIG_DEBUG_SCHED_ERROR=y
CONFIG_DEBUG_SYMBOLS=y
CONFIG_DEBUG_USAGEFAULT=y
CONFIG_DEFAULT_TASK_STACKSIZE=4096
CONFIG_DEV_ZERO=y
CONFIG_EXAMPLES_HELLO=y
CONFIG_EXPERIMENTAL=y
CONFIG_FS_PROCFS=y
CONFIG_FS_ROMFS=y
CONFIG_FS_TMPFS=y
CONFIG_HAVE_CXX=y
CONFIG_IDLETHREAD_STACKSIZE=4096
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_INTELHEX_BINARY=y
CONFIG_LIBC_MEMFD_ERROR=y
CONFIG_LIBM=y
CONFIG_MM_REGIONS=2
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PREALLOC_TIMERS=4
CONFIG_RAMLOG=y
CONFIG_RAM_SIZE=2097152
CONFIG_RAM_START=0x01000000
CONFIG_RAW_BINARY=y
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_GCOV=y
CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=192
CONFIG_SCHED_IRQMONITOR=y
CONFIG_SPINLOCK=y
CONFIG_STACK_COLORATION=y
CONFIG_STANDARD_SERIAL=y
CONFIG_START_DAY=25
CONFIG_START_MONTH=4
CONFIG_START_YEAR=2023
CONFIG_SYMTAB_ORDEREDBYNAME=y
CONFIG_SYSTEM_GCOV=y
CONFIG_SYSTEM_NSH=y
CONFIG_SYSTEM_SYSTEM=y
CONFIG_TESTING_GETPRIME=y
CONFIG_TESTING_OSTEST=y
CONFIG_TIMER=y
CONFIG_TIMER_ARCH=y
CONFIG_USEC_PER_TICK=1000
28 changes: 25 additions & 3 deletions boards/arm/mps/mps3-an547/scripts/flash.ld
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ SECTIONS
_einit = ABSOLUTE(.);
} > flash

__llvm_prf_names : {
__start__llvm_prf_names = .;
KEEP (*(__llvm_prf_names))
__end__llvm_prf_names = .;
} > flash

.ARM.extab : ALIGN(4) {
*(.ARM.extab*)
} > flash
Expand Down Expand Up @@ -91,8 +97,24 @@ SECTIONS
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
. = ALIGN(4);
} > sram1 AT > flash

__llvm_prf_data : {
__start__llvm_prf_data = .;
KEEP (*(__llvm_prf_data))
__end__llvm_prf_data = .;
} > sram1 AT > flash

__llvm_prf_vnds : {
__start__llvm_prf_vnds = .;
KEEP (*(__llvm_prf_vnds))
__end__llvm_prf_vnds = .;
} > sram1 AT > flash

__llvm_prf_cnts : {
__start__llvm_prf_cnts = .;
KEEP (*(__llvm_prf_cnts))
__end__llvm_prf_cnts = .;
_edata = ABSOLUTE(.);
} > sram1 AT > flash

Expand Down Expand Up @@ -124,4 +146,4 @@ SECTIONS
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
}
1 change: 1 addition & 0 deletions tools/ci/testlist/arm-05.dat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/arm/mps/mps3-an547/configs/ap,CONFIG_ARM_TOOLCHAIN_GNU_EABI
/arm/mps/mps3-an547/configs/bl,CONFIG_ARM_TOOLCHAIN_GNU_EABI
/arm/mps/mps3-an547/configs/clang,CONFIG_ARM_TOOLCHAIN_CLANG
/arm/mps/mps3-an547/configs/profile,CONFIG_ARM_TOOLCHAIN_CLANG
/arm/mps/mps3-an547/configs/nsh,CONFIG_ARM_TOOLCHAIN_GNU_EABI
/arm/mps/mps3-an547/configs/picostest,CONFIG_ARM_TOOLCHAIN_GNU_EABI

Expand Down

0 comments on commit acf45f8

Please sign in to comment.