mirror of
https://github.com/pvvx/RTL00_HelloWorld.git
synced 2025-07-31 20:21:03 +00:00
add
This commit is contained in:
parent
56693eef0d
commit
636d16a63b
4 changed files with 166 additions and 16 deletions
|
|
@ -199,7 +199,7 @@ enum _SPIC_BIT_MODE_ {
|
|||
#define FLASH_VLD_DUAL_CMDS (BIT_WR_BLOCKING | BIT_RD_DUAL_IO)
|
||||
#define FLASH_VLD_QUAD_CMDS (BIT_WR_BLOCKING | BIT_WR_QUAD_II | BIT_RD_QUAD_IO)
|
||||
#endif
|
||||
#if 0
|
||||
#if 1
|
||||
//======================================================
|
||||
// Function prototype
|
||||
BOOLEAN SpicFlashInitRtl8195A(u8 SpicBitMode);
|
||||
|
|
|
|||
|
|
@ -7,9 +7,12 @@
|
|||
|
||||
#include "strproc.h"
|
||||
#include "basic_types.h"
|
||||
//#include "rtl_std_lib/include/rt_lib_rom.h"
|
||||
// #include "fwlib/hal_misc.h"
|
||||
// #include "rtl_std_lib/include/rtl_lib.h"
|
||||
|
||||
#define _ROM_CALL_
|
||||
|
||||
extern uint32_t HalDelayUs(uint32_t us);
|
||||
extern uint32_t DiagPrintf(const char *fmt, ...);
|
||||
extern uint32_t HalGetCpuClk(VOID);
|
||||
|
|
@ -61,15 +64,20 @@ extern COMMAND_TABLE UartLogRomCmdTable[];
|
|||
// #define sprintf prvDiagSPrintf
|
||||
#define snprintf DiagSnPrintf
|
||||
|
||||
#define memset rtl_memset_v1_00
|
||||
#define memchr rtl_memchr_v1_00
|
||||
#define memmove rtl_memmove_v1_00
|
||||
#define memcpy rtl_memcpy_v1_00
|
||||
extern _ROM_CALL_ void * rtl_memset_v1_00(void * m , int c , size_t n);
|
||||
extern _ROM_CALL_ void * rtl_memchr_v1_00(const void * src_void , int c , size_t length);
|
||||
extern _ROM_CALL_ void * rtl_memmove_v1_00( void * dst_void , const void * src_void , size_t length);
|
||||
extern _ROM_CALL_ void * rtl_memcpy_v1_00(void * __restrict dst0 , const void * __restrict src0 , size_t len0);
|
||||
|
||||
#define strcmp rtl_strcmp_v1_00
|
||||
extern _ROM_CALL_ int rtl_strcmp_v1_00(const char *s1 , const char *s2);
|
||||
|
||||
#define memchr rtl_memchr
|
||||
#define memcmp rtl_memcmp
|
||||
#define memcpy rtl_memcpy
|
||||
#define memmove rtl_memmove
|
||||
#define memset rtl_memset
|
||||
#define strcat rtl_strcat
|
||||
#define strchr rtl_strchr
|
||||
#define strcmp(s1, s2) rtl_strcmp((const char *)s1, (const char *)s2)
|
||||
#define strcpy rtl_strcpy
|
||||
#define strlen(str) rtl_strlen((const char *)str)
|
||||
#define strncat rtl_strncat
|
||||
|
|
@ -86,9 +94,17 @@ extern COMMAND_TABLE UartLogRomCmdTable[];
|
|||
// #define sscanf rtl_sscanf
|
||||
#define strnlen rtl_strnlen
|
||||
// #define strlen rtl_strlen
|
||||
|
||||
|
||||
|
||||
|
||||
#define strstr rtl_strstr
|
||||
#define vsnprintf rtl_vfprintf_r
|
||||
|
||||
/*
|
||||
#define fflush_r rtl_fflush_r_v1_00
|
||||
#define vfprintf_r rtl_vfprintf_r_v1_00
|
||||
|
||||
extern _ROM_CALL_ int rtl_fflush_r_v1_00(struct _reent *ptr, register FILE * fp);
|
||||
extern _ROM_CALL_ int rtl_vfprintf_r_v1_00(struct _reent *, FILE *, const char *, va_list);
|
||||
*/
|
||||
|
||||
#endif // __PLATFORM_ROMLIB_H__
|
||||
|
|
|
|||
|
|
@ -9,9 +9,10 @@
|
|||
|
||||
|
||||
#include <basic_types.h>
|
||||
#include <diag.h>
|
||||
#define _ROM_CALL_
|
||||
//#include <diag.h>
|
||||
|
||||
#include <reent.h>
|
||||
//#include <reent.h>
|
||||
|
||||
#include "../libc/rom/string/rom_libc_string.h"
|
||||
#include "../libgloss/rtl8195a/rom/rom_libgloss_retarget.h"
|
||||
|
|
@ -138,7 +139,7 @@ extern _ROM_CALL_ _Bigint * rtl_i2b_v1_00(struct _reent *ptr, int i );
|
|||
extern _ROM_CALL_ _Bigint * rtl_pow5mult_v1_00(struct _reent * ptr, _Bigint *b, int k);
|
||||
extern _ROM_CALL_ _Bigint * rtl_multadd_v1_00(struct _reent *ptr, _Bigint * b, int m, int a);
|
||||
extern _ROM_CALL_ _Bigint * rtl_mult_v1_00(struct _reent *ptr, _Bigint *a, _Bigint *b);
|
||||
extern _ROM_CALL_ int rtl_hi0bits_v1_00(register __ULong x);
|
||||
//extern _ROM_CALL_ int rtl_hi0bits_v1_00(register __ULong x);
|
||||
extern _ROM_CALL_ _Bigint *rtl_lshift_v1_00(struct _reent *ptr, _Bigint *b, int k);
|
||||
extern _ROM_CALL_ int rtl_cmp_v1_00(_Bigint *a, _Bigint *b);
|
||||
extern _ROM_CALL_ _Bigint *rtl_diff_v1_00(struct _reent* ptr, _Bigint *a, _Bigint *b);
|
||||
|
|
@ -154,8 +155,8 @@ extern char * rtl_dtoa_r_v1_00(struct _reent *ptr, double _d, int mode, int ndig
|
|||
//
|
||||
// mallocr
|
||||
//
|
||||
#include <sys/config.h>
|
||||
#include <reent.h>
|
||||
//#include <sys/config.h>
|
||||
//#include <reent.h>
|
||||
|
||||
|
||||
|
||||
|
|
@ -222,7 +223,7 @@ extern _ROM_CALL_ _READ_WRITE_RETURN_TYPE rtl_seofread_v1_00(
|
|||
_PTR cookie,
|
||||
char *buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE len);
|
||||
|
||||
/*
|
||||
extern _ROM_CALL_ _fpos_t rtl_sseek_v1_00(
|
||||
struct _reent *ptr _AND
|
||||
void *cookie _AND
|
||||
|
|
@ -236,7 +237,7 @@ extern _ROM_CALL_ int rtl_sclose_v1_00(
|
|||
extern _ROM_CALL_ void * rtl_sbrk_r_v1_00(
|
||||
struct _reent *ptr,
|
||||
ptrdiff_t incr);
|
||||
|
||||
*/
|
||||
//
|
||||
// vfprintf
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue