mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
S60 Support (#1692)
* Mock S60 * cleanup * Start refactor of OLED init * Setup timers roughly * Set Vector table offset correctly Update system_stm32f1xx.c * Update OLED.cpp * Update stm32f1xx_hal_msp.c * Update configuration.h * I2C init before GPIO From Errata Update stm32f1xx_hal_msp.c Update Software_I2C.h Allow no hardware I2C * I2C BB run bus unlock at init * cleanups * Software I2C for now * Mildly more graceful Interpolate * Handle is powered by DC Update Power.cpp Update drawPowerSourceIcon.cpp Update configuration.h Update Setup.cpp * Cleanup HomeScreen * Segment remap oled at init * Cleanup * Update MOVThread.cpp * Fix PWM Init * Fix adc2 trigger * Update configs * Fixup warning * Saner default config * Update ThermoModel.cpp * Util for current@voltage * Hub238 warning * Add hub238 handling in power mode * Update USBPDDebug_FUSB.cpp * HUSB238 debug * Hook PSU Limit * Use wrapping section of GRAM for scroll Update OLED.hpp * Update NTC table * Fix HUB voltage picker * Cleanup * Larger tip filter * Calibrate in a bunch closer Update ThermoModel.cpp * Update configuration.h * Update HUB238.cpp * Update configuration.h * Movement Pin * Update BSP.cpp * tim2 irq * Rough timer conversion (adc broken) but movement working * Fix tim2 start * Faster base PWM * Ensure utils grabs config * Add wattage limiter tolerance for device * Speed up PWM and enable PWM current limiting * tune for 12v * Prevent start until PD done * Update configuration.h * Add HUB238 check for have re-negotiated * Adjust timer to avoid noise when its possible
This commit is contained in:
@@ -6,7 +6,8 @@ ALL_MINIWARE_MODELS=TS100 TS80 TS80P
|
||||
ALL_PINECIL_MODELS=Pinecil
|
||||
ALL_PINECIL_V2_MODELS=Pinecilv2
|
||||
ALL_MHP30_MODELS=MHP30
|
||||
ALL_MODELS=$(ALL_MINIWARE_MODELS) $(ALL_PINECIL_MODELS) $(ALL_MHP30_MODELS) $(ALL_PINECIL_V2_MODELS)
|
||||
ALL_SEQURE_MODELS=S60
|
||||
ALL_MODELS=$(ALL_MINIWARE_MODELS) $(ALL_PINECIL_MODELS) $(ALL_MHP30_MODELS) $(ALL_PINECIL_V2_MODELS) $(ALL_SEQURE_MODELS)
|
||||
ifneq ($(model),$(filter $(model),$(ALL_MODELS)))
|
||||
$(error Invalid model '$(model)', valid options are: $(ALL_MODELS))
|
||||
endif
|
||||
@@ -57,6 +58,14 @@ MINIWARE_STARTUP_DIR = ./Startup
|
||||
MINIWARE_INC_DIR = ./Core/BSP/Miniware
|
||||
MINIWARE_LD_FILE = ./Core/BSP/Miniware/stm32f103.ld
|
||||
|
||||
S60_INC_CMSIS_DEVICE = ./Core/BSP/Sequre_S60/Vendor/CMSIS/Device/ST/STM32F1xx/Include
|
||||
S60_CMSIS_CORE_INC_DIR = ./Core/BSP/Sequre_S60/Vendor/CMSIS/Include
|
||||
S60_HAL_INC_DIR = ./Core/BSP/Sequre_S60/Vendor/STM32F1xx_HAL_Driver/Inc
|
||||
S60_HAL_LEGACY_INC_DIR = ./Core/BSP/Sequre_S60/Vendor/STM32F1xx_HAL_Driver/Inc/Legacy
|
||||
S60_STARTUP_DIR = ./Startup
|
||||
S60_INC_DIR = ./Core/BSP/Sequre_S60
|
||||
S60_LD_FILE = ./Core/BSP/Sequre_S60/stm32f103.ld
|
||||
|
||||
MHP30_INC_CMSIS_DEVICE = ./Core/BSP/MHP30/Vendor/CMSIS/Device/ST/STM32F1xx/Include
|
||||
MHP30_CMSIS_CORE_INC_DIR = ./Core/BSP/MHP30/Vendor/CMSIS/Include
|
||||
MHP30_HAL_INC_DIR = ./Core/BSP/MHP30/Vendor/STM32F1xx_HAL_Driver/Inc
|
||||
@@ -190,6 +199,31 @@ bootldr_size=0x4000
|
||||
DEVICE_DFU_ADDRESS=0x08004000
|
||||
DEVICE_DFU_VID_PID=0x1209:0xDB42
|
||||
endif
|
||||
ifeq ($(model),$(filter $(model),$(ALL_SEQURE_MODELS)))
|
||||
$(info Building for Sequre )
|
||||
DEVICE_INCLUDES = -I$(S60_INC_DIR) \
|
||||
-I$(S60_INC_CMSIS_DEVICE)\
|
||||
-I$(S60_CMSIS_CORE_INC_DIR) \
|
||||
-I$(S60_HAL_INC_DIR) \
|
||||
-I$(S60_HAL_LEGACY_INC_DIR)
|
||||
DEVICE_BSP_DIR = ./Core/BSP/Sequre_S60
|
||||
S_SRCS := $(shell find $(S60_STARTUP_DIR) -type f -name '*.S')
|
||||
LDSCRIPT=$(S60_LD_FILE)
|
||||
DEV_GLOBAL_DEFS= -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32F103xB -D USE_RTOS_SYSTICK -D GCC_ARMCM3 \
|
||||
-D ARM_MATH_CM3 \
|
||||
-D STM32F10X_MD -finline-limit=9999999
|
||||
DEV_LDFLAGS= -Wl,--wrap=printf -Wl,--no-wchar-size-warning
|
||||
DEV_AFLAGS=
|
||||
DEV_CFLAGS= -D VECT_TAB_OFFSET=$(bootldr_size)U
|
||||
DEV_CXXFLAGS=
|
||||
CPUFLAGS= -mcpu=cortex-m3 \
|
||||
-mthumb \
|
||||
-mfloat-abi=soft
|
||||
flash_size=62k
|
||||
bootldr_size=0x4400
|
||||
DEVICE_DFU_ADDRESS=0x08004400
|
||||
DEVICE_DFU_VID_PID=0x1209:0xDB42
|
||||
endif
|
||||
|
||||
ifeq ($(model),$(filter $(model),$(ALL_MHP30_MODELS)))
|
||||
$(info Building for MHP30 )
|
||||
@@ -422,9 +456,13 @@ COMPILER=gcc
|
||||
ifeq ($(model),$(filter $(model),$(ALL_MINIWARE_MODELS) $(ALL_MHP30_MODELS)))
|
||||
COMPILER_PREFIX=arm-none-eabi
|
||||
endif
|
||||
ifeq ($(model),$(filter $(model),$(ALL_SEQURE_MODELS) ))
|
||||
COMPILER_PREFIX=arm-none-eabi
|
||||
endif
|
||||
ifeq ($(model),$(filter $(model),$(ALL_PINECIL_MODELS) $(ALL_PINECIL_V2_MODELS)))
|
||||
COMPILER_PREFIX=riscv-none-elf
|
||||
endif
|
||||
|
||||
# programs ---------------------------------------------------------------------
|
||||
CC=$(COMPILER_PREFIX)-gcc
|
||||
CPP=$(COMPILER_PREFIX)-g++
|
||||
|
||||
Reference in New Issue
Block a user