블로그 이미지
안녕1999

카테고리

전체 (3067)
자바스크립트 (20)
안드로이드 (14)
WebGL (4)
변비 (17)
정치,경제 (35)
C언어,ARM (162)
컴퓨터(PC, Note Book, 윈.. (41)
전자회로, PCB (27)
유머,안웃긴,GIF,동영상 (118)
국부론60 (71)
모듈(PCB) (3)
건강 (2)
FreeCAD (25)
PADS (43)
퇴직,퇴사,구직,취업 활동 (3)
C# (86)
엑셀 (8)
워드 (0)
LabView (6)
레고 (30)
FPGA (0)
Total
Today
Yesterday

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

최근에 올라온 글

gcc 컴파일러로 프로그램 작성하는 중에,
리스트파일을 확인해보니,
함수가 여기저기 조각 조각 널려있는게 아닌가?
원래 있어야할 위치에 없고, 말그대로, 조각 조각 널려져 있었다.
-O3 옵션을 주었다.
예)
void func1(int a)
{
    ...
void func1(int a)  <<---똑같은 함수명(코드는 다름. 호출변수등에 따라 달라지는듯)
{
    ...
void func2()
{
    ...
}
    ...


결론
===========
최적화 옵션을 주면, inline 표시를 안해도, 컴파일러가, 함수를 적당한 위치에,
함수를 용도에 맞게 조각 조각 내서(또는 통째로), 끼워넣어준다.
이는 함수 호출과 리턴할때 필요한 코드를 없애, 속도를 빠르게하고, 코드사이즈를 작게하는 효과가 있다.
최적화 옵션을 주어 컴파일한다면, 굳이 inline 표시를 안해도 될듯 싶다.
(그러나, inline 옵션을 주면, inline이 꼭 필요한 함수는 거의 대부분(?) inline 적용해줄것이다.)

Posted by 안녕1999
, |

'i'는 'include'의 약자인듯함.
prefix는 '접두어', '미리 준비된' 등으로 해석하면 될듯함.
-iprefix 옵션은 include 디렉토리를 설정하는듯 함.


https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html

 -iprefix prefix

Specify prefix as the prefix for subsequent -iwithprefix options. If the prefix represents a directory, you should include the final ‘/’. 

gcc 폴터에 있는 lib 폴더를 삭제하니, 컴파일 오류가 남.


arm-none-eabi-gcc: error: CreateProcess: No such file or directory

-iprefix XXXXXXXX\bin\../lib/gcc/arm-none-eabi/2.1.2/
-isysroot XXXXXXXX\bin\../arm-none-eabi


Posted by 안녕1999
, |

부트로더 주소설정방법

LinkerScript.ld


SECTIONS

{

  .boot_loader :

  {

    . = ALIGN(4);

    KEEP(*(.boot_loader)) /* Startup code */

    . = 0x4000;

  } >FLASH


   /* The startup code goes first into FLASH */

  .isr_vector :

  {

    . = ALIGN(4);

    KEEP(*(.isr_vector)) /* Startup code */

    . = ALIGN(4);

  } >FLASH





Generate binary file

Generate hex file

main.o  :

section               size         addr

.boot_loader         16384    134217728 <<====0x8000000

.isr_vector            388    134234112 <<====0x8004000

.text                43480    134234500

.ARM.attributes         41            0



부트로더가 없다면, 실행되지 않는다. 부트로더에서 호출해주어야 실행된다.








SECTIONS

{

  .boot_loader :

  {

    . = ALIGN(4);

    KEEP(*(.boot_loader)) /* Startup code */

    . = 0x0000;

  } >FLASH


   /* The startup code goes first into FLASH */

  .isr_vector :

  {

    . = ALIGN(4);

    KEEP(*(.isr_vector)) /* Startup code */

    . = ALIGN(4);

  } >FLASH




Generate binary file

Generate hex file

main.o  :

section               size         addr

.boot_loader             0    134217728 <<===0x8000000

.isr_vector            388    134217728 <<===0x8000000

.text                43480    134218116

.ARM.attributes         41            0

.init_array              8    134261596


Posted by 안녕1999
, |

warning: iteration 15u invokes undefined behavior [-Waggressive-loop-optimizations]


iteration : 되풀이

invokes : 호출

undefined : 정의되지 않은

behavior : 동작

aggressive : 적극적인


원인

for루프에서 비트필드 값을 참조했다.

루프문에서 비트필드값을 반복하여 참조하므로, 경고 메세지가 뜬것이다.

물론, 동일한 변수가 아니였다.

그러나 진짜 원인은 배열의 참조값을 벗어났기때문이었다.


gcc버젼은

arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.9.3 20150303 (release) [ARM/embedded-4_9-branch revision 221220]


Posted by 안녕1999
, |

임베디드 mcu프로그램을 하기위해,

gcc arm 컴파일러를 준비하고,


compile.bat 파일을 만들어, 컴파일 할 수 있게 설정했다.


VC++6.0에서는 MakeFile 프로젝트를 만들어서, 아래와 같이

배치파일을 넣어준다.


Debug모드 : Build command line = compile.bat

Release모드 : Build command line = DownLoad_main_HEX.bat


VC++ 6.0에서

Debug모드로 컴파일하면, 컴파일이 되고,

Release모드로 컴파일하면, 다운로딩이 된다.


장점

- 프로젝트를 WIN32환경으로도 구축하여, WIN32에서 알고리즘 동작테스트 후,

  gcc로 컴파일하여 다운로딩하면, 개발 시간을 단축할 수 있다.

  gcc등으로 "컴파일 -> 다운로딩 -> 테스트 -> 수정 -> ..." 무한반복을

  "WIN32에서 알고리즘 동작테스트 -> gcc컴파일 -> 다운로드"

- 도스창(배치파일)로 컴파일하는것 보다는 훨씬 편하다.

- 도스창에 나오는 내용은 Build창에 나온다.


단점

- VC++ 6.0 사용하는 사람이 적음

- 도스창에 나오는 내용중, 진행상황을 표시하는것은, 완료가 되어야 나온다.

  예) 다운로딩



VC++ 6.0자체가 가볍지는 않고, 유료 프로그램이라서,

약간 부담은 되나,

크로스컴파일러를 설치하고, 해당 컴파일러 환경을 사용하는데, 불편한 사람들

(즉, VC++ 6.0이 익숙한 사람들)에게는 좋은 환경이된다.



VC++ 6.0의 편집툴(IDE)은 비교적 가볍고, 검은색 배경으로 설정하면,

눈도 덜아프다.(색상 조절이 잘되는편)


현재 나온 대부분의 크로스컴파일러들은 VS 2005와 비슷한 IDE를 가지고 있으며,

무겁고, 색상, 폰트 변경이 조금만 되는 것들이 많다.



WIN32, gcc 크로스컴파일 환경 구축방법

==================================

WIN32 프로젝트를 만들고, 위에서처럼, MakeFile 프로젝트를 추가하면 된다.

Posted by 안녕1999
, |

STMicroelectronics flash loader.exe


STMicroelectronics HEX 파일

:020000040800F2

:10000000900B00202DD20008DDB60008DFB60008F6

:10001000E1B60008E3B60008E5B6000800000000FD

:10002000000000000000000000000000E7B600082B

:10003000E9B6000800000000EBB60008EDB60008C5

:10004000B5D20008F5B60008BDD200088FBA000886

:10005000C5D20008C9D20008CDD2000819B70008DF

:10006000D5D20008D9D20008DDD20008E1D20008BC

:10007000E5D20008E9D20008EDD20008F1D200086C

:10008000F5D20008F9D20008FDD2000801D300081B

:1000900005D3000809D300080DD3000811D30008C8

:1000A00015D3000819D300081DD3000821D3000878



gcc HEX파일(verilog)

arm-none-eabi-objcopy -S main.o -O verilog ..\main.hex

@08000000

00 00 02 20 C1 68 00 08 21 08 00 08 25 08 00 08 

29 08 00 08 2D 08 00 08 31 08 00 08 00 00 00 00 

00 00 00 00 00 00 00 00 00 00 00 00 35 08 00 08 

39 08 00 08 00 00 00 00 3D 08 00 08 41 08 00 08 

05 69 00 08 51 08 00 08 05 69 00 08 A1 0B 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 79 08 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

85 08 00 08 05 09 00 08 45 0A 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 D9 0B 00 08 85 0C 00 08 31 0D 00 08 

D5 0B 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 D1 0B 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 05 69 00 08 05 69 00 08 05 69 00 08 

05 69 00 08 

@08000184

10 B5 05 4C 23 78 33 B9 04 4B 13 B1 04 48 AF F3 

00 80 01 23 23 70 10 BD A0 04 00 20 00 00 00 00 

84 01 00 08 08 4B 10 B5 1B B1 08 48 08 49 AF F3 

00 80 08 48 03 68 03 B9 10 BD 07 4B 00 2B FB D0  



gcc HEX파일(ihex 인텔헥사파일)

arm-none-eabi-objcopy -S main.o -O ihex ..\main.hex

:020000040800F2

:1000000000000220496900082108000825080008AE

:10001000290800082D080008310800080000000029

:10002000000000000000000000000000350800088B

:1000300039080008000000003D08000841080008D9

:100040008D690008510800088D690008A10B00089F

:100050008D6900088D6900088D690008790800081D

:100060008D6900088D6900088D6900088D69000898

:100070008D6900088D6900088D6900088D69000888

:100080008D6900088D6900088D6900088D69000878

:100090008D6900088D6900088D6900088D69000868

:1000A0008D6900088D6900088D6900088D69000858

:1000B0008508000805090008450A00088D69000840

:1000C0008D6900088D6900088D6900088D69000838

:1000D0008D690008D90B0008850C0008310D000857

:1000E000D50B00088D6900088D6900088D6900082E

:1000F0008D6900088D6900088D6900088D69000808

:100100008D6900088D6900088D6900088D690008F7

:100110008D6900088D6900088D6900088D690008E7

:100120008D6900088D6900088D6900088D690008D7

:100130008D6900088D6900088D6900088D690008C7

:100140008D6900088D6900088D690008D10B0008D1

:100150008D6900088D6900088D6900088D690008A7

:100160008D6900088D6900088D6900088D69000897

:100170008D6900088D6900088D6900088D69000887

:040180008D6900087D

:1001840010B5054C237833B9044B13B10448AFF3CD 





Posted by 안녕1999
, |

gcc컴파일러에, 사용하지 않는 변수를 경고나 에러처리할 수 있는 기능이 있나?



Posted by 안녕1999
, |

How to remove unused C/C++ symbols with GCC and ld?


gcc컴파일시, 사용하지 않는 함수도 코드사이즈에 포함되어, 불필요하게 코드사이즈가 증가된다.

사용하지 않는 함수는 제거할 수 있는 옵션이 있나?


-fdata-sections -ffunction-sections -Wl,--gc-sections 옵션 추가하면됨.


69,156 => 28,976가 되었음

Posted by 안녕1999
, |

임베디드용 프로그램은 컴파일된 코드사이즈가 작을 수 록 좋다.

보통 printf등의 함수를 사용하면, 수십kb 이상 파일크기가 증가한다.

약 68kbyte인 상태

=================
Generate binary file
Generate hex file
main.o  :
section               size         addr
.isr_vector            388    134217728
.text                67288    134218116
.eh_frame                4    134285404
.ARM                     8    134285408
.ARM.attributes         41            0
.init_array              8    134285416
.fini_array              4    134285424
.data                 1204    536870912
.jcr                     4    536872116
.fsmc_sram_data          0   1677721600
.fsmc_sram_bss           0   1677721600
.fsmc_sram_perma         0   1677721600
.bss                  2128    536872120
._user_heap_stack     1536    536874248
.factory_values          0    135264256
.debug_info         117485            0
.debug_abbrev         3591            0
.debug_loc          114940            0
.debug_aranges         176            0
.debug_ranges        21624            0
.debug_line          29503            0
.debug_str           20683            0
.comment               112            0
.debug_frame         14992            0
Total               395719
   text    data     bss     dec     hex filename
  67688    1220    3664   72572   11b7c main.o
 D 드라이브의 볼륨: D
 볼륨 일련 번호: 1473-2495
 D:\ARM\DP3000\DP3000 디렉터리
2016-09-09  오후 04:57            68,908 main.bin

printf함수대신, puts등을 여러번 사용하여 구현하기도 한다.

또는 %d, %s등만 구현이 되는 간단한 printf함수를 만들어 사용하기도 한다.


또한, printf, puts등에 사용된 문자열도 코드사이즈 증가에 한몫한다.

가는하면, 디버깅이 끝나면, 주석문으로 처리하는것이 좋다.



컴파일된 함수의 기계어 코드사이즈를 확인할 수 있는 방법

Usage: arm-none-eabi-objdump  
 Display information from object .
 At least one of the following switches must be given:
  -a, --archive-headers    Display archive header information
  -f, --file-headers       Display the contents of the overall file header
  -p, --private-headers    Display object format specific file header contents
  -P, --private=OPT,OPT... Display object format specific contents
  -h, --[section-]headers  Display the contents of the section headers
  -x, --all-headers        Display the contents of all headers
  -d, --disassemble        Display assembler contents of executable sections
  -D, --disassemble-all    Display assembler contents of all sections
  -S, --source             Intermix source code with disassembly
  -s, --full-contents      Display the full contents of all sections requested
  -g, --debugging          Display debug information in object file
  -e, --debugging-tags     Display debug information using ctags style
  -G, --stabs              Display (in raw form) any STABS info in the file
  -W[lLiaprmfFsoRt] or
  --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,
          =frames-interp,=str,=loc,=Ranges,=pubtypes,
          =gdb_index,=trace_info,=trace_abbrev,=trace_aranges,
          =addr,=cu_index]
                           Display DWARF info in the file
  -t, --syms               Display the contents of the symbol table(s)
  -T, --dynamic-syms       Display the contents of the dynamic symbol table
  -r, --reloc              Display the relocation entries in the file
  -R, --dynamic-reloc      Display the dynamic relocation entries in the file
  @                  Read options from 
  -v, --version            Display this program's version number
  -i, --info               List object formats and architectures supported
  -H, --help               Display this information


arm-none-eabi-objdump -S -h -d main.o > ..\main.lst
Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .isr_vector   00000184  08000000  08000000  00008000  2**0
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  1 .text         000106d8  08000184  08000184  00008184  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, CODE
  2 .eh_frame     00000004  0801085c  0801085c  0001885c  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  3 .ARM          00000008  08010860  08010860  00018860  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
  4 .ARM.attributes 00000029  00000000  00000000  000204b8  2**0
                  CONTENTS, READONLY
  5 .init_array   00000008  08010868  08010868  00018868  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  6 .fini_array   00000004  08010870  08010870  00018870  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  7 .data         000004b4  20000000  08010874  00020000  2**3
                  CONTENTS, ALLOC, LOAD, DATA
  8 .jcr          00000004  200004b4  08010d28  000204b4  2**2
                  CONTENTS, ALLOC, LOAD, DATA
  9 .fsmc_sram_data 00000000  64000000  64000000  000204e1  2**0
                  CONTENTS
 10 .fsmc_sram_bss 00000000  64000000  64000000  000204e1  2**0
                  CONTENTS
 11 .fsmc_sram_perma 00000000  64000000  64000000  000204e1  2**0
                  CONTENTS
 12 .bss          00000850  200004b8  200004b4  000204b8  2**2
                  ALLOC
 13 ._user_heap_stack 00000600  20000d08  2001fa00  00020d08  2**0
                  ALLOC
 14 .factory_values 00000000  080ff800  080ff800  000204e1  2**0
                  CONTENTS
 15 .debug_info   0001caed  00000000  00000000  000204e1  2**0
                  CONTENTS, READONLY, DEBUGGING
 16 .debug_abbrev 00000e07  00000000  00000000  0003cfce  2**0
                  CONTENTS, READONLY, DEBUGGING
 17 .debug_loc    0001c0fc  00000000  00000000  0003ddd5  2**0
                  CONTENTS, READONLY, DEBUGGING
 18 .debug_aranges 000000b0  00000000  00000000  00059ed8  2**3
                  CONTENTS, READONLY, DEBUGGING
 19 .debug_ranges 00005478  00000000  00000000  00059f88  2**3
                  CONTENTS, READONLY, DEBUGGING
 20 .debug_line   0000733f  00000000  00000000  0005f400  2**0
                  CONTENTS, READONLY, DEBUGGING
 21 .debug_str    000050cb  00000000  00000000  0006673f  2**0
                  CONTENTS, READONLY, DEBUGGING
 22 .comment      00000070  00000000  00000000  0006b80a  2**0
                  CONTENTS, READONLY
 23 .debug_frame  00003a90  00000000  00000000  0006b87c  2**2
                  CONTENTS, READONLY, DEBUGGING

Disassembly of section .text:

08000184 <__do_global_dtors_aux>:
 8000184:	b510      	push	{r4, lr}
 8000186:	4c05      	ldr	r4, [pc, #20]	; (800019c <__do_global_dtors_aux+0x18>)
 8000188:	7823      	ldrb	r3, [r4, #0]
 800018a:	b933      	cbnz	r3, 800019a <__do_global_dtors_aux+0x16>
 800018c:	4b04      	ldr	r3, [pc, #16]	; (80001a0 <__do_global_dtors_aux+0x1c>)
 800018e:	b113      	cbz	r3, 8000196 <__do_global_dtors_aux+0x12>
 8000190:	4804      	ldr	r0, [pc, #16]	; (80001a4 <__do_global_dtors_aux+0x20>)
 8000192:	f3af 8000 	nop.w
 8000196:	2301      	movs	r3, #1
 8000198:	7023      	strb	r3, [r4, #0]
 800019a:	bd10      	pop	{r4, pc}
 800019c:	200004b8 	.word	0x200004b8
 80001a0:	00000000 	.word	0x00000000
 80001a4:	0801085c 	.word	0x0801085c

080001a8 <frame_dummy>:
 80001a8:	4b08      	ldr	r3, [pc, #32]	; (80001cc <frame_dummy+0x24>)
 80001aa:	b510      	push	{r4, lr}
 80001ac:	b11b      	cbz	r3, 80001b6 <frame_dummy+0xe>
 80001ae:	4808      	ldr	r0, [pc, #32]	; (80001d0 <frame_dummy+0x28>)
 80001b0:	4908      	ldr	r1, [pc, #32]	; (80001d4 <frame_dummy+0x2c>)
 80001b2:	f3af 8000 	nop.w
 80001b6:	4808      	ldr	r0, [pc, #32]	; (80001d8 <frame_dummy+0x30>)
 80001b8:	6803      	ldr	r3, [r0, #0]
 80001ba:	b903      	cbnz	r3, 80001be <frame_dummy+0x16>
 80001bc:	bd10      	pop	{r4, pc}
 80001be:	4b07      	ldr	r3, [pc, #28]	; (80001dc <frame_dummy+0x34>)
 80001c0:	2b00      	cmp	r3, #0
 80001c2:	d0fb      	beq.n	80001bc <frame_dummy+0x14>
 80001c4:	e8bd 4010 	ldmia.w	sp!, {r4, lr}
 80001c8:	4718      	bx	r3
 80001ca:	bf00      	nop
 80001cc:	00000000 	.word	0x00000000
 80001d0:	0801085c 	.word	0x0801085c
 80001d4:	200004bc 	.word	0x200004bc
 80001d8:	200004b4 	.word	0x200004b4
 80001dc:	00000000 	.word	0x00000000

080001e0 <_mainCRTStartup>:
 80001e0:	4b15      	ldr	r3, [pc, #84]	; (8000238 <_mainCRTStartup+0x58>)
 80001e2:	2b00      	cmp	r3, #0
 80001e4:	bf08      	it	eq
 80001e6:	4b13      	ldreq	r3, [pc, #76]	; (8000234 <_mainCRTStartup+0x54>)
 80001e8:	469d      	mov	sp, r3
 80001ea:	f5a3 3a80 	sub.w	sl, r3, #65536	; 0x10000
 80001ee:	2100      	movs	r1, #0
 80001f0:	468b      	mov	fp, r1
 80001f2:	460f      	mov	r7, r1
 80001f4:	4813      	ldr	r0, [pc, #76]	; (8000244 <_mainCRTStartup+0x64>)
 80001f6:	4a14      	ldr	r2, [pc, #80]	; (8000248 <_mainCRTStartup+0x68>)
 80001f8:	1a12      	subs	r2, r2, r0
 80001fa:	f010 f819 	bl	8010230 <memset>
 80001fe:	4b0f      	ldr	r3, [pc, #60]	; (800023c <_mainCRTStartup+0x5c>)
 8000200:	2b00      	cmp	r3, #0
 8000202:	d000      	beq.n	8000206 <_mainCRTStartup+0x26>
 8000204:	4798      	blx	r3
 8000206:	4b0e      	ldr	r3, [pc, #56]	; (8000240 <_mainCRTStartup+0x60>)
 8000208:	2b00      	cmp	r3, #0
 800020a:	d000      	beq.n	800020e <_mainCRTStartup+0x2e>
 800020c:	4798      	blx	r3
 800020e:	2000      	movs	r0, #0
 8000210:	2100      	movs	r1, #0
 8000212:	0004      	movs	r4, r0
 8000214:	000d      	movs	r5, r1
 8000216:	480d      	ldr	r0, [pc, #52]	; (800024c <_mainCRTStartup+0x6c>)
 8000218:	2800      	cmp	r0, #0
 800021a:	d002      	beq.n	8000222 <_mainCRTStartup+0x42>
 800021c:	480c      	ldr	r0, [pc, #48]	; (8000250 <_mainCRTStartup+0x70>)
 800021e:	f010 f8f7 	bl	8010410 <atexit>
 8000222:	f00f ffdd 	bl	80101e0 <__libc_init_array>
 8000226:	0020      	movs	r0, r4
 8000228:	0029      	movs	r1, r5
 800022a:	f00f ff5d 	bl	80100e8 <main>
 800022e:	f00f ffc7 	bl	80101c0 <exit>
 8000232:	bf00      	nop
 8000234:	00080000 	.word	0x00080000
	...
 8000244:	200004b8 	.word	0x200004b8
 8000248:	20000d08 	.word	0x20000d08
 800024c:	08010411 	.word	0x08010411
 8000250:	0801041d 	.word	0x0801041d


symbol table에서 각 함수의 크기를 확인할 수 있다.

크기가 큰 함수나, 불필요한 함수는 제거하자.

arm-none-eabi-objdump -S -h -d -t main.o > ..\main.lst
SYMBOL TABLE:
08000000 l    d  .isr_vector	00000000 .isr_vector
08000184 l    d  .text	00000000 .text
0801085c l    d  .eh_frame	00000000 .eh_frame
08010860 l    d  .ARM	00000000 .ARM
00000000 l    d  .ARM.attributes	00000000 .ARM.attributes
08010868 l    d  .init_array	00000000 .init_array
08010870 l    d  .fini_array	00000000 .fini_array
20000000 l    d  .data	00000000 .data
200004b4 l    d  .jcr	00000000 .jcr
64000000 l    d  .fsmc_sram_data	00000000 .fsmc_sram_data
64000000 l    d  .fsmc_sram_bss	00000000 .fsmc_sram_bss
64000000 l    d  .fsmc_sram_perma	00000000 .fsmc_sram_perma
200004b8 l    d  .bss	00000000 .bss
20000d08 l    d  ._user_heap_stack	00000000 ._user_heap_stack
080ff800 l    d  .factory_values	00000000 .factory_values
00000000 l    d  .debug_info	00000000 .debug_info
00000000 l    d  .debug_abbrev	00000000 .debug_abbrev
00000000 l    d  .debug_loc	00000000 .debug_loc
00000000 l    d  .debug_aranges	00000000 .debug_aranges
00000000 l    d  .debug_ranges	00000000 .debug_ranges
00000000 l    d  .debug_line	00000000 .debug_line
00000000 l    d  .debug_str	00000000 .debug_str
00000000 l    d  .comment	00000000 .comment
00000000 l    d  .debug_frame	00000000 .debug_frame
00000000 l    df *ABS*	00000000 C:\DOCUME~1\a\LOCALS~1\Temp\ccG34aLa.o
08010184 l       .text	00000000 LoopCopyDataInit
0801017c l       .text	00000000 CopyDataInit
08010198 l       .text	00000000 LoopFillZerobss
08010192 l       .text	00000000 FillZerobss
080101bc l       .text	00000000 Infinite_Loop
00000000 l    df *ABS*	00000000 d:/arm/bin/../lib/gcc/arm-none-eabi/4.9.3/armv7-m/crti.o
00000000 l    df *ABS*	00000000 crtstuff.c
0801085c l     O .eh_frame	00000000 __EH_FRAME_BEGIN__
200004b4 l     O .jcr	00000000 __JCR_LIST__
08000184 l     F .text	00000000 __do_global_dtors_aux
200004b8 l       .bss	00000000 completed.8108


Posted by 안녕1999
, |

In function `LoopFillZerobss':
startup_stm32f2xx.s:102: undefined reference to `SystemInit' 


#include "system_stm32f2xx.c" 추가하여 해결됨

Posted by 안녕1999
, |

최근에 달린 댓글

글 보관함