mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Pinecil V2 (#1341)
* Add SDK * fork * massaging makefile * Drop git module * Bring in sdk as its broken Far, Far to much crap to fix with regex now * Remove bl706 * rf_para_flash_t is missing defs * Remove crapton of junk * Remove yet more * Poking I2C * Update peripheral_config.h * Update pinmux_config.h * Update preRTOS.cpp * Update main.hpp * Setup template * Verbose boot * I2C ish * Update I2C_Wrapper.cpp * Update main.cpp * Turn off I2C reading for now * Display running * Roughing out scheduling timer0 * Starting ADC setup * Working scheduling of ADC 🎉 * Format adc headers * Update IRQ.cpp * Buttons working * Slow down I2C * Poking IRQ * Larger stack required * Accel on * Trying to chase down why __libc_init_array isnt working yet * Working c++ * Cleanup * Bump stacks * I2C wake part workaround * Cleanup * Working PWM init * qc draft * Hookup PWM * Stable enough ADC * ADC timing faster + timer without HAL * Silence * Remove boot banner * Tuning in ADC * Wake PID after ADC * Remove unused hal * Draft flash settings * Working settings save & restore * Update to prod model * Cleanup * NTC thermistor * Correct adc gain * Rough tip resistance progress * Scratch out resistance awareness of the tip * better adc settings * Tweaking ADC * ADC tweaking * Make adc range scalable * Update Dockerfile * Update configuration.h * Can read same ADC twice in a row * ADC Setup * Update PIDThread.cpp * Lesser adc backoff * Update USBPD.h * Add device ID * Update BSP_Power.h * Update BSP.cpp * DrawHex dynamicLength * Shorter ID padding * Show validation code * tip measurement * Create access for w0w1 * Expose w0 w1 * Enable debug * crc32 * Device validation * wip starting epr * Logic refactor * Safer PWM Init * PD cleanups * Update bl702_pwm.c * Update power.cpp * Update usb-pd * io * EPR decode * Better gui for showing pd specs * Rough handler for capabilities * EPR * Fix > 25V input * Perform pow step after PPS * Update BSP.cpp * Fix timer output * QC3 * Add tip resistance view * Hold PD negotiation until detection is done for tip res * Get Thermal mass * Tip res =0 protection * Update PIDThread.cpp * Update GUIThread.cpp * Rewrite tip resistance measurement * Update GUIThread.cpp * Fix fallback * Far better tip resistance measurement * Fix QC 0.6V D- * Convert the interpolator to int32 * Correct the NTC lookup * Update BSP.cpp * Update Setup.cpp * . Update configuration #defines More backported functions * Update usb-pd * More missed updates * Refactor BSP Magic BSP -> PinecilV2 Pine64 BSP -> Pinecil Update Makefile * Add Pinecilv2 to CI * Pinecil v2 multi-lang Update push.yml * Update HallSensor.md * Update README.md * Fix wrong prestartcheck default * Fix logo mapping * Update Makefile * Remove unused font block * Style * Style * Remove unused timer funcs * More culling TS80P * Revert "More culling TS80P" This reverts commit2078b89be7. * Revert "Remove unused timer funcs" This reverts commit0c693a89cc. * Make VBus check maskable * Remove DMA half transfer * Drop using brightness and invert icons and go back to text Saves flash space * Refactor settings UI drawing descriptions * Shorten setting function names * Store bin file assets * Fix MHP prestart
This commit is contained in:
178
source/Makefile
178
source/Makefile
@@ -3,9 +3,10 @@ model:=Pinecil
|
||||
endif
|
||||
|
||||
ALL_MINIWARE_MODELS=TS100 TS80 TS80P
|
||||
ALL_PINE_MODELS=Pinecil
|
||||
ALL_PINECIL_MODELS=Pinecil
|
||||
ALL_PINECIL_V2_MODELS=Pinecilv2
|
||||
ALL_MHP30_MODELS=MHP30
|
||||
ALL_MODELS=$(ALL_MINIWARE_MODELS) $(ALL_PINE_MODELS) $(ALL_MHP30_MODELS)
|
||||
ALL_MODELS=$(ALL_MINIWARE_MODELS) $(ALL_PINECIL_MODELS) $(ALL_MHP30_MODELS) $(ALL_PINECIL_V2_MODELS)
|
||||
ifneq ($(model),$(filter $(model),$(ALL_MODELS)))
|
||||
$(error Invalid model '$(model)', valid options are: $(ALL_MODELS))
|
||||
endif
|
||||
@@ -64,11 +65,58 @@ MHP30_STARTUP_DIR = ./Startup
|
||||
MHP30_INC_DIR = ./Core/BSP/MHP30
|
||||
MHP30_LD_FILE = ./Core/BSP/MHP30/stm32f103.ld
|
||||
|
||||
PINE_INC_DIR = ./Core/BSP/Pine64
|
||||
PINE_VENDOR_INC_DIR = ./Core/BSP/Pine64/Vendor/SoC/gd32vf103/Common/Include
|
||||
PINE_VENDOR_USB_INC_DIR = ./Core/BSP/Pine64/Vendor/SoC/gd32vf103/Common/Include/Usb
|
||||
PINE_NMSIS_INC_DIR = ./Core/BSP/Pine64/Vendor/NMSIS/Core/Include
|
||||
PINE_FREERTOS_PORT_INC_DIR = ./Core/BSP/Pine64/Vendor/OS/FreeRTOS/Source/portable/GCC
|
||||
PINE_INC_DIR = ./Core/BSP/Pinecil
|
||||
PINE_VENDOR_INC_DIR = ./Core/BSP/Pinecil/Vendor/SoC/gd32vf103/Common/Include
|
||||
PINE_VENDOR_USB_INC_DIR = ./Core/BSP/Pinecil/Vendor/SoC/gd32vf103/Common/Include/Usb
|
||||
PINE_NMSIS_INC_DIR = ./Core/BSP/Pinecil/Vendor/NMSIS/Core/Include
|
||||
PINE_FREERTOS_PORT_INC_DIR = ./Core/BSP/Pinecil/Vendor/OS/FreeRTOS/Source/portable/GCC
|
||||
|
||||
PINECILV2_DIR = ./Core/BSP/Pinecilv2
|
||||
PINECILV2_SDK_DIR = $(PINECILV2_DIR)/bl_mcu_sdk
|
||||
|
||||
PINECILV2_VENDOR_BSP_DIR = $(PINECILV2_SDK_DIR)/bsp
|
||||
PINECILV2_VENDOR_BSP_COMMON_DIR = $(PINECILV2_VENDOR_BSP_DIR)/bsp_common
|
||||
PINECILV2_VENDOR_BSP_BOARD_DIR = $(PINECILV2_VENDOR_BSP_DIR)/board
|
||||
PINECILV2_VENDOR_BSP_PLATFORM_DIR = $(PINECILV2_VENDOR_BSP_COMMON_DIR)/platform
|
||||
PINECILV2_VENDOR_BSP_USB_DIR = $(PINECILV2_VENDOR_BSP_COMMON_DIR)/usb
|
||||
|
||||
|
||||
PINECILV2_COMMON_DIR = $(PINECILV2_SDK_DIR)/common
|
||||
PINECILV2_COMMON_BL_MATH_DIR = $(PINECILV2_COMMON_DIR)/bl_math
|
||||
PINECILV2_COMMON_DEVICE_DIR = $(PINECILV2_COMMON_DIR)/device
|
||||
PINECILV2_COMMON_LIST_DIR = $(PINECILV2_COMMON_DIR)/list
|
||||
PINECILV2_COMMON_MISC_DIR = $(PINECILV2_COMMON_DIR)/misc
|
||||
PINECILV2_COMMON_PARTITION_DIR = $(PINECILV2_COMMON_DIR)/partition
|
||||
PINECILV2_COMMON_PID_DIR = $(PINECILV2_COMMON_DIR)/pid
|
||||
PINECILV2_COMMON_RING_BUFFERDIR = $(PINECILV2_COMMON_DIR)/ring_buffer
|
||||
PINECILV2_COMMON_SOFT_CRC_DIR = $(PINECILV2_COMMON_DIR)/soft_crc
|
||||
PINECILV2_COMMON_TIMESTAMP_DIR = $(PINECILV2_COMMON_DIR)/timestamp
|
||||
PINECILV2_COMPONENTS_DIR = $(PINECILV2_SDK_DIR)/components
|
||||
|
||||
|
||||
PINECILV2_COMPONENTS_FREERTOS_DIR = $(PINECILV2_COMPONENTS_DIR)/freertos
|
||||
PINECILV2_COMPONENTS_FREERTOS_BL602_DIR = $(PINECILV2_COMPONENTS_FREERTOS_DIR)/portable/gcc/risc-v/bl702
|
||||
|
||||
|
||||
PINECILV2_COMPONENTS_NMSIS_DIR = $(PINECILV2_COMPONENTS_DIR)/nmsis
|
||||
PINECILV2_COMPONENTS_NMSIS_CORE_INC_DIR = $(PINECILV2_COMPONENTS_NMSIS_DIR)/core/inc
|
||||
|
||||
PINECILV2_COMPONENTS_USB_STACK_DIR = $(PINECILV2_COMPONENTS_DIR)/usb_stack
|
||||
PINECILV2_COMPONENTS_USB_STACK_COMMON_DIR = $(PINECILV2_COMPONENTS_USB_STACK_DIR)/common
|
||||
PINECILV2_COMPONENTS_USB_STACK_CORE_DIR = $(PINECILV2_COMPONENTS_USB_STACK_DIR)/core
|
||||
PINECILV2_COMPONENTS_USB_STACK_CDC_DIR = $(PINECILV2_COMPONENTS_USB_STACK_DIR)/class/cdc
|
||||
PINECILV2_COMPONENTS_USB_STACK_WINUSB_DIR = $(PINECILV2_COMPONENTS_USB_STACK_DIR)/class/winusb
|
||||
|
||||
PINECILV2_DRIVERS_DIR = $(PINECILV2_SDK_DIR)/drivers/bl702_driver
|
||||
PINECILV2_DRIVERS_HAL_DRV_INC_DIR = $(PINECILV2_DRIVERS_DIR)/hal_drv/inc
|
||||
PINECILV2_DRIVERS_HAL_DRV_DEF_DIR = $(PINECILV2_DRIVERS_DIR)/hal_drv/default_config
|
||||
PINECILV2_DRIVERS_REGS_DIR = $(PINECILV2_DRIVERS_DIR)/regs
|
||||
PINECILV2_DRIVERS_RISCV_DIR = $(PINECILV2_DRIVERS_DIR)/risc-v
|
||||
PINECILV2_DRIVERS_STARTUP_DIR = $(PINECILV2_DRIVERS_DIR)/startup
|
||||
PINECILV2_DRIVERS_STD_DRV_DIR = $(PINECILV2_DRIVERS_DIR)/std_drv/inc
|
||||
|
||||
|
||||
|
||||
|
||||
SOURCE_MIDDLEWARES_DIR = ./Middlewares
|
||||
FRTOS_CMIS_INC_DIR = ./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS
|
||||
@@ -84,10 +132,12 @@ SOURCE_DRIVERS_DIR = ./Core/Drivers
|
||||
INC_PD_DRIVERS_DIR = ./Core/Drivers/usb-pd/include
|
||||
PD_DRIVER_TESTS_DIR = ./Core/Drivers/usb-pd/tests
|
||||
PD_DRIVER_DIR = ./Core/Drivers/usb-pd
|
||||
# Find-all's used for formatting
|
||||
|
||||
ALL_INCLUDES = $(shell find ./Core -type d \( -path $(BRIEFLZ_INC_DIR) -o -path $(PD_DRIVER_DIR) \) -prune -false -o \( -type f \( -name '*.h' -o -name '*.hpp' \) \) )
|
||||
ALL_SOURCE = $(shell find ./Core -type d \( -path $(SOURCE_BRIEFLZ_DIR) -o -path $(PD_DRIVER_DIR) \) -prune -false -o \( -type f \( -name '*.c' -o -name '*.cpp' \) \) )
|
||||
|
||||
# Find-all's used for formatting; have to exclude external modules
|
||||
|
||||
ALL_INCLUDES = $(shell find ./Core -type d \( -path $(BRIEFLZ_INC_DIR) -o -path $(PD_DRIVER_DIR) -o -path $(PINECILV2_SDK_DIR) \) -prune -false -o \( -type f \( -name '*.h' -o -name '*.hpp' \) \) )
|
||||
ALL_SOURCE = $(shell find ./Core -type d \( -path $(SOURCE_BRIEFLZ_DIR) -o -path $(PD_DRIVER_DIR) -o -path $(PINECILV2_SDK_DIR) \) -prune -false -o \( -type f \( -name '*.c' -o -name '*.cpp' \) \) )
|
||||
|
||||
# Device dependent settings
|
||||
ifeq ($(model),$(filter $(model),$(ALL_MINIWARE_MODELS)))
|
||||
@@ -105,11 +155,11 @@ DEV_GLOBAL_DEFS= -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32
|
||||
-D STM32F10X_MD
|
||||
DEV_LDFLAGS=
|
||||
DEV_AFLAGS=
|
||||
DEV_CFLAGS=
|
||||
DEV_CFLAGS= -D VECT_TAB_OFFSET=$(bootldr_size)U
|
||||
DEV_CXXFLAGS=
|
||||
CPUFLAGS= -mcpu=cortex-m3 \
|
||||
-mthumb \
|
||||
-mfloat-abi=soft
|
||||
-mthumb \
|
||||
-mfloat-abi=soft
|
||||
flash_size=64k
|
||||
bootldr_size=0x4000
|
||||
DEVICE_DFU_ADDRESS=0x08004000
|
||||
@@ -131,11 +181,11 @@ DEV_GLOBAL_DEFS= -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32
|
||||
-D STM32F10X_MD
|
||||
DEV_LDFLAGS=
|
||||
DEV_AFLAGS=
|
||||
DEV_CFLAGS=
|
||||
DEV_CFLAGS= -D VECT_TAB_OFFSET=$(bootldr_size)U
|
||||
DEV_CXXFLAGS=
|
||||
CPUFLAGS= -mcpu=cortex-m3 \
|
||||
-mthumb \
|
||||
-mfloat-abi=soft
|
||||
-mthumb \
|
||||
-mfloat-abi=soft
|
||||
flash_size=128k
|
||||
bootldr_size=32k
|
||||
DEVICE_DFU_ADDRESS=0x08008000
|
||||
@@ -143,18 +193,18 @@ DEVICE_DFU_VID_PID=0x1209:0xDB42
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(model),$(ALL_PINE_MODELS))
|
||||
$(info Building for Pine64 )
|
||||
ifeq ($(model),$(ALL_PINECIL_MODELS))
|
||||
$(info Building for Pine64 Pinecilv1)
|
||||
DEVICE_INCLUDES = -I$(PINE_INC_DIR) \
|
||||
-I$(PINE_VENDOR_INC_DIR) \
|
||||
-I$(PINE_VENDOR_USB_INC_DIR) \
|
||||
-I$(PINE_NMSIS_INC_DIR) \
|
||||
-I$(PINE_FREERTOS_PORT_INC_DIR)
|
||||
|
||||
DEVICE_BSP_DIR = ./Core/BSP/Pine64
|
||||
DEVICE_BSP_DIR = ./Core/BSP/Pinecil
|
||||
S_SRCS := $(shell find $(PINE_INC_DIR) -type f -name '*.S') $(info $(S_SRCS) )
|
||||
ASM_INC = -I$(PINE_RISCV_INC_DIR)
|
||||
LDSCRIPT=./Core/BSP/Pine64/Vendor/SoC/gd32vf103/Board/pinecil/Source/GCC/gcc_gd32vf103_flashxip.ld
|
||||
LDSCRIPT=./Core/BSP/Pinecil/Vendor/SoC/gd32vf103/Board/pinecil/Source/GCC/gcc_gd32vf103_flashxip.ld
|
||||
flash_size=128k
|
||||
bootldr_size=0x0
|
||||
# Flags
|
||||
@@ -164,10 +214,74 @@ CPUFLAGS= -march=rv32imac \
|
||||
DEV_LDFLAGS=-nostartfiles
|
||||
DEV_AFLAGS=
|
||||
DEV_GLOBAL_DEFS= -DRTOS_FREERTOS -DDOWNLOAD_MODE=DOWNLOAD_MODE_FLASHXIP
|
||||
DEV_CFLAGS=
|
||||
DEV_CFLAGS= -D VECT_TAB_OFFSET=$(bootldr_size)U
|
||||
DEV_CXXFLAGS=
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
ifeq ($(model),$(ALL_PINECIL_V2_MODELS))
|
||||
$(info Building for Pine64 Pinecilv2 )
|
||||
|
||||
|
||||
|
||||
DEVICE_INCLUDES = -I$(PINECILV2_DIR) \
|
||||
-I$(PINECILV2_SDK_DIR) \
|
||||
-I$(PINECILV2_VENDOR_BSP_COMMON_DIR) \
|
||||
-I$(PINECILV2_VENDOR_BSP_PLATFORM_DIR) \
|
||||
-I$(PINECILV2_COMMON_DIR) \
|
||||
-I$(PINECILV2_COMMON_BL_MATH_DIR) \
|
||||
-I$(PINECILV2_COMMON_DEVICE_DIR) \
|
||||
-I$(PINECILV2_COMMON_LIST_DIR) \
|
||||
-I$(PINECILV2_COMMON_MISC_DIR) \
|
||||
-I$(PINECILV2_COMMON_PARTITION_DIR) \
|
||||
-I$(PINECILV2_COMMON_PID_DIR) \
|
||||
-I$(PINECILV2_COMMON_RING_BUFFERDIR) \
|
||||
-I$(PINECILV2_COMMON_SOFT_CRC_DIR) \
|
||||
-I$(PINECILV2_COMMON_TIMESTAMP_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_FREERTOS_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_FREERTOS_BL602_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_NMSIS_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_USB_STACK_DIR) \
|
||||
-I$(PINECILV2_DRIVERS_DIR) \
|
||||
-I$(PINECILV2_DRIVERS_HAL_DRV_INC_DIR) \
|
||||
-I$(PINECILV2_DRIVERS_HAL_DRV_DEF_DIR) \
|
||||
-I$(PINECILV2_DRIVERS_REGS_DIR) \
|
||||
-I$(PINECILV2_DRIVERS_RISCV_DIR) \
|
||||
-I$(PINECILV2_DRIVERS_STARTUP_DIR) \
|
||||
-I$(PINECILV2_DRIVERS_STD_DRV_DIR) \
|
||||
-I$(PINECILV2_VENDOR_BSP_PLATFORM_DIR) \
|
||||
-I$(PINECILV2_VENDOR_BSP_USB_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_USB_STACK_COMMON_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_USB_STACK_CORE_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_USB_STACK_CDC_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_USB_STACK_WINUSB_DIR) \
|
||||
-I$(PINECILV2_COMPONENTS_NMSIS_CORE_INC_DIR)
|
||||
|
||||
DEVICE_BSP_DIR = ./Core/BSP/Pinecilv2
|
||||
S_SRCS := $(shell find $(PINECILV2_DIR) -type d \( -path $(PINECILV2_VENDOR_BSP_COMMON_DIR) \) -prune -false -o -type f -name '*.S') $(info $(S_SRCS) )
|
||||
ASM_INC = $(DEVICE_INCLUDES)
|
||||
LDSCRIPT=./Core/BSP/Pinecilv2/bl_mcu_sdk/drivers/bl702_driver/bl702_flash.ld
|
||||
|
||||
# Flags
|
||||
CPUFLAGS= -march=rv32imafc \
|
||||
-mabi=ilp32f \
|
||||
-mcmodel=medany -fsigned-char -fno-builtin -nostartfiles \
|
||||
-DportasmHANDLE_INTERRUPT=FreeRTOS_Interrupt_Handler -DARCH_RISCV -D__RISCV_FEATURE_MVE=0 -DportUSING_MPU_WRAPPERS=0
|
||||
# -DBFLB_USE_ROM_DRIVER=1
|
||||
DEV_LDFLAGS=-nostartfiles -DDEBUG
|
||||
DEV_AFLAGS=
|
||||
DEV_GLOBAL_DEFS=
|
||||
#Required to be turned off due to their drivers tripping warnings
|
||||
DEV_CFLAGS= -Wno-error=enum-conversion -Wno-type-limits -Wno-implicit-fallthrough
|
||||
DEV_CXXFLAGS= $(DEV_CFLAGS)
|
||||
flash_size=128k
|
||||
bootldr_size=0x0
|
||||
|
||||
endif
|
||||
|
||||
INCLUDES = -I$(APP_INC_DIR) \
|
||||
-I$(BRIEFLZ_INC_DIR) \
|
||||
-I$(FRTOS_CMIS_INC_DIR) \
|
||||
@@ -176,19 +290,26 @@ INCLUDES = -I$(APP_INC_DIR) \
|
||||
-I$(BSP_INC_DIR) \
|
||||
-I$(THREADS_INC_DIR) \
|
||||
-I$(INC_PD_DRIVERS_DIR) \
|
||||
$(DEVICE_INCLUDES)
|
||||
$(DEVICE_INCLUDES)
|
||||
|
||||
EXCLUDED_DIRS := -path $(PINECILV2_VENDOR_BSP_ES8388_DIR) \
|
||||
-o -path $(PINECILV2_VENDOR_BSP_IMAGE_SENSOR_DIR) \
|
||||
-o -path $(PINECILV2_VENDOR_BSP_LVGL_DIR) \
|
||||
-o -path $(PINECILV2_VENDOR_BSP_MCU_LCD_DIR) \
|
||||
-o -path $(PINECILV2_VENDOR_BSP_BOARD_DIR) \
|
||||
-o -path $(PINECILV2_VENDOR_BSP_USB_DIR) \
|
||||
|
||||
SOURCE := $(shell find $(SOURCE_THREADS_DIR) -type f -name '*.c') \
|
||||
$(shell find $(SOURCE_CORE_DIR) -type f -name '*.c') \
|
||||
$(shell find $(SOURCE_DRIVERS_DIR) -type f -name '*.c') \
|
||||
$(shell find $(DEVICE_BSP_DIR) -type f -name '*.c') \
|
||||
$(shell find $(DEVICE_BSP_DIR) -type d \( $(EXCLUDED_DIRS) \) -prune -false -o -type f -name '*.c')\
|
||||
$(shell find $(SOURCE_MIDDLEWARES_DIR) -type f -name '*.c') \
|
||||
$(SOURCE_BRIEFLZ_DIR)/depack.c
|
||||
# We exclude the USB-PD stack tests $(PD_DRIVER_TESTS_DIR)
|
||||
SOURCE_CPP := $(shell find $(SOURCE_THREADS_DIR) -type f -name '*.cpp') \
|
||||
$(shell find $(SOURCE_CORE_DIR) -type f -name '*.cpp') \
|
||||
$(shell find $(SOURCE_DRIVERS_DIR) -path $(PD_DRIVER_TESTS_DIR) -prune -false -o -type f -name '*.cpp') \
|
||||
$(shell find $(DEVICE_BSP_DIR) -type f -name '*.cpp') \
|
||||
$(shell find $(DEVICE_BSP_DIR) -type d \( $(EXCLUDED_DIRS) \) -prune -false -o -type f -name '*.cpp') \
|
||||
$(shell find $(SOURCE_MIDDLEWARES_DIR) -type f -name '*.cpp')
|
||||
|
||||
# code optimisation ------------------------------------------------------------
|
||||
@@ -215,7 +336,7 @@ COMPILER=gcc
|
||||
ifeq ($(model),$(filter $(model),$(ALL_MINIWARE_MODELS) $(ALL_MHP30_MODELS)))
|
||||
COMPILER_PREFIX=arm-none-eabi
|
||||
endif
|
||||
ifeq ($(model),$(ALL_PINE_MODELS))
|
||||
ifeq ($(model),$(filter $(model),$(ALL_PINECIL_MODELS) $(ALL_PINECIL_V2_MODELS)))
|
||||
COMPILER_PREFIX=riscv-none-elf
|
||||
endif
|
||||
# programs ---------------------------------------------------------------------
|
||||
@@ -223,7 +344,6 @@ CC=$(COMPILER_PREFIX)-gcc
|
||||
CPP=$(COMPILER_PREFIX)-g++
|
||||
OBJCOPY=$(COMPILER_PREFIX)-objcopy
|
||||
OBJDUMP=$(COMPILER_PREFIX)-objdump
|
||||
SIZE=$(COMPILER_PREFIX)-size
|
||||
# use gcc in assembler mode so we can use defines etc in assembly
|
||||
AS=$(COMPILER_PREFIX)-gcc -x assembler-with-cpp
|
||||
|
||||
@@ -236,7 +356,6 @@ LINKER_FLAGS= -Wl,--gc-sections \
|
||||
-Wl,--defsym=__FLASH_SIZE__=$(flash_size) \
|
||||
-Wl,--defsym=__BOOTLDR_SIZE__=$(bootldr_size) \
|
||||
-Wl,--print-memory-usage \
|
||||
-flto \
|
||||
--specs=nosys.specs \
|
||||
--specs=nano.specs \
|
||||
$(DEV_LDFLAGS)
|
||||
@@ -270,8 +389,8 @@ CHECKOPTIONS= -Wall \
|
||||
-Winline \
|
||||
-Wshadow \
|
||||
-Wno-unused-parameter \
|
||||
-Wdouble-promotion \
|
||||
-Werror
|
||||
-Wdouble-promotion
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -349,7 +468,6 @@ firmware-%: $(HEXFILE_DIR)/$(model)_%.hex $(HEXFILE_DIR)/$(model)_%.bin $(HEXFIL
|
||||
$(OBJCOPY) $< -O ihex $@
|
||||
|
||||
%.bin : %.elf Makefile
|
||||
$(SIZE) --format=berkeley $<
|
||||
$(OBJCOPY) $< -O binary $@
|
||||
|
||||
%.dfu : %.bin Makefile
|
||||
|
||||
Reference in New Issue
Block a user