mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 03:20:00 +03:00
Build uf2 success with RP2350B
- fix strtol duplication
This commit is contained in:
parent
fbe266afd8
commit
1b5733b4b0
4 changed files with 11 additions and 2 deletions
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
#define _STRTO_ENDPTR 1
|
#define _STRTO_ENDPTR 1
|
||||||
|
|
||||||
|
#if PLATFORM_NO_LIBC
|
||||||
static unsigned long _strto_l(const char * str, char ** endptr, int base, int sflag)
|
static unsigned long _strto_l(const char * str, char ** endptr, int base, int sflag)
|
||||||
{
|
{
|
||||||
unsigned long number, cutoff;
|
unsigned long number, cutoff;
|
||||||
|
@ -127,6 +128,7 @@ unsigned long strtoul(const char * str, char ** endptr, int base)
|
||||||
{
|
{
|
||||||
return _strto_l(str, endptr, base, 0);
|
return _strto_l(str, endptr, base, 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int atoi(const char *str)
|
int atoi(const char *str)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,6 +39,10 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef PLATFORM_NO_LIBC
|
||||||
|
#define PLATFORM_NO_LIBC 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
|
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
|
||||||
#define DEFAULT_AUX_CHANNEL_COUNT MAX_AUX_CHANNEL_COUNT
|
#define DEFAULT_AUX_CHANNEL_COUNT MAX_AUX_CHANNEL_COUNT
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -24,7 +24,7 @@ ifeq ($(DEBUG_HARDFAULTS),PICO)
|
||||||
CFLAGS += -DDEBUG_HARDFAULTS
|
CFLAGS += -DDEBUG_HARDFAULTS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SDK_DIR = $(LIB_MAIN_DIR)/pico-sdk
|
SDK_DIR = $(LIB_MAIN_DIR)/pico-sdk/src
|
||||||
|
|
||||||
#CMSIS
|
#CMSIS
|
||||||
CMSIS_DIR := $(SDK_DIR)/rp2_common/cmsis/stub/CMSIS
|
CMSIS_DIR := $(SDK_DIR)/rp2_common/cmsis/stub/CMSIS
|
||||||
|
@ -79,6 +79,7 @@ PICO_LIB_SRC = \
|
||||||
rp2_common/pico_float/float_math.c \
|
rp2_common/pico_float/float_math.c \
|
||||||
rp2_common/hardware_divider/divider.c \
|
rp2_common/hardware_divider/divider.c \
|
||||||
rp2_common/hardware_vreg/vreg.c \
|
rp2_common/hardware_vreg/vreg.c \
|
||||||
|
rp2_common/hardware_xip_cache/xip_cache.c \
|
||||||
rp2_common/pico_standard_binary_info/standard_binary_info.c \
|
rp2_common/pico_standard_binary_info/standard_binary_info.c \
|
||||||
rp2_common/pico_clib_interface/newlib_interface.c \
|
rp2_common/pico_clib_interface/newlib_interface.c \
|
||||||
rp2_common/pico_malloc/malloc.c \
|
rp2_common/pico_malloc/malloc.c \
|
||||||
|
@ -118,7 +119,7 @@ endif
|
||||||
|
|
||||||
#CMSIS
|
#CMSIS
|
||||||
VPATH := $(VPATH):$(CMSIS_DIR)/Core/Include:$(CMSIS_DIR)/Device/$(TARGET_MCU_LIB_UPPER)/Include
|
VPATH := $(VPATH):$(CMSIS_DIR)/Core/Include:$(CMSIS_DIR)/Device/$(TARGET_MCU_LIB_UPPER)/Include
|
||||||
CMSIS_SRC :=
|
CMSIS_SRC :=
|
||||||
|
|
||||||
INCLUDE_DIRS += \
|
INCLUDE_DIRS += \
|
||||||
$(TARGET_PLATFORM_DIR) \
|
$(TARGET_PLATFORM_DIR) \
|
||||||
|
@ -218,6 +219,7 @@ SYS_INCLUDE_DIRS = \
|
||||||
$(SDK_DIR)/rp2_common/hardware_gpio/include \
|
$(SDK_DIR)/rp2_common/hardware_gpio/include \
|
||||||
$(SDK_DIR)/rp2_common/pico_malloc/include \
|
$(SDK_DIR)/rp2_common/pico_malloc/include \
|
||||||
$(SDK_DIR)/rp2_common/hardware_timer/include \
|
$(SDK_DIR)/rp2_common/hardware_timer/include \
|
||||||
|
$(SDK_DIR)/rp2_common/hardware_xip_cache/include \
|
||||||
$(CMSIS_DIR)/Core/Include \
|
$(CMSIS_DIR)/Core/Include \
|
||||||
$(CMSIS_DIR)/Device/$(TARGET_MCU_LIB_UPPER)/Include \
|
$(CMSIS_DIR)/Device/$(TARGET_MCU_LIB_UPPER)/Include \
|
||||||
$(SDK_DIR)/$(TARGET_MCU_LIB_LOWER)/pico_platform/include \
|
$(SDK_DIR)/$(TARGET_MCU_LIB_LOWER)/pico_platform/include \
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "hardware/flash.h"
|
#include "hardware/flash.h"
|
||||||
|
|
||||||
#define NVIC_PriorityGroup_2 0x500
|
#define NVIC_PriorityGroup_2 0x500
|
||||||
|
#define PLATFORM_NO_LIBC 0
|
||||||
|
|
||||||
#if defined(RP2350A) || defined(RP2350B)
|
#if defined(RP2350A) || defined(RP2350B)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue