Andes Workshop

It is currently Fri Mar 29, 2024 2:05 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Error message when compile C extension program
PostPosted: Tue Dec 24, 2013 5:40 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
If we get an error message when compiling C extension program, like the following message:
Code:
./src/interrupt-c-ext.o:(.rodata+0x4): undefined reference to `_nds32_vector_01'
./src/interrupt-c-ext.o:(.rodata+0x8): undefined reference to `_nds32_vector_02'
./src/interrupt-c-ext.o:(.rodata+0xc): undefined reference to `_nds32_vector_03'
./src/interrupt-c-ext.o:(.rodata+0x10): undefined reference to `_nds32_vector_04'
......
./src/interrupt-c-ext.o: In function `_nds32_vector_00':
(.nds32_vector.00+0x0): undefined reference to `_nds32_reset'
./src/interrupt-c-ext.o: In function `_nds32_vector_09':
(.nds32_vector.09+0xa): undefined reference to `_nds32_i_ps_nn'
./src/interrupt-c-ext.o: In function `_nds32_vector_10':
(.nds32_vector.10+0xa): undefined reference to `_nds32_i_ps_nr'
./src/interrupt-c-ext.o: In function `_nds32_vector_15':
......


We should add a library to solve this problem.
nds32le-elf-gcc -O0 -nostartfiles -static -T"../nds32-c-ext.ld" -o "demo-int-c-ext.adx" ./src/init-default.o ./src/init-soc.o ./src/interrupt-c-ext.o ./src/main-c-ext.o ./src/uart.o -lnds32_isr
Finished building target: demo-int-c-ext.adx

In AndeSight, we can add the option in ld setting.
Attachment:
1.gif
1.gif [ 18.24 KiB | Viewed 6411 times ]


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group