summaryrefslogtreecommitdiff
path: root/components/utilities
diff options
context:
space:
mode:
authorBruceOu <[email protected]>2022-01-09 10:06:01 +0800
committerGitHub <[email protected]>2022-01-09 10:06:01 +0800
commit6278523af7be1d89603fb7eb834397c52aa2c6d7 (patch)
tree5858f02fceeb71da3d7d3065a577673e51dad635 /components/utilities
parent77ccb89590e7f5f97fdc2f9ed2671849fbafd510 (diff)
parentf21af8362b22b1f19fcf7b519192f5c71b4fa8d9 (diff)
Merge branch 'master' into master
Diffstat (limited to 'components/utilities')
-rw-r--r--components/utilities/utest/utest.c4
-rw-r--r--components/utilities/var_export/var_export.c6
-rw-r--r--components/utilities/zmodem/rz.c4
-rw-r--r--components/utilities/zmodem/sz.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/components/utilities/utest/utest.c b/components/utilities/utest/utest.c
index 7103efb89c..21dc93100b 100644
--- a/components/utilities/utest/utest.c
+++ b/components/utilities/utest/utest.c
@@ -68,7 +68,7 @@ void utest_log_lv_set(rt_uint8_t lv)
int utest_init(void)
{
/* initialize the utest commands table.*/
-#if defined(__CC_ARM) || defined(__CLANG_ARM) /* ARM C Compiler */
+#if defined(__ARMCC_VERSION) /* ARM C Compiler */
extern const int UtestTcTab$$Base;
extern const int UtestTcTab$$Limit;
tc_table = (utest_tc_export_t)&UtestTcTab$$Base;
@@ -174,7 +174,7 @@ static void utest_run(const char *utest_name)
tc_run_num = 0;
if (tc_fail_list)
{
- memset(tc_fail_list, 0, TC_FAIL_LIST_SIZE);
+ rt_memset(tc_fail_list, 0, TC_FAIL_LIST_SIZE);
}
LOG_I("[==========] [ utest ] loop %d/%d", index + 1, tc_loop);
diff --git a/components/utilities/var_export/var_export.c b/components/utilities/var_export/var_export.c
index f4623dec04..1e54f39362 100644
--- a/components/utilities/var_export/var_export.c
+++ b/components/utilities/var_export/var_export.c
@@ -20,7 +20,7 @@ static rt_size_t ve_exporter_num = 0;
#endif
/* for ARM C and IAR Compiler */
-#if defined(__CC_ARM) || defined(__CLANG_ARM) || defined (__ICCARM__) || defined(__ICCRX__)
+#if defined(__ARMCC_VERSION) || defined (__ICCARM__) || defined(__ICCRX__)
static RT_USED const struct ve_exporter __ve_table_start
RT_SECTION("0.""VarExpTab") = {"ve_start", "ve_start", 0};
@@ -43,7 +43,7 @@ RT_USED const struct ve_exporter __ve_table_end = { "ve_end", "ve_end", 2};
int var_export_init(void)
{
/* initialize the var export table.*/
-#if defined(__CC_ARM) || defined(__CLANG_ARM) /* for ARM C Compiler */
+#if defined(__ARMCC_VERSION) /* for ARM C Compiler */
ve_exporter_table = &__ve_table_start + 1;
ve_exporter_num = &__ve_table_end - &__ve_table_start;
#elif defined (__GNUC__) /* for GCC Compiler */
@@ -94,7 +94,7 @@ int var_export_init(void)
}
}
ve_exporter_table = ve_exporter_tab;
-#endif /* __CC_ARM || __CLANG_ARM */
+#endif /* __ARMCC_VERSION */
return ve_exporter_num;
}
diff --git a/components/utilities/zmodem/rz.c b/components/utilities/zmodem/rz.c
index 1845fd24c2..224d8f95a8 100644
--- a/components/utilities/zmodem/rz.c
+++ b/components/utilities/zmodem/rz.c
@@ -44,7 +44,7 @@ void zr_start(char *path)
rt_kprintf("zf: out of memory\r\n");
return;
}
- memset(zf, 0, sizeof(struct zfile));
+ rt_memset(zf, 0, sizeof(struct zfile));
zf->fname = path;
zf->fd = -1;
res = zrec_files(zf);
@@ -272,7 +272,7 @@ static rt_err_t zget_file_info(char *name, struct zfile *zf)
rt_free(full_path);
return -RT_ERROR;
}
- memset(full_path,0,len);
+ rt_memset(full_path,0,len);
for (i=0,ptr=zf->fname;i<len-strlen(name)-2;i++)
full_path[i] = *ptr++;
diff --git a/components/utilities/zmodem/sz.c b/components/utilities/zmodem/sz.c
index 0b0b5515f0..e6096756b1 100644
--- a/components/utilities/zmodem/sz.c
+++ b/components/utilities/zmodem/sz.c
@@ -47,7 +47,7 @@ void zs_start(char *path)
return;
}
rt_kprintf("\r\nsz: ready...\r\n"); /* here ready to send things */
- memset(zf, 0, sizeof(struct zfile));
+ rt_memset(zf, 0, sizeof(struct zfile));
zf->fname = path;
zf->fd = -1;
res = zsend_files(zf);