Skip to content

Commit 2d18777

Browse files
committed
merge kinetis into its own family in bsp
1 parent b13b95a commit 2d18777

File tree

15 files changed

+115
-219
lines changed

15 files changed

+115
-219
lines changed

hw/bsp/frdm_k32l2a4s/README.rst

Lines changed: 0 additions & 51 deletions
This file was deleted.

hw/bsp/frdm_k32l2a4s/board.mk

Lines changed: 0 additions & 80 deletions
This file was deleted.

hw/bsp/frdm_k32l2b/board.mk

Lines changed: 0 additions & 51 deletions
This file was deleted.

hw/bsp/frdm_k32l2a4s/board.h renamed to hw/bsp/kinetis/boards/frdm_k32l2a4s/board.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* The MIT License (MIT)
33
*
44
* Copyright (c) 2019, Ha Thach (tinyusb.org)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
SDK_DIR = hw/mcu/nxp/mcux-sdk
2+
MCU = K32L2A41A
3+
MCU_DIR = $(SDK_DIR)/devices/$(MCU)
4+
5+
CFLAGS += \
6+
-mcpu=cortex-m0plus \
7+
-DCPU_K32L2A41VLH1A \
8+
-DCFG_TUSB_MCU=OPT_MCU_K32L2AXX
9+
10+
# mcu driver cause following warnings
11+
CFLAGS += -Wno-error=unused-parameter -Wno-error=redundant-decls -Wno-error=cast-qual
12+
13+
# All source paths should be relative to the top level.
14+
LD_FILE = $(MCU_DIR)/gcc/K32L2A41xxxxA_flash.ld
15+
16+
# For freeRTOS port source
17+
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
18+
19+
# For flash-jlink target
20+
JLINK_DEVICE = K32L2A41xxxxA
21+
22+
# For flash-pyocd target
23+
PYOCD_TARGET = K32L2A
24+
25+
# flash using pyocd
26+
flash: flash-pyocd

hw/bsp/frdm_k32l2a4s/frdm_k32l2a4s.c renamed to hw/bsp/kinetis/boards/frdm_k32l2a4s/frdm_k32l2a4s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* This file is part of the TinyUSB stack.
2626
*/
2727

28-
#include "../board.h"
28+
#include "bsp/board.h"
2929
#include "board.h"
3030
#include "fsl_gpio.h"
3131
#include "fsl_port.h"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
SDK_DIR = hw/mcu/nxp/mcux-sdk
2+
MCU = K32L2B31A
3+
MCU_DIR = $(SDK_DIR)/devices/$(MCU)
4+
5+
CFLAGS += \
6+
-mcpu=cortex-m0plus \
7+
-DCPU_K32L2B31VLH0A \
8+
-DCFG_TUSB_MCU=OPT_MCU_K32L2BXX
9+
10+
# mcu driver cause following warnings
11+
CFLAGS += -Wno-error=unused-parameter -Wno-error=redundant-decls
12+
13+
# All source paths should be relative to the top level.
14+
LD_FILE = $(MCU_DIR)/gcc/K32L2B31xxxxA_flash.ld
15+
16+
# For freeRTOS port source
17+
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
18+
19+
# For flash-jlink target
20+
JLINK_DEVICE = K32L2B31xxxxA
21+
22+
# For flash-pyocd target
23+
PYOCD_TARGET = K32L2B
24+
25+
# flash using pyocd
26+
flash: flash-pyocd

hw/bsp/frdm_k32l2b/frdm_k32l2b.c renamed to hw/bsp/kinetis/boards/frdm_k32l2b/frdm_k32l2b.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* This file is part of the TinyUSB stack.
2626
*/
2727

28-
#include "../board.h"
28+
#include "bsp/board.h"
2929
#include "board.h"
3030
#include "fsl_gpio.h"
3131
#include "fsl_port.h"
Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
SDK_DIR = hw/mcu/nxp/nxp_sdk
2-
DEPS_SUBMODULES += $(SDK_DIR)
2+
MCU = MKL25Z4
3+
MCU_DIR = $(SDK_DIR)/devices/$(MCU)
34

45
CFLAGS += \
5-
-mthumb \
6-
-mabi=aapcs \
76
-mcpu=cortex-m0plus \
87
-DCPU_MKL25Z128VLK4 \
98
-DCFG_TUSB_MCU=OPT_MCU_MKL25ZXX \
@@ -16,29 +15,9 @@ LDFLAGS += \
1615
# mcu driver cause following warnings
1716
CFLAGS += -Wno-error=unused-parameter -Wno-error=format -Wno-error=redundant-decls
1817

19-
MCU_DIR = $(SDK_DIR)/devices/MKL25Z4
20-
2118
# All source paths should be relative to the top level.
2219
LD_FILE = $(MCU_DIR)/gcc/MKL25Z128xxx4_flash.ld
2320

24-
SRC_C += \
25-
src/portable/nxp/khci/dcd_khci.c \
26-
src/portable/nxp/khci/hcd_khci.c \
27-
$(MCU_DIR)/system_MKL25Z4.c \
28-
$(MCU_DIR)/project_template/clock_config.c \
29-
$(MCU_DIR)/drivers/fsl_clock.c \
30-
$(MCU_DIR)/drivers/fsl_gpio.c \
31-
$(MCU_DIR)/drivers/fsl_lpsci.c
32-
33-
INC += \
34-
$(TOP)/hw/bsp/$(BOARD) \
35-
$(TOP)/$(SDK_DIR)/CMSIS/Include \
36-
$(TOP)/$(MCU_DIR) \
37-
$(TOP)/$(MCU_DIR)/drivers \
38-
$(TOP)/$(MCU_DIR)/project_template \
39-
40-
SRC_S += $(MCU_DIR)/gcc/startup_MKL25Z4.S
41-
4221
# For freeRTOS port source
4322
FREERTOS_PORTABLE_SRC = $(FREERTOS_PORTABLE_PATH)/ARM_CM0
4423

@@ -49,4 +28,4 @@ JLINK_DEVICE = MKL25Z128xxx4
4928
PYOCD_TARGET = mkl25zl128
5029

5130
# flash using pyocd
52-
flash: flash-pyocd
31+
flash: flash-jlink

0 commit comments

Comments
 (0)