From d31c05a44c75a0b60b9e10f23bfeab35ef152719 Mon Sep 17 00:00:00 2001 From: Rbb666 Date: Mon, 4 Mar 2024 15:20:36 +0800 Subject: [PATCH] [tools]Fix project compilation errors generated by mdk and iar --- bsp/phytium/aarch64/.config | 68 ++++++++++++++++++++++++++-------- bsp/phytium/aarch64/rtconfig.h | 12 +++++- include/rtsched.h | 2 +- tools/iar.py | 8 ++++ tools/keil.py | 2 +- 5 files changed, 73 insertions(+), 19 deletions(-) diff --git a/bsp/phytium/aarch64/.config b/bsp/phytium/aarch64/.config index e36b170abe..241c9666d0 100644 --- a/bsp/phytium/aarch64/.config +++ b/bsp/phytium/aarch64/.config @@ -78,6 +78,8 @@ 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_THREADSAFE_PRINTF is not set +CONFIG_RT_USING_SCHED_THREAD_CTX=y CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=128 CONFIG_RT_CONSOLE_DEVICE_NAME="uart1" @@ -190,7 +192,6 @@ CONFIG_RT_SERIAL_RB_BUFSZ=64 CONFIG_RT_USING_CAN=y 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 CONFIG_RT_USING_I2C=y # CONFIG_RT_I2C_DEBUG is not set @@ -198,7 +199,6 @@ CONFIG_RT_USING_I2C_BITOPS=y # CONFIG_RT_I2C_BITOPS_DEBUG is not set # CONFIG_RT_USING_SOFT_I2C is not set # CONFIG_RT_USING_PHY is not set -CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_ADC is not set # CONFIG_RT_USING_DAC is not set CONFIG_RT_USING_NULL=y @@ -236,7 +236,9 @@ CONFIG_RT_USING_QSPI=y CONFIG_RT_USING_DEV_BUS=y # CONFIG_RT_USING_WIFI is not set # CONFIG_RT_USING_VIRTIO is not set +CONFIG_RT_USING_PIN=y CONFIG_RT_USING_KTIME=y +# CONFIG_RT_USING_HWTIMER is not set # # Using USB @@ -439,6 +441,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 @@ -460,7 +477,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 @@ -481,6 +497,8 @@ 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_CYW43XX 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 @@ -500,6 +518,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 @@ -546,7 +566,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 @@ -621,6 +640,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 @@ -657,6 +677,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 @@ -680,6 +702,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 @@ -693,6 +716,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 @@ -757,6 +785,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 @@ -857,6 +886,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_BT_MX01 is not set # CONFIG_PKG_USING_SPI_TOOLS is not set # @@ -872,6 +906,7 @@ CONFIG_RT_USING_ADT_REF=y # CONFIG_PKG_USING_QUEST is not set # CONFIG_PKG_USING_NAXOS is not set # CONFIG_PKG_USING_NCNN is not set +# CONFIG_PKG_USING_R_TINYMAIX is not set # # Signal Processing and Control Algorithm Packages @@ -942,6 +977,7 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=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 @@ -978,7 +1014,9 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=y # Projects and Demos # # CONFIG_PKG_USING_ARDUINO_MSGQ_C_CPP_DEMO is not set +# CONFIG_PKG_USING_ARDUINO_SKETCH_LOADER_DEMO is not set # CONFIG_PKG_USING_ARDUINO_ULTRASOUND_RADAR is not set +# CONFIG_PKG_USING_ARDUINO_NINEINONE_SENSOR_SHIELD is not set # CONFIG_PKG_USING_ARDUINO_SENSOR_KIT is not set # CONFIG_PKG_USING_ARDUINO_MATLAB_SUPPORT is not set @@ -986,13 +1024,13 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=y # Sensors # # CONFIG_PKG_USING_ARDUINO_SENSOR_DEVICE_DRIVERS is not set -# CONFIG_PKG_USING_ARDUINO_CAPACITIVESENSOR is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSOR is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSORLAB is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_ADXL375 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL53L0X is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL53L1X is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSOR is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_VL6180X is not set -# CONFIG_PKG_USING_ADAFRUIT_MAX31855 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31855 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31865 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX31856 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MAX6675 is not set @@ -1037,7 +1075,7 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=y # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_LIS3MDL is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MLX90640 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MMA8451 is not set -# CONFIG_PKG_USING_ADAFRUIT_MSA301 is not set +# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MSA301 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_MPL115A2 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO08X is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_BNO08X_RVC is not set @@ -1076,7 +1114,6 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=y # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HTU21DF is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_AS7341 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_HTU31D is not set -# CONFIG_PKG_USING_ARDUINO_ADAFRUIT_SENSORLAB is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_INA260 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TMP007_LIBRARY is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_L3GD20 is not set @@ -1099,7 +1136,7 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=y # CONFIG_PKG_USING_ARDUINO_SEEED_TSL2561 is not set # CONFIG_PKG_USING_ARDUINO_SEEED_PAJ7620 is not set # CONFIG_PKG_USING_ARDUINO_SEEED_VL53L0X is not set -# CONFIG_PKG_USING_SEEED_ITG3200 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_ITG3200 is not set # CONFIG_PKG_USING_ARDUINO_SEEED_SHT31 is not set # CONFIG_PKG_USING_ARDUINO_SEEED_HP20X is not set # CONFIG_PKG_USING_ARDUINO_SEEED_DRV2605L is not set @@ -1107,7 +1144,7 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=y # CONFIG_PKG_USING_ARDUINO_SEEED_HMC5883L is not set # CONFIG_PKG_USING_ARDUINO_SEEED_LSM303DLH is not set # CONFIG_PKG_USING_ARDUINO_SEEED_TCS3414CS is not set -# CONFIG_PKG_USING_SEEED_MP503 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_MP503 is not set # CONFIG_PKG_USING_ARDUINO_SEEED_BMP085 is not set # CONFIG_PKG_USING_ARDUINO_SEEED_HIGHTEMP is not set # CONFIG_PKG_USING_ARDUINO_SEEED_VEML6070 is not set @@ -1120,12 +1157,14 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=y # CONFIG_PKG_USING_ARDUINO_SEEED_MCP9600 is not set # CONFIG_PKG_USING_ARDUINO_SEEED_LTC2941 is not set # CONFIG_PKG_USING_ARDUINO_SEEED_LDC1612 is not set +# CONFIG_PKG_USING_ARDUINO_CAPACITIVESENSOR is not set # # Display # # 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 @@ -1134,6 +1173,7 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=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 @@ -1159,18 +1199,17 @@ CONFIG_PKG_USING_KERNEL_SAMPLES_EN=y # # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCF8574 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_PCA9685 is not set -# CONFIG_PKG_USING_ARDUINO_SEEED_PCF85063TP is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_TPA2016 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DRV2605 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS1841 is not set # CONFIG_PKG_USING_ARDUINO_ADAFRUIT_DS3502 is not set +# CONFIG_PKG_USING_ARDUINO_SEEED_PCF85063TP is not set # # Other # # 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 @@ -1248,9 +1287,6 @@ CONFIG_I2C_USE_MIO=y CONFIG_RT_USING_MIO15=y # CONFIG_I2C_USE_CONTROLLER is not set # CONFIG_BSP_USING_SDIF is not set -# CONFIG_USING_SDIF0 is not set -# CONFIG_USING_SDIF1 is not set -# 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 diff --git a/bsp/phytium/aarch64/rtconfig.h b/bsp/phytium/aarch64/rtconfig.h index cef904bfe4..28e4797cf6 100644 --- a/bsp/phytium/aarch64/rtconfig.h +++ b/bsp/phytium/aarch64/rtconfig.h @@ -50,6 +50,7 @@ #define RT_USING_HEAP_ISR #define RT_USING_HEAP #define RT_USING_DEVICE +#define RT_USING_SCHED_THREAD_CTX #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 128 #define RT_CONSOLE_DEVICE_NAME "uart1" @@ -136,7 +137,6 @@ #define RT_CAN_USING_CANFD #define RT_USING_I2C #define RT_USING_I2C_BITOPS -#define RT_USING_PIN #define RT_USING_NULL #define RT_USING_ZERO #define RT_USING_RANDOM @@ -151,6 +151,7 @@ #define RT_USING_SPI #define RT_USING_QSPI #define RT_USING_DEV_BUS +#define RT_USING_PIN #define RT_USING_KTIME /* Using USB */ @@ -270,6 +271,15 @@ /* Wiced WiFi */ +/* CYW43012 WiFi */ + + +/* BL808 WiFi */ + + +/* CYW43439 WiFi */ + + /* IoT Cloud */ diff --git a/include/rtsched.h b/include/rtsched.h index cb312e320f..809d03fb4e 100644 --- a/include/rtsched.h +++ b/include/rtsched.h @@ -99,7 +99,7 @@ struct rt_sched_thread_ctx rt_tick_t remaining_tick; /**< remaining tick */ \ rt_uint8_t current_priority; /**< current priority */ \ rt_uint8_t init_priority; /**< initialized priority */ \ - _RT_SCHED_THREAD_CTX_PRIO_EXT; \ + _RT_SCHED_THREAD_CTX_PRIO_EXT \ rt_uint32_t number_mask; /**< priority number mask */ #define RT_SCHED_PRIV(thread) (*thread) diff --git a/tools/iar.py b/tools/iar.py index fc2bc44f91..56c4cb487f 100644 --- a/tools/iar.py +++ b/tools/iar.py @@ -87,6 +87,7 @@ def IARProject(target, script): CPPPATH = [] CPPDEFINES = [] + LOCAL_CPPDEFINES = [] LINKFLAGS = '' CFLAGS = '' Libs = [] @@ -115,6 +116,9 @@ def IARProject(target, script): if 'CPPDEFINES' in group and group['CPPDEFINES']: CPPDEFINES += group['CPPDEFINES'] + if 'LOCAL_CPPDEFINES' in group and group['LOCAL_CPPDEFINES']: + LOCAL_CPPDEFINES += group['LOCAL_CPPDEFINES'] + # get each group's link flags if 'LINKFLAGS' in group and group['LINKFLAGS']: LINKFLAGS += group['LINKFLAGS'] @@ -154,6 +158,10 @@ def IARProject(target, script): state = SubElement(option, 'state') state.text = define + for define in LOCAL_CPPDEFINES: + state = SubElement(option, 'state') + state.text = define + if name.text == 'IlinkAdditionalLibs': for path in Libs: state = SubElement(option, 'state') diff --git a/tools/keil.py b/tools/keil.py index b4c5e03388..2c9f239f1e 100644 --- a/tools/keil.py +++ b/tools/keil.py @@ -186,7 +186,7 @@ def MDK4AddGroup(ProjectFiles, parent, name, files, project_path, group_scons): MiscControls_text = MiscControls_text + group_scons['LOCAL_CXXFLAGS'] if 'LOCAL_CCFLAGS' in group_scons: MiscControls_text = MiscControls_text + group_scons['LOCAL_CCFLAGS'] - if MiscControls_text != ' ': + if MiscControls_text != ' ' or ('LOCAL_CPPDEFINES' in group_scons): FileOption = SubElement(file, 'FileOption') FileArmAds = SubElement(FileOption, 'FileArmAds') Cads = SubElement(FileArmAds, 'Cads')