Skip to content

Commit

Permalink
完善ARMCLIB的默认配置
Browse files Browse the repository at this point in the history
  • Loading branch information
HEYAHONG committed Jan 14, 2025
1 parent b29ce7e commit 953b4b5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions hbox/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ hbox意为HYH的工具箱。
| `HDEFAULTS_LIBC_GLIBC` | C库采用glibc | [glibc](https://www.gnu.org/software/libc/)是大多数Linux发行版采用的C库。与其作用类似的为[musl](http://musl.libc.org/)、uClibc。一般在Linux操作系统环境下,若未采用glibc,大概率采用musl或uClibc作为C库。 |
| `HDEFAULTS_LIBC_MUSL` | C库采用musl | [musl](http://musl.libc.org/)通常用于轻量级场景(如容器、嵌入式Linux),其体积一般相较glibc小,但其某些行为可能与glibc不同。 |
| `HDEFAULTS_LIBC_UCLIBC` | C库采用uClibc | uclibc常采用[uClibc-ng](https://uclibc-ng.org/)版本。uClibc是一个用于嵌入式Linux系统的C库,其体积较小。 |
| `HDEFAULTS_LIBC_ARMCLIB` | C库采用ARM Compiler的C库 | ARM Compiler常见于Keil MDK。一般用于ARM架构的MCU开发。 |

可外部配置的宏定义如下:

Expand Down
9 changes: 9 additions & 0 deletions hbox/hdefaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,15 @@
#endif // HDEFAULTS_LIBC_UCLIBC
#endif

//armclib
#ifdef __ARMCLIB_VERSION
#include "hdefaults/hdefaults_libc_armclib.h"
#ifndef HDEFAULTS_LIBC_ARMCLIB
#define HDEFAULTS_LIBC_ARMCLIB 1
#endif // HDEFAULTS_LIBC_ARMCLIB
#endif


//导入配置文件

//导入config.h
Expand Down
13 changes: 13 additions & 0 deletions hbox/hdefaults/hdefaults_libc_armclib.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/***************************************************************
* Name: hdefaults_libc_armclib.h
* Purpose: 定义一些默认宏定义
* Author: HYH (hyhsystem.cn)
* Created: 2025-01-14
* Copyright: HYH (hyhsystem.cn)
* License: MIT
**************************************************************/
#ifndef __HDEFAULTS_LIBC_ARMCLIB_H__
#define __HDEFAULTS_LIBC_ARMCLIB_H__


#endif

0 comments on commit 953b4b5

Please sign in to comment.