diff --git a/boards/px4/fmu-v5x/nuttx-config/Kconfig b/boards/px4/fmu-v5x/nuttx-config/Kconfig index 520c5abadb..6663cfdff1 100644 --- a/boards/px4/fmu-v5x/nuttx-config/Kconfig +++ b/boards/px4/fmu-v5x/nuttx-config/Kconfig @@ -15,3 +15,8 @@ config BOARD_USE_PROBES ---help--- Select to use GPIO FMU-CH1-8, CAP1 to provide timing signals from selected drivers. + +config BOARD_USE_RAMFUNCS + bool "Allow the usage of RAM functions on this board" + default n + select ARCH_HAVE_RAMFUNCS diff --git a/boards/px4/fmu-v5x/nuttx-config/nsh/defconfig b/boards/px4/fmu-v5x/nuttx-config/nsh/defconfig index cfb7af2bd2..1020205291 100644 --- a/boards/px4/fmu-v5x/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v5x/nuttx-config/nsh/defconfig @@ -67,6 +67,7 @@ CONFIG_ARMV7M_BASEPRI_WAR=y CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y +CONFIG_ARMV7M_ITCM=y CONFIG_ARMV7M_MEMCPY=y CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARM_MPU_EARLY_RESET=y @@ -75,6 +76,7 @@ CONFIG_BOARD_ASSERT_RESET_VALUE=0 CONFIG_BOARD_CRASHDUMP=y CONFIG_BOARD_LOOPSPERMSEC=22114 CONFIG_BOARD_RESET_ON_ASSERT=2 +CONFIG_BOARD_USE_RAMFUNCS=y CONFIG_BUILTIN=y CONFIG_CDCACM=y CONFIG_CDCACM_IFLOWCONTROL=y diff --git a/boards/px4/fmu-v5x/nuttx-config/scripts/itcm_gen_functions.ld b/boards/px4/fmu-v5x/nuttx-config/scripts/itcm_gen_functions.ld new file mode 100644 index 0000000000..e0e9b5cda5 --- /dev/null +++ b/boards/px4/fmu-v5x/nuttx-config/scripts/itcm_gen_functions.ld @@ -0,0 +1,15 @@ +*(.text._ZN4uORB7Manager27orb_add_internal_subscriberE6ORB_IDhPj) +*(.text._ZN4uORB7Manager13orb_data_copyEPvS1_Rjb) +*(.text._ZN7Mavlink16update_rate_multEv) +*(.text._ZN4uORB12DeviceMaster19getDeviceNodeLockedEPK12orb_metadatah) +*(.text._ZN3Ekf20controlGravityFusionERKN9estimator9imuSampleE) +*(.text._ZN7sensors22VehicleAngularVelocity21FilterAngularVelocityEiPfi) +*(.text._ZN39ControlAllocationSequentialDesaturation23computeDesaturationGainERKN6matrix6VectorIfLj16EEES4_) +*(.text._Z32param_get_default_value_internaltPv) +*(.text._ZL19param_get_cplusplustPf.isra.0) +*(.text.param_get_index) +*(.text.param_get_system_default_value) +*(.text.param_get) +*(.text.param_get_default_value) +*(.text._Z12get_orb_meta6ORB_ID) +*(.text._ZN3Ekf17measurementUpdateERN6matrix6VectorIfLj24EEERKS2_ff) diff --git a/boards/px4/fmu-v5x/nuttx-config/scripts/itcm_static_functions.ld b/boards/px4/fmu-v5x/nuttx-config/scripts/itcm_static_functions.ld new file mode 100644 index 0000000000..c4dae2ac7e --- /dev/null +++ b/boards/px4/fmu-v5x/nuttx-config/scripts/itcm_static_functions.ld @@ -0,0 +1,82 @@ +/* Static */ +*(.text.hrt_absolute_time) +*(.text.arm_ack_irq) +*(.text.arm_doirq) +*(.text.arm_svcall) +*(.text.arm_switchcontext) +*(.text.clock_timer) +*(.text.exception_common) +*(.text.hrt_call_enter) +*(.text.hrt_tim_isr) +*(.text.stm32_configwaitints) +*(.text.stm32_dmainterrupt) +*(.text.stm32_dmaresidual) +*(.text.stm32_dmasetup) +*(.text.stm32_dmastart) +*(.text.stm32_endwait) +*(.text.stm32_endtransfer) +*(.text.stm32_i2c_isr) +*(.text.stm32_i2c_transfer) +*(.text.stm32_interrupt) +*(.text.stm32_interrupt_work) +*(.text.stm32_ioctl) +*(.text.stm32_receive) +*(.text.stm32_sdmmc_interrupt) +*(.text.stm32_txpoll) +*(.text.stm32_usbinterrupt) +*(.text.irq_dispatch) +*(.text.ioctl) +*(.text.memcpy) +*(.text.memset) +*(.text.nxsched_add_blocked) +*(.text.nxsched_add_prioritized) +*(.text.nxsched_add_readytorun) +*(.text.nxsched_get_files) +*(.text.nxsched_get_tcb) +*(.text.nxsched_merge_pending) +*(.text.nxsched_process_timer) +*(.text.nxsched_remove_blocked) +*(.text.nxsched_remove_readytorun) +*(.text.nxsched_resume_scheduler) +*(.text.nxsched_suspend_scheduler) +*(.text.nxsem_add_holder) +*(.text.nxsem_add_holder_tcb) +*(.text.nxsem_clockwait) +*(.text.nxsem_foreachholder) +*(.text.nxsem_freecount0holder) +*(.text.nxsem_freeholder) +*(.text.nxsem_post) +*(.text.nxsem_release_holder) +*(.text.nxsem_restore_baseprio) +*(.text.nxsem_tickwait) +*(.text.nxsem_timeout) +*(.text.nxsem_trywait) +*(.text.nxsem_wait) +*(.text.nxsem_wait_uninterruptible) +*(.text.nxsig_timedwait) +*(.text.perf_set_elapsed) +*(.text.sched_lock) +*(.text.sched_note_resume) +*(.text.sched_note_suspend) +*(.text.sched_unlock) +*(.text.spi_exchange) +*(.text.spi_exchange_nodma) +*(.text.spi_send) +*(.text.strcmp) +*(.text.sq_addafter) +*(.text.sq_addlast) +*(.text.sq_rem) +*(.text.sq_remafter) +*(.text.sq_remfirst) +*(.text.uart_connected) +*(.text.up_block_task) +*(.text.up_dma_receive) +*(.text.up_dma_send) +*(.text.up_dma_rxcallback) +*(.text.up_dma_txcallback) +*(.text.up_rxint) +*(.text.up_txint) +*(.text.up_unblock_task) +*(.text.wd_timer) +*(.text.wd_start) +*(.text._do_memcpy) diff --git a/boards/px4/fmu-v5x/nuttx-config/scripts/script.ld b/boards/px4/fmu-v5x/nuttx-config/scripts/script.ld index 8d5a78da6b..3b080f1d2b 100644 --- a/boards/px4/fmu-v5x/nuttx-config/scripts/script.ld +++ b/boards/px4/fmu-v5x/nuttx-config/scripts/script.ld @@ -94,9 +94,23 @@ EXTERN(board_get_manifest) SECTIONS { + .vectors : { + KEEP(*(.vectors)) + *(.vectors) + } > FLASH_AXIM + + .ramfunc : { + _sramfuncs = .; + INCLUDE "itcm_static_functions.ld" + INCLUDE "itcm_gen_functions.ld" + . = ALIGN(4); + _eramfuncs = .; + } > ITCM_RAM AT > FLASH_AXIM + + _framfuncs = LOADADDR(.ramfunc); + .text : { _stext = ABSOLUTE(.); - *(.vectors) . = ALIGN(32); /* This signature provides the bootloader with a way to delay booting @@ -115,7 +129,6 @@ SECTIONS *(.gcc_except_table) *(.gnu.linkonce.r.*) _etext = ABSOLUTE(.); - } > FLASH_AXIM /* @@ -178,13 +191,4 @@ SECTIONS .debug_line 0 : { *(.debug_line) } .debug_pubnames 0 : { *(.debug_pubnames) } .debug_aranges 0 : { *(.debug_aranges) } - - .ramfunc : { - _sramfuncs = .; - *(.ramfunc .ramfunc.*) - . = ALIGN(4); - _eramfuncs = .; - } > ITCM_RAM AT > FLASH_AXIM - - _framfuncs = LOADADDR(.ramfunc); } diff --git a/platforms/nuttx/NuttX/nuttx b/platforms/nuttx/NuttX/nuttx index f71309197b..eaf77e7e1a 160000 --- a/platforms/nuttx/NuttX/nuttx +++ b/platforms/nuttx/NuttX/nuttx @@ -1 +1 @@ -Subproject commit f71309197ba90f347987afe71ff779a7c9eae374 +Subproject commit eaf77e7e1a9ef418ce589269d12967348b04c20b