Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎯 [libcpu/arm/cortex-a]修改arm/cortex-a启动方式,解决cortex-a开启SMP工作异常问题 #8517

Merged
merged 29 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 83 additions & 27 deletions bsp/phytium/aarch32/.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ CONFIG_RT_NAME_MAX=16
# CONFIG_RT_USING_SMART is not set
# CONFIG_RT_USING_NANO is not set
# CONFIG_RT_USING_AMP is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_CPUS_NR=1
CONFIG_RT_USING_SMP=y
CONFIG_RT_CPUS_NR=2
CONFIG_RT_ALIGN_SIZE=4
# CONFIG_RT_THREAD_PRIORITY_8 is not set
CONFIG_RT_THREAD_PRIORITY_32=y
Expand All @@ -26,6 +26,7 @@ CONFIG_RT_HOOK_USING_FUNC_PTR=y
CONFIG_RT_USING_IDLE_HOOK=y
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
CONFIG_IDLE_THREAD_STACK_SIZE=4096
CONFIG_SYSTEM_THREAD_STACK_SIZE=4096
CONFIG_RT_USING_TIMER_SOFT=y
CONFIG_RT_TIMER_THREAD_PRIO=4
CONFIG_RT_TIMER_THREAD_STACK_SIZE=4096
Expand All @@ -43,6 +44,7 @@ CONFIG_RT_DEBUGING_COLOR=y
CONFIG_RT_DEBUGING_CONTEXT=y
# CONFIG_RT_DEBUGING_AUTO_INIT is not set
# CONFIG_RT_DEBUGING_PAGE_LEAK is not set
# CONFIG_RT_DEBUGING_SPINLOCK is not set

#
# Inter-Thread communication
Expand Down Expand Up @@ -76,6 +78,7 @@ CONFIG_RT_USING_HEAP=y
CONFIG_RT_USING_DEVICE=y
# CONFIG_RT_USING_DEVICE_OPS is not set
# CONFIG_RT_USING_INTERRUPT_INFO is not set
# CONFIG_RT_USING_THREDSAFE_PRINTF is not set
CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE=256
CONFIG_RT_CONSOLE_DEVICE_NAME="uart1"
Expand Down Expand Up @@ -182,7 +185,7 @@ CONFIG_RT_USING_SERIAL_V1=y
CONFIG_RT_SERIAL_USING_DMA=y
CONFIG_RT_SERIAL_RB_BUFSZ=1024
CONFIG_RT_USING_CAN=y
# CONFIG_RT_CAN_USING_HDR is not set
CONFIG_RT_CAN_USING_HDR=y
CONFIG_RT_CAN_USING_CANFD=y
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CPUTIME is not set
Expand Down Expand Up @@ -436,6 +439,21 @@ CONFIG_RT_USING_ADT_REF=y
#
# CONFIG_PKG_USING_WLAN_WICED is not set
# CONFIG_PKG_USING_RW007 is not set

#
# CYW43012 WiFi
#
# CONFIG_PKG_USING_WLAN_CYW43012 is not set

#
# BL808 WiFi
#
# CONFIG_PKG_USING_WLAN_BL808 is not set

#
# CYW43439 WiFi
#
# CONFIG_PKG_USING_WLAN_CYW43439 is not set
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
Expand All @@ -457,7 +475,6 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_JIOT-C-SDK is not set
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
# CONFIG_PKG_USING_JOYLINK is not set
# CONFIG_PKG_USING_EZ_IOT_OS is not set
# CONFIG_PKG_USING_IOTSHARP_SDK is not set
# CONFIG_PKG_USING_NIMBLE is not set
# CONFIG_PKG_USING_LLSYNC_SDK_ADAPTER is not set
Expand All @@ -478,6 +495,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_NMEALIB is not set
# CONFIG_PKG_USING_PDULIB is not set
# CONFIG_PKG_USING_BTSTACK is not set
# CONFIG_PKG_USING_BT_CYW43012 is not set
# CONFIG_PKG_USING_LORAWAN_ED_STACK is not set
# CONFIG_PKG_USING_WAYZ_IOTKIT is not set
# CONFIG_PKG_USING_MAVLINK is not set
Expand All @@ -497,6 +515,8 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_ZFTP is not set
# CONFIG_PKG_USING_WOL is not set
# CONFIG_PKG_USING_ZEPHYR_POLLING is not set
# CONFIG_PKG_USING_MATTER_ADAPTATION_LAYER is not set
# CONFIG_PKG_USING_LHC_MODBUS is not set

#
# security packages
Expand Down Expand Up @@ -543,7 +563,6 @@ CONFIG_RT_USING_ADT_REF=y
# LVGL: powerful and easy-to-use embedded GUI library
#
# CONFIG_PKG_USING_LVGL is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_LV_MUSIC_DEMO is not set
# CONFIG_PKG_USING_GUI_GUIDER_DEMO is not set

Expand Down Expand Up @@ -619,6 +638,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_HASH_MATCH is not set
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
# CONFIG_PKG_USING_VOFA_PLUS is not set
# CONFIG_PKG_USING_ZDEBUG is not set

#
# system packages
Expand Down Expand Up @@ -655,6 +675,8 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_UC_COMMON is not set
# CONFIG_PKG_USING_UC_MODBUS is not set
# CONFIG_PKG_USING_FREERTOS_WRAPPER is not set
# CONFIG_PKG_USING_LITEOS_SDK is not set
# CONFIG_PKG_USING_TZ_DATABASE is not set
# CONFIG_PKG_USING_CAIRO is not set
# CONFIG_PKG_USING_PIXMAN is not set
# CONFIG_PKG_USING_PARTITION is not set
Expand All @@ -678,6 +700,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_QBOOT is not set
# CONFIG_PKG_USING_PPOOL is not set
# CONFIG_PKG_USING_OPENAMP is not set
# CONFIG_PKG_USING_RPMSG_LITE is not set
# CONFIG_PKG_USING_LPM is not set
# CONFIG_PKG_USING_TLSF is not set
# CONFIG_PKG_USING_EVENT_RECORDER is not set
Expand All @@ -691,6 +714,11 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_AGILE_UPGRADE is not set
# CONFIG_PKG_USING_FLASH_BLOB is not set
# CONFIG_PKG_USING_MLIBC is not set
# CONFIG_PKG_USING_TASK_MSG_BUS is not set
# CONFIG_PKG_USING_SFDB is not set
# CONFIG_PKG_USING_RTP is not set
# CONFIG_PKG_USING_REB is not set
# CONFIG_PKG_USING_R_RHEALSTONE is not set

#
# peripheral libraries and drivers
Expand Down Expand Up @@ -755,6 +783,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_BALANCE is not set
# CONFIG_PKG_USING_SHT2X is not set
# CONFIG_PKG_USING_SHT3X is not set
# CONFIG_PKG_USING_SHT4X is not set
# CONFIG_PKG_USING_AD7746 is not set
# CONFIG_PKG_USING_ADT74XX is not set
# CONFIG_PKG_USING_MAX17048 is not set
Expand Down Expand Up @@ -855,6 +884,11 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_FINGERPRINT is not set
# CONFIG_PKG_USING_BT_ECB02C is not set
# CONFIG_PKG_USING_UAT is not set
# CONFIG_PKG_USING_ST7789 is not set
# CONFIG_PKG_USING_VS1003 is not set
# CONFIG_PKG_USING_X9555 is not set
# CONFIG_PKG_USING_SYSTEM_RUN_LED is not set
# CONFIG_PKG_USING_PHYTIUM_SDK is not set
# CONFIG_PKG_USING_SPI_TOOLS is not set

#
Expand All @@ -869,6 +903,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_ULAPACK is not set
# CONFIG_PKG_USING_QUEST is not set
# CONFIG_PKG_USING_NAXOS is not set
# CONFIG_PKG_USING_R_TINYMAIX is not set

#
# Signal Processing and Control Algorithm Packages
Expand All @@ -878,6 +913,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_KISSFFT is not set
# CONFIG_PKG_USING_CMSIS_DSP is not set

#
# miscellaneous packages
Expand Down Expand Up @@ -915,6 +951,7 @@ CONFIG_RT_USING_ADT_REF=y
# CONFIG_PKG_USING_MINILZO is not set
# CONFIG_PKG_USING_QUICKLZ is not set
# CONFIG_PKG_USING_LZMA is not set
# CONFIG_PKG_USING_RALARAM is not set
# CONFIG_PKG_USING_MULTIBUTTON is not set
# CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set
# CONFIG_PKG_USING_CANFESTIVAL is not set
Expand Down Expand Up @@ -1099,6 +1136,7 @@ CONFIG_RT_USING_ADT_REF=y
#
# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_GFX_LIBRARY is not set
# CONFIG_PKG_USING_ARDUINO_U8G2 is not set
# CONFIG_PKG_USING_ARDUINO_TFT_ESPI is not set
# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ST7735 is not set
# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SSD1306 is not set
# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ILI9341 is not set
Expand All @@ -1107,6 +1145,7 @@ CONFIG_RT_USING_ADT_REF=y
#
# Timing
#
# CONFIG_PKG_USING_ARDUINO_RTCLIB is not set
# CONFIG_PKG_USING_ARDUINO_MSTIMER2 is not set
# CONFIG_PKG_USING_ARDUINO_TICKER is not set
# CONFIG_PKG_USING_ARDUINO_TASKSCHEDULER is not set
Expand Down Expand Up @@ -1143,7 +1182,6 @@ CONFIG_RT_USING_ADT_REF=y
#
# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MFRC630 is not set
# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SI5351 is not set
# CONFIG_PKG_USING_ARDUINO_RTCLIB is not set

#
# Signal IO
Expand Down Expand Up @@ -1176,28 +1214,35 @@ CONFIG_RT_USING_UART1=y
# CONFIG_RT_USING_UART2 is not set
# CONFIG_RT_USING_UART3 is not set
CONFIG_BSP_USING_SPI=y
CONFIG_RT_USING_SPIM0=y
# CONFIG_RT_USING_SPIM0 is not set
# CONFIG_RT_USING_SPIM1 is not set
# CONFIG_RT_USING_SPIM2 is not set
CONFIG_RT_USING_SPIM2=y
# CONFIG_RT_USING_SPIM3 is not set
# CONFIG_BSP_USING_CAN is not set
CONFIG_BSP_USING_CAN=y
CONFIG_RT_USING_CANFD=y
CONFIG_RT_USING_FILTER=y
CONFIG_RT_USING_CAN0=y
CONFIG_RT_USING_CAN1=y
CONFIG_BSP_USING_GPIO=y
# CONFIG_BSP_USING_QSPI is not set
CONFIG_BSP_USING_QSPI=y
CONFIG_RT_USING_QSPI0=y
CONFIG_USING_QSPI_CHANNEL0=y
# CONFIG_USING_QSPI_CHANNEL1 is not set
CONFIG_BSP_USING_ETH=y
CONFIG_RT_LWIP_PBUF_POOL_BUFSIZE=1700
CONFIG_BSP_USING_PWM=y
# CONFIG_RT_USING_PWM0 is not set
# CONFIG_RT_USING_PWM1 is not set
CONFIG_RT_USING_PWM2=y
# CONFIG_RT_USING_PWM2 is not set
# CONFIG_RT_USING_PWM3 is not set
# CONFIG_RT_USING_PWM4 is not set
# CONFIG_RT_USING_PWM5 is not set
# CONFIG_RT_USING_PWM6 is not set
CONFIG_RT_USING_PWM6=y
# CONFIG_RT_USING_PWM7 is not set
CONFIG_BSP_USING_I2C=y
CONFIG_I2C_USE_MIO=y
CONFIG_RT_USING_MIO0=y
CONFIG_RT_USING_MIO1=y
# CONFIG_RT_USING_MIO0 is not set
# CONFIG_RT_USING_MIO1 is not set
# CONFIG_RT_USING_MIO2 is not set
# CONFIG_RT_USING_MIO3 is not set
# CONFIG_RT_USING_MIO4 is not set
Expand All @@ -1211,9 +1256,18 @@ CONFIG_RT_USING_MIO1=y
# CONFIG_RT_USING_MIO12 is not set
# CONFIG_RT_USING_MIO13 is not set
# CONFIG_RT_USING_MIO14 is not set
# CONFIG_RT_USING_MIO15 is not set
# CONFIG_I2C_USE_CONTROLLER is not set
# CONFIG_BSP_USING_SDIF is not set
CONFIG_RT_USING_MIO15=y
CONFIG_I2C_USE_CONTROLLER=y
CONFIG_RT_USING_I2C0=y
# CONFIG_RT_USING_I2C1 is not set
# CONFIG_RT_USING_I2C2 is not set
# CONFIG_RT_USING_I2C3 is not set
CONFIG_BSP_USING_SDIF=y
CONFIG_BSP_USING_SDCARD_FATFS=y
CONFIG_BSP_USING_SDCARD_PARTITION="sd0"
# CONFIG_USING_SDIF0 is not set
CONFIG_USING_SDIF1=y
# CONFIG_USING_EMMC is not set
CONFIG_BSP_USING_DC=y
# CONFIG_RT_USING_DC_CHANNEL0 is not set
CONFIG_RT_USING_DC_CHANNEL1=y
Expand All @@ -1234,14 +1288,15 @@ CONFIG_USE_AARCH64_L1_TO_AARCH32=y
#
# Soc configuration
#
CONFIG_TARGET_PHYTIUMPI=y
# CONFIG_TARGET_PHYTIUMPI is not set
# CONFIG_TARGET_E2000Q is not set
# CONFIG_TARGET_E2000D is not set
CONFIG_TARGET_E2000D=y
# CONFIG_TARGET_E2000S is not set
# CONFIG_TARGET_FT2004 is not set
# CONFIG_TARGET_D2000 is not set
CONFIG_SOC_NAME="phytiumpi"
CONFIG_SOC_CORE_NUM=4
CONFIG_SOC_NAME="e2000"
CONFIG_TARGET_TYPE_NAME="d"
CONFIG_SOC_CORE_NUM=2
CONFIG_F32BIT_MEMORY_ADDRESS=0x80000000
CONFIG_F32BIT_MEMORY_LENGTH=0x80000000
CONFIG_F64BIT_MEMORY_ADDRESS=0x2000000000
Expand All @@ -1255,21 +1310,22 @@ CONFIG_DEFAULT_DEBUG_PRINT_UART1=y
#
# Board Configuration
#
CONFIG_BOARD_NAME="firefly"
CONFIG_E2000D_DEMO_BOARD=y
CONFIG_BOARD_NAME="demo"

#
# IO mux configuration when board start up
#
# CONFIG_USE_SPI_IOPAD is not set
# CONFIG_USE_GPIO_IOPAD is not set
# CONFIG_USE_CAN_IOPAD is not set
# CONFIG_USE_QSPI_IOPAD is not set
# CONFIG_USE_PWM_IOPAD is not set
# CONFIG_USE_ADC_IOPAD is not set
# CONFIG_USE_MIO_IOPAD is not set
# CONFIG_USE_TACHO_IOPAD is not set
# CONFIG_USE_UART_IOPAD is not set
# CONFIG_USE_THIRD_PARTY_IOPAD is not set
CONFIG_FIREFLY_DEMO_BOARD=y

#
# IO mux configuration when board start up
#
# CONFIG_CUS_DEMO_BOARD is not set

#
Expand Down
4 changes: 2 additions & 2 deletions bsp/phytium/aarch32/applications/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static void demo_core_thread(void *parameter)
level = rt_cpus_lock();
rt_kprintf("Hi, core%d \r\n", rt_hw_cpu_id());
rt_cpus_unlock(level);
rt_thread_mdelay(2000000);
rt_thread_mdelay(200000);
}
}

Expand Down Expand Up @@ -87,7 +87,7 @@ void demo_core(void)
int main(void)
{
#ifdef RT_USING_SMP
// demo_core();
demo_core();
#endif
return RT_EOK;
}
Expand Down
Loading
Loading