Skip to content

Commit 779149e

Browse files
authored
Merge pull request hathach#1858 from bpaddock/FRDM_K32L24AS
Add support for the NXP FRDM-K32L2A4S eval board.
2 parents f1a859d + ec0f25d commit 779149e

File tree

25 files changed

+431
-177
lines changed

25 files changed

+431
-177
lines changed

.github/workflows/build_arm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
# Alphabetical order
3535
- 'broadcom_32bit'
3636
- 'imxrt'
37+
- 'kinetis_k32 kinetis_kl'
3738
- 'lpc15 lpc18'
3839
- 'lpc54 lpc55'
3940
- 'mm32 msp432e4'

docs/reference/supported.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ Kinetis
253253
^^^^^^^
254254

255255
- `Freedom FRDM-KL25Z <https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/freedom-development-platform-for-kinetis-kl14-kl15-kl24-kl25-mcus:FRDM-KL25Z>`__
256+
- `Freedom FRDM-K32L2A4S <https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/nxp-freedom-platform-for-k32-l2a-mcus:FRDM-K32L2A4S>`__
256257
- `Freedom FRDM-K32L2B3 <https://www.nxp.com/design/development-boards/freedom-development-boards/mcu-boards/nxp-freedom-development-platform-for-k32-l2b-mcus:FRDM-K32L2B3>`__
257258
- `KUIIC <https://github.com/nxf58843/kuiic>`__
258259

examples/device/net_lwip_webserver/skip.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ mcu:MKL25ZXX
88
family:broadcom_64bit
99
family:broadcom_32bit
1010
board:curiosity_nano
11+
board:frdm_kl25z

hw/bsp/board_mcu.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@
3939
//--------------------------------------------------------------------+
4040

4141
// Include order follows OPT_MCU_ number
42-
#if CFG_TUSB_MCU == OPT_MCU_LPC11UXX || CFG_TUSB_MCU == OPT_MCU_LPC13XX || \
43-
CFG_TUSB_MCU == OPT_MCU_LPC15XX || CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || \
44-
CFG_TUSB_MCU == OPT_MCU_LPC177X_8X || CFG_TUSB_MCU == OPT_MCU_LPC18XX || \
45-
CFG_TUSB_MCU == OPT_MCU_LPC40XX || CFG_TUSB_MCU == OPT_MCU_LPC43XX
42+
#if TU_CHECK_MCU(OPT_MCU_LPC11UXX, OPT_MCU_LPC13XX, OPT_MCU_LPC15XX) || \
43+
TU_CHECK_MCU(OPT_MCU_LPC175X_6X, OPT_MCU_LPC177X_8X, OPT_MCU_LPC18XX) || \
44+
TU_CHECK_MCU(OPT_MCU_LPC40XX, OPT_MCU_LPC43XX)
4645
#include "chip.h"
4746

48-
#elif CFG_TUSB_MCU == OPT_MCU_LPC51UXX || CFG_TUSB_MCU == OPT_MCU_LPC54XXX || \
49-
CFG_TUSB_MCU == OPT_MCU_LPC55XX || CFG_TUSB_MCU == OPT_MCU_MKL25ZXX || \
50-
CFG_TUSB_MCU == OPT_MCU_K32L2BXX
47+
#elif TU_CHECK_MCU(OPT_MCU_LPC51UXX, OPT_MCU_LPC54XXX, OPT_MCU_LPC55XX)
48+
#include "fsl_device_registers.h"
49+
50+
#elif TU_CHECK_MCU(OPT_MCU_KINETIS_KL, OPT_MCU_KINETIS_K32)
5151
#include "fsl_device_registers.h"
5252

5353
#elif CFG_TUSB_MCU == OPT_MCU_NRF5X

hw/bsp/frdm_k32l2b/board.mk

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

hw/bsp/frdm_kl25z/board.mk

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2019, Ha Thach (tinyusb.org)
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*
24+
* This file is part of the TinyUSB stack.
25+
*/
26+
27+
28+
#ifndef BOARD_H_
29+
#define BOARD_H_
30+
31+
#include "fsl_device_registers.h"
32+
33+
// LED
34+
// The Red LED is on PTE29.
35+
// The Green LED is on PTC4.
36+
// The Blue LED is on PTE31.
37+
#define LED_PIN_CLOCK kCLOCK_PortC
38+
#define LED_GPIO GPIOC
39+
#define LED_PORT PORTC
40+
#define LED_PIN 4
41+
#define LED_STATE_ON 0
42+
43+
// SW3 button1
44+
#define BUTTON_PIN_CLOCK kCLOCK_PortE
45+
#define BUTTON_GPIO GPIOE
46+
#define BUTTON_PORT PORTE
47+
#define BUTTON_PIN 4
48+
#define BUTTON_STATE_ACTIVE 0
49+
50+
// UART
51+
#define UART_PORT LPUART0
52+
#define UART_PIN_CLOCK kCLOCK_PortB
53+
#define UART_PIN_GPIO GPIOB
54+
#define UART_PIN_PORT PORTB
55+
#define UART_PIN_RX 16u
56+
#define UART_PIN_TX 17u
57+
58+
#endif /* BOARD_H_ */
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
MCU = K32L2A41A
2+
3+
CFLAGS += \
4+
-mcpu=cortex-m0plus \
5+
-DCPU_K32L2A41VLH1A \
6+
7+
# mcu driver cause following warnings
8+
CFLAGS += -Wno-error=unused-parameter -Wno-error=redundant-decls -Wno-error=cast-qual
9+
10+
# All source paths should be relative to the top level.
11+
LD_FILE = $(MCU_DIR)/gcc/K32L2A41xxxxA_flash.ld
12+
13+
SRC_C += \
14+
$(MCU_DIR)/project_template/clock_config.c \
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

0 commit comments

Comments
 (0)