Skip to content

Commit 20191b7

Browse files
committed
[bsp][renesas][ra4m1-ek] support RT-Thread Nano
1 parent 6e4bb73 commit 20191b7

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

bsp/renesas/ra4m1-ek/Kconfig

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,17 @@ PKGS_DIR := packages
1111

1212
ENV_DIR := /
1313

14+
config SOC_R7FA4M1AB
15+
bool
16+
select SOC_SERIES_R7FA4M1
17+
select RT_USING_COMPONENTS_INIT
18+
select RT_USING_USER_MAIN
19+
default y
20+
1421
source "$(RTT_DIR)/Kconfig"
1522
osource "$PKGS_DIR/Kconfig"
1623
rsource "../libraries/Kconfig"
17-
source "$(BSP_DIR)/board/Kconfig"
24+
25+
if !RT_USING_NANO
26+
rsource "$(BSP_DIR)/board/Kconfig"
27+
endif

bsp/renesas/ra4m1-ek/rtconfig.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
OBJCPY = PREFIX + 'objcopy'
4444
NM = PREFIX + 'nm'
4545

46-
DEVICE = ' -mcpu=cortex-m33 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
46+
DEVICE = ' -mcpu=cortex-m4 -mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=hard -ffunction-sections -fdata-sections'
4747
CFLAGS = DEVICE + ' -Dgcc'
4848
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
4949
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread.map,-cref,-u,Reset_Handler -T script/fsp.ld -L script/'
@@ -69,9 +69,9 @@
6969
LINK = 'armlink'
7070
TARGET_EXT = 'axf'
7171

72-
DEVICE = ' --cpu Cortex-M33'
72+
DEVICE = ' --cpu Cortex-M4'
7373

74-
CFLAGS = ' -mcpu=Cortex-M33 -xc -std=c99 --target=arm-arm-none-eabi -mfpu=fpv5-sp-d16 -mfloat-abi=hard -c'
74+
CFLAGS = ' -mcpu=Cortex-M4 -xc -std=c99 --target=arm-arm-none-eabi -mfpu=fpv5-sp-d16 -mfloat-abi=hard -c'
7575
CFLAGS += ' -fno-rtti -funsigned-char -ffunction-sections'
7676
CFLAGS += ' -Wno-license-management -Wuninitialized -Wall -Wmissing-declarations -Wpointer-arith -Waggregate-return -Wfloat-equal'
7777

bsp/renesas/ra4m1-ek/src/hal_entry.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@
1212

1313
#include <rtthread.h>
1414
#include "hal_data.h"
15+
#ifdef RT_USING_NANO
16+
#include <drv_gpio.h>
17+
#else
1518
#include <rtdevice.h>
16-
#include "fal.h"
19+
#endif /* RT_USING_NANO */
1720

1821
#define LED_PIN BSP_IO_PORT_01_PIN_06 /* Onboard LED pins */
1922
#define USER_BUTTON_PIN "P105"

0 commit comments

Comments
 (0)