Skip to content

Commit

Permalink
Upgrade NuttX to 8.2
Browse files Browse the repository at this point in the history
Nuttx with PX4 contrib of bbsram fix

Nuttx 8.31+ with BBSRAM disable dcache

Nuttx 8.2-
  • Loading branch information
bkueng authored and LorenzMeier committed Nov 16, 2019
1 parent 1128771 commit 78944a7
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 12 deletions.
2 changes: 1 addition & 1 deletion platforms/nuttx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ list(APPEND nuttx_libs
nuttx_arch
nuttx_binfmt
nuttx_c
nuttx_configs
nuttx_boards
nuttx_xx
nuttx_drivers
nuttx_fs
Expand Down
12 changes: 6 additions & 6 deletions platforms/nuttx/NuttX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,19 @@ add_custom_target(nuttx_copy_and_apps_target
if(EXISTS ${NUTTX_CONFIG_DIR}/Kconfig)
add_custom_command(
OUTPUT
${NUTTX_DIR}/configs/dummy/Kconfig
${NUTTX_DIR}/boards/dummy/Kconfig
${CMAKE_CURRENT_BINARY_DIR}/nuttx_config_kconfig.stamp
COMMAND ${CMAKE_COMMAND} -E copy ${NUTTX_CONFIG_DIR}/Kconfig ${NUTTX_DIR}/configs/dummy/Kconfig
COMMAND ${CMAKE_COMMAND} -E copy ${NUTTX_CONFIG_DIR}/Kconfig ${NUTTX_DIR}/boards/dummy/Kconfig
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/nuttx_config_kconfig.stamp
DEPENDS
nuttx_copy_and_apps_target
)
else()
add_custom_command(
OUTPUT
${NUTTX_DIR}/configs/dummy/Kconfig
${NUTTX_DIR}/boards/dummy/Kconfig
${CMAKE_CURRENT_BINARY_DIR}/nuttx_config_kconfig.stamp
COMMAND ${CMAKE_COMMAND} -E touch ${NUTTX_DIR}/configs/dummy/Kconfig
COMMAND ${CMAKE_COMMAND} -E touch ${NUTTX_DIR}/boards/dummy/Kconfig
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/nuttx_config_kconfig.stamp
DEPENDS
nuttx_copy_and_apps_target
Expand All @@ -133,7 +133,7 @@ endif()

add_custom_target(nuttx_config_kconfig_target
DEPENDS
${NUTTX_DIR}/configs/dummy/Kconfig
${NUTTX_DIR}/boards/dummy/Kconfig
${CMAKE_CURRENT_BINARY_DIR}/nuttx_config_kconfig.stamp
)

Expand Down Expand Up @@ -357,7 +357,7 @@ endfunction()
# add_nuttx_dir(NAME DIRECTORY KERNEL EXTRA)
add_nuttx_dir(arch arch/arm/src y -D__KERNEL__)
add_nuttx_dir(binfmt binfmt y -D__KERNEL__)
add_nuttx_dir(configs configs y -D__KERNEL__)
add_nuttx_dir(boards boards y -D__KERNEL__)
add_nuttx_dir(drivers drivers y -D__KERNEL__)
add_nuttx_dir(fs fs y -D__KERNEL__)
add_nuttx_dir(sched sched y -D__KERNEL__)
Expand Down
2 changes: 1 addition & 1 deletion platforms/nuttx/NuttX/apps
Submodule apps updated 1571 files
2 changes: 1 addition & 1 deletion platforms/nuttx/NuttX/nuttx
Submodule nuttx updated 10995 files
4 changes: 2 additions & 2 deletions platforms/nuttx/cmake/init.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ set(NUTTX_DEFCONFIG ${NUTTX_CONFIG_DIR}/${NUTTX_CONFIG}/defconfig CACHE FILEPATH

# If the board provides a Kconfig Use it or create an empty one
if(EXISTS ${NUTTX_CONFIG_DIR}/Kconfig)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${NUTTX_CONFIG_DIR}/Kconfig ${NUTTX_DIR}/configs/dummy/Kconfig)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${NUTTX_CONFIG_DIR}/Kconfig ${NUTTX_DIR}/boards/dummy/Kconfig)
else()
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${NUTTX_DIR}/configs/dummy/Kconfig)
execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${NUTTX_DIR}/boards/dummy/Kconfig)
endif()

execute_process(
Expand Down
33 changes: 33 additions & 0 deletions platforms/nuttx/src/px4/nxp/kinetis/board_reset/board_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,39 @@
#include <nuttx/board.h>


#ifdef CONFIG_BOARDCTL_RESET

/****************************************************************************
* Public functions
****************************************************************************/

/****************************************************************************
* Name: board_reset
*
* Description:
* Reset board. Support for this function is required by board-level
* logic if CONFIG_BOARDCTL_RESET is selected.
*
* Input Parameters:
* status - Status information provided with the reset event. This
* meaning of this status information is board-specific. If not
* used by a board, the value zero may be provided in calls to
* board_reset().
*
* Returned Value:
* If this function returns, then it was not possible to power-off the
* board due to some constraints. The return value int this case is a
* board-specific reason for the failure to shutdown.
*
****************************************************************************/

int board_reset(int status)
{
up_systemreset();
return 0;
}

#endif /* CONFIG_BOARDCTL_RESET */


int board_set_bootload_mode(board_reset_e mode)
Expand Down
33 changes: 33 additions & 0 deletions platforms/nuttx/src/px4/stm/stm32_common/board_reset/board_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,39 @@
#include <stm32_rtc.h>
#include <nuttx/board.h>

#ifdef CONFIG_BOARDCTL_RESET

/****************************************************************************
* Public functions
****************************************************************************/

/****************************************************************************
* Name: board_reset
*
* Description:
* Reset board. Support for this function is required by board-level
* logic if CONFIG_BOARDCTL_RESET is selected.
*
* Input Parameters:
* status - Status information provided with the reset event. This
* meaning of this status information is board-specific. If not
* used by a board, the value zero may be provided in calls to
* board_reset().
*
* Returned Value:
* If this function returns, then it was not possible to power-off the
* board due to some constraints. The return value int this case is a
* board-specific reason for the failure to shutdown.
*
****************************************************************************/

int board_reset(int status)
{
up_systemreset();
return 0;
}

#endif /* CONFIG_BOARDCTL_RESET */

int board_set_bootload_mode(board_reset_e mode)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ __BEGIN_DECLS

#define PX4_SOC_ARCH_ID PX4_SOC_ARCH_ID_STM32F7
#include <chip.h>
#include <chip/stm32_flash.h>
#include <hardware/stm32_flash.h>
#include <up_internal.h> //include up_systemreset() which is included on stm32.h
#include <stm32_bbsram.h>
#define PX4_BBSRAM_SIZE STM32F7_BBSRAM_SIZE
Expand Down

0 comments on commit 78944a7

Please sign in to comment.