Jump to content
Sign in to follow this  
attdona

mspgcc isr into archive library

Recommended Posts

When I insert into an archive library the interrupt services does not appears into the target elf.

 

I reproduced with a minimal gist the problem:

 

https://gist.github.com/attdona/0ef96f41155d780f70ef

 

The build recipe build_no_lib (mspgcc LTS 20120406 unpatched):

 

msp430-gcc -Os -fno-strict-aliasing -g -Wall -mmcu=msp430f5438 -std=gnu99 -c -o isr.o isr.c
msp430-gcc -Os -fno-strict-aliasing -g -Wall -mmcu=msp430f5438 -std=gnu99 -c -o main.o main.c
msp430-gcc ./isr.o ./main.o -mmcu=msp430f5438 -o "main-nolib.elf"
 
create the right fw (.vectors OK e ISR OK)
 
whereas the recipe:
 
msp430-gcc -Os -fno-strict-aliasing -g -Wall -mmcu=msp430f5438 -std=gnu99 -c -o isr.o isr.c
msp430-ar rcf mylib.a isr.o
msp430-gcc -Os -fno-strict-aliasing -g -Wall -mmcu=msp430f5438 -std=gnu99 main.c mylib.a -o main-lib.elf

 

does not setup .vectors and the ISR in not included in the elf.

 

 

What I missing?

 

Attilio

 

Share this post


Link to post
Share on other sites

msp430-gcc -Os -fno-strict-aliasing -g -Wall -mmcu=msp430f5438 -std=gnu99 main.c mylib.a -o main-lib.elf -Wl,-uisr_port2

 

That will force isr_port2 to be linked from the lib. 

 

-rick

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...