Skip to content

Commit ec02ddf

Browse files
committed
initial ra6m5 ek, board_test led + sw works
1 parent 14f1123 commit ec02ddf

File tree

16 files changed

+616
-28
lines changed

16 files changed

+616
-28
lines changed

hw/bsp/ra/boards/ra4m1_ek/board.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set(MCU_VARIANT ra4m1)
44
set(JLINK_DEVICE R7FA4M1AB)
55

66
function(update_board TARGET)
7-
target_compile_definitions(${TARGET} PUBLIC)
8-
target_sources(${TARGET} PRIVATE)
9-
target_include_directories(${BOARD_TARGET} PUBLIC)
7+
# target_compile_definitions(${TARGET} PUBLIC)
8+
# target_sources(${TARGET} PRIVATE)
9+
# target_include_directories(${BOARD_TARGET} PUBLIC)
1010
endfunction()

hw/bsp/ra/boards/ra4m3_ek/board.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set(MCU_VARIANT ra4m3)
44
set(JLINK_DEVICE R7FA4M3AF)
55

66
function(update_board TARGET)
7-
target_compile_definitions(${TARGET} PUBLIC)
8-
target_sources(${TARGET} PRIVATE)
9-
target_include_directories(${BOARD_TARGET} PUBLIC)
7+
# target_compile_definitions(${TARGET} PUBLIC)
8+
# target_sources(${TARGET} PRIVATE)
9+
# target_include_directories(${BOARD_TARGET} PUBLIC)
1010
endfunction()

hw/bsp/ra/boards/ra6m1_ek/board.cmake

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ set(MCU_VARIANT ra6m1)
44
set(JLINK_DEVICE R7FA6M1AD)
55

66
function(update_board TARGET)
7-
target_compile_definitions(${TARGET} PUBLIC
8-
)
9-
target_sources(${TARGET} PRIVATE
10-
)
11-
target_include_directories(${BOARD_TARGET} PUBLIC
12-
)
7+
# target_compile_definitions(${TARGET} PUBLIC)
8+
# target_sources(${TARGET} PRIVATE)
9+
# target_include_directories(${BOARD_TARGET} PUBLIC)
1310
endfunction()

hw/bsp/ra/boards/ra6m1_ek/fsp_cfg/bsp/bsp_pin_cfg.h

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

hw/bsp/ra/boards/ra6m5_ek/board.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
set(CMAKE_SYSTEM_PROCESSOR cortex-m33 CACHE INTERNAL "System Processor")
2+
set(MCU_VARIANT ra6m5)
3+
4+
set(JLINK_DEVICE R7FA6M5BH)
5+
6+
function(update_board TARGET)
7+
# target_compile_definitions(${TARGET} PUBLIC)
8+
# target_sources(${TARGET} PRIVATE)
9+
# target_include_directories(${BOARD_TARGET} PUBLIC)
10+
endfunction()

hw/bsp/ra/boards/ra6m5_ek/board.h

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2023 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+
#ifndef _BOARD_H_
28+
#define _BOARD_H_
29+
30+
#ifdef __cplusplus
31+
extern "C" {
32+
#endif
33+
34+
#define LED1 BSP_IO_PORT_00_PIN_08
35+
#define LED_STATE_ON 1
36+
37+
#define SW1 BSP_IO_PORT_00_PIN_05
38+
#define BUTTON_STATE_ACTIVE 0
39+
40+
const ioport_pin_cfg_t board_pin_cfg[] = {
41+
{.pin = BSP_IO_PORT_04_PIN_07, .pin_cfg = ((uint32_t) IOPORT_CFG_PERIPHERAL_PIN | (uint32_t) IOPORT_PERIPHERAL_USB_FS)},
42+
{.pin = BSP_IO_PORT_05_PIN_00, .pin_cfg = ((uint32_t) IOPORT_CFG_PERIPHERAL_PIN | (uint32_t) IOPORT_PERIPHERAL_USB_FS)},
43+
{.pin = BSP_IO_PORT_05_PIN_01, .pin_cfg = ((uint32_t) IOPORT_CFG_PERIPHERAL_PIN | (uint32_t) IOPORT_PERIPHERAL_USB_FS)},
44+
{.pin = LED1, .pin_cfg = ((uint32_t) IOPORT_CFG_PORT_DIRECTION_OUTPUT | (uint32_t) IOPORT_CFG_PORT_OUTPUT_LOW)},
45+
{.pin = SW1, .pin_cfg = ((uint32_t) IOPORT_CFG_PORT_DIRECTION_INPUT)},
46+
};
47+
48+
#ifdef __cplusplus
49+
}
50+
#endif
51+
52+
#endif

hw/bsp/ra/boards/ra6m5_ek/board.mk

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CPU_CORE = cortex-m33
2+
MCU_VARIANT = ra6m5
3+
4+
# For flash-jlink target
5+
JLINK_DEVICE = R7FA6M5BH
6+
7+
flash: flash-jlink
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/* generated configuration header file - do not edit */
2+
#ifndef BSP_CFG_H_
3+
#define BSP_CFG_H_
4+
#ifdef __cplusplus
5+
extern "C" {
6+
#endif
7+
8+
#include "bsp_clock_cfg.h"
9+
#include "bsp_mcu_family_cfg.h"
10+
11+
#define RA_NOT_DEFINED 0
12+
#ifndef BSP_CFG_RTOS
13+
#if (RA_NOT_DEFINED) != (2)
14+
#define BSP_CFG_RTOS (2)
15+
#elif (RA_NOT_DEFINED) != (RA_NOT_DEFINED)
16+
#define BSP_CFG_RTOS (1)
17+
#else
18+
#define BSP_CFG_RTOS (0)
19+
#endif
20+
#endif
21+
#ifndef BSP_CFG_RTC_USED
22+
#define BSP_CFG_RTC_USED (RA_NOT_DEFINED)
23+
#endif
24+
#undef RA_NOT_DEFINED
25+
#if defined(_RA_BOOT_IMAGE)
26+
#define BSP_CFG_BOOT_IMAGE (1)
27+
#endif
28+
#define BSP_CFG_MCU_VCC_MV (3300)
29+
#define BSP_CFG_STACK_MAIN_BYTES (0x400)
30+
#define BSP_CFG_HEAP_BYTES (0x1000)
31+
#define BSP_CFG_PARAM_CHECKING_ENABLE (1)
32+
#define BSP_CFG_ASSERT (0)
33+
#define BSP_CFG_ERROR_LOG (0)
34+
35+
#define BSP_CFG_PFS_PROTECT ((1))
36+
37+
#define BSP_CFG_C_RUNTIME_INIT ((1))
38+
#define BSP_CFG_EARLY_INIT ((0))
39+
40+
#define BSP_CFG_STARTUP_CLOCK_REG_NOT_RESET ((0))
41+
42+
#ifndef BSP_CLOCK_CFG_MAIN_OSC_POPULATED
43+
#define BSP_CLOCK_CFG_MAIN_OSC_POPULATED (1)
44+
#endif
45+
46+
#ifndef BSP_CLOCK_CFG_MAIN_OSC_CLOCK_SOURCE
47+
#define BSP_CLOCK_CFG_MAIN_OSC_CLOCK_SOURCE (0)
48+
#endif
49+
#ifndef BSP_CLOCK_CFG_SUBCLOCK_DRIVE
50+
#define BSP_CLOCK_CFG_SUBCLOCK_DRIVE (0)
51+
#endif
52+
#ifndef BSP_CLOCK_CFG_SUBCLOCK_POPULATED
53+
#define BSP_CLOCK_CFG_SUBCLOCK_POPULATED (1)
54+
#endif
55+
#ifndef BSP_CLOCK_CFG_SUBCLOCK_STABILIZATION_MS
56+
#define BSP_CLOCK_CFG_SUBCLOCK_STABILIZATION_MS 1000
57+
#endif
58+
59+
// for SystemInit()
60+
void bsp_init(void * p_args);
61+
62+
#ifdef __cplusplus
63+
}
64+
#endif
65+
#endif /* BSP_CFG_H_ */
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* generated configuration header file - do not edit */
2+
#ifndef BSP_MCU_DEVICE_CFG_H_
3+
#define BSP_MCU_DEVICE_CFG_H_
4+
#define BSP_CFG_MCU_PART_SERIES (6)
5+
#endif /* BSP_MCU_DEVICE_CFG_H_ */
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* generated configuration header file - do not edit */
2+
#ifndef BSP_MCU_DEVICE_PN_CFG_H_
3+
#define BSP_MCU_DEVICE_PN_CFG_H_
4+
#define BSP_MCU_R7FA6M5BH3CFC
5+
#define BSP_MCU_FEATURE_SET ('B')
6+
#define BSP_ROM_SIZE_BYTES (2097152)
7+
#define BSP_RAM_SIZE_BYTES (524288)
8+
#define BSP_DATA_FLASH_SIZE_BYTES (8192)
9+
#define BSP_PACKAGE_LQFP
10+
#define BSP_PACKAGE_PINS (176)
11+
#endif /* BSP_MCU_DEVICE_PN_CFG_H_ */

0 commit comments

Comments
 (0)