xiaoxiang781216 commented on code in PR #10385:
URL: https://github.com/apache/nuttx/pull/10385#discussion_r1304649454
##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/Makefile:
##########
@@ -57,4 +59,120 @@ else ifeq ($(CONFIG_STM32F7_OTGFSHS),y)
CSRCS += stm32_usb.c
endif
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += stm32_usbmsc.c
+endif
+
+ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
+CSRCS += stm32_idle.c
+endif
+
+ifeq ($(CONFIG_STM32F7_SDMMC2),y)
+CSRCS += meadow_sdmmc.c
+endif
+
+ifeq ($(CONFIG_MEADOW_HCOM),y)
+CSRCS += $(MEADOW_OS_DIR)/hcom_nx/hcom_nx_upd.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_startup_mgr.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_common_utils.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_bbreg_access.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_upd_route_cmd.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_config_manager.c \
+$(MEADOW_OS_DIR)/hcom_nx/commands/hcom_nx_ex_flash.c \
+$(MEADOW_OS_DIR)/hcom_nx/comms/hcom_nx_host_send.c \
+$(MEADOW_OS_DIR)/hcom_nx/create_fs/hcom_nx_fs.c \
+$(MEADOW_OS_DIR)/hcom_nx/create_fs/hcom_nx_fs_littlefs.c \
+$(MEADOW_OS_DIR)/hcom_nx/diag/hcom_nx_route_text_to_host.c \
+$(MEADOW_OS_DIR)/hcom_nx/diag/hcom_nx_trace_msg_proc.c \
+$(MEADOW_OS_DIR)/hcom_nx/tests/hcom_nx_qspi_flash_tests.c
+
+ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
+CSRCS += misc/meadow_idle_monitor.c
+endif
+
+ifeq ($(CONFIG_MEADOW_PWR_MGMT_SUPPORT),y)
+CSRCS += pwrmgmt/pwrmgmt_calib_lsi_clock.c \
+pwrmgmt/pwrmgmt_config_wakeup_timer.c \
+pwrmgmt/pwrmgmt_config_wakeup_alarm.c \
+pwrmgmt/pwrmgmt_control.c \
+pwrmgmt/pwrmgmt_enter_stop_mode.c \
+pwrmgmt/pwrmgmt_misc.c \
+pwrmgmt/pwrmgmt_switch_rtc_clock.c \
+pwrmgmt/pwrmgmt_time_support.c
+endif
+
+ifeq ($(CONFIG_MEADOW_TIMER_SUPPORT),y)
+CSRCS += timers/timer_manager.c \
+timers/cpu_measure.c \
+timers/pulse_width.c \
+timers/freq_duty.c \
+timers/rc_servo_decode.c \
+timers/lsi_clk_freq_measure.c
+endif
+
+CSRCS += $(MEADOW_OS_DIR)/ethernet/meadow_ethnet_start.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_utils.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_connect.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_monitor.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_dhcp.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_ping.c
+
+ifeq ($(CONFIG_MEADOW_ESPCP_MANAGER),y)
+CSRCS += $(MEADOW_OS_DIR)/espcp/espcp_thread.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_queue.c \
Review Comment:
align the code
##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/Makefile:
##########
@@ -57,4 +59,120 @@ else ifeq ($(CONFIG_STM32F7_OTGFSHS),y)
CSRCS += stm32_usb.c
endif
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += stm32_usbmsc.c
+endif
+
+ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
+CSRCS += stm32_idle.c
+endif
+
+ifeq ($(CONFIG_STM32F7_SDMMC2),y)
+CSRCS += meadow_sdmmc.c
+endif
+
+ifeq ($(CONFIG_MEADOW_HCOM),y)
+CSRCS += $(MEADOW_OS_DIR)/hcom_nx/hcom_nx_upd.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_startup_mgr.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_common_utils.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_bbreg_access.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_upd_route_cmd.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_config_manager.c \
+$(MEADOW_OS_DIR)/hcom_nx/commands/hcom_nx_ex_flash.c \
+$(MEADOW_OS_DIR)/hcom_nx/comms/hcom_nx_host_send.c \
+$(MEADOW_OS_DIR)/hcom_nx/create_fs/hcom_nx_fs.c \
+$(MEADOW_OS_DIR)/hcom_nx/create_fs/hcom_nx_fs_littlefs.c \
+$(MEADOW_OS_DIR)/hcom_nx/diag/hcom_nx_route_text_to_host.c \
+$(MEADOW_OS_DIR)/hcom_nx/diag/hcom_nx_trace_msg_proc.c \
+$(MEADOW_OS_DIR)/hcom_nx/tests/hcom_nx_qspi_flash_tests.c
+
+ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
+CSRCS += misc/meadow_idle_monitor.c
+endif
+
+ifeq ($(CONFIG_MEADOW_PWR_MGMT_SUPPORT),y)
+CSRCS += pwrmgmt/pwrmgmt_calib_lsi_clock.c \
+pwrmgmt/pwrmgmt_config_wakeup_timer.c \
+pwrmgmt/pwrmgmt_config_wakeup_alarm.c \
+pwrmgmt/pwrmgmt_control.c \
+pwrmgmt/pwrmgmt_enter_stop_mode.c \
+pwrmgmt/pwrmgmt_misc.c \
+pwrmgmt/pwrmgmt_switch_rtc_clock.c \
+pwrmgmt/pwrmgmt_time_support.c
+endif
+
+ifeq ($(CONFIG_MEADOW_TIMER_SUPPORT),y)
+CSRCS += timers/timer_manager.c \
+timers/cpu_measure.c \
+timers/pulse_width.c \
+timers/freq_duty.c \
+timers/rc_servo_decode.c \
+timers/lsi_clk_freq_measure.c
+endif
+
+CSRCS += $(MEADOW_OS_DIR)/ethernet/meadow_ethnet_start.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_utils.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_connect.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_monitor.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_dhcp.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_ping.c
+
+ifeq ($(CONFIG_MEADOW_ESPCP_MANAGER),y)
+CSRCS += $(MEADOW_OS_DIR)/espcp/espcp_thread.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_queue.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_encoders.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_message.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_message_dispatcher.c \
+ $(MEADOW_OS_DIR)/espcp/generic_list.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_coprocessor.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_wifi.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_system.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_common.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_usrsock_sockif.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_event_handlers.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_file_system.c
+endif
+
+CSRCS += $(MEADOW_OS_DIR)/kerneltests/espcp_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/ethernet_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/bg77_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/network_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/sdcard_tests.c \
Review Comment:
align the code
##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.c:
##########
@@ -168,14 +168,15 @@ void board_late_initialize(void)
* stm32_mpu_uheap((uintptr_t)0x90000000, 0x4000000);
*/
#endif
+#if defined(CONFIG_MEADOW_HCOM)
+ /* Initialize Meadow HCOM nuttx */
-#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL)
- /* Perform NSH initialization here instead of from the NSH. This
- * alternative NSH initialization is necessary when NSH is ran in
- * user-space but the initialization function must run in kernel space.
- */
-
- board_app_initialize();
Review Comment:
why remove board_app_initialize
##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/Makefile:
##########
@@ -57,4 +59,120 @@ else ifeq ($(CONFIG_STM32F7_OTGFSHS),y)
CSRCS += stm32_usb.c
endif
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += stm32_usbmsc.c
+endif
+
+ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
+CSRCS += stm32_idle.c
+endif
+
+ifeq ($(CONFIG_STM32F7_SDMMC2),y)
+CSRCS += meadow_sdmmc.c
+endif
+
+ifeq ($(CONFIG_MEADOW_HCOM),y)
+CSRCS += $(MEADOW_OS_DIR)/hcom_nx/hcom_nx_upd.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_startup_mgr.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_common_utils.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_bbreg_access.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_upd_route_cmd.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_config_manager.c \
+$(MEADOW_OS_DIR)/hcom_nx/commands/hcom_nx_ex_flash.c \
+$(MEADOW_OS_DIR)/hcom_nx/comms/hcom_nx_host_send.c \
+$(MEADOW_OS_DIR)/hcom_nx/create_fs/hcom_nx_fs.c \
+$(MEADOW_OS_DIR)/hcom_nx/create_fs/hcom_nx_fs_littlefs.c \
+$(MEADOW_OS_DIR)/hcom_nx/diag/hcom_nx_route_text_to_host.c \
+$(MEADOW_OS_DIR)/hcom_nx/diag/hcom_nx_trace_msg_proc.c \
+$(MEADOW_OS_DIR)/hcom_nx/tests/hcom_nx_qspi_flash_tests.c
+
+ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
+CSRCS += misc/meadow_idle_monitor.c
+endif
+
+ifeq ($(CONFIG_MEADOW_PWR_MGMT_SUPPORT),y)
+CSRCS += pwrmgmt/pwrmgmt_calib_lsi_clock.c \
+pwrmgmt/pwrmgmt_config_wakeup_timer.c \
+pwrmgmt/pwrmgmt_config_wakeup_alarm.c \
+pwrmgmt/pwrmgmt_control.c \
+pwrmgmt/pwrmgmt_enter_stop_mode.c \
+pwrmgmt/pwrmgmt_misc.c \
+pwrmgmt/pwrmgmt_switch_rtc_clock.c \
+pwrmgmt/pwrmgmt_time_support.c
+endif
+
+ifeq ($(CONFIG_MEADOW_TIMER_SUPPORT),y)
+CSRCS += timers/timer_manager.c \
+timers/cpu_measure.c \
+timers/pulse_width.c \
+timers/freq_duty.c \
+timers/rc_servo_decode.c \
+timers/lsi_clk_freq_measure.c
+endif
+
+CSRCS += $(MEADOW_OS_DIR)/ethernet/meadow_ethnet_start.c \
Review Comment:
look like that you move many userspace components to kernel, it isn't a good
design. @patacongo what do you thinking?
##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/Makefile:
##########
@@ -57,4 +59,120 @@ else ifeq ($(CONFIG_STM32F7_OTGFSHS),y)
CSRCS += stm32_usb.c
endif
+ifeq ($(CONFIG_USBMSC),y)
+CSRCS += stm32_usbmsc.c
+endif
+
+ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
+CSRCS += stm32_idle.c
+endif
+
+ifeq ($(CONFIG_STM32F7_SDMMC2),y)
+CSRCS += meadow_sdmmc.c
+endif
+
+ifeq ($(CONFIG_MEADOW_HCOM),y)
+CSRCS += $(MEADOW_OS_DIR)/hcom_nx/hcom_nx_upd.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_startup_mgr.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_common_utils.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_bbreg_access.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_upd_route_cmd.c \
+$(MEADOW_OS_DIR)/hcom_nx/hcom_nx_config_manager.c \
+$(MEADOW_OS_DIR)/hcom_nx/commands/hcom_nx_ex_flash.c \
+$(MEADOW_OS_DIR)/hcom_nx/comms/hcom_nx_host_send.c \
+$(MEADOW_OS_DIR)/hcom_nx/create_fs/hcom_nx_fs.c \
+$(MEADOW_OS_DIR)/hcom_nx/create_fs/hcom_nx_fs_littlefs.c \
+$(MEADOW_OS_DIR)/hcom_nx/diag/hcom_nx_route_text_to_host.c \
+$(MEADOW_OS_DIR)/hcom_nx/diag/hcom_nx_trace_msg_proc.c \
+$(MEADOW_OS_DIR)/hcom_nx/tests/hcom_nx_qspi_flash_tests.c
+
+ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y)
+CSRCS += misc/meadow_idle_monitor.c
+endif
+
+ifeq ($(CONFIG_MEADOW_PWR_MGMT_SUPPORT),y)
+CSRCS += pwrmgmt/pwrmgmt_calib_lsi_clock.c \
+pwrmgmt/pwrmgmt_config_wakeup_timer.c \
+pwrmgmt/pwrmgmt_config_wakeup_alarm.c \
+pwrmgmt/pwrmgmt_control.c \
+pwrmgmt/pwrmgmt_enter_stop_mode.c \
+pwrmgmt/pwrmgmt_misc.c \
+pwrmgmt/pwrmgmt_switch_rtc_clock.c \
+pwrmgmt/pwrmgmt_time_support.c
+endif
+
+ifeq ($(CONFIG_MEADOW_TIMER_SUPPORT),y)
+CSRCS += timers/timer_manager.c \
+timers/cpu_measure.c \
+timers/pulse_width.c \
+timers/freq_duty.c \
+timers/rc_servo_decode.c \
+timers/lsi_clk_freq_measure.c
+endif
+
+CSRCS += $(MEADOW_OS_DIR)/ethernet/meadow_ethnet_start.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_utils.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_connect.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_monitor.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_dhcp.c \
+$(MEADOW_OS_DIR)/ethernet/meadow_ethnet_ping.c
+
+ifeq ($(CONFIG_MEADOW_ESPCP_MANAGER),y)
+CSRCS += $(MEADOW_OS_DIR)/espcp/espcp_thread.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_queue.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_encoders.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_message.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_message_dispatcher.c \
+ $(MEADOW_OS_DIR)/espcp/generic_list.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_coprocessor.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_wifi.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_system.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_common.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_usrsock_sockif.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_event_handlers.c \
+ $(MEADOW_OS_DIR)/espcp/espcp_file_system.c
+endif
+
+CSRCS += $(MEADOW_OS_DIR)/kerneltests/espcp_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/ethernet_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/bg77_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/network_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/sdcard_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/power_management_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/iso8601_time_tests.c \
+ $(MEADOW_OS_DIR)/kerneltests/quick_misc_tests.c
+#
+# Add the NTP client.
+#
+CSRCS += $(MEADOW_OS_DIR)/ntpclient/ntpclient.c
$(MEADOW_OS_DIR)/misc/long_period_scheduler.c
+
+#
+# Add the Meadow logging system.
+#
+CSRCS += $(MEADOW_OS_DIR)/misc/meadow_logging.c
+
+
+#
+# The libyaml library is required by cyaml.
Review Comment:
why not move the library build to userspace?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]