모바일 프로에서 PocketDOS를 설치후, TC2.0을 통해서 프로그래밍을 할 수 있고,

다음처럼 lccmips를 사용할 수 있습니다.

요약하자면 w32console 환경에서 vim 또는 editor를 통해서 에디팅을 한 후

mipscc로 c compile후 생성된 asm을 asm.exe로 실행해보거나 exe를 만들어보는 것입니다.

그러나 마지막 exe 생성은 잘 안되었고요. run은 되는 것 확인했습니다.

적어도 mips머신에서 mips programming을 해볼 수 있다는데 의의가 있는것 같습니다.

첨부파일은 lccmips와 asm, w32console, vim, editor와 최소 dll 포함본 입니다.





관련 파일 다운로드 받는 곳
msvcrt.dll 다운받아야 함.
http://www.rainer-keuchel.de/wince/dirlist.html

MipsLcc 1.07 과 Mips Assembler, console
http://users.rcn.com/pjsteuert/
http://www.hpcfactor.com/forums/forums/thread-view.asp?tid=4205&start=1


vilcc
mips용 vim은 존재하지만 c-subset compiler는 arm용으로밖에 없음
http://www.freewarepocketpc.net/ppc-download-pocket-vic-v1-10.html

PocketGCC
c++ compiler(linker, library존재) ARM용 WinCE에서 돔
PocketPC, PocketPC 2002, Windows Mobile and HandheldPC devices with ARM-compatible processors.
http://www.freewarepocketpc.net/ppc-download-pocket-gcc.html


freecompiler (mips용은 아님)
http://www.freeprogrammingresources.com/cppcomp.html


-----------------------------------------------

오후 11:30 2006-08-27
조경민 bro@shinbiro.com
MobilePro780에서 lccmips 사용하기 (WInCE 2.11 mips)
===========================================================

1. mipscc 설치하기
----------------------------------------------
lccmips 다운 받기
http://users.rcn.com/pjsteuert/

아래 네개를 받는다.
lccmips211.zip - port of lcc c compiler to the windows ce 211 NEC
asm211.zip - assembler for the above c compiler
commandline211.zip - w32console.exe command line for the NEC MobilePro 770
tools211.zip - various exes for the w32console environment

위를 돌리기 위해서 celib.dll과 msvcrt.dll이 필요하다.
celib.dll은 tools211.zip에 포함되어 있다.

msvcrt.dll은 아래에서 받는다.
http://www.rainer-keuchel.de/wince/dirlist.html

vim으로 편집하고 싶다면
vim도 위에서 다운받는다.
기본 tools211.zip의 editor.exe를 사용해도 된다 (cedialogs.dll과 cedialogsx.dll도 필요)

2. 컴파일 해보기
------------------------------------------------
모두 Storage Card2lcc에  설치했다면
w32console.exe를 실행 한 후
cd 'Storage Card2'
실행 후
cd lcc
한다. (기본 cmd로 하면 나중에 mipscc가 안먹는다.)

그런데 cd말고 다른 명령어들 (ls, cp, mv, find, grep, find 등)은
내장 명령어로 기본으로 사용안한다.
builtin ls를 해주면 내장으로 사용하겠다고 하는 명령
그렇게 한 후
ls를 해보면 리스트가 나온다.

vim test.c


#include <stdio.h>

void main()
{
   printf("aaa
");
}
하고 저장한다.

pipeable mipscc
를 하여 mipscc의 결과가 pipe로 연결되어 w32console에 보이도록 한다.
mipscc test.c
을 하면
test.asm 파일이 생긴다.

pipeable asm
하여 역시 asm.exe를 w32console 파이프에 연결한 후,
(연결 안하면 루트 파일에 어쩌구_stdout.txt 등에 쓰여진다)

asm test run
하면 출력된다.

어디서 읽은바로는
exes 폴더를 생성 후 asm.exe를 거기에 복사한 후 복사된 asm.exe를 proto.exe로 이름을
바꾸고
asm test bld
라고 하면 exesproto.exe가 그 결과 파일이 된다고 하던데 잘되지 않았다.;

3. 설정 파일 만들어 두기
------------------------------------------------------

만일 builtin과 pipeable을 매번하고 싶지 않다면
$HOME/_console 파일을 만든 후

builtin rm mv ls more
pipeable mipscc asm vim sort grep find

을 넣어두면 된다. (물론 외부 실행파일인 sort.exe grpe.exe find.exe도 있다고 가정하에 넣은것임,
tools211.zip에 모두 들어 있음)
근데 문제는 $HOME은 레지스트리 편집기로 직접 추가해야한다는 것이다 -_-

먼저 TascalRegEdit를 설치한 후 실행하여
HKEY_LOCAL_MACHINEEnvironment 키를 생성 한 후 그 안에서 두개의 문자열을 생성한다.
PATH = Storage Card2lcc
HOME = Storage Card2lcc

PATH는 외부 실행 파일을 찾을 곳이고, HOME은 _console을 시작시 읽기 위해서 넣는 것이다.


참고1. v32console 명령어
        cd <dirname>                - Change directory.
        pwd                        - Print working directory.
        mv <oldfile> <newfile>        - Move file.
        cp <oldfile> <newfile>  - Copy file.
        rm <file>                - Delete file.
        dir [-l] [dirname]        - List directory. -l prints filesize.
        mkdir <dirname>                - Make directory.
        more <filename>                - Display text file.
        env <varname>                - Display environment var.
        setenv <var> <val>        - Set env var, also in registry!
        x <cmdline>                - Execute commandline and wait.
        exec <cmdline>                - Execute commandline and wait.
        start <cmdline>                - Execute commandline and dont wait.
        q                        - Exit.
        quit                        - Exit.
        exit                        - Exit.
        !                        - Repeat last command.
        ls [-l] [<pattern>]        - List files with globbing.
        cls                        - Clear screen.

        echo                        - Print string.
        read <localvar>                - Read string from console.
        set <localvar> = <value> - Set variable. Needs spaces around '='.

        Some of these commands must now be specified as builtin in
        $HOME/.console. See below.

참고2. celib.dll이 지원하는 함수들

    Currently implemented functions

XCEAdjustWindowRect
XCEAppendMenuA
XCEAttachThreadInput
XCEBuildCommDCBA
XCECallWindowProcA
XCECharLowerA
XCECharUpperA
XCEChooseColor
XCECloseHandle
XCECopyFileA
XCECopyFileW
XCECopyMemory
XCECreateDCA
XCECreateDirectoryA
XCECreateDirectoryW
XCECreateEventA
XCECreateFileA
XCECreateFileForMappingA
XCECreateFileForMappingW
XCECreateFileMappingA
XCECreateFileW
XCECreateFontIndirectA
XCECreateMutexA
XCECreatePipe
XCECreateProcessA
XCECreateWindowA
XCECreateWindowExA
XCEDefWindowProcA
XCEDeleteFileA
XCEDeleteFileW
XCEDialogBoxIndirectParamA
XCEDispatchMessageA
XCEDuplicateHandle
XCEEnumFontFamilies
XCEExecuteProcessA
XCEExitProcess
XCEExtCreatePen
XCEExtTextOutA
XCEFillRect
XCEFindFirstFileA
XCEFindFirstFileW
XCEFindNextFileA
XCEFindNextFileW
XCEFindResourceA
XCEFindWindowA
XCEFormatMessageA
XCEFreeEnvironmentStrings
XCEGetCharABCWidthsA
XCEGetCharABCWidthsW
XCEGetCharWidthA
XCEGetCharWidthW
XCEGetCommandLineA
XCEGetComputerNameA
XCEGetCurrentDirectoryA
XCEGetCurrentDirectoryW
XCEGetCurrentRootDirectoryA
XCEGetCurrentRootDirectoryW
XCEGetDesktopWindow
XCEGetDiskFreeSpaceExA
XCEGetDlgItemTextA
XCEGetEnvironmentStrings
XCEGetEnvironmentVariableA
XCEGetEnvironmentVariableFromRegA
XCEGetFileAttributesA
XCEGetFileAttributesW
XCEGetFileInformationByHandle
XCEGetFileType
XCEGetFontData
XCEGetFullPathNameA
XCEGetMessageA
XCEGetModuleFileNameA
XCEGetModuleHandleA
XCEGetObjectA
XCEGetOpenFileNameA
XCEGetProcAddressA
XCEGetRegStringA
XCEGetSaveFileNameA
XCEGetScrollPos
XCEGetShortPathNameA
XCEGetStdHandle
XCEGetSystemTimeAsFileTime
XCEGetTempFileNameA
XCEGetTempPathA
XCEGetTextCharset
XCEGetTextExtentExPointA
XCEGetTextExtentPoint32A
XCEGetTextExtentPoint32W
XCEGetTextFaceA
XCEGetTextMetricsA
XCEGetUnixPath
XCEGetUserNameA
XCEGetVersion
XCEGetVersionExA
XCEGetVolumeInformationA
XCEGetWindowLongA
XCEGetWindowPlacement
XCEGetWindowTextA
XCEInsertMenuA
XCEIsIconic
XCEIsZoomed
XCELoadCursorA
XCELoadIconA
XCELoadLibraryA
XCEMakeUnicode
XCEMapVirtualKeyA
XCEMessageBoxA
XCEMoveFileA
XCEMoveFileW
XCEMoveWindow
XCEMulDiv
XCEOutputDebugStringA
XCEPeekMessageA
XCEPostMessageA
XCEPostThreadMessageA
XCEReadFile
XCERegEnumValueA
XCERegOpenKeyExA
XCERegQueryValueExA
XCERegSetValueExA
XCERegisterClassA
XCERemoveDirectoryA
XCERemoveDirectoryW
XCESearchPathA
XCESendDlgItemMessageA
XCESendMessageA
XCESetCurrentDirectoryA
XCESetCurrentDirectoryW
XCESetCurrentRootDirectoryA
XCESetCurrentRootDirectoryW
XCESetDlgItemTextA
XCESetEnvironmentVariableInRegA
XCESetErrorMode
XCESetFileAttributesA
XCESetFileAttributesW
XCESetRegStringA
XCESetScrollPos
XCESetStdHandle
XCESetWindowLongA
XCESetWindowTextA
XCEShowMessageA
XCEShowMessageW
XCEShowNormalCursor
XCEShowWaitCursor
XCEStretchDIBits
XCETextOutA
XCETextOutW
XCEToAscii
XCEToDosPath
XCEToUnixPath
XCETrace
XCETraceW
XCEUnregisterClassA
XCEUtil_VkToScancode
XCEVkKeyScan
XCEWaitProcess
XCEWriteFile
XCElstrcmpA
XCElstrcmpiA
XCElstrcpyA
XCElstrcpynA
XCEwsprintfA
XXCreatePipe
__xceargc
__xceargv
_getptd
_timezone
_xcebeginthread
_xcebeginthreadex
_xceendthread
_xceendthreadex
_xcetzset
environ
palm_clearerr
palm_fclose
palm_fcloseall
palm_fdopen
palm_feof
palm_ferror
palm_fflush
palm_fgetc
palm_fgetmode
palm_fgetpos
palm_fgets
palm_fileno
palm_flushall
palm_fopen
palm_fprintf
palm_fputc
palm_fputs
palm_fread
palm_freopen
palm_fseek
palm_fsetmode
palm_fsetpos
palm_ftell
palm_fwrite
palm_getc
palm_getchar
palm_gets
palm_printf
palm_putc
palm_putchar
palm_puts
palm_rewind
palm_setvbuf
palm_stderr
palm_stdin
palm_stdout
palm_ungetc
palm_vfprintf
palm_vprintf
pipe_read
pipe_write
xceabort
xceaccept
xceaccess
xcealarm
xceascii2addr
xceasctime
xceatof
xcebcmp
xcebcopy
xcebind
xcebsearch
xcebzero
xcecalloc
xcechdir
xcechmod
xcechown
xcechroot
xcechsize
xceclose
xceclosedir
xcecloselog
xceclosesocket
xceconnect
xceconnectlog
xcecreat
xcectime
xcedllinit
xcedup
xcedup2
xceendpwent
xceendusershell
xceexecl
xceexecvp
xceexit
xcefclose
xcefnmatch
xcefopen
xcefreopen
xcefstat
xceftime
xceftruncate
xcefutime
xceget_osfhandle
xcegetcwd
xcegetegid
xcegetenv
xcegeteuid
xcegetgid
xcegetlogin
xcegetopt
xcegetpass
xcegetpeername
xcegetpid
xcegetprotobyname
xcegetprotobynumber
xcegetpwent
xcegetpwnam
xcegetpwuid
xcegetservbyname
xcegetservbyport
xcegetsockname
xcegetsockopt
xcegettimeofday
xcegettimeofday_timer
xcegetuid
xcegetusershell
xceglob
xceglobfree
xcegmtime
xcehandleassert
xceindex
xceinet_aton
xceinit
xceinitconsole
xceioctlsocket
xceirda_getaddr
xceisatty
xcelisten
xcelocalhost
xcelocaltime
xcelocking
xcelogwtmp
xcelseek
xcemblen
xcembtowc
xcemkdir
xcemktemp
xcemktime
xceopen
xceopendir
xceopenlog
xceopenw
xcepclose
xceperror
xcepipe
xcepopen
xceprinterror
xceputenv
xceputpwent
xceraise
xcercmd
xceread
xcereaddir
xcerecv
xcerecvfrom
xceremove
xcerename
xcerexec
xcerindex
xcermdir
xceselect
xcesend
xcesendto
xcesetegid
xceseteuid
xcesetgid
xcesetlocale
xcesetpwent
xcesetsockopt
xcesetuid
xceshutdown
xcesignal
xcesleep
xcesnprintf
xcesocket
xcestat
xcestrcasecmp
xcestrcmpi
xcestrcoll
xcestrdup
xcestrerror
xcestrftime
xcestricmp
xcestrlwr
xcestrncasecmp
xcestrndup
xcestrnicmp
xcestrpbrk
xcestrrchr
xcestrsep
xcestrspn
xcestrtod
xcestrtol
xcestrtoul
xcestrupr
xcesyslog
xcesystem
xcetime
xcetmpnam
xceumask
xceunlink
xceutime
xcevsyslog
xcewctomb
xcewinperror
xcewinstrerror
xcewrite
xcewserror
xcewsstart
xcewsstop
xcewsstrerror

'KB > 기타' 카테고리의 다른 글

Embedded Visual C++  (0) 2006.08.27
Verilog Simulator  (0) 2006.08.27
Hidden Markov model  (0) 2006.08.11
spin lock on x86  (0) 2006.07.28
컴파일러 설계 관련  (0) 2006.07.19

+ Recent posts