Ignore:
Timestamp:
Jan 21, 2018, 12:10:09 AM (6 years ago)
Author:
coas-nagasima
Message:

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

Location:
EcnlProtoTool/trunk/ntshell/fatfs
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/ntshell/fatfs/ff.c

    r321 r331  
    1919#include "ff.h"                 /* Declarations of FatFs API */
    2020#include "diskio.h"             /* Declarations of disk I/O functions */
    21 
     21#include "util/ntstdio.h"
     22#include "shellif.h"
    2223
    2324/*--------------------------------------------------------------------------
     
    39093910                                        if (dir[DIR_Attr] & AM_DIR) {   /* The new object is a directory */
    39103911                                                temp_new_path = (TCHAR *)ff_memalloc((_MAX_LFN + 1) * sizeof(WCHAR));
    3911                                                 snprintf(temp_new_path, _MAX_LFN, "%s/%s", path_new, basename((char *)path_old));
     3912                                                ntstdio_snprintf(temp_new_path, _MAX_LFN, "%s/%s", path_new, basename((char *)path_old));
    39123913                                                res = follow_path(&djn, temp_new_path);
    39133914                                        }
  • EcnlProtoTool/trunk/ntshell/fatfs/ff.h

    r321 r331  
    162162        const TCHAR*    pat;    /* Pointer to the name matching pattern */
    163163#endif
    164         struct dirent *dirent;
    165164} DIR;
    166165
  • EcnlProtoTool/trunk/ntshell/fatfs/ffarch.c

    r321 r331  
    3939 */
    4040
     41#include "shellif.h"
    4142#include <kernel.h>
    4243#include <stdlib.h>
     
    5051#include "ff.h"
    5152#include "tlsf.h"
    52 #include "ntstdio.h"
     53#include "util/ntstdio.h"
    5354
    5455#define SIO_PORTID 1
     
    5859static pool_t sys_pool;
    5960
    60 uint32_t  __HeapBase;
    61 uint32_t  __HeapLimit;
     61uint8_t shell_heap[64 * 1024];
    6262FATFS RomDisk;
    6363
     
    118118void sys_init(void)
    119119{
    120         sys_tlsf = tlsf_create(&__HeapBase);
     120        sys_tlsf = tlsf_create(&shell_heap);
    121121        if (sys_tlsf == NULL)
    122122                return;
    123123
    124         sys_pool = tlsf_add_pool(sys_tlsf, ((uint8_t *)&__HeapBase) + tlsf_size(), ((size_t)&__HeapLimit - (size_t)&__HeapBase) - tlsf_size());
     124        sys_pool = tlsf_add_pool(sys_tlsf, ((uint8_t *)&shell_heap) + tlsf_size(), sizeof(shell_heap) - tlsf_size());
    125125}
    126126
  • EcnlProtoTool/trunk/ntshell/fatfs/fftime.c

    r330 r331  
    3030#include "ff.h"
    3131
     32int shell_errno;
     33
    3234/* 2000-03-01 (mod 400 year, immediately after feb29 */
    3335#define LEAPOCH (946684800LL + 86400*(31+29))
     
    200202        * __secs_to_zone cannot safely handle them. */
    201203        if (*t < INT_MIN * 31622400LL || *t > INT_MAX * 31622400LL) {
    202                 errno = EOVERFLOW;
     204                shell_errno = EOVERFLOW;
    203205                return 0;
    204206        }
    205207        //TODO:__secs_to_zone(*t, 0, &tm->tm_isdst, &tm->__tm_gmtoff, 0, &tm->__tm_zone);
    206208        if (__secs_to_tm((long long)*t /*+ tm->__tm_gmtoff*/, tm) < 0) {
    207                 errno = EOVERFLOW;
     209                shell_errno = EOVERFLOW;
    208210                return 0;
    209211        }
     
    220222{
    221223        if (__secs_to_tm(*t, tm) < 0) {
    222                 errno = EOVERFLOW;
     224                shell_errno = EOVERFLOW;
    223225                return 0;
    224226        }
     
    249251
    250252error:
    251         errno = EOVERFLOW;
     253        shell_errno = EOVERFLOW;
    252254        return -1;
    253255}
     
    258260        struct tm _tm;
    259261
    260         time(&temp);
     262        temp = rtc_read();
    261263        gmtime_r(&temp, &_tm);
    262264
  • EcnlProtoTool/trunk/ntshell/fatfs/sdfs.h

    r321 r331  
    2424
    2525#include <stdint.h>
    26 #include <time.h>
     26//#include <time.h>
     27#define __NEED_time_t
     28#include "../musl-1.1.18/include/bits/alltypes.h"
    2729#include "gpio_api.h"
    2830#include "spi_api.h"
Note: See TracChangeset for help on using the changeset viewer.