2177 views|0 replies

501

Posts

4

Resources
The OP
 

[RTT & Renesas ultra-low power MCU RA2L1 development board] Evaluation of the development environment based on MDK+RT-Thread [Copy link]

This post was last edited by qinyunti on 2022-11-12 10:27

Prepare

The prerequisite is that MDK and JLINK have been installed.

MDK version V5.37

JLINK version V7.82 (V7.5 or above)

Development board reference

https://www2.renesas.cn/cn/zh/products/microcontrollers-microprocessors/ra-cortex-m-mcus/cpk-ra2l1-evaluation-board#overview

Code Download

git clone https://github.com/RT-Thread/rt-thread.git

Double-click rt-thread\bsp\renesas\ra2l1-cpk\project.uvprojx

The package installation prompt will pop up automatically, just click Install to install it.

If prompted to upgrade Jlink, click on it.

Project Configuration

Right click on the project directory on the left

Target1->Options for Target 'Target1'

Select the chip as follows

Fix compilation errors

If there are compilation errors, please refer to the following modifications

rt-thread\bsp\renesas\ra2l1-cpk\ra\fsp\src\r_icu\r_icu.c

Comment out #include "r_icu_cfg.h"

rt-thread\bsp\renesas\ra2l1-cpk\rtconfig.h

#define RT_CONSOLE_DEVICE_NAME "uart" to

#define RT_CONSOLE_DEVICE_NAME "uart9"

Comment out

#define RT_USING_DFS

#define DFS_USING_POSIX

#define RT_USING_SERIAL_V1

Change to

#define RT_USING_SERIAL_V2

#define BSP_USING_UART

Change to

#define BSP_USING_UART9

Add two lines after

#define BSP_UART9_RX_BUFSIZE 128

#define BSP_UART9_TX_BUFSIZE 128

Compile

JFlashLite Download

JFlashLite.exe

Select the file rt-thread\bsp\renesas\ra2l1-cpk\Objects\rtthread.hex

JLink Simulation Debug

After confirming that the project configuration is set up, you can enter the simulation environment

There is a pit here. If the following information is prompted

Then check the file JLinkSettings.ini in the project directory

Put the inside

Device="xxxx"

Change to

Device="R7FA2L1AB"

Even if you select the chip in the project configuration, it will not be automatically modified here and needs to be modified manually.

Debug serial port

rtconfig.h

#define RT_CONSOLE_DEVICE_NAME "uart"

Change to

#define RT_CONSOLE_DEVICE_NAME "uart9"

wiring

UART9: P109(TXD)-J2-2, P110(RXD)-J2-3 GND-J2-8

The serial port is disconnected, the parameters are 115200-8-n-1 without flow control.

You can see the print by running the program. You can enter help to view the command.

This post is from Renesas Electronics MCUs

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list