답변좀..해주세여~~꼭~(make)에서

익명 사용자의 이미지

make화일에서 여러개 화일을 만들거든여~~
**.elf을 통해서 **.rom 화일이 만들어 지는데~
format = ihex라~~intel hex값이 나옴니다~
혹시 binary값으로 바뀌게 할수있는 방법아시는분~
format = ~~~ 이 답일꺼..같은데~~
꼭좀..답좀..해주세여~~메일도..좋구여~
프래쉬에 프로그램을 다운로드 해야하는데`~hex값이 안읽혀져서~~
binary로 format해야겠는데~~제가..좀..이쪽분야에 아는게..없어서리~~
부탁합니다.!!!꼭좀 binary로 바꿀수있는 포맷을 갈쳐수세여~
그럼..~

익명 사용자의 이미지

이동한 wrote..
make화일에서 여러개 화일을 만들거든여~~
**.elf을 통해서 **.rom 화일이 만들어 지는데~
format = ihex라~~intel hex값이 나옴니다~
혹시 binary값으로 바뀌게 할수있는 방법아시는분~
format = ~~~ 이 답일꺼..같은데~~
꼭좀..답좀..해주세여~~메일도..좋구여~
프래쉬에 프로그램을 다운로드 해야하는데`~hex값이 안읽혀져서~~
binary로 format해야겠는데~~제가..좀..이쪽분야에 아는게..없어서리~~
부탁합니다.!!!꼭좀 binary로 바꿀수있는 포맷을 갈쳐수세여~
그럼..~
저두 잘 모르지만..

저두 지금까지 본 format이라고는 ihex하구..motorola어쩌구..format밖에

없는데요..

정 ihex로 출력된 hex파일을 binary로 바꾸고 싶으시다면..

간단한 프로그램을 짜서 바꿀수 있지 않을까요..?

#include
#include

void hex2bin(char *in,char *out)
{
char c;
int n,i;
while(c=*in) {
in++;
if(!isalnum(c)) {
*out=c;
out++;
continue;
}
if(isalpha(c)) n=0xa+toupper(c)-'A';
else if(isdigit(c)) n=c-'0';
for(i=3;i>=0;i--,out++) {
*out=n/(1< n=n%(1< }
}
*out='\0';
}

int main(int argc,char *argv[])
{
FILE *fpr,*fpw;
char filename[100];
char input[256+1];
char output[256*4+1];
if(argc < 2) {
exit(1);
}
fpr=fopen(argv[1],"r");
if(fpr==NULL) exit(1);
sprintf(filename,"%s.bin",argv[1]);
fpw=fopen(filename,"w");
if(fpw==NULL) exit(1);
while(fgets(input,256+1,fpr)!=NULL) {
hex2bin(input,output);
fputs(output,fpw);
}
fclose(fpr);
fclose(fpw);
return 0;
}

첫번째 인자로 hex파일을 주면..

파일명.bin 이란 bin파일이 생길겁니다..

잘되길 빕니당..

익명 사용자의 이미지

감사합니다~~
여하튼..한번..해봐야겠져~~~^^~
담에..또.~

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.