Skip to content

Commit e3a4bee

Browse files
reorganizing a little
1 parent f93105b commit e3a4bee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+114
-93
lines changed

FreeRTOS/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ TARGET_SRCS = Source/croutine.c Source/list.c Source/queue.c Source/tasks.c Sour
1212

1313
TARGET_SRCS += Source/portable/MemMang/heap_3.c
1414

15-
ifeq ($(CPU),arm)
16-
ifeq ($(CPU_FAMILY),CM3)
15+
ifeq ($(CPU_FAMILY),arm)
16+
ifeq ($(CPU_SUBFAMILY),CM3)
1717
TARGET_SRCS += Source/portable/GCC/ARM_CM3/port.c
1818
endif
19-
ifeq ($(CPU_FAMILY),CM4F)
19+
ifeq ($(CPU_SUBFAMILY),CM4F)
2020
TARGET_SRCS += Source/portable/GCC/ARM_CM4F/port.c
2121
endif
2222
endif

FreeRTOS/config.mk

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
TARGET_INCLUDES += $(ROOTDIR)/FreeRTOS/Source/include
22

3-
TARGET_INCLUDES += $(ROOTDIR)/config/$(CPU)/$(CPU_FLAVOR)
3+
TARGET_INCLUDES += $(ROOTDIR)/config/$(CPU_FAMILY)/$(CPU_FLAVOR)
44

5-
ifeq ($(CPU),arm)
6-
ifeq ($(CPU_FAMILY),CM3)
5+
ifeq ($(CPU_FAMILY),arm)
6+
ifeq ($(CPU_SUBFAMILY),CM3)
77
TARGET_INCLUDES += $(ROOTDIR)/FreeRTOS/Source/portable/GCC/ARM_CM3
88
endif
9-
ifeq ($(CPU_FAMILY),CM4F)
9+
ifeq ($(CPU_SUBFAMILY),CM4F)
1010
TARGET_INCLUDES += $(ROOTDIR)/FreeRTOS/Source/portable/GCC/ARM_CM4F
1111
endif
1212
endif
1313

14-
ifeq ($(CPU),mips)
15-
ifeq ($(CPU_FLAVOR),mips4)
14+
ifeq ($(CPU_FAMILY),mips)
15+
ifeq ($(CPU_SUBFAMILY),mips4)
1616
TARGET_INCLUDES += $(ROOTDIR)/FreeRTOS/Source/portable/MPLAB/PIC32MX
1717
endif
1818
endif

arch/Makefile

+22-22
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,43 @@ include $(ROOTDIR)/os/config.mk
99
include $(ROOTDIR)/libc/config.mk
1010
include $(ROOTDIR)/hardware/config.mk
1111

12-
ifeq ($(CPU),arm)
12+
ifeq ($(CPU_FAMILY),arm)
1313

14-
ifeq ($(CPU_FAMILY),CM3)
15-
TARGET_SRCS += arm/src/CM3/angel.s
16-
TARGET_SRCS += arm/src/CM3/CoreSupport/core_cm3.c
17-
TARGET_SRCS += arm/src/CM3/setjmp.s arm/src/CM3/startup.s
18-
TARGET_SRCS += arm/src/CM3/handlers.c
14+
ifeq ($(CPU_SUBFAMILY),CM3)
15+
TARGET_SRCS += arm/Core/CM3/angel.s
16+
TARGET_SRCS += arm/Core/CM3/CoreSupport/core_cm3.c
17+
TARGET_SRCS += arm/Core/CM3/setjmp.s arm/Core/CM3/startup.s
18+
TARGET_SRCS += arm/Core/CM3/handlers.c
1919
endif
2020

21-
ifeq ($(CPU_FAMILY),CM4F)
22-
TARGET_SRCS += arm/src/CM4F/angel.s
23-
#TARGET_SRCS += arm/src/CM4F/CoreSupport/core_cm4.c
24-
TARGET_SRCS += arm/src/CM4F/startup.s
25-
TARGET_SRCS += arm/src/CM4F/handlers.c
21+
ifeq ($(CPU_SUBFAMILY),CM4F)
22+
TARGET_SRCS += arm/Core/CM4F/angel.s
23+
#TARGET_SRCS += arm/Core/CM4F/CoreSupport/core_cm4.c
24+
TARGET_SRCS += arm/Core/CM4F/startup.s
25+
TARGET_SRCS += arm/Core/CM4F/handlers.c
2626
endif
2727

2828
ifeq ($(CPU_FLAVOR),lpc17xx)
29-
TARGET_SRCS += arm/lpc17xx/Core/CM3/DeviceSupport/NXP/LPC17xx/system_LPC17xx.c
29+
TARGET_SRCS += arm/Core/CM3/DeviceSupport/NXP/lpc17xx/system_LPC17xx.c
3030
TARGET_SRCS += $(addprefix arm/lpc17xx/Drivers/source/lpc17xx_, spi.c rit.c exti.c wdt.c uart.c dac.c rtc.c i2s.c pwm.c mcpwm.c pinsel.c nvic.c emac.c systick.c ssp.c can.c gpio.c libcfg_default.c i2c.c timer.c gpdma.c clkpwr.c qei.c adc.c)
3131
TARGET_SRCS += arm/lpc17xx/init.c arm/lpc17xx/Drivers/source/debug_frmwrk.c
3232
TARGET_SRCS += arm/lpc17xx/registry.c
3333
endif
3434

35-
ifeq ($(BOARD),mbed)
36-
TARGET_SRCS += arm/lpc17xx/mbed/BoardConsole.c arm/lpc17xx/mbed/BoardInit.c
35+
ifeq ($(BOARD),mbedlpc1768)
36+
TARGET_SRCS += arm/lpc17xx/mbedlpc1768/BoardConsole.c arm/lpc17xx/mbedlpc1768/BoardInit.c
3737
endif
3838

39-
ifeq ($(CPU_FLAVOR),stm32f10)
40-
TARGET_SRCS += arm/stm32f10x/Core/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c
39+
ifeq ($(CPU_FLAVOR),stm32f10x)
40+
TARGET_SRCS += arm/Core/CM3/DeviceSupport/ST/stm32f10x/system_stm32f10x.c
4141
TARGET_SRCS += $(addprefix arm/stm32f10x/Drivers/source/stm32f10x_, adc.c bkp.c can.c cec.c crc.c dac.c dbgmcu.c dma.c exti.c flash.c fsmc.c gpio.c i2c.c iwdg.c pwr.c rcc.c rtc.c sdio.c spi.c tim.c usart.c wwdg.c)
4242
TARGET_SRCS += arm/stm32f10x/Drivers/source/misc.c
4343
TARGET_SRCS += arm/stm32f10x/init.c
4444
TARGET_SRCS += arm/stm32f10x/registry.c
4545
endif
4646

47-
ifeq ($(CPU_FLAVOR),stm32f4)
48-
TARGET_SRCS += arm/stm32f4xx/Core/CM4F/DeviceSupport/ST/STM32F4xx/system_stm32f4xx.c
47+
ifeq ($(CPU_FLAVOR),stm32f4xx)
48+
TARGET_SRCS += arm/Core/CM4F/DeviceSupport/ST/stm32f4xx/system_stm32f4xx.c
4949
TARGET_SRCS += $(addprefix arm/stm32f4xx/Drivers/source/stm32f4xx_, adc.c can.c crc.c cryp_aes.c cryp_des.c cryp_tdes.c cryp.c dac.c dbgmcu.c dcmi.c dma.c dma2d.c exti.c flash.c gpio.c hash_md5.c hash_sha1.c hash.c i2c.c iwdg.c ltdc.c pwr.c rcc.c rng.c rtc.c sai.c sdio.c spi.c syscfg.c tim.c usart.c wwdg.c)
5050
#STM32F427_437xx, STM32F429_439xx: fmc.c
5151
#STM32F40_41xxx: fsmc.c
@@ -54,18 +54,18 @@ TARGET_SRCS += arm/stm32f4xx/init.c
5454
TARGET_SRCS += arm/stm32f4xx/registry.c
5555
endif
5656

57-
ifeq ($(BOARD),inemo)
58-
TARGET_SRCS += arm/stm32f10x/inemo/BoardConsole.c arm/stm32f10x/inemo/BoardInit.c
57+
ifeq ($(BOARD),inemom1)
58+
TARGET_SRCS += arm/stm32f10x/inemom1/BoardConsole.c arm/stm32f10x/inemom1/BoardInit.c
5959
endif
6060

6161
ifeq ($(BOARD),stm32f4discovery)
6262
TARGET_SRCS += $(addprefix arm/stm32f4xx/Drivers/source/stm32f4xx_, fsmc.c)
6363
TARGET_SRCS += arm/stm32f4xx/stm32f4discovery/BoardConsole.c arm/stm32f4xx/stm32f4discovery/BoardInit.c
6464
endif
6565

66-
ifeq ($(BOARD),stm32f4discovery2)
66+
ifeq ($(BOARD),stm32f429discovery)
6767
TARGET_SRCS += $(addprefix arm/stm32f4xx/Drivers/source/stm32f4xx_, fmc.c)
68-
TARGET_SRCS += arm/stm32f4xx/stm32f4discovery2/BoardConsole.c arm/stm32f4xx/stm32f4discovery2/BoardInit.c
68+
TARGET_SRCS += arm/stm32f4xx/stm32f429discovery/BoardConsole.c arm/stm32f4xx/stm32f429discovery/BoardInit.c
6969
endif
7070
endif
7171

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

arch/config.mk

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
ifeq ($(CPU),arm)
1+
ifeq ($(CPU_FAMILY),arm)
22
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/include
33

4+
ifeq ($(CPU_SUBFAMILY),CM3)
5+
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/Core/CM3/CoreSupport
6+
SPECS = $(ROOTDIR)/arch/arm/src/specs
7+
endif
8+
9+
ifeq ($(CPU_SUBFAMILY),CM4F)
10+
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/Core/CM4F/CoreSupport
11+
SPECS = $(ROOTDIR)/arch/arm/src/specs
12+
endif
13+
414
ifeq ($(CPU_FLAVOR),lpc17xx)
5-
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/lpc17xx/Core/CM3/DeviceSupport/NXP/LPC17xx $(ROOTDIR)/arch/arm/lpc17xx/Drivers/include
15+
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/Core/CM3/DeviceSupport/NXP/LPC17xx $(ROOTDIR)/arch/arm/lpc17xx/Drivers/include
616
LDSCRIPT = $(ROOTDIR)/arch/arm/lpc17xx/ldscript
717
TARGET_CPPFLAGS += -DTARGET_LITTLE_ENDIAN
818
endif
919

10-
ifeq ($(CPU_FLAVOR),stm32f10)
11-
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/stm32f10x/Core/CM3/DeviceSupport/ST/STM32F10x $(ROOTDIR)/arch/arm/stm32f10x/Drivers/include
20+
ifeq ($(CPU_FLAVOR),stm32f10x)
21+
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/Core/CM3/DeviceSupport/ST/stm32f10x $(ROOTDIR)/arch/arm/stm32f10x/Drivers/include
1222
LDSCRIPT = $(ROOTDIR)/arch/arm/stm32f10x/ldscript
1323
TARGET_CPPFLAGS += -DTARGET_LITTLE_ENDIAN
1424
endif
1525

16-
ifeq ($(CPU_FLAVOR),stm32f4)
17-
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/stm32f4xx/Core/CM4F/DeviceSupport/ST/STM32F4xx $(ROOTDIR)/arch/arm/stm32f4xx/Drivers/include
26+
ifeq ($(CPU_FLAVOR),stm32f4xx)
27+
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/Core/CM4F/DeviceSupport/ST/STM32F4xx $(ROOTDIR)/arch/arm/stm32f4xx/Drivers/include
1828
TARGET_CPPFLAGS += -DTARGET_LITTLE_ENDIAN
1929
endif
2030

21-
ifeq ($(CPU_FAMILY),CM3)
22-
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/src/CM3/CoreSupport
23-
SPECS = $(ROOTDIR)/arch/arm/src/specs
31+
ifeq ($(BOARD),mbedlpc1768)
32+
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/lpc17xx/mbedlpc1768
2433
endif
2534

26-
ifeq ($(CPU_FAMILY),CM4F)
27-
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/src/CM4F/CoreSupport
28-
SPECS = $(ROOTDIR)/arch/arm/src/specs
29-
endif
30-
31-
ifeq ($(BOARD),mbed)
32-
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/lpc17xx/mbed
33-
endif
34-
35-
ifeq ($(BOARD),inemo)
36-
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/stm32f10x/inemo
35+
ifeq ($(BOARD),inemom1)
36+
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/stm32f10x/inemom1
3737
endif
3838

3939
ifeq ($(BOARD),stm32f4discovery)
@@ -43,18 +43,18 @@ TARGET_CPPFLAGS += -DPLL_M=8
4343
LDSCRIPT = $(ROOTDIR)/arch/arm/stm32f4xx/stm32f40x.ld
4444
endif
4545

46-
ifeq ($(BOARD),stm32f4discovery2)
47-
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/stm32f4xx/stm32f4discovery2
46+
ifeq ($(BOARD),stm32f429discovery)
47+
TARGET_INCLUDES += $(ROOTDIR)/arch/arm/stm32f4xx/stm32f429discovery
4848
TARGET_CPPFLAGS += -DHSE_VALUE=8000000
4949
TARGET_CPPFLAGS += -DPLL_M=8
50-
LDSCRIPT = $(ROOTDIR)/arch/arm/stm32f4xx/stm32f40x.ld
50+
LDSCRIPT = $(ROOTDIR)/arch/arm/stm32f4xx/stm32f429.ld
5151
endif
5252

5353
endif
5454

55-
ifeq ($(CPU),mips)
55+
ifeq ($(CPU_FAMILY),mips)
5656
TARGET_INCLUDES += $(ROOTDIR)/arch/mips/include
57-
ifeq ($(CPU_FLAVOR),mips4)
57+
ifeq ($(CPU_SUBFAMILY),mips4)
5858
TARGET_INCLUDES += $(ROOTDIR)/arch/mips/mips4
5959
LDSCRIPT = $(ROOTDIR)/arch/mips/mips4/ldscript
6060
SPECS = $(ROOTDIR)/arch/mips/mips4/specs

config/arm/stm32f10/stm32f10x_conf.h

-3
This file was deleted.

config/arm/stm32f10x/stm32f10x_conf.h

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#pragma once
2+
3+
//#define assert_param(x) ((void)0)
4+
5+
#ifdef USE_FULL_ASSERT
6+
7+
/**
8+
* @brief The assert_param macro is used for function's parameters check.
9+
* @param expr: If expr is false, it calls assert_failed function
10+
* which reports the name of the source file and the source
11+
* line number of the call that failed.
12+
* If expr is true, it returns no value.
13+
* @retval None
14+
*/
15+
#define assert_param(expr) ((expr) ? (void)0 : assert_failed((uint8_t *)__FILE__, __LINE__))
16+
/* Exported functions ------------------------------------------------------- */
17+
void assert_failed(uint8_t* file, uint32_t line);
18+
#else
19+
#define assert_param(expr) ((void)0)
20+
#endif /* USE_FULL_ASSERT */

config/target.mk

+23-19
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,49 @@
1-
ifeq ($(BOARD),mbed)
2-
CPU = arm
1+
ifeq ($(BOARD),mbedlpc1768)
2+
CPU_FAMILY = arm
3+
CPU_SUBFAMILY = CM3
34
CPU_FLAVOR = lpc17xx
4-
CPU_FAMILY = CM3
5+
CPU = lpc1768
56

67
TARGET_CPPFLAGS += -DHAS_ETHERNET -DHAS_SEMIFS -DBOARD_MBED
78
endif
89

9-
ifeq ($(BOARD),inemo)
10-
CPU = arm
11-
CPU_FLAVOR = stm32f10
12-
CPU_FAMILY = CM3
10+
ifeq ($(BOARD),inemom1)
11+
CPU_FAMILY = arm
12+
CPU_SUBFAMILY = CM3
13+
CPU_FLAVOR = stm32f10x
14+
CPU = stm32f103
1315
endif
1416

1517
ifeq ($(BOARD),pic32)
16-
CPU = mips
17-
CPU_FLAVOR = mips4
18+
CPU_FAMILY = mips
19+
CPU_SUBFAMILY = mips4
1820
endif
1921

2022
ifeq ($(BOARD),stm32f4discovery)
21-
CPU = arm
22-
CPU_FLAVOR = stm32f4
23-
CPU_FAMILY = CM4F
23+
CPU_FAMILY = arm
24+
CPU_SUBFAMILY = CM4F
25+
CPU_FLAVOR = stm32f4xx
26+
CPU = stm32f407
2427

2528
TARGET_CPPFLAGS += -DBOARD_DISCOVERY_F4
2629
#TARGET_CPPFLAGS += -DSystemCoreClock=168000000
2730
endif
2831

29-
ifeq ($(BOARD),stm32f4discovery2)
30-
CPU = arm
31-
CPU_FLAVOR = stm32f4
32-
CPU_FAMILY = CM4F
32+
ifeq ($(BOARD),stm32f429discovery)
33+
CPU_FAMILY = arm
34+
CPU_SUBFAMILY = CM4F
35+
CPU_FLAVOR = stm32f4xx
36+
CPU = stm32f429
3337

34-
TARGET_CPPFLAGS += -DBOARD_DISCOVERY_F4
38+
TARGET_CPPFLAGS += -DBOARD_DISCOVERY_F429
3539
#TARGET_CPPFLAGS += -DSystemCoreClock=168000000
3640
endif
3741

38-
ifeq ($(CPU),)
42+
ifeq ($(CPU_FAMILY),)
3943
$(info You probably want to compile one of the examples - you can't compile uC-sdk as-it.)
4044
$(info For example, make -C examples/stm32f4discovery/skel)
4145
$(error You need at least a CPU definition.)
4246
endif
4347

4448

45-
TARGET_CPPFLAGS += -DPORT_CPU=$(CPU) -DPORT_CPU_FLAVOR=$(CPU_FLAVOR) -DPORT_CPU_FAMILY=$(CPU_FAMILY)
49+
TARGET_CPPFLAGS += -DPORT_CPU=$(CPU) -DPORT_CPU_FAMILY=$(CPU_FAMILY) -DPORT_CPU_FAMILY_SUBFAMILY=$(CPU_SUBFAMILY) -DPORT_CPU_FLAVOR=$(CPU_FLAVOR)

config/toolchain.mk

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
ifeq ($(CPU),arm)
1+
ifeq ($(CPU_FAMILY),arm)
22
TOOLCHAIN = arm-none-eabi
33
TARGET_FORMAT = elf32-littlearm
4-
ifeq ($(CPU_FAMILY),CM3)
4+
ifeq ($(CPU_SUBFAMILY),CM3)
55
TARGET_CPPFLAGS += -mcpu=cortex-m3 -mtune=cortex-m3 -D__thumb2__=1 -march=armv7-m -mfix-cortex-m3-ldrd -mthumb -msoft-float
66
TARGET_LDFLAGS += -mcpu=cortex-m3 -mtune=cortex-m3 -march=armv7-m -mthumb
77
endif
8-
ifeq ($(CPU_FAMILY),CM4F)
8+
ifeq ($(CPU_SUBFAMILY),CM4F)
99
TARGET_CPPFLAGS += -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fno-math-errno -mtune=cortex-m4 -D__thumb2__=1 -march=armv7e-m -mthumb
1010
TARGET_LDFLAGS += -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fno-math-errno -mtune=cortex-m4 -march=armv7e-m -mthumb
1111
endif
12-
ifeq ($(CPU_FLAVOR),stm32f10)
12+
ifeq ($(CPU_FLAVOR),stm32f10x)
1313
TARGET_CPPFLAGS += -DUSE_STDPERIPH_DRIVER
1414
endif
15-
ifeq ($(CPU_FLAVOR),stm32f4)
15+
ifeq ($(CPU_FLAVOR),stm32f4xx)
1616
TARGET_CPPFLAGS += -DUSE_STDPERIPH_DRIVER
1717
endif
18-
ifeq ($(BOARD),inemo)
18+
ifeq ($(CPU),stm32f103)
1919
TARGET_CPPFLAGS += -DSTM32F10X_HD
2020
endif
21-
ifeq ($(BOARD),stm32f4discovery)
21+
ifeq ($(CPU),stm32f407)
2222
TARGET_CPPFLAGS += -DSTM32F40_41xxx
2323
endif
24-
ifeq ($(BOARD),stm32f4discovery2)
24+
ifeq ($(CPU),stm32f429)
2525
TARGET_CPPFLAGS += -DSTM32F429_439xx
2626
endif
2727
TARGET_CPPFLAGS += -Os -mapcs-frame -mno-sched-prolog -fno-hosted -ffunction-sections -fdata-sections -fshort-wchar -D__LITTLE_ENDIAN
2828
TARGET_LDFLAGS += -Wl,--no-wchar-size-warning
2929
endif
3030

31-
ifeq ($(CPU),mips)
31+
ifeq ($(CPU_FAMILY),mips)
3232
TOOLCHAIN = mipsel-elf
3333
TARGET_FORMAT = elf32-littlemips
34-
ifeq ($(CPU_FLAVOR),mips4)
34+
ifeq ($(CPU_SUBFAMILY),mips4)
3535
TARGET_CPPFLAGS +=
3636
endif
3737
TARGET_CPPFLAGS += -Os -msoft-float -fno-hosted -ffunction-sections -fdata-sections -fshort-wchar -D__LITTLE_ENDIAN
@@ -45,7 +45,7 @@ TARGET_AR = $(TOOLCHAIN)-ar
4545
TARGET_AS = $(TOOLCHAIN)-gcc
4646
TARGET_OBJCOPY = $(TOOLCHAIN)-objcopy
4747

48-
TARGET_OBJCOPY_BIN = $(TARGET_OBJCOPY) -I binary -O $(TARGET_FORMAT) --binary-architecture $(CPU)
48+
TARGET_OBJCOPY_BIN = $(TARGET_OBJCOPY) -I binary -O $(TARGET_FORMAT) --binary-architecture $(CPU_FAMILY)
4949

5050

5151
HOST_CC = gcc

hardware/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ include $(ROOTDIR)/libc/config.mk
1111
TARGET_SRCS = \
1212
src/sdcard.c \
1313

14-
ifeq ($(CPU_FAMILY),CM3)
14+
ifeq ($(CPU_SUBFAMILY),CM3)
1515
ifeq ($(CPU_FLAVOR),lpc17xx)
1616
TARGET_SRCS += src/gpio-lpc17xx.c
1717
TARGET_SRCS += src/ssp-lpc17xx.c
1818
endif
1919
endif
2020

21-
ifeq ($(CPU_FAMILY),CM4F)
22-
ifeq ($(CPU_FLAVOR),stm32f4)
21+
ifeq ($(CPU_SUBFAMILY),CM4F)
22+
ifeq ($(CPU_FLAVOR),stm32f4xx)
2323
TARGET_SRCS += src/adc-stm32f4xx.c
2424
TARGET_SRCS += src/gpio-stm32f4xx.c
2525
TARGET_SRCS += src/i2c-stm32f4xx.c

libm/include/math.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <decl.h>
3131

3232
BEGIN_DECL
33-
#if PORT_CPU == arm && PORT_CPU_FAMILY == CM4F
33+
#if PORT_CPU_FAMILY == arm && PORT_CPU_SUBFAMILY == CM4F
3434
#define SOFTFLOAT_SQRTF
3535
static inline float sqrtf(float x) {
3636
float r;

0 commit comments

Comments
 (0)