gcc말고 armlink 에서 사용되는 Loadmap 에 대해 아시는 분 ?

johlim의 이미지

뜬금없이 arm 컴파일러 문제를 꺼내서 죄송합니다. 어디다 물어볼곳도 없고해서 문의드립니다.

일단 에러메시지부터 보여드리겠습니다.

armasm startup.s --cpu ARM920T
armcc --cpu ARM920T  -c main.c
armlink -o bootprj.elf startup.o main.o -ro-base 0x00000000 -rw-base 0x00010000
--scatter bootprj.map
Error: L6218E: Undefined symbol Image$$RO$$Limit (referred from startup.o).
Error: L6218E: Undefined symbol Image$$RW$$Base (referred from startup.o).
Error: L6218E: Undefined symbol Image$$ZI$$Base (referred from startup.o).
Error: L6218E: Undefined symbol Image$$ZI$$Limit (referred from startup.o).
Finished: 0 information, 0 warning and 4 error messages.
make:  Error code 129, while making 'bootprj.elf'

위 에러 메세지가 발생하는 Scatter 파일이의 내용입니다.
BOOT 0x0000	0x8000
	{
		EXEC_ROM 0x0000	0x8000
		{
			Startup.o(Init,+FIRST)
			*(+RO)
		}

		RAM 0x0010000 0x6000
		{
			* (+RW, +ZI)
		}
		
		HEAP +0 EMPTY 0x10000
		{
		}
	}


위 에러메세지를 피하려면 scatter 파일을 지정하는대신 armlink 호출시 command line옵션을 사용하면 되는데

전 꼭 파일을 지정해서 사용하고 싶거든요. 어떻게 해야 Undefined symbol Image$$RO$$Limit 와 같은 에러를 피할 수 있을까요 ?
Image$$RO$$Limit는 armlink가 기본적으로 제공하는 것으로 아는데 커맨드라인옵션을 사용할때는 문제가 없지만
위에서 언급한 map 파일을 사용하면 해 문제가 발생합니다.

뭘고쳐야 정상적으로 Image$$RO$$Limit 를 인식할 수 있을까요 ?
정상적인경우

command line :
armlink -o bootprj.elf startup.o main.o -ro-base 0x0000 -rw-base 0x00010000

bluecafe의 이미지

ARM Developer Suite [ADS]를 사용하신다면...
Scatterd Link 방식에서 위에 에러가나는 심볼은 없어졌습니다.
위에 언급하신 심볼은 Simple Image 인 경우에만 생성이 됩니다.
즉, Scatter File 을 사용하실 때는 위의 심볼을 사용 하실수 없습니다.

아래와 같은 Built in variable 을 사용해 보세요..

Symbol Description

Load$$region_name$$Base --> Load address of the region.
Image$$region_name$$Base --> Execution address of the region.
Image$$region_name$$Length --> Execution region length in bytes (multiple of 4).
Image$$region_name$$Limit --> Address of the byte beyond the end of the execution region.
Image$$region_name$$ZI$$Base --> Execution address of the ZI output section in this region.
Image$$region_name$$ZI$$Length --> Length of the ZI output section in bytes (multiple of 4).
Image$$region_name$$ZI$$Limit --> Address of the byte beyond the end of the ZI output section in the execution region.
johlim의 이미지

그런거였군여..

사용하지 못하는 것였다는 걸 알게되니 속이 시원하네요.

감사합니다.

p.s. 다시 문서를 찾아보니 이제사 눈에 들어오네요

Quote:

The output section symbols shown in Table 4-2 are generated if you use command-line
options to create a simple image.

A better tomorrow

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.