Part Number: MSP430G2553
Tool/software: TI C/C++ Compiler
My code works fine, but takes additional ~ 700bytes. I am not gcc expert. How not to link the runtime library?
Code:
#include<msp430g2553.h>
int main(void){
WDTCTL = WDTPW | WDTHOLD;
P1DIR = BIT0;
P1OUT = BIT0;
while(1);//never exits
}
|
Compiling command line: msp430-elf-gcc -O2 -g mycode.c -o mycode.o
objdump result:
| Disassembly of section .text: 0000c00c <__crt0_start>: c00c: 31 40 00 04 mov #1024, r1 ;#0x0400 0000c010 <__crt0_init_bss>: c010: 3c 40 02 02 mov #514, r12 ;#0x0202 ... ... ... ... |