很高兴收到瑞萨电子发放的RA4L1开发板,根据数据手册可以知道
RA4L1的资源很丰富

■ Arm® Cortex®-M33 Core
● Armv8-M architecture with the main extension
● Maximum operating frequency: 80 MHz
● Arm Memory Protection Unit (Arm MPU)
– Protected Memory System Architecture (PMSAv8)
– Secure MPU (MPU_S): 8 regions
– Non-secure MPU (MPU_NS): 8 regions
● SysTick timer
– Embeds two Systick timers: Secure and Non-secure instance
– Driven by LOCO or system clock
● CoreSight™ ETM-M33
■ Memory
● Up to 512-KB code flash memory
● 8-KB data flash memory (100,000 program/erase (P/E) cycles)
● 64-KB SRAM
The RA4L1 group features low power, 32-bit microcontrollers (MCUs) based on the Arm® Cortex®-M33 (CM33) core with
TrustZone®, delivering an ideal balance of low voltage operation, low power consumption, and high performance. The RA4L1offers operation down to 1.6V combined with a low power standby current of as little as 1.65µA and a multitude of low powerfeatures enabling the user to dynamically optimize power/performance to their application requirements. BGA/WLCSP are under development。
RA4L1是基于CM33内核,这个比CM4内核先进一倍,处理浮点运算电机算法非常强悍!!!!!
光对着数据手册,我们无法得知RA4L1的CPU性能参数,就好比新买了一台笔记本电脑,需要用鲁大师先测下CPU能跑多少分!!!
刚好有个专业软件叫coremark专门用来测试嵌入式MCU的性能的。
它的链接如下:
https://github.com/eembc/coremark

使用git下载下来


我们只需要其中的这几个文件

其它的全部删掉!
1。移植coremark
打开portme文件,修改如下:

对应KEIL里的

最大优化等级
同样这样修改


同时将main函数改为coremark_main函数

为了跑coremark,需要使用一个定时器,这里我直接使用systick


#include "hal_data.h"
#include "usart9.h"
#include "RTT.h"
#include "led.h"
#include <stdio.h>
#include <stdlib.h>
#include "coremark.h"
FSP_CPP_HEADER
void R_BSP_WarmStart(bsp_warm_start_event_t event);
FSP_CPP_FOOTER
void coremark_main(void);
/*******************************************************************************************************************//**
- main() is generated by the RA Configuration editor and is used to generate threads if an RTOS is used. This function
- is called by main() when no RTOS is used.
*********************************************************************************************************************/
void hal_entry(void)
{
/ TODO: add your own code here */
UART9_Init();
hal_systick_init();
// printf("\r\n欢迎来到瑞萨电子\r\n");
// printf("很高兴试用RA4L1开发板********\r\n");
// printf("串口输出打印 波特率115200\r\n\r\n");
printf("瑞萨RA4L1 开发板 coremark跑分测试:\r\n\r\n");
coremark_main();
while(1)
{
// printf("RA4L1 Sensor开发板\r\n");
//print("RA4L1 Sensor develop board\r\n");
led_1_flicker();
led_2_flicker();
led_3_flicker();
}
#if BSP_TZ_SECURE_BUILD
/* Enter non-secure code */
R_BSP_NonSecureEnter();
#endif
}
/*******************************************************************************************************************//**
-
This function is called at various points during the startup process. This implementation uses the event that is
-
called right before main() to set up the pins.
-
@param[in] event Where at in the start up process the code is currently at
**********************************************************************************************************************/
void R_BSP_WarmStart (bsp_warm_start_event_t event)
{
if (BSP_WARM_START_RESET == event)
{
#if BSP_FEATURE_FLASH_LP_VERSION != 0
R_FACI_LP->DFLCTL = 1U;
#endif
}
if (BSP_WARM_START_POST_C == event)
{
R_IOPORT_Open(&IOPORT_CFG_CTRL, &IOPORT_CFG_NAME);
#if BSP_CFG_SDRAM_ENABLED
R_BSP_SdramInit(true);
#endif
}
}
#if BSP_TZ_SECURE_BUILD
FSP_CPP_HEADER
BSP_CMSE_NONSECURE_ENTRY void template_nonsecure_callable ();
/* Trustzone Secure Projects require at least one nonsecure callable function in order to build (Remove this if it is not required to build). */
BSP_CMSE_NONSECURE_ENTRY void template_nonsecure_callable ()
{
}
FSP_CPP_FOOTER
#endif
这是核心代码

编译后烧录程序
2。打开串口助手

可以看到,最终RA4L1 coremark 跑分为: 137.447598 分